diff mbox series

[FFmpeg-devel] lavc/qsvenc_hevc: use open GOP by default

Message ID 20221006075101.20058-1-haihao.xiang@intel.com
State New
Headers show
Series [FFmpeg-devel] lavc/qsvenc_hevc: use open GOP by default | expand

Checks

Context Check Description
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished

Commit Message

Xiang, Haihao Oct. 6, 2022, 7:51 a.m. UTC
From: Haihao Xiang <haihao.xiang@intel.com>

HEVC spec has CRA frame which allows random access with open GOP, hence
it can achieve higher compression efficiency.

Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
---
 libavcodec/qsvenc_hevc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Andreas Rheinhardt Oct. 6, 2022, 11:35 a.m. UTC | #1
Xiang, Haihao:
> From: Haihao Xiang <haihao.xiang@intel.com>
> 
> HEVC spec has CRA frame which allows random access with open GOP, hence
> it can achieve higher compression efficiency.
> 
> Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
> ---
>  libavcodec/qsvenc_hevc.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/libavcodec/qsvenc_hevc.c b/libavcodec/qsvenc_hevc.c
> index a5bf915954..ba83987151 100644
> --- a/libavcodec/qsvenc_hevc.c
> +++ b/libavcodec/qsvenc_hevc.c
> @@ -294,7 +294,7 @@ static const FFCodecDefault qsv_enc_defaults[] = {
>      { "qmin",      "-1"    },
>      { "qmax",      "-1"    },
>      { "trellis",   "-1"    },
> -    { "flags",     "+cgop" },
> +    { "flags",     "-cgop" },
>      { NULL },
>  };
>  

If you want open GOP as default, you can just remove the entry, as open
GOP is the default anyway.

- Andreas
Xiang, Haihao Oct. 7, 2022, 2:45 a.m. UTC | #2
> Xiang, Haihao:
> > From: Haihao Xiang <haihao.xiang@intel.com>
> > 
> > HEVC spec has CRA frame which allows random access with open GOP, hence
> > it can achieve higher compression efficiency.
> > 
> > Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
> > ---
> >  libavcodec/qsvenc_hevc.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/libavcodec/qsvenc_hevc.c b/libavcodec/qsvenc_hevc.c
> > index a5bf915954..ba83987151 100644
> > --- a/libavcodec/qsvenc_hevc.c
> > +++ b/libavcodec/qsvenc_hevc.c
> > @@ -294,7 +294,7 @@ static const FFCodecDefault qsv_enc_defaults[] = {
> >      { "qmin",      "-1"    },
> >      { "qmax",      "-1"    },
> >      { "trellis",   "-1"    },
> > -    { "flags",     "+cgop" },
> > +    { "flags",     "-cgop" },
> >      { NULL },
> >  };
> >  
> 
> If you want open GOP as default, you can just remove the entry, as open
> GOP is the default anyway.
> 

Thanks for pointing it out, I will update the patch. 

BRs
Haihao
diff mbox series

Patch

diff --git a/libavcodec/qsvenc_hevc.c b/libavcodec/qsvenc_hevc.c
index a5bf915954..ba83987151 100644
--- a/libavcodec/qsvenc_hevc.c
+++ b/libavcodec/qsvenc_hevc.c
@@ -294,7 +294,7 @@  static const FFCodecDefault qsv_enc_defaults[] = {
     { "qmin",      "-1"    },
     { "qmax",      "-1"    },
     { "trellis",   "-1"    },
-    { "flags",     "+cgop" },
+    { "flags",     "-cgop" },
     { NULL },
 };