Browse code

mpeg4videodec: move enhancement_type from MpegEncContext to Mpeg4DecContext

Anton Khirnov authored on 2013/11/26 22:34:52
Showing 3 changed files
... ...
@@ -74,6 +74,7 @@ typedef struct Mpeg4DecContext {
74 74
     int t_frame;
75 75
 
76 76
     int new_pred;
77
+    int enhancement_type;
77 78
 
78 79
     /* bug workarounds */
79 80
     int divx_version;
... ...
@@ -1969,7 +1969,7 @@ no_cplx_est:
1969 1969
             h_sampling_factor_m = get_bits(gb, 5);
1970 1970
             v_sampling_factor_n = get_bits(gb, 5);
1971 1971
             v_sampling_factor_m = get_bits(gb, 5);
1972
-            s->enhancement_type = get_bits1(gb);
1972
+            ctx->enhancement_type = get_bits1(gb);
1973 1973
 
1974 1974
             if (h_sampling_factor_n == 0 || h_sampling_factor_m == 0 ||
1975 1975
                 v_sampling_factor_n == 0 || v_sampling_factor_m == 0) {
... ...
@@ -2253,7 +2253,7 @@ static int decode_vop_header(Mpeg4DecContext *ctx, GetBitContext *gb)
2253 2253
             if (ctx->shape != RECT_SHAPE && s->pict_type != AV_PICTURE_TYPE_I)
2254 2254
                 skip_bits1(gb);  // vop shape coding type
2255 2255
         } else {
2256
-            if (s->enhancement_type) {
2256
+            if (ctx->enhancement_type) {
2257 2257
                 int load_backward_shape = get_bits1(gb);
2258 2258
                 if (load_backward_shape)
2259 2259
                     av_log(s->avctx, AV_LOG_ERROR,
... ...
@@ -590,7 +590,6 @@ typedef struct MpegEncContext {
590 590
     int quant_precision;
591 591
     int quarter_sample;              ///< 1->qpel, 0->half pel ME/MC
592 592
     int scalability;
593
-    int enhancement_type;
594 593
     int aspect_ratio_info; //FIXME remove
595 594
     int sprite_warping_accuracy;
596 595
     int data_partitioning;           ///< data partitioning flag from header