Hi, Attached patch adds full support for skip_loop_filter (all levels) to the hevc decoder.
I'm not too sure about the implementation of "nonref", since this email (http://ffmpeg.org/pipermail/ffmpeg-devel/2015-July/176116.html) mentions looking at nal_unit_type and temporal_id instead. Some help would be appreciated. The 'make fate' test suite passed.
From 3e2f7152e3dab1f6cfe7c7e14f2ba1cee519978c Mon Sep 17 00:00:00 2001 From: sfan5 <sf...@live.de> Date: Thu, 30 Nov 2017 23:58:02 +0100 Subject: [PATCH] libavcodec/hevc_filter: support for all skip_loop_filter levels. Continues where commit 52c75d486ed5f75cbb79e5dbd07b7aef24f3071f left off. --- doc/decoders.texi | 7 ------- libavcodec/hevc_filter.c | 12 +++++++++++- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/doc/decoders.texi b/doc/decoders.texi index d149d2bea5..a9510bdf02 100644 --- a/doc/decoders.texi +++ b/doc/decoders.texi @@ -25,13 +25,6 @@ enabled decoders. A description of some of the currently available video decoders follows. -@section hevc - -HEVC / H.265 decoder. - -Note: the @option{skip_loop_filter} option has effect only at level -@code{all}. - @section rawvideo Raw video decoder. diff --git a/libavcodec/hevc_filter.c b/libavcodec/hevc_filter.c index b53f4cc721..17ec59619f 100644 --- a/libavcodec/hevc_filter.c +++ b/libavcodec/hevc_filter.c @@ -842,7 +842,17 @@ void ff_hevc_deblocking_boundary_strengths(HEVCContext *s, int x0, int y0, void ff_hevc_hls_filter(HEVCContext *s, int x, int y, int ctb_size) { int x_end = x >= s->ps.sps->width - ctb_size; - if (s->avctx->skip_loop_filter < AVDISCARD_ALL) + int deblock = 1; + if (s->avctx->skip_loop_filter >= AVDISCARD_ALL || + (s->avctx->skip_loop_filter >= AVDISCARD_NONKEY && !IS_IDR(s)) || + (s->avctx->skip_loop_filter >= AVDISCARD_NONINTRA && + s->sh.slice_type != HEVC_SLICE_I) || + (s->avctx->skip_loop_filter >= AVDISCARD_BIDIR && + s->sh.slice_type == HEVC_SLICE_B) || + (s->avctx->skip_loop_filter >= AVDISCARD_NONREF && + ff_hevc_frame_nb_refs(s) == 0)) + deblock = 0; + if (deblock) deblocking_filter_CTB(s, x, y); if (s->ps.sps->sao_enabled) { int y_end = y >= s->ps.sps->height - ctb_size; -- 2.15.0
_______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel