[FFmpeg-cvslog] lavc/proresdec2: Fix slice_count for very high resolutions.
Carl Eugen Hoyos
git at videolan.org
Fri Oct 30 01:34:34 CET 2015
ffmpeg | branch: master | Carl Eugen Hoyos <cehoyos at ag.or.at> | Fri Oct 30 01:32:39 2015 +0100| [bd1d67efe830efcdb21af751e9bfd7ef8da42590] | committer: Carl Eugen Hoyos
lavc/proresdec2: Fix slice_count for very high resolutions.
QT ignores the value written in the frame header.
Issue reported by forum user Koracas.
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=bd1d67efe830efcdb21af751e9bfd7ef8da42590
---
libavcodec/proresdec2.c | 5 ++++-
libavcodec/version.h | 2 +-
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/libavcodec/proresdec2.c b/libavcodec/proresdec2.c
index 932f85f..2d47a13 100644
--- a/libavcodec/proresdec2.c
+++ b/libavcodec/proresdec2.c
@@ -180,7 +180,10 @@ static int decode_picture_header(AVCodecContext *avctx, const uint8_t *buf, cons
else
ctx->mb_height = (avctx->height + 15) >> 4;
- slice_count = AV_RB16(buf + 5);
+ // QT ignores the written value
+ // slice_count = AV_RB16(buf + 5);
+ slice_count = ctx->mb_height * ((ctx->mb_width >> log2_slice_mb_width) +
+ av_popcount(ctx->mb_width & (1 << log2_slice_mb_width) - 1));
if (ctx->slice_count != slice_count || !ctx->slices) {
av_freep(&ctx->slices);
diff --git a/libavcodec/version.h b/libavcodec/version.h
index 71e0703..02c2a08 100644
--- a/libavcodec/version.h
+++ b/libavcodec/version.h
@@ -30,7 +30,7 @@
#define LIBAVCODEC_VERSION_MAJOR 57
#define LIBAVCODEC_VERSION_MINOR 13
-#define LIBAVCODEC_VERSION_MICRO 101
+#define LIBAVCODEC_VERSION_MICRO 102
#define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \
LIBAVCODEC_VERSION_MINOR, \
More information about the ffmpeg-cvslog
mailing list