summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2017-06-26 16:14:35 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2017-06-27 12:54:06 +0200
commit430d4f2bb52e6d1d7d375186cb5c710008a20603 (patch)
tree5c5199ffffac49b3fd8acb0368fd64a78040d82a
parent4ed7c2bbc3d04d5410433fd7038f076538e4a944 (diff)
downloadffmpeg-streaming-430d4f2bb52e6d1d7d375186cb5c710008a20603.zip
ffmpeg-streaming-430d4f2bb52e6d1d7d375186cb5c710008a20603.tar.gz
avcodec/ffv1enc: Allow less than 2 rows of slices for low vertical resolution
Fixes: Ticket5548 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r--libavcodec/ffv1enc.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libavcodec/ffv1enc.c b/libavcodec/ffv1enc.c
index e59d540..39b52d5 100644
--- a/libavcodec/ffv1enc.c
+++ b/libavcodec/ffv1enc.c
@@ -850,6 +850,10 @@ FF_ENABLE_DEPRECATION_WARNINGS
if (s->version > 1) {
int plane_count = 1 + 2*s->chroma_planes + s->transparency;
s->num_v_slices = (avctx->width > 352 || avctx->height > 288 || !avctx->slices) ? 2 : 1;
+
+ if (avctx->height < 5)
+ s->num_v_slices = 1;
+
for (; s->num_v_slices < 32; s->num_v_slices++) {
for (s->num_h_slices = s->num_v_slices; s->num_h_slices < 2*s->num_v_slices; s->num_h_slices++) {
int maxw = (avctx->width + s->num_h_slices - 1) / s->num_h_slices;
OpenPOWER on IntegriCloud