[FFmpeg-devel] [PATCH 3/4] hevc: actual benefits from new step threading API

Christophe Gisquet christophe.gisquet at gmail.com
Wed Jul 23 21:13:45 CEST 2014


The new API allows tracking the position of the first raster line
being decoded, so allow updating it whenever SAO is called.
---
 libavcodec/hevc_filter.c | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/libavcodec/hevc_filter.c b/libavcodec/hevc_filter.c
index 62f0ebb..abf8b24 100644
--- a/libavcodec/hevc_filter.c
+++ b/libavcodec/hevc_filter.c
@@ -696,10 +696,16 @@ void ff_hevc_hls_filter(HEVCContext *s, int x, int y, int ctb_size)
     deblocking_filter_CTB(s, x, y);
     if (s->sps->sao_enabled) {
         int y_end = y >= s->sps->height - ctb_size;
-        if (y && x)
+        if (y && x) {
             sao_filter_CTB(s, x - ctb_size, y - ctb_size);
-        if (x && y_end)
+            if (s->threads_type & FF_THREAD_FRAME)
+                ff_thread_report_progress3_increment(&s->ref->tf, x, y-ctb_size, ctb_size);
+        }
+        if (x && y_end) {
             sao_filter_CTB(s, x - ctb_size, y);
+            if (s->threads_type & FF_THREAD_FRAME)
+                ff_thread_report_progress3_increment(&s->ref->tf, x, y, ctb_size);
+        }
         if (y && x_end) {
             sao_filter_CTB(s, x, y - ctb_size);
             if (s->threads_type & FF_THREAD_FRAME)
-- 
1.9.2.msysgit.0



More information about the ffmpeg-devel mailing list