[FFmpeg-devel,5/7] avcodec/ffv1enc: support of 1024 slices

Submitted by Jerome Martinez on March 7, 2018, 3:52 p.m.

Details

Message ID 1bfd5dd0-8b2f-7622-a7d5-517351259331@mediaarea.net
State New
Headers show

Commit Message

Jerome Martinez March 7, 2018, 3:52 p.m.
FFV1 decoder supports up to 1024 slices but FFV1 encoder permits only 
961 (31x31) slices.
This patch permits to create 1024 (32x32) slices.
From 494115e12981a9c54bf04b63a13ef50364349de2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Martinez?= <jerome@mediaarea.net>
Date: Wed, 7 Mar 2018 10:49:24 +0100
Subject: [PATCH 5/7] avcodec/ffv1enc: support of 1024 slices

Decoder already accepts 1024 slices but encoder was limited to 961 slices
---
 libavcodec/ffv1enc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch hide | download patch | download mbox

diff --git a/libavcodec/ffv1enc.c b/libavcodec/ffv1enc.c
index 16987117d8..262821abab 100644
--- a/libavcodec/ffv1enc.c
+++ b/libavcodec/ffv1enc.c
@@ -872,7 +872,7 @@  FF_ENABLE_DEPRECATION_WARNINGS
 
         s->num_v_slices = FFMIN(s->num_v_slices, max_v_slices);
 
-        for (; s->num_v_slices < 32; s->num_v_slices++) {
+        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;
                 int maxh = (avctx->height + s->num_v_slices - 1) / s->num_v_slices;