[FFmpeg-devel] [PATCH 1/2] avcodec/proresenc_kostya: set initial max_slice_size based on frame_size_upper_bound

Michael Niedermayer michaelni at gmx.at
Tue Aug 19 12:31:57 CEST 2014


On Tue, Aug 19, 2014 at 09:40:03AM +0200, Christophe Gisquet wrote:
> Hi,
> 
> 2014-08-18 21:49 GMT+02:00 Michael Niedermayer <michaelni at gmx.at>:
> > Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> > ---
> >  libavcodec/proresenc_kostya.c |    3 ++-
> >  1 file changed, 2 insertions(+), 1 deletion(-)
> >
> > diff --git a/libavcodec/proresenc_kostya.c b/libavcodec/proresenc_kostya.c
> > index 0f69767..1e40dcf 100644
> > --- a/libavcodec/proresenc_kostya.c
> > +++ b/libavcodec/proresenc_kostya.c
> > @@ -938,7 +938,8 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt,
> >      int sizes[4] = { 0 };
> >      int slice_hdr_size = 2 + 2 * (ctx->num_planes - 1);
> >      int frame_size, picture_size, slice_size;
> > -    int pkt_size, ret, max_slice_size = 0;
> > +    int pkt_size, ret;
> > +    int max_slice_size = (ctx->frame_size_upper_bound - 200) / ctx->pictures_per_frame / ctx->slices_per_picture;
> >      uint8_t frame_flags;
> 
> By itself, what does that change achieve regarding the reallocation?
> Maybe put that in the commit message.

suggested commit message:
    avcodec/proresenc_kostya: set initial max_slice_size based on frame_size_upper_bound

    If the initial max_slice_size is 0 then reallocation is disabled for the first
    slice.

    Signed-off-by: Michael Niedermayer <michaelni at gmx.at>


[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Dictatorship naturally arises out of democracy, and the most aggravated
form of tyranny and slavery out of the most extreme liberty. -- Plato
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20140819/d86e0027/attachment.asc>


More information about the ffmpeg-devel mailing list