good point about CBR... and this would require to get BufferSizeInKB adjusted at the proper place, with InitialDelayInKB
On Tue, Nov 28, 2017 at 11:41 PM, Mark Thompson <[email protected]> wrote: > On 01/12/17 20:04, Zhong Li wrote: > > Hypothetical Reference Decoding (HRD) model assumes that data flows into > a > > buffer of the fixed size BufferSizeInKB with a constant bitrate. > > BufferSizeInKB represents the maximum possible size of any compressed > frames. > > > > Signed-off-by: Zhong Li <[email protected]> > > --- > > libavcodec/qsvenc.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/libavcodec/qsvenc.c b/libavcodec/qsvenc.c > > index 9db9eb3..cdddfd9 100644 > > --- a/libavcodec/qsvenc.c > > +++ b/libavcodec/qsvenc.c > > @@ -437,7 +437,7 @@ static int init_video_param(AVCodecContext *avctx, > QSVEncContext *q) > > q->param.mfx.NumSlice = avctx->slices; > > q->param.mfx.NumRefFrame = FFMAX(0, avctx->refs); > > q->param.mfx.EncodedOrder = 0; > > - q->param.mfx.BufferSizeInKB = 0; > > + q->param.mfx.BufferSizeInKB = (avctx->rc_buffer_size > 0) ? > avctx->rc_buffer_size / 8000 : 0; > > > > desc = av_pix_fmt_desc_get(sw_format); > > if (!desc) > > > > The Intel documentation says "BufferSizeInKB represents the maximum > possible size of any compressed frames.". Is that just confused? Some of > the surrounding text does suggest that it's the right thing. > > Probably fine, but are you sure it should be set when in > non-bitrate-targetted modes? (The related HRD parameter InitialDelayInKB > is set further down in CBR/VBR modes only.) > > - Mark > > > Aside: Please try to avoid sending messages from the future, it's > confusing when things are sorted by time. (You probably have the clock set > wrong on a machine used for git send-email.) > _______________________________________________ > libav-devel mailing list > [email protected] > https://lists.libav.org/mailman/listinfo/libav-devel _______________________________________________ libav-devel mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-devel
