diff options
author | Derek Buitenhuis <derek.buitenhuis@gmail.com> | 2016-04-24 12:31:14 +0100 |
---|---|---|
committer | Derek Buitenhuis <derek.buitenhuis@gmail.com> | 2016-04-24 12:31:14 +0100 |
commit | e5c655b09817da9388a8812b93e9948c44cc00af (patch) | |
tree | 6a2407434cfaa99f084147e924bce0a5179304c4 /libavcodec | |
parent | 83e0b1b1d7b4120f1bdd2576e977a6bda0283ce9 (diff) | |
parent | 577393321c389ad2973bec6168a8045c94a9e099 (diff) | |
download | ffmpeg-e5c655b09817da9388a8812b93e9948c44cc00af.tar.gz |
Merge commit '577393321c389ad2973bec6168a8045c94a9e099'
* commit '577393321c389ad2973bec6168a8045c94a9e099':
intrax8: Carry over the loopfilter value in ff_intrax8_decode_picture
Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/intrax8.c | 5 | ||||
-rw-r--r-- | libavcodec/intrax8.h | 7 | ||||
-rw-r--r-- | libavcodec/vc1_block.c | 3 | ||||
-rw-r--r-- | libavcodec/wmv2dec.c | 3 |
4 files changed, 12 insertions, 6 deletions
diff --git a/libavcodec/intrax8.c b/libavcodec/intrax8.c index 471009e61a..d8bcad663b 100644 --- a/libavcodec/intrax8.c +++ b/libavcodec/intrax8.c @@ -708,7 +708,7 @@ block_placed: if (!chroma) x8_update_predictions(w, w->orient, n); - if (s->loop_filter) { + if (w->loopfilter) { uint8_t *ptr = w->dest[chroma]; int linesize = s->current_picture.f->linesize[!!chroma]; @@ -777,7 +777,7 @@ av_cold void ff_intrax8_common_end(IntraX8Context *w) } int ff_intrax8_decode_picture(IntraX8Context *const w, int dquant, - int quant_offset) + int quant_offset, int loopfilter) { MpegEncContext *const s = w->s; int mb_xy; @@ -786,6 +786,7 @@ int ff_intrax8_decode_picture(IntraX8Context *const w, int dquant, w->dquant = dquant; w->quant = dquant >> 1; w->qsum = quant_offset; + w->loopfilter = loopfilter; w->divide_quant_dc_luma = ((1 << 16) + (w->quant >> 1)) / w->quant; if (w->quant < 5) { diff --git a/libavcodec/intrax8.h b/libavcodec/intrax8.h index 849e04d952..ac31a5f16d 100644 --- a/libavcodec/intrax8.h +++ b/libavcodec/intrax8.h @@ -45,6 +45,7 @@ typedef struct IntraX8Context { int quant; int dquant; int qsum; + int loopfilter; // calculated per frame int quant_dc_chroma; @@ -81,7 +82,7 @@ void ff_intrax8_common_end(IntraX8Context *w); /** * Decode single IntraX8 frame. - * The parent codec must fill s->loopfilter and s->gb (bitstream). + * The parent codec must fill s->gb (bitstream). * The parent codec must call ff_mpv_frame_start() before calling this function. * The parent codec must call ff_mpv_frame_end() after calling this function. * This function does not use ff_mpv_decode_mb(). @@ -89,7 +90,9 @@ void ff_intrax8_common_end(IntraX8Context *w); * @param w pointer to IntraX8Context * @param dquant doubled quantizer, it would be odd in case of VC-1 halfpq==1. * @param quant_offset offset away from zero + * @param loopfilter enable filter after decoding a block */ -int ff_intrax8_decode_picture(IntraX8Context *w, int quant, int halfpq); +int ff_intrax8_decode_picture(IntraX8Context *w, int quant, int halfpq, + int loopfilter); #endif /* AVCODEC_INTRAX8_H */ diff --git a/libavcodec/vc1_block.c b/libavcodec/vc1_block.c index c74788b99c..3853251527 100644 --- a/libavcodec/vc1_block.c +++ b/libavcodec/vc1_block.c @@ -2931,7 +2931,8 @@ void ff_vc1_decode_blocks(VC1Context *v) v->s.esc3_level_length = 0; if (v->x8_type) { - ff_intrax8_decode_picture(&v->x8, 2*v->pq + v->halfpq, v->pq * !v->pquantizer); + ff_intrax8_decode_picture(&v->x8, 2 * v->pq + v->halfpq, + v->pq * !v->pquantizer, v->s.loop_filter); ff_er_add_slice(&v->s.er, 0, 0, (v->s.mb_x >> 1) - 1, (v->s.mb_y >> 1) - 1, diff --git a/libavcodec/wmv2dec.c b/libavcodec/wmv2dec.c index a365838b2f..f0fe708a4e 100644 --- a/libavcodec/wmv2dec.c +++ b/libavcodec/wmv2dec.c @@ -219,7 +219,8 @@ int ff_wmv2_decode_secondary_picture_header(MpegEncContext *s) s->picture_number++; // FIXME ? if (w->j_type) { - ff_intrax8_decode_picture(&w->x8, 2 * s->qscale, (s->qscale - 1) | 1); + ff_intrax8_decode_picture(&w->x8, 2 * s->qscale, (s->qscale - 1) | 1, + s->loop_filter); ff_er_add_slice(&w->s.er, 0, 0, (w->s.mb_x >> 1) - 1, (w->s.mb_y >> 1) - 1, |