#include "libavutil/samplefmt.h"
#include "libavutil/dict.h"
#include "avcodec.h"
+#include "decode.h"
#include "libavutil/opt.h"
#include "me_cmp.h"
#include "mpegvideo.h"
return 0;
}
-#if HAVE_SIMD_ALIGN_32
-# define STRIDE_ALIGN 32
-#elif HAVE_SIMD_ALIGN_16
-# 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])
{
+ size_t max_align = av_cpu_max_align();
int i;
int w_align = 1;
int h_align = 1;
*height += 2;
for (i = 0; i < 4; i++)
- linesize_align[i] = STRIDE_ALIGN;
+ linesize_align[i] = max_align;
}
void avcodec_align_dimensions(AVCodecContext *s, int *width, int *height)
avctx->hwaccel->uninit(avctx);
av_freep(&avctx->internal->hwaccel_priv_data);
+ ff_decode_bsfs_uninit(avctx);
+
av_freep(&avctx->internal);
}
avctx->nb_coded_side_data = 0;
av_buffer_unref(&avctx->hw_frames_ctx);
+ av_buffer_unref(&avctx->hw_device_ctx);
if (avctx->priv_data && avctx->codec && avctx->codec->priv_class)
av_opt_free(avctx->priv_data);