Re: [libav-devel] [PATCH V2] lavc/qsvenc: set HRD buffer size

2017-12-06 Thread Li, Zhong
> will check it shortly
> 
Got it, thanks. : ) 

> On Fri, Dec 1, 2017 at 9:48 AM, Zhong Li  wrote:
> 
> > Hypothetical Reference Decoding (HRD) model assumes that data flows
> > into a buffer of the fixed size BufferSizeInKB with a constant bitrate.
> > Smaller BufferSizeInKB means smaller frame size variations, but more
> > difficult to maintain HRD.
> >
> > Signed-off-by: Zhong Li 
> > ---
> >  libavcodec/qsvenc.c | 1 +
> >  1 file changed, 1 insertion(+)
> >
> > diff --git a/libavcodec/qsvenc.c b/libavcodec/qsvenc.c index
> > 57f78c4..96c8fb5 100644
> > --- a/libavcodec/qsvenc.c
> > +++ b/libavcodec/qsvenc.c
> > @@ -495,6 +495,7 @@ static int init_video_param(AVCodecContext
> *avctx,
> > QSVEncContext *q)  #if QSV_HAVE_VCM
> >  case MFX_RATECONTROL_VCM:
> >  #endif
> > +q->param.mfx.BufferSizeInKB   = avctx->rc_buffer_size /
> 8000;
> >  q->param.mfx.InitialDelayInKB =
> > avctx->rc_initial_buffer_occupancy
> > / 1000;
> >  q->param.mfx.TargetKbps   = avctx->bit_rate / 1000;
> >  q->param.mfx.MaxKbps  = avctx->rc_max_rate /
> 1000;
> > --
> > 1.8.3.1
___
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel

Re: [libav-devel] [PATCH V2] lavc/qsvenc: set HRD buffer size

2017-12-04 Thread Maxym Dmytrychenko
will check it shortly

On Fri, Dec 1, 2017 at 9:48 AM, Zhong Li  wrote:

> Hypothetical Reference Decoding (HRD) model assumes that data flows
> into a buffer of the fixed size BufferSizeInKB with a constant bitrate.
> Smaller BufferSizeInKB means smaller frame size variations,
> but more difficult to maintain HRD.
>
> Signed-off-by: Zhong Li 
> ---
>  libavcodec/qsvenc.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/libavcodec/qsvenc.c b/libavcodec/qsvenc.c
> index 57f78c4..96c8fb5 100644
> --- a/libavcodec/qsvenc.c
> +++ b/libavcodec/qsvenc.c
> @@ -495,6 +495,7 @@ static int init_video_param(AVCodecContext *avctx,
> QSVEncContext *q)
>  #if QSV_HAVE_VCM
>  case MFX_RATECONTROL_VCM:
>  #endif
> +q->param.mfx.BufferSizeInKB   = avctx->rc_buffer_size / 8000;
>  q->param.mfx.InitialDelayInKB = avctx->rc_initial_buffer_occupancy
> / 1000;
>  q->param.mfx.TargetKbps   = avctx->bit_rate / 1000;
>  q->param.mfx.MaxKbps  = avctx->rc_max_rate / 1000;
> --
> 1.8.3.1
>
> ___
> libav-devel mailing list
> libav-devel@libav.org
> https://lists.libav.org/mailman/listinfo/libav-devel
___
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel

[libav-devel] [PATCH V2] lavc/qsvenc: set HRD buffer size

2017-12-01 Thread Zhong Li
Hypothetical Reference Decoding (HRD) model assumes that data flows
into a buffer of the fixed size BufferSizeInKB with a constant bitrate.
Smaller BufferSizeInKB means smaller frame size variations,
but more difficult to maintain HRD.

Signed-off-by: Zhong Li 
---
 libavcodec/qsvenc.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/libavcodec/qsvenc.c b/libavcodec/qsvenc.c
index 57f78c4..96c8fb5 100644
--- a/libavcodec/qsvenc.c
+++ b/libavcodec/qsvenc.c
@@ -495,6 +495,7 @@ static int init_video_param(AVCodecContext *avctx, 
QSVEncContext *q)
 #if QSV_HAVE_VCM
 case MFX_RATECONTROL_VCM:
 #endif
+q->param.mfx.BufferSizeInKB   = avctx->rc_buffer_size / 8000;
 q->param.mfx.InitialDelayInKB = avctx->rc_initial_buffer_occupancy / 
1000;
 q->param.mfx.TargetKbps   = avctx->bit_rate / 1000;
 q->param.mfx.MaxKbps  = avctx->rc_max_rate / 1000;
-- 
1.8.3.1

___
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel