[FFmpeg-devel] [PATCH 1/5] dpxenc: fix padding in encode_gbrp12

James Darnley james.darnley at gmail.com
Wed Aug 20 11:35:25 CEST 2014


On 2014-08-20 10:10, Christophe Gisquet wrote:
> It was added per pixel instead of per line.
> ---
>  libavcodec/dpxenc.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/libavcodec/dpxenc.c b/libavcodec/dpxenc.c
> index 059d8c6..aca745b 100644
> --- a/libavcodec/dpxenc.c
> +++ b/libavcodec/dpxenc.c
> @@ -159,11 +159,11 @@ static void encode_gbrp12(AVCodecContext *avctx, const AVPicture *pic, uint16_t
>                  value[2] = AV_RL16(src[1] + x) << 4;
>                  value[0] = AV_RL16(src[2] + x) << 4;
>              }
> -            for (i = 0; i < pad; i++)
> -                *dst++ = 0;
>              for (i = 0; i < 3; i++)
>                  write16(dst++, value[i]);
>          }
> +        for (i = 0; i < pad; i++)
> +            *dst++ = 0;
>          for (i = 0; i < 3; i++)
>              src[i] += pic->linesize[i]/2;
>      }
> 

(In an effort to help review...)

This does move from per-pixel to per-line so if this is supposed to be
correct then it looks good to me.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 618 bytes
Desc: OpenPGP digital signature
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20140820/96cdff84/attachment.asc>


More information about the ffmpeg-devel mailing list