Michael Niedermayer
a1c0d1d906
avcodec/pnm: Use ff_set_dimensions()
...
Fixes: OOM
Fixes: 1906/clusterfuzz-testcase-minimized-4599315114754048
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
8 years ago
Andreas Cadhalpun
484151df7c
pnm: limit maxval to UINT16_MAX
...
From 'man ppm': The maximum color value (Maxval), again in ASCII decimal.
Must be less than 65536.
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
8 years ago
Carl Eugen Hoyos
6c559a0a9d
lavc/pnm: Support decoding ya16.
10 years ago
Michael Niedermayer
b4d525eb63
avcodec/pnm: check buf[0] before using buf[1]
...
Fixes CSA warning
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Anton Khirnov
afa21a12bf
p*menc: use the AVFrame API properly.
11 years ago
Michael Niedermayer
62738157dd
pnmdec: always output native pixel format
...
This simplifies the code
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Paul B Mahol
a5155294e5
pnm: do not set avctx->coded_frame
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
12 years ago
Paul B Mahol
329221eee7
pnm: fix 255 < maxval < 65535 for pam with depth 1
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
12 years ago
Paul B Mahol
768e40b451
Revert "pnm: remove nonsense code"
...
Breaks decoding pgms with 256 < maxval < 65535.
Found-by: Carl Eugen Hoyos <cehoyos@ag.or.at>.
This reverts commit a0348d0966
.
12 years ago
Carl Eugen Hoyos
7e8e8ba9cc
Assume gray8 if 1 < maxval <= 255 in pgm.
12 years ago
Anton Khirnov
e6c4ac7b5f
pixdesc: rename PIX_FMT_* flags to AV_PIX_FMT_FLAG_*
12 years ago
Anton Khirnov
759001c534
lavc decoders: work with refcounted frames.
12 years ago
Martin Storsjö
86611ff123
pnm: Use av_pix_fmt_desc_get instead of accessing the array directly
...
This fixes boken fate tests with MSVC with DLLs, broken since
b5f536d24
.
Signed-off-by: Martin Storsjö <martin@martin.st>
12 years ago
Michael Niedermayer
5ecf8189c6
pnm: use av_pix_fmt_desc_get()
...
Using the table directly may cause problems on some platforms like msvc
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Kostya Shishkov
b5f536d24b
pnm: add high-bitdepth PGMYUV support for both encoder and decoder
12 years ago
Anton Khirnov
380242ca50
pnm: return meaningful error codes.
12 years ago
Paul B Mahol
cc5bcaa48e
pnm: cosmetics: reindent
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
12 years ago
Paul B Mahol
ae5ecb8e60
pnm: remove duplicated check for maxval > 255
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
12 years ago
Paul B Mahol
a0348d0966
pnm: remove nonsense code
...
If maxval is more than 255 than each value takes 2 bytes with most
significant byte first.
Signed-off-by: Paul B Mahol <onemda@gmail.com>
12 years ago
Anton Khirnov
716d413c13
Replace PIX_FMT_* -> AV_PIX_FMT_*, PixelFormat -> AVPixelFormat
12 years ago
Martin Storsjö
1d9c2dc89a
Don't include common.h from avutil.h
...
Signed-off-by: Martin Storsjö <martin@martin.st>
13 years ago
Michael Niedermayer
0049af2628
pnmdec: make ff_pnm_decode_header() more robust
...
Fixes ticket1321
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Niedermayer
bb7744a45b
pnmdec: make pnm_get more robust
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Anton Khirnov
36ef5369ee
Replace all CODEC_ID_* with AV_CODEC_ID_*
13 years ago
Diego Biurrun
562b6c744a
Remove unnecessary AVFrame pointer casts.
13 years ago
Michael Niedermayer
d9b3097ba2
pamdec: fix mono support.
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Carl Eugen Hoyos
66b9d7065a
pam: Fix a typo that broke writing and reading PAM files.
...
Reported and reviewed by Derek Buitenhuis.
Signed-off-by: Janne Grunau <janne-libav@jannau.net>
13 years ago
Carl Eugen Hoyos
b614c14767
Simplify 32bit pam decoding.
...
Reviewed-by: Paul B Mahol
13 years ago
Carl Eugen Hoyos
00430075bd
Support 64bit pam decoding.
13 years ago
Carl Eugen Hoyos
328e79329a
Support gray8a pam decoding.
13 years ago
Carl Eugen Hoyos
19b945dc2a
Cosmetics: Fix indentation.
...
Found by: Alexander Strasser
13 years ago
ami_stuff
febf75f3d2
pam: Reject 64bpp rgba.
...
Fixes ticket #883
13 years ago
ami_stuff
a44b63f6c8
Support 48bpp pam decoding.
...
Fixes ticket #882 .
13 years ago
ami_stuff
871e2f4fac
Support 16bpp grayscale pam decoding.
...
Fixes ticket #881 .
13 years ago
Carl Eugen Hoyos
190a0998c3
Fix a crash when reading gray pam files.
...
Fixes ticket #837 .
13 years ago
Carl Eugen Hoyos
c1bc1967f3
Fix a typo that broke writing (and reading) PAM files.
...
Reported and reviewed by Derek Buitenhuis.
13 years ago
Michael Niedermayer
0257ac8f12
pnm: Fix spurious error message.
...
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
Reinhard Tartler
7ffe76e540
Merge libavcore into libavutil
...
Done to keep ABI compatible. Otherwise this is just silly
14 years ago
Reinhard Tartler
737eb5976f
Merge libavcore into libavutil
...
It is pretty hopeless that other considerable projects will adopt
libavutil alone in other projects. Projects that need small footprint
are better off with more specialized libraries such as gnulib or rather
just copy the necessary parts that they need. With this in mind, nobody
is helped by having libavutil and libavcore split. In order to ease
maintenance inside and around FFmpeg and to reduce confusion where to
put common code, avcore's functionality is merged (back) to avutil.
Signed-off-by: Reinhard Tartler <siretart@tauware.de>
14 years ago
Carl Eugen Hoyos
8219782a6d
Do not stop decoding on pnm files with negative maxval.
...
Originally committed as revision 26304 to svn://svn.ffmpeg.org/ffmpeg/trunk
14 years ago
Daniel Kang
ebc3488300
Check for invalid maxval in pgm decoder, fixes issue 2518.
...
Patch by Daniel Kang, daniel.d.kang at gmail
Originally committed as revision 26292 to svn://svn.ffmpeg.org/ffmpeg/trunk
14 years ago
Stefano Sabatini
e16f217ceb
Use new imgutils.h API names, fix deprecation warnings.
...
Originally committed as revision 25058 to svn://svn.ffmpeg.org/ffmpeg/trunk
15 years ago
Stefano Sabatini
6ce9b4310c
Remove use of the deprecated function avcodec_check_dimensions(), use
...
av_check_image_size() instead.
Originally committed as revision 24711 to svn://svn.ffmpeg.org/ffmpeg/trunk
15 years ago
Michael Niedermayer
63538a960e
Support ASCII pnms.
...
Implements issue1452.
Originally committed as revision 20687 to svn://svn.ffmpeg.org/ffmpeg/trunk
15 years ago
Diego Biurrun
8767a009a1
Move PNM init/end functions to the PNM common code.
...
This is done in preparation for the PNM encoder/decoder split.
Originally committed as revision 20382 to svn://svn.ffmpeg.org/ffmpeg/trunk
15 years ago
Diego Biurrun
d3067047e7
whitespace cosmetics: K&R coding style, prettyprinting
...
Originally committed as revision 20381 to svn://svn.ffmpeg.org/ffmpeg/trunk
15 years ago
Justin Ruggles
5a92cc663c
pnm: Add missing 'else'. Fixes decoding for 16-bit pgm.
...
Originally committed as revision 17848 to svn://svn.ffmpeg.org/ffmpeg/trunk
16 years ago
Peter Ross
001821904e
Support 48-bit RGB PPM image.
...
Originally committed as revision 17511 to svn://svn.ffmpeg.org/ffmpeg/trunk
16 years ago
Diego Biurrun
406792e7b0
cosmetics: Remove pointless period after copyright statement non-sentences.
...
Originally committed as revision 16684 to svn://svn.ffmpeg.org/ffmpeg/trunk
16 years ago