Re: [FFmpeg-devel] [PATCH 1/2] lavc/vaapi_encode_mpeg2: add support for CBR/VBR

2019-01-23 Thread Fu, Linjie
> -Original Message-
> From: ffmpeg-devel [mailto:ffmpeg-devel-boun...@ffmpeg.org] On Behalf
> Of Mark Thompson
> Sent: Thursday, January 24, 2019 07:35
> To: ffmpeg-devel@ffmpeg.org
> Subject: Re: [FFmpeg-devel] [PATCH 1/2] lavc/vaapi_encode_mpeg2: add
> support for CBR/VBR
> 
> On 16/01/2019 14:34, Linjie Fu wrote:
> > Add support for VBR/CBR mode in mpeg2_vaapi encode.
> >
> > Fix #7650.
> >
> > Signed-off-by: Linjie Fu 
> > ---
> >  libavcodec/vaapi_encode_mpeg2.c | 7 +++
> >  1 file changed, 7 insertions(+)
> >
> > diff --git a/libavcodec/vaapi_encode_mpeg2.c
> b/libavcodec/vaapi_encode_mpeg2.c
> > index 22d7e306bb..a625b15461 100644
> > --- a/libavcodec/vaapi_encode_mpeg2.c
> > +++ b/libavcodec/vaapi_encode_mpeg2.c
> > @@ -541,6 +541,13 @@ static av_cold int
> vaapi_encode_mpeg2_configure(AVCodecContext *avctx)
> > "%d / %d / %d for I- / P- / B-frames.\n",
> > priv->quant_i, priv->quant_p, priv->quant_b);
> >
> > +} else if (ctx->va_rc_mode == VA_RC_CBR ||
> > +   ctx->va_rc_mode == VA_RC_VBR) {
> > +// These still need to be set for quantiser_scale_code.
> > +priv->quant_i = 10;
> > +priv->quant_p = 10;
> > +priv->quant_b = 10;
> > +
> >  } else {
> >  av_assert0(0 && "Invalid RC mode.");
> >  }
> >
> 
> See existing patch <https://lists.ffmpeg.org/pipermail/ffmpeg-devel/2018-
> December/237943.html>.  I'll send a new version of the remainder of that
> series soon.
> 
> - Mark

Seen, next time I'll check the existing patch list first for the issues in trac.
Thanks.
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH 1/2] lavc/vaapi_encode_mpeg2: add support for CBR/VBR

2019-01-23 Thread Mark Thompson
On 16/01/2019 14:34, Linjie Fu wrote:
> Add support for VBR/CBR mode in mpeg2_vaapi encode.
> 
> Fix #7650.
> 
> Signed-off-by: Linjie Fu 
> ---
>  libavcodec/vaapi_encode_mpeg2.c | 7 +++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/libavcodec/vaapi_encode_mpeg2.c b/libavcodec/vaapi_encode_mpeg2.c
> index 22d7e306bb..a625b15461 100644
> --- a/libavcodec/vaapi_encode_mpeg2.c
> +++ b/libavcodec/vaapi_encode_mpeg2.c
> @@ -541,6 +541,13 @@ static av_cold int 
> vaapi_encode_mpeg2_configure(AVCodecContext *avctx)
> "%d / %d / %d for I- / P- / B-frames.\n",
> priv->quant_i, priv->quant_p, priv->quant_b);
>  
> +} else if (ctx->va_rc_mode == VA_RC_CBR ||
> +   ctx->va_rc_mode == VA_RC_VBR) {
> +// These still need to be set for quantiser_scale_code.
> +priv->quant_i = 10;
> +priv->quant_p = 10;
> +priv->quant_b = 10;
> +
>  } else {
>  av_assert0(0 && "Invalid RC mode.");
>  }
> 

See existing patch 
.  
I'll send a new version of the remainder of that series soon.

- Mark
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


[FFmpeg-devel] [PATCH 1/2] lavc/vaapi_encode_mpeg2: add support for CBR/VBR

2019-01-16 Thread Linjie Fu
Add support for VBR/CBR mode in mpeg2_vaapi encode.

Fix #7650.

Signed-off-by: Linjie Fu 
---
 libavcodec/vaapi_encode_mpeg2.c | 7 +++
 1 file changed, 7 insertions(+)

diff --git a/libavcodec/vaapi_encode_mpeg2.c b/libavcodec/vaapi_encode_mpeg2.c
index 22d7e306bb..a625b15461 100644
--- a/libavcodec/vaapi_encode_mpeg2.c
+++ b/libavcodec/vaapi_encode_mpeg2.c
@@ -541,6 +541,13 @@ static av_cold int 
vaapi_encode_mpeg2_configure(AVCodecContext *avctx)
"%d / %d / %d for I- / P- / B-frames.\n",
priv->quant_i, priv->quant_p, priv->quant_b);
 
+} else if (ctx->va_rc_mode == VA_RC_CBR ||
+   ctx->va_rc_mode == VA_RC_VBR) {
+// These still need to be set for quantiser_scale_code.
+priv->quant_i = 10;
+priv->quant_p = 10;
+priv->quant_b = 10;
+
 } else {
 av_assert0(0 && "Invalid RC mode.");
 }
-- 
2.17.1

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel