[FFmpeg-cvslog] mpeg4videodec: move MpegEncContext.rvlc to Mpeg4DecContext
Anton Khirnov
git at videolan.org
Fri Nov 29 23:46:44 CET 2013
ffmpeg | branch: master | Anton Khirnov <anton at khirnov.net> | Tue Nov 26 11:23:16 2013 +0100| [bc5abfb19e7ff00b859120561d6ffd622c7904fe] | committer: Anton Khirnov
mpeg4videodec: move MpegEncContext.rvlc to Mpeg4DecContext
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=bc5abfb19e7ff00b859120561d6ffd622c7904fe
---
libavcodec/mpeg4video.h | 2 ++
libavcodec/mpeg4videodec.c | 4 ++--
libavcodec/mpegvideo.h | 1 -
libavcodec/vaapi_mpeg4.c | 2 +-
4 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/libavcodec/mpeg4video.h b/libavcodec/mpeg4video.h
index bda44e6..12a49f9 100644
--- a/libavcodec/mpeg4video.h
+++ b/libavcodec/mpeg4video.h
@@ -66,6 +66,8 @@ typedef struct Mpeg4DecContext {
int time_increment_bits;
int shape;
int vol_sprite_usage;
+ // reversible vlc
+ int rvlc;
} Mpeg4DecContext;
/* dc encoding for mpeg4 */
diff --git a/libavcodec/mpeg4videodec.c b/libavcodec/mpeg4videodec.c
index a14d269..65d51e2 100644
--- a/libavcodec/mpeg4videodec.c
+++ b/libavcodec/mpeg4videodec.c
@@ -1226,7 +1226,7 @@ static int mpeg4_decode_partitioned_mb(MpegEncContext *s, int16_t block[6][64])
s->dsp.clear_blocks(s->block[0]);
/* decode each block */
for (i = 0; i < 6; i++) {
- if (mpeg4_decode_block(s, block[i], i, cbp & 32, s->mb_intra, s->rvlc) < 0) {
+ if (mpeg4_decode_block(s, block[i], i, cbp & 32, s->mb_intra, ctx->rvlc) < 0) {
av_log(s->avctx, AV_LOG_ERROR,
"texture corrupted at %d %d %d\n",
s->mb_x, s->mb_y, s->mb_intra);
@@ -1935,7 +1935,7 @@ no_cplx_est:
s->data_partitioning = get_bits1(gb);
if (s->data_partitioning)
- s->rvlc = get_bits1(gb);
+ ctx->rvlc = get_bits1(gb);
if (vo_ver_id != 1) {
s->new_pred = get_bits1(gb);
diff --git a/libavcodec/mpegvideo.h b/libavcodec/mpegvideo.h
index 32ebe90..a83241a 100644
--- a/libavcodec/mpegvideo.h
+++ b/libavcodec/mpegvideo.h
@@ -599,7 +599,6 @@ typedef struct MpegEncContext {
int low_latency_sprite;
int data_partitioning; ///< data partitioning flag from header
int partitioned_frame; ///< is current frame partitioned
- int rvlc; ///< reversible vlc
int resync_marker; ///< could this stream contain resync markers
int low_delay; ///< no reordering needed / has no b-frames
int vo_type;
diff --git a/libavcodec/vaapi_mpeg4.c b/libavcodec/vaapi_mpeg4.c
index 7973a64..75bfb22 100644
--- a/libavcodec/vaapi_mpeg4.c
+++ b/libavcodec/vaapi_mpeg4.c
@@ -71,7 +71,7 @@ static int vaapi_mpeg4_start_frame(AVCodecContext *avctx, av_unused const uint8_
pic_param->vol_fields.bits.quant_type = s->mpeg_quant;
pic_param->vol_fields.bits.quarter_sample = s->quarter_sample;
pic_param->vol_fields.bits.data_partitioned = s->data_partitioning;
- pic_param->vol_fields.bits.reversible_vlc = s->rvlc;
+ pic_param->vol_fields.bits.reversible_vlc = ctx->rvlc;
pic_param->vol_fields.bits.resync_marker_disable = !s->resync_marker;
pic_param->no_of_sprite_warping_points = s->num_sprite_warping_points;
for (i = 0; i < s->num_sprite_warping_points && i < 3; i++) {
More information about the ffmpeg-cvslog
mailing list