diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-11-30 03:58:58 +0400 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-11-30 04:28:04 +0400 |
commit | ee9d53e5726250295cfe0b9e67518fdd1475390e (patch) | |
tree | 49c8d062310d87707522dee0db6efdc3d084fce3 /libavcodec/mpeg4videodec.c | |
parent | 2d2b363c652403ac0bda129912e1910aacdaa3fc (diff) | |
parent | 48e139409556861c9e561ce34133891d8eecc3cf (diff) |
Merge commit '48e139409556861c9e561ce34133891d8eecc3cf'
* commit '48e139409556861c9e561ce34133891d8eecc3cf':
mpeg4videodec: move MpegEncContext.resync_marker into Mpeg4DecContext.
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/mpeg4videodec.c')
-rw-r--r-- | libavcodec/mpeg4videodec.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/libavcodec/mpeg4videodec.c b/libavcodec/mpeg4videodec.c index b7549fa04b..d5329ce7d8 100644 --- a/libavcodec/mpeg4videodec.c +++ b/libavcodec/mpeg4videodec.c @@ -109,12 +109,13 @@ void ff_mpeg4_pred_ac(MpegEncContext *s, int16_t *block, int n, int dir) * check if the next stuff is a resync marker or the end. * @return 0 if not */ -static inline int mpeg4_is_resync(MpegEncContext *s) +static inline int mpeg4_is_resync(Mpeg4DecContext *ctx) { + MpegEncContext *s = &ctx->m; int bits_count = get_bits_count(&s->gb); int v = show_bits(&s->gb, 16); - if (s->workaround_bugs & FF_BUG_NO_PADDING && !s->resync_marker) + if (s->workaround_bugs & FF_BUG_NO_PADDING && !ctx->resync_marker) return 0; while (v <= 0xFF) { @@ -1268,12 +1269,12 @@ static int mpeg4_decode_partitioned_mb(MpegEncContext *s, int16_t block[6][64]) /* per-MB end of slice check */ if (--s->mb_num_left <= 0) { - if (mpeg4_is_resync(s)) + if (mpeg4_is_resync(ctx)) return SLICE_END; else return SLICE_NOEND; } else { - if (mpeg4_is_resync(s)) { + if (mpeg4_is_resync(ctx)) { const int delta = s->mb_x + 1 == s->mb_width ? 2 : 1; if (s->cbp_table[xy + delta]) return SLICE_END; @@ -1632,7 +1633,7 @@ intra: end: /* per-MB end of slice check */ if (s->codec_id == AV_CODEC_ID_MPEG4) { - int next = mpeg4_is_resync(s); + int next = mpeg4_is_resync(ctx); if (next) { if (s->mb_x + s->mb_y*s->mb_width + 1 > next && (s->avctx->err_recognition & AV_EF_AGGRESSIVE)) { return -1; @@ -1968,7 +1969,7 @@ no_cplx_est: s->cplx_estimation_trash_b = 0; } - s->resync_marker = !get_bits1(gb); /* resync_marker_disabled */ + ctx->resync_marker = !get_bits1(gb); /* resync_marker_disabled */ s->data_partitioning = get_bits1(gb); if (s->data_partitioning) @@ -2315,7 +2316,7 @@ static int decode_vop_header(Mpeg4DecContext *ctx, GetBitContext *gb) s->pict_type == AV_PICTURE_TYPE_I ? "I" : (s->pict_type == AV_PICTURE_TYPE_P ? "P" : (s->pict_type == AV_PICTURE_TYPE_B ? "B" : "S")), gb->size_in_bits,s->progressive_sequence, s->alternate_scan, s->top_field_first, s->quarter_sample ? "q" : "h", - s->data_partitioning, s->resync_marker, + s->data_partitioning, ctx->resync_marker, s->num_sprite_warping_points, s->sprite_warping_accuracy, 1 - s->no_rounding, s->vo_type, s->vol_control_parameters ? " VOLC" : " ", s->intra_dc_threshold, |