* utils.
*/
+#include "config.h"
#include "libavutil/avassert.h"
#include "libavutil/avstring.h"
#include "libavutil/channel_layout.h"
#define INTERNAL_BUFFER_SIZE (32 + 1)
+#if (ARCH_ARM && HAVE_NEON) || ARCH_PPC || HAVE_MMX
+# define STRIDE_ALIGN 16
+#else
+# define STRIDE_ALIGN 8
+#endif
+
void avcodec_align_dimensions2(AVCodecContext *s, int *width, int *height,
int linesize_align[AV_NUM_DATA_POINTERS])
{
buf->base[i] = av_malloc(size[i] + 16); //FIXME 16
if (buf->base[i] == NULL)
return -1;
- memset(buf->base[i], 128, size[i]);
// no edge if EDGE EMU or not planar YUV
if ((s->flags & CODEC_FLAG_EMU_EDGE) || !size[2])
} else if (avctx->channel_layout) {
avctx->channels = av_get_channel_layout_nb_channels(avctx->channel_layout);
}
+
+ if (!avctx->rc_initial_buffer_occupancy)
+ avctx->rc_initial_buffer_occupancy = avctx->rc_buffer_size * 3 / 4;
}
if (avctx->codec->init && !(avctx->active_thread_type & FF_THREAD_FRAME)) {
const short *samples)
{
AVPacket pkt;
- AVFrame frame0 = { 0 };
+ AVFrame frame0 = { { 0 } };
AVFrame *frame;
int ret, samples_size, got_packet;
int *frame_size_ptr,
AVPacket *avpkt)
{
- AVFrame frame = {0};
+ AVFrame frame = { { 0 } };
int ret, got_frame = 0;
if (avctx->get_buffer != avcodec_default_get_buffer) {