[FFmpeg-devel] [PATCH] v210dec: Fix width calculation

Kieran Kunhya kierank at obe.tv
Sat Nov 22 20:40:16 CET 2014


On 22 November 2014 at 19:32, Reimar Döffinger <Reimar.Doeffinger at gmx.de> wrote:
> On Sat, Nov 22, 2014 at 07:11:57PM +0000, Kieran Kunhya wrote:
>> ---
>>  libavcodec/v210dec.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/libavcodec/v210dec.c b/libavcodec/v210dec.c
>> index ae03952..978dffe 100644
>> --- a/libavcodec/v210dec.c
>> +++ b/libavcodec/v210dec.c
>> @@ -117,7 +117,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
>>          const uint32_t *src = (const uint32_t*)psrc;
>>          uint32_t val;
>>
>> -        w = (avctx->width / 6) * 6;
>> +        w = ((avctx->width - 5) / 6) * 6;
>
> Why?
> The original code is correct for v210_planar_unpack_c.
> The x86 asm code unfortunately doesn't document its assumptions,
> but I doubt that even for those this would be exactly right.

Please ignore this patch.


More information about the ffmpeg-devel mailing list