#include "libavutil/internal.h"
#include "libavutil/mem_internal.h"
#include "libavutil/stereo3d.h"
+#include "libavutil/video_enc_params.h"
#include "avcodec.h"
#include "bytestream.h"
#include "mpegvideodata.h"
#include "profiles.h"
#include "thread.h"
-#include "version.h"
#include "xvmc_internal.h"
#define A53_MAX_CC_COUNT 2000
avctx->coded_width = avctx->coded_height = 0; // do not trust dimensions from input
ff_mpv_decode_init(s2, avctx);
- s->mpeg_enc_ctx.avctx = avctx;
-
/* we need some permutation to store matrices,
* until the decoder sets the real permutation. */
ff_mpv_idct_init(s2);
s->mpeg_enc_ctx_allocated = 0;
s->mpeg_enc_ctx.picture_number = 0;
s->repeat_field = 0;
- s->mpeg_enc_ctx.codec_id = avctx->codec->id;
avctx->color_range = AVCOL_RANGE_MPEG;
return 0;
}
tc = s-> timecode_frame_start = get_bits(&s->gb, 25);
-#if FF_API_PRIVATE_OPT
-FF_DISABLE_DEPRECATION_WARNINGS
- avctx->timecode_frame_start = tc;
-FF_ENABLE_DEPRECATION_WARNINGS
-#endif
-
s->closed_gop = get_bits1(&s->gb);
/* broken_link indicates that after editing the
* reference frames of the first B-Frames after GOP I-Frame
{
Mpeg1Context *s = avctx->priv_data;
- ff_mpv_common_end(&s->mpeg_enc_ctx);
+ if (s->mpeg_enc_ctx_allocated)
+ ff_mpv_common_end(&s->mpeg_enc_ctx);
av_buffer_unref(&s->a53_buf_ref);
return 0;
}
-AVCodec ff_mpeg1video_decoder = {
+const AVCodec ff_mpeg1video_decoder = {
.name = "mpeg1video",
.long_name = NULL_IF_CONFIG_SMALL("MPEG-1 video"),
.type = AVMEDIA_TYPE_VIDEO,
.capabilities = AV_CODEC_CAP_DRAW_HORIZ_BAND | AV_CODEC_CAP_DR1 |
AV_CODEC_CAP_TRUNCATED | AV_CODEC_CAP_DELAY |
AV_CODEC_CAP_SLICE_THREADS,
- .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP |
+ .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE |
FF_CODEC_CAP_SKIP_FRAME_FILL_PARAM,
.flush = flush,
.max_lowres = 3,
.update_thread_context = ONLY_IF_THREADS_ENABLED(mpeg_decode_update_thread_context),
- .hw_configs = (const AVCodecHWConfigInternal*[]) {
+ .hw_configs = (const AVCodecHWConfigInternal *const []) {
#if CONFIG_MPEG1_NVDEC_HWACCEL
HWACCEL_NVDEC(mpeg1),
#endif
},
};
-AVCodec ff_mpeg2video_decoder = {
+const AVCodec ff_mpeg2video_decoder = {
.name = "mpeg2video",
.long_name = NULL_IF_CONFIG_SMALL("MPEG-2 video"),
.type = AVMEDIA_TYPE_VIDEO,
.capabilities = AV_CODEC_CAP_DRAW_HORIZ_BAND | AV_CODEC_CAP_DR1 |
AV_CODEC_CAP_TRUNCATED | AV_CODEC_CAP_DELAY |
AV_CODEC_CAP_SLICE_THREADS,
- .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP |
+ .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE |
FF_CODEC_CAP_SKIP_FRAME_FILL_PARAM,
.flush = flush,
.max_lowres = 3,
.profiles = NULL_IF_CONFIG_SMALL(ff_mpeg2_video_profiles),
- .hw_configs = (const AVCodecHWConfigInternal*[]) {
+ .hw_configs = (const AVCodecHWConfigInternal *const []) {
#if CONFIG_MPEG2_DXVA2_HWACCEL
HWACCEL_DXVA2(mpeg2),
#endif
};
//legacy decoder
-AVCodec ff_mpegvideo_decoder = {
+const AVCodec ff_mpegvideo_decoder = {
.name = "mpegvideo",
.long_name = NULL_IF_CONFIG_SMALL("MPEG-1 video"),
.type = AVMEDIA_TYPE_VIDEO,
.close = mpeg_decode_end,
.decode = mpeg_decode_frame,
.capabilities = AV_CODEC_CAP_DRAW_HORIZ_BAND | AV_CODEC_CAP_DR1 | AV_CODEC_CAP_TRUNCATED | AV_CODEC_CAP_DELAY | AV_CODEC_CAP_SLICE_THREADS,
- .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE | FF_CODEC_CAP_INIT_CLEANUP |
+ .caps_internal = FF_CODEC_CAP_INIT_THREADSAFE |
FF_CODEC_CAP_SKIP_FRAME_FILL_PARAM,
.flush = flush,
.max_lowres = 3,
avctx->pix_fmt = AV_PIX_FMT_YUV420P;
ff_mpv_decode_init(m, avctx);
- s->m.avctx = avctx;
ff_mpv_idct_init(m);
ff_mpeg12_common_init(m);
ff_mpeg12_init_vlcs();
return 0;
}
-AVCodec ff_ipu_decoder = {
+const AVCodec ff_ipu_decoder = {
.name = "ipu",
.long_name = NULL_IF_CONFIG_SMALL("IPU Video"),
.type = AVMEDIA_TYPE_VIDEO,