[FFmpeg-devel] [PATCH]lavc/proresdec2: Fix slice_count for very high resolutions
Michael Niedermayer
michael at niedermayer.cc
Wed Oct 28 12:48:09 CET 2015
On Sun, Oct 25, 2015 at 03:09:24PM +0100, Carl Eugen Hoyos wrote:
> On Sunday 25 October 2015 01:37:15 pm Carl Eugen Hoyos wrote:
> > Hi!
> >
> > Attached patch intends to fix an issue reported by forum user Koracas:
> > For slice_count > 0x10000 FFmpeg fails to decode a frame, QT seems to
> > ignore the value.
>
> New patch attached.
>
> Please comment, Carl Eugen
> proresdec2.c | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
> 9f0961894862a1ff8a0ce9e3f8f0bfbf3f1ee15d patchslicecount.diff
> 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 thats what QT does then sure LGTM
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
DNS cache poisoning attacks, popular search engine, Google internet authority
dont be evil, please
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20151028/135aae6a/attachment.sig>
More information about the ffmpeg-devel
mailing list