[FFmpeg-devel,1/2] h264_slice: Add forgotten progress update for the 2nd field in a slice

Submitted by Derek Buitenhuis on Dec. 8, 2016, 3:24 p.m.

Details

Message ID 20161208152432.27707-2-derek.buitenhuis@gmail.com
State New
Headers show

Commit Message

Derek Buitenhuis Dec. 8, 2016, 3:24 p.m.
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
---
 libavcodec/h264_slice.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

Carl Eugen Hoyos Dec. 8, 2016, 3:46 p.m.
2016-12-08 16:24 GMT+01:00 Derek Buitenhuis <derek.buitenhuis@gmail.com>:
> Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
> ---
>  libavcodec/h264_slice.c | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/libavcodec/h264_slice.c b/libavcodec/h264_slice.c
> index 1f2c06521e..a8a8731138 100644
> --- a/libavcodec/h264_slice.c
> +++ b/libavcodec/h264_slice.c
> @@ -1538,6 +1538,8 @@ static int h264_field_start(H264Context *h, const H264SliceContext *sl,
>          ret = h264_export_frame_props(h);
>          if (ret < 0)
>              return ret;
> +        ff_thread_report_progress(&h->cur_pic_ptr->tf, INT_MAX,
> +                                  h->picture_structure != PICT_BOTTOM_FIELD);

Does this have a speed impact for valid h264 streams?

Carl Eugen
Derek Buitenhuis Dec. 8, 2016, 4:01 p.m.
On 12/8/2016 3:46 PM, Carl Eugen Hoyos wrote:
> Does this have a speed impact for valid h264 streams?

Nope.

- Derek

Patch hide | download patch | download mbox

diff --git a/libavcodec/h264_slice.c b/libavcodec/h264_slice.c
index 1f2c06521e..a8a8731138 100644
--- a/libavcodec/h264_slice.c
+++ b/libavcodec/h264_slice.c
@@ -1538,6 +1538,8 @@  static int h264_field_start(H264Context *h, const H264SliceContext *sl,
         ret = h264_export_frame_props(h);
         if (ret < 0)
             return ret;
+        ff_thread_report_progress(&h->cur_pic_ptr->tf, INT_MAX,
+                                  h->picture_structure != PICT_BOTTOM_FIELD);
     }
 
     return 0;