diff options
author | Kostya Shishkov <kostya.shishkov@gmail.com> | 2008-01-18 07:04:11 +0000 |
---|---|---|
committer | Kostya Shishkov <kostya.shishkov@gmail.com> | 2008-01-18 07:04:11 +0000 |
commit | b008e6b869ae2b4cc0de36b9b21b81eca2b97ade (patch) | |
tree | a452f5e9fb7ab28dc084a6e46741b58e5e1e0819 /libavcodec/rv34.c | |
parent | 094c09bb4a58060f1be02c1fd6b44e0e144c206e (diff) | |
download | ffmpeg-streaming-b008e6b869ae2b4cc0de36b9b21b81eca2b97ade.zip ffmpeg-streaming-b008e6b869ae2b4cc0de36b9b21b81eca2b97ade.tar.gz |
Save coded block patterns for future loop filtering.
Originally committed as revision 11554 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/rv34.c')
-rw-r--r-- | libavcodec/rv34.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/libavcodec/rv34.c b/libavcodec/rv34.c index ac67fb9..dbbe445 100644 --- a/libavcodec/rv34.c +++ b/libavcodec/rv34.c @@ -1012,6 +1012,8 @@ static int rv34_decode_macroblock(RV34DecContext *r, int8_t *intra_types) s->qscale = r->si.quant; cbp = cbp2 = rv34_decode_mb_header(r, intra_types); + r->cbp_luma [s->mb_x + s->mb_y * s->mb_stride] = cbp; + r->cbp_chroma[s->mb_x + s->mb_y * s->mb_stride] = cbp >> 16; if(cbp == -1) return -1; @@ -1101,6 +1103,8 @@ static int rv34_decode_slice(RV34DecContext *r, int end, uint8_t* buf, int buf_s r->intra_types_hist = av_realloc(r->intra_types_hist, s->b4_stride * 4 * 2 * sizeof(*r->intra_types_hist)); r->intra_types = r->intra_types_hist + s->b4_stride * 4; r->mb_type = av_realloc(r->mb_type, r->s.mb_stride * r->s.mb_height * sizeof(*r->mb_type)); + r->cbp_luma = av_realloc(r->cbp_luma, r->s.mb_stride * r->s.mb_height * sizeof(*r->cbp_luma)); + r->cbp_chroma = av_realloc(r->cbp_chroma, r->s.mb_stride * r->s.mb_height * sizeof(*r->cbp_chroma)); } s->pict_type = r->si.type ? r->si.type : I_TYPE; if(MPV_frame_start(s, s->avctx) < 0) @@ -1188,6 +1192,9 @@ int ff_rv34_decode_init(AVCodecContext *avctx) r->mb_type = av_mallocz(r->s.mb_stride * r->s.mb_height * sizeof(*r->mb_type)); + r->cbp_luma = av_malloc(r->s.mb_stride * r->s.mb_height * sizeof(*r->cbp_luma)); + r->cbp_chroma = av_malloc(r->s.mb_stride * r->s.mb_height * sizeof(*r->cbp_chroma)); + if(!intra_vlcs[0].cbppattern[0].bits) rv34_init_tables(); |