Michael Niedermayer
ef7e8425e8
avcodec/mjpegdec: factorize some parts of the pix_fmt_id switch()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
784e1cf76b
avcodec/mjpegdec: handle luma upscale detection generically
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
64d98dadc7
avcodec/mjpegdec: set upscale_h/upscale_v using generic code instead of hardcoding a list
...
Some code is left to handle corner cases
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
7558e55345
avcodec/mjpegdec: Support pix_fmt_id==0x11222200
...
Fixes: 4858286_300.jpg
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
cd417d947e
avcodec/mjpegdec: fix width for non chroma in rescaling
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
4e09300ffa
mjpegdec: Support pix_fmt_id == 0x22112200
...
Fixes 4780490_300.jpg
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Diego Biurrun
e3fcb14347
dsputil: Split off IDCT bits into their own context
11 years ago
Derek Buitenhuis
2deb614272
mjpegdec: Properly set the context colorspace info
...
The JPEG spec requires it to be this.
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
11 years ago
Derek Buitenhuis
c11043aca7
mjpegdec: Properly set the context colorspace info
...
The JPEG spec requires it to be this.
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
11 years ago
Justin Ruggles
9e500efdbe
Add av_image_check_sar() and use it to validate SAR
11 years ago
Diego Biurrun
e74433a8e6
dsputil: Split clear_block*/fill_block* off into a separate context
11 years ago
Michael Niedermayer
0545ef7116
avcodec/mjpegdec: Improve intel jpeg flip heuristic
...
Fixes Ticket3698
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
149be91374
avcodec/mjpegdec: request a AMV sample with non mod 16 height
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
ec33f59fed
avcodec/mjpegdec: Support pix_fmt_id== 0x42111100
...
Fixes: 538782_300.jpg
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
aff352be63
avcodec/mjpegdec: zero gb to silence warning about it being possibly uninitialized
...
The code is not speed relevant, also its more robust if the pointers are NULL instead of random.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
8532566e80
avcodec/mjpegdec: use av_mallocz_array()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
e31727bd53
avcodec/mjpegdec: make type of shift unsigned to avoid undefined behavior
...
Found-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
b432960528
avcodec/mjpegdec: Fix undefined shift
...
Fixes CID1194388
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Carl Eugen Hoyos
ced0d6c14d
Use correct msvc type specifiers for ptrdiff_t and size_t.
...
The Windows runtime aborts if it finds %t or %z.
Fixes ticket #3472 .
Reviewed-by: Ronald Bultje
11 years ago
Justin Ruggles
591c0c26b5
mjpeg: cosmetics: indentation
...
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
11 years ago
Justin Ruggles
39ef000e19
mjpeg: Do not fail jpeg decoding on bad EXIF data.
...
It is not required to correctly decode the image.
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
11 years ago
Thilo Borgmann
8c161d7884
lavc/exif: Make EXIF IFD decoding part of private API/ABI.
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
254f653b24
avcodec/jpeglsdec: add PAL8 support
...
Fixes Ticket3478
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
d56c373391
avcodec/mjpegdec: fix cmyk 420 with adobe_transform == 2
...
Fixes Ticket3516
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
559c8b9ee9
avcodec/mjpegdec: support subsampled 420 CMYK
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
798490812a
avcodec/mjpegdec: upgrade upscale_v to support multiple planes
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
f9059ce794
avcodec/mjpegdec: upgrade upscale_h to support multiple planes
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
dde16f5aae
avcodec/mjpegdec: Switch default interlaced polarity for MJPG to 1
...
Fixes Ticket3229
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
493296800c
avcodec/mjpegdec: parse avid data from extradata
...
Makes no difference for any file tested but is needed
for following bug-fix
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
046a75eea0
avcodec/mjpeg: print info from parse_avid() if requested
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
98f9aa389b
avcodec/mjpegdec: switch interlaced_polarity to 0 for PAL AVID
...
0 should have been the default, this change should make no difference
but this is needed for the following bugfix
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
1083c479eb
avcodec/mjpegdec: factorize parse_avid out
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Vittorio Giovara
1c1fbc70ca
mjpeg: set color_range
11 years ago
Michael Niedermayer
e161c1bbfc
avcodec/mjpegdec: support adob transform 2
...
Fixes Ticket3426
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
a05635ee01
avcodec/mjpegdec: convert CMYK to GBRAP
...
Fixes Ticket2799
This should be moved into swscale once we have a CMYK pixel format
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
501beae6f9
avcodec/mjpegdec: fix decoding 4th plane
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
6904168c79
avcodec/mjpegdec: Print error in case of CMYK
...
Also fail if AV_EF_EXPLODE is set.
We do not fail by default, but rather return some image as it may be usefull to the
end user to see what is on the image, for example text could be read quite fine and
objects recognized.
Possibly fixes Ticket3424
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
681e72a668
avcodec/mjpegdec: parse adobe_transform
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
7e8be7081f
avcodec/mjpegdec: Print human readable string for APPx
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
19b41f8645
avcodec/mjpegdec: use the correct linesize in the flipping code
...
Fixes out of array access
No releases should be affected
Depends on 7c3700cd1d
, do not backport without this one
Fixes: asan_heap-oob_14a37fe_9111_cov_1692584941_test4.amv
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
2884688bd5
avcodec/mjpegdec: pass into ff_mjpeg_decode_sos() and check bitmask size
...
Fixes: heap array overread
Fixes: asan_heap-oob_149b2bc_6577_m1.mxg
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
b80073c05f
avcodec/mjpegdec: use av_freep() instead of av_free()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
ed56c021e7
avcodec/mjpegdec Fix potential memleak of stereo3D at the end in case of decoding failure
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Kirill Gavrilov
e9e7e68516
mjpegdec: parse JPS extension and save relevant stereo3d information
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
ad8d063f23
avcodec/mjpegdec: Dont skip picture allocation if theres no picture allocated
...
Fixes Ticket 3245
11 years ago
Michael Niedermayer
31e703e899
avcodec/mjpegdec: Dont treat the lack of a startcode differently from end of the bitstream
...
Fixes Ticket3303
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
361e27a3d8
avcodec/mjpegdec: only run EOI emulation code when there was a scan
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
8893f31e20
avcodec/mjpegdec: update cur_scan also for non-LS jpeg
...
This should make no difference but the variable will be used in a subsequent commit
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
ebfa1264aa
avcodec/mjpegdec: allow lowres with amv
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
7c3700cd1d
avcodec/mjpegdec: use the AVFrame width/height for flipping
...
This makes it possible to use the code with lowres
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago