vc1: move MpegEncContext.resync_marker into VC1Context.
authorAnton Khirnov <anton@khirnov.net>
Tue, 26 Nov 2013 11:18:44 +0000 (12:18 +0100)
committerAnton Khirnov <anton@khirnov.net>
Fri, 29 Nov 2013 13:19:47 +0000 (14:19 +0100)
The field still remains in MpegEncContext because it is used by the
mpeg4 decoder.

libavcodec/dxva2_vc1.c
libavcodec/mss2.c
libavcodec/vaapi_vc1.c
libavcodec/vc1.c
libavcodec/vc1.h
libavcodec/vdpau_vc1.c

index 4af3ce8..a72d91e 100644 (file)
@@ -97,7 +97,7 @@ static void fill_picture_parameters(AVCodecContext *avctx,
                                   (v->vstransform      );
     pp->bPicOverflowBlocks      = (v->quantizer_mode << 6) |
                                   (v->multires       << 5) |
-                                  (s->resync_marker  << 4) |
+                                  (v->resync_marker  << 4) |
                                   (v->rangered       << 3) |
                                   (s->max_b_frames       );
     pp->bPicExtrapolation       = (!v->interlace || v->fcm == PROGRESSIVE) ? 1 : 2;
index 0e5fd6d..d219b67 100644 (file)
@@ -779,7 +779,7 @@ static av_cold int wmv9_init(AVCodecContext *avctx)
 
     v->overlap         = 0;
 
-    v->s.resync_marker = 0;
+    v->resync_marker   = 0;
     v->rangered        = 0;
 
     v->s.max_b_frames = avctx->max_b_frames = 0;
index a9ab3c7..50cba16 100644 (file)
@@ -169,7 +169,7 @@ static int vaapi_vc1_start_frame(AVCodecContext *avctx, av_unused const uint8_t
     pic_param->sequence_fields.bits.psf                             = v->psf;
     pic_param->sequence_fields.bits.multires                        = v->multires;
     pic_param->sequence_fields.bits.overlap                         = v->overlap;
-    pic_param->sequence_fields.bits.syncmarker                      = s->resync_marker;
+    pic_param->sequence_fields.bits.syncmarker                      = v->resync_marker;
     pic_param->sequence_fields.bits.rangered                        = v->rangered;
     pic_param->sequence_fields.bits.max_b_frames                    = s->avctx->max_b_frames;
 #if VA_CHECK_VERSION(0,32,0)
index b701817..a78d23e 100644 (file)
@@ -367,7 +367,7 @@ int ff_vc1_decode_sequence_header(AVCodecContext *avctx, VC1Context *v, GetBitCo
 
     v->overlap         = get_bits1(gb); //common
 
-    v->s.resync_marker = get_bits1(gb);
+    v->resync_marker   = get_bits1(gb);
     v->rangered        = get_bits1(gb);
     if (v->rangered && v->profile == PROFILE_SIMPLE) {
         av_log(avctx, AV_LOG_INFO,
@@ -408,7 +408,7 @@ int ff_vc1_decode_sequence_header(AVCodecContext *avctx, VC1Context *v, GetBitCo
            "DQuant=%i, Quantizer mode=%i, Max B frames=%i\n",
            v->profile, v->frmrtq_postproc, v->bitrtq_postproc,
            v->s.loop_filter, v->multires, v->fastuvmc, v->extended_mv,
-           v->rangered, v->vstransform, v->overlap, v->s.resync_marker,
+           v->rangered, v->vstransform, v->overlap, v->resync_marker,
            v->dquant, v->quantizer_mode, avctx->max_b_frames);
     return 0;
 }
index d70e337..9db8edd 100644 (file)
@@ -401,6 +401,7 @@ typedef struct VC1Context{
     int end_mb_x;                ///< Horizontal macroblock limit (used only by mss2)
 
     int parse_only;              ///< Context is used within parser
+    int resync_marker;           ///< could this stream contain resync markers
 } VC1Context;
 
 /** Find VC-1 marker in buffer
index c21a861..b401352 100644 (file)
@@ -83,7 +83,7 @@ static int vdpau_vc1_start_frame(AVCodecContext *avctx,
     info->range_mapuv       = v->range_mapuv;
     /* Specific to simple/main profile only */
     info->multires          = v->multires;
-    info->syncmarker        = v->s.resync_marker;
+    info->syncmarker        = v->resync_marker;
     info->rangered          = v->rangered | (v->rangeredfrm << 1);
     info->maxbframes        = v->s.max_b_frames;
     info->deblockEnable     = v->postprocflag & 1;