Anton Khirnov
716d413c13
Replace PIX_FMT_* -> AV_PIX_FMT_*, PixelFormat -> AVPixelFormat
12 years ago
Michael Niedermayer
0da0b5e0f8
pngdec: av_log() zlib errors
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Anton Khirnov
36ef5369ee
Replace all CODEC_ID_* with AV_CODEC_ID_*
13 years ago
Paul B Mahol
a09ae4ef65
Remove duplicated png and mng signatures.
...
Reviewed-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Paul B Mahol <onemda@gmail.com>
13 years ago
Ronald S. Bultje
d2205d6543
png: check bit depth for PAL8/Y400A pixel formats.
...
Wrong bit depth can lead to invalid rowsize values, which crashes the
decoder further down.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
13 years ago
Michael Niedermayer
a63c813797
pngdec: check bits_per_pixel for palette mode.
...
This fixes a out of array read
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Niedermayer
c7dc19d68f
png: make sure the previous frames dimensions match before using it as reference
...
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Martin Storsjö
00c3b67b8a
cosmetics: Align codec declarations
...
Also break some long lines, remove codec function placeholder comments
and add spaces in sample/pixel format lists.
Signed-off-by: Martin Storsjö <martin@martin.st>
13 years ago
Paul B Mahol
25b67dc765
png: fix warning about discarding qualifiers [-Wincompatible-pointer-types]
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Clément Bœsch
50a3867bab
png: make ff_png_pass_mask local to pngdec.
13 years ago
Michael Niedermayer
8f394a6cf8
pngdec: print error message for truncated pngs even if we output them
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Niedermayer
4ed47d3354
pngdec: dont discard incomplete images.
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Niedermayer
eeb792d862
pngdec: Print error messages for the various failure pathes.
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Ronald S. Bultje
4c25269ced
png: convert to bytestream2 API.
...
Protects against overreads in the input buffer.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
13 years ago
Michael Niedermayer
39a3a53b66
pngdec: validate length.
...
Fixes out of array reading.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Niedermayer
8a08503b78
pngdec: Print error if signature is wrong.
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Paul B Mahol
08630d25a2
png: make .long_name more descriptive
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Diego Biurrun <diego@biurrun.de>
13 years ago
Michael Niedermayer
146ef3f37c
pngdec: fix warning about pointer types
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Carl Eugen Hoyos
97da38c99b
Allow decoding of 64bit png images.
...
Fixes a part of ticket #639 .
13 years ago
Carl Eugen Hoyos
ea604de91e
Simplify "deloco" and support decoding of 48bit loco png.
13 years ago
Ronald S. Bultje
e92003514d
png: move DSP functions to their own DSP context.
13 years ago
Michael Niedermayer
49f2056289
pngdec: Convert 2/4 bit formats to 8bit.
...
This way 2 and 4 bit gray, rgb & rgba are supported.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Niedermayer
d1c48025a7
pngdec: Do not use SIMD paeth prediction for bpp=2
...
Fixes decoding of basi4a08.png
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Niedermayer
fd8a8373aa
pngdec: Fix masks for interlaced decoding
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Niedermayer
602e97dfaa
pngdec: Add some FF_DEBUG based av_logs.
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Carl Eugen Hoyos
e209a37777
Simplify 32bit png decoding.
13 years ago
Paul B Mahol
e20a4881ff
pngdec: show verbose message for unsupported files
13 years ago
Carl Eugen Hoyos
613cbf3168
Fix some 1bit png samples, they can be palettised.
...
Fixes ticket #767 .
13 years ago
Carl Eugen Hoyos
0c5fd6372e
Do not try to read 16bit gray png files with alpha channel.
...
FFmpeg does not support gray16a.
Fixes the crash in ticket #644 .
13 years ago
Reimar Döffinger
371e165443
Try to set AVFrame.reference to correct values.
...
I am not sure these new values are correct, not am I sure
the semantics are a good idea since we do not seem to make any
use of them but they caused a lot of confusion, but this
seems to make things closer to matching the documentation.
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
13 years ago
Michael Niedermayer
f962518036
pngdec: set reference correctly for corepng.
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Carl Eugen Hoyos
f863cdef81
Cosmetics: Fix comment.
13 years ago
Michael Niedermayer
0c9cba24b7
pngdec: implement 4bpp interlaced
...
Fixes Ticket435
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Niedermayer
dcabb3d608
pngdec: implement 2 bpp interlaced.
...
Fixes Ticket434
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Niedermayer
bc6445f2db
pngdec: Fix interlaced PAETH prediction
...
Fixes Ticket161
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Niedermayer
2d4102fc13
pngdec: Implement 2bpp
...
Fixes Ticket433
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Niedermayer
dc43ad6d1a
pngdec: Fix interlaced 1bpp
...
Fixes Ticket214
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Niedermayer
738219c921
pngdec: 4bpp support
...
Fixes Ticket208
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Anton Khirnov
ec6402b7c5
lavc: use designated initialisers for all codecs.
...
It's more readable and less prone to breakage.
14 years ago
Mans Rullgard
e23a05ab06
Fix incorrect max_lowres values
...
Signed-off-by: Mans Rullgard <mans@mansr.com>
14 years ago
Mans Rullgard
e65ab9d94f
Remove unused variables
14 years ago
Stefano Sabatini
68bed67d2e
pngdec: relax condition for setting monoblack pixel format
...
Ignore color_type information for setting the monoblack pixel format,
only rely on bit_depth.
In particular: fix Test_1bpp_grayscale.png from issue #172 .
This may work fine for some broken encoder, and not for others.
14 years ago
Stefano Sabatini
ce5e49b0c2
replace deprecated FF_*_TYPE symbols with AV_PICTURE_TYPE_*
14 years ago
Stefano Sabatini
975a1447f7
Replace deprecated FF_*_TYPE symbols with AV_PICTURE_TYPE_*.
...
Signed-off-by: Diego Biurrun <diego@biurrun.de>
14 years ago
ami_stuff
658296e344
Remove lowres support from png decoder
...
The lowres support doesn't work correctly (crops the video), so let's remove it.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
14 years ago
Baptiste Coudurier
045cc36fe7
100l, change #ifdef to #if
14 years ago
Baptiste Coudurier
46394d39e3
In png decoder, only call png_init_mmx if HAVE_MMX is defined.
14 years ago
Baptiste Coudurier
e91946ed23
Rename y400a to gray8a.
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
14 years ago
Baptiste Coudurier
6d4c49a2af
Move png mmx functions into x86/png_mmx.c, remove them from DSPContext.
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
14 years ago
Mans Rullgard
2912e87a6c
Replace FFmpeg with Libav in licence headers
...
Signed-off-by: Mans Rullgard <mans@mansr.com>
14 years ago