Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-08-18 22:42:27 +0400
committerMichael Niedermayer <michaelni@gmx.at>2014-09-20 19:46:41 +0400
commit1f8e0f7e06aff959d3567be910db0def919ae538 (patch)
treee949791f6f428917db160da7a975a6e846512ceb
parent6dd718e416c05ddc0cdc03f28769e303e2eaafb7 (diff)
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. Reviewed-by: Christophe Gisquet <christophe.gisquet@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at> (cherry picked from commit 76a8cb9d7bcc12a8f1cedcb4c23bbb6391a4c56c) Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavcodec/proresenc_kostya.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavcodec/proresenc_kostya.c b/libavcodec/proresenc_kostya.c
index ab56820911..1905f6067a 100644
--- a/libavcodec/proresenc_kostya.c
+++ b/libavcodec/proresenc_kostya.c
@@ -939,7 +939,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;
*avctx->coded_frame = *pic;