[FFmpeg-cvslog] pngenc: Fix incorrect mask used for interlaced mode.
Clément Bœsch
ubitux at gmail.com
Wed Mar 21 10:04:56 CET 2012
On Tue, Mar 20, 2012 at 09:35:46PM +0100, Michael Niedermayer wrote:
> ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Tue Mar 20 20:39:32 2012 +0100| [15db6a959057b92245a384909ec7d413d5c16461] | committer: Michael Niedermayer
>
> pngenc: Fix incorrect mask used for interlaced mode.
>
> Fixes Ticket1109
>
> Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
>
> > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=15db6a959057b92245a384909ec7d413d5c16461
> ---
>
> libavcodec/pngenc.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/libavcodec/pngenc.c b/libavcodec/pngenc.c
> index 1af8584..86eae4f 100644
> --- a/libavcodec/pngenc.c
> +++ b/libavcodec/pngenc.c
> @@ -55,7 +55,7 @@ static void png_get_interlaced_row(uint8_t *dst, int row_size,
> uint8_t *d;
> const uint8_t *s;
>
> - mask = ff_png_pass_mask[pass];
> + mask = (int[]){0x80, 0x08, 0x88, 0x22, 0xaa, 0x55, 0xff}[pass];
Maybe a static const int[] for this one with a comment outside the
function would be welcome.
Also, it looks like ff_png_pass_mask is now local to pngdec.
Last, since this is a regression, maybe a fate test could be added? The
ticket provides samples we could use. It will also likely greatly improve
the somehow poor PNG code coverage.
[...]
--
Clément B.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 490 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-cvslog/attachments/20120321/ff9ddda6/attachment.asc>
More information about the ffmpeg-cvslog
mailing list