summaryrefslogtreecommitdiff
path: root/libavcodec/vp56.c
diff options
context:
space:
mode:
authorPeter Ross <pross@xvid.org>2019-01-13 15:15:29 +1100
committerPeter Ross <pross@xvid.org>2019-01-26 23:49:04 +1100
commit160ebe0a8d780f6db7c18e824d8ec6f437da33a2 (patch)
treeee73ea2f72016d83d963d06bd03098c999c490ab /libavcodec/vp56.c
parent10a57f55e60902ab91388b8a46b73f1f4532f737 (diff)
avcodec/vp6: use ff_vp3dsp_[hv]_loop_filter_12
Partially fixes: https://trac.ffmpeg.org/ticket/1282 Signed-off-by: Peter Ross <pross@xvid.org>
Diffstat (limited to 'libavcodec/vp56.c')
-rw-r--r--libavcodec/vp56.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/libavcodec/vp56.c b/libavcodec/vp56.c
index 27b4b8b944..e9e8d5d9fd 100644
--- a/libavcodec/vp56.c
+++ b/libavcodec/vp56.c
@@ -33,6 +33,8 @@
void ff_vp56_init_dequant(VP56Context *s, int quantizer)
{
+ if (s->quantizer != quantizer)
+ ff_vp3dsp_set_bounding_values(s->bounding_values_array, ff_vp56_filter_threshold[quantizer]);
s->quantizer = quantizer;
s->dequant_dc = ff_vp56_dc_dequant[quantizer] << 2;
s->dequant_ac = ff_vp56_ac_dequant[quantizer] << 2;
@@ -320,9 +322,17 @@ static void vp56_add_predictors_dc(VP56Context *s, VP56Frame ref_frame)
static void vp56_deblock_filter(VP56Context *s, uint8_t *yuv,
ptrdiff_t stride, int dx, int dy)
{
+ if (s->avctx->codec->id == AV_CODEC_ID_VP5) {
int t = ff_vp56_filter_threshold[s->quantizer];
if (dx) s->vp56dsp.edge_filter_hor(yuv + 10-dx , stride, t);
if (dy) s->vp56dsp.edge_filter_ver(yuv + stride*(10-dy), stride, t);
+ } else {
+ int * bounding_values = s->bounding_values_array + 127;
+ if (dx)
+ ff_vp3dsp_h_loop_filter_12(yuv + 10-dx, stride, bounding_values);
+ if (dy)
+ ff_vp3dsp_v_loop_filter_12(yuv + stride*(10-dy), stride, bounding_values);
+ }
}
static void vp56_mc(VP56Context *s, int b, int plane, uint8_t *src,