diff mbox series

[FFmpeg-devel,2/2] avcodec/hevc: set field_order=progressive when SPS makes it straightforward

Message ID 20210129172401.681-3-nicolas.gaullier@cji.paris
State New
Headers show
Series Enhance progressive content detection | expand

Checks

Context Check Description
andriy/x86_make success Make finished
andriy/x86_make_fate fail Make fate failed
andriy/PPC64_make success Make finished
andriy/PPC64_make_fate warning Make fate failed

Commit Message

Nicolas Gaullier Jan. 29, 2021, 5:24 p.m. UTC
---
 libavcodec/hevcdec.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

Nuo Mi Jan. 30, 2021, 3:54 a.m. UTC | #1
Hi Nicolas,
One related question, do we have a deinterlace filter to handle hevc SAFF?
thanks

On Sat, Jan 30, 2021 at 1:24 AM Nicolas Gaullier <nicolas.gaullier@cji.paris>
wrote:

> ---
>  libavcodec/hevcdec.c | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/libavcodec/hevcdec.c b/libavcodec/hevcdec.c
> index 92eb888033..2eaa683399 100644
> --- a/libavcodec/hevcdec.c
> +++ b/libavcodec/hevcdec.c
> @@ -330,6 +330,8 @@ static void export_stream_params(HEVCContext *s, const
> HEVCSPS *sps)
>      avctx->has_b_frames        = sps->temporal_layer[sps->max_sub_layers
> - 1].num_reorder_pics;
>      avctx->profile             = sps->ptl.general_ptl.profile_idc;
>      avctx->level               = sps->ptl.general_ptl.level_idc;
> +    if (sps->ptl.general_ptl.progressive_source_flag &&
> !sps->ptl.general_ptl.interlaced_source_flag)
> +        avctx->field_order     = AV_FIELD_PROGRESSIVE;
>
>      ff_set_sar(avctx, sps->vui.sar);
>
> --
> 2.27.0.windows.1
>
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
diff mbox series

Patch

diff --git a/libavcodec/hevcdec.c b/libavcodec/hevcdec.c
index 92eb888033..2eaa683399 100644
--- a/libavcodec/hevcdec.c
+++ b/libavcodec/hevcdec.c
@@ -330,6 +330,8 @@  static void export_stream_params(HEVCContext *s, const HEVCSPS *sps)
     avctx->has_b_frames        = sps->temporal_layer[sps->max_sub_layers - 1].num_reorder_pics;
     avctx->profile             = sps->ptl.general_ptl.profile_idc;
     avctx->level               = sps->ptl.general_ptl.level_idc;
+    if (sps->ptl.general_ptl.progressive_source_flag && !sps->ptl.general_ptl.interlaced_source_flag)
+        avctx->field_order     = AV_FIELD_PROGRESSIVE;
 
     ff_set_sar(avctx, sps->vui.sar);