199d9f995d 
								
							
								 
							
						 
						
							
							
								
								mjpegdec: fix undefined shift  
							
							Add a comment to explain the code.
CC: libav-stable@libav.org 
Bug-Id: CID 1194388 
							
						 
						11 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								c5ffd7aee5 
								
							
								 
							
						 
						
							
							
								
								avcodec/mjpegdec: use FF_CEIL_RSHIFT() for width  
							
							No testcase known
Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						11 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								d5a3a20d1e 
								
							
								 
							
						 
						
							
							
								
								avcodec/mjpegdec: simplify chroma_height calculation  
							
							Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						11 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								059c842818 
								
							
								 
							
						 
						
							
							
								
								avcodec/mjpegdec: Support 24111100 pix fmt id  
							
							Fixes 129533924_640.jpg
Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						11 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								0db1f2c2c7 
								
							
								 
							
						 
						
							
							
								
								avcodec/mjpegdec: sanity check bits  
							
							Fixes undefined shift
Fixes: asan_heap-oob_16668e9_2_asan_heap-oob_16668e9_346_miss_congeniality_pegasus_mjpg.avi
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						11 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								5c378d6a6d 
								
							
								 
							
						 
						
							
							
								
								avcodec/mjpegdec: check bits per pixel for changes similar to dimensions  
							
							Fixes out of array accesses
Fixes: asan_heap-oob_16668e9_2_asan_heap-oob_16668e9_346_miss_congeniality_pegasus_mjpg.avi
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						11 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								b96d864fd6 
								
							
								 
							
						 
						
							
							
								
								avcodec/mjpegdec: Fix chroma width rounding  
							
							Fixes vertical line at the right side
Fixes Ticket 3929
Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						11 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								1654ca7d4e 
								
							
								 
							
						 
						
							
							
								
								avcodec/mjpegdec: fix rounding of chroma_height  
							
							Fixes green line at the bottom
Fixes Ticket3913
Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						11 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								f0d4f00f24 
								
							
								 
							
						 
						
							
							
								
								avcodec/mjpegdec: fix green line at the bottom with upscale v  
							
							Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						11 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								63a52ca134 
								
							
								 
							
						 
						
							
							
								
								avcodec/mjpegdec: fix green vertical line at the right with upscale h  
							
							Fixes Ticket3891
Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						11 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								5c7899a483 
								
							
								 
							
						 
						
							
							
								
								avcodec/mjpegdec: Support AV_PIX_FMT_YUV420P16 with upscale_h  
							
							Fixes assertion failure
Fixes: test42f.jpg
Found-by: Piotr Bandurski <ami_stuff@o2.pl>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						11 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								c68098ba4a 
								
							
								 
							
						 
						
							
							
								
								avcodec/mjpegdec: add pix_fmt: 0x14121200  
							
							Fixes: _15801_F.jpg
Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						11 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								ef7e8425e8 
								
							
								 
							
						 
						
							
							
								
								avcodec/mjpegdec: factorize some parts of the pix_fmt_id switch()  
							
							Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						11 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								784e1cf76b 
								
							
								 
							
						 
						
							
							
								
								avcodec/mjpegdec: handle luma upscale detection generically  
							
							Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						11 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								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  
				
					
						
							
							
								 
						
							
							
							
								
							
								7558e55345 
								
							
								 
							
						 
						
							
							
								
								avcodec/mjpegdec: Support pix_fmt_id==0x11222200  
							
							Fixes: 4858286_300.jpg
Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						11 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								cd417d947e 
								
							
								 
							
						 
						
							
							
								
								avcodec/mjpegdec: fix width for non chroma in rescaling  
							
							Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						11 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								4e09300ffa 
								
							
								 
							
						 
						
							
							
								
								mjpegdec: Support pix_fmt_id == 0x22112200  
							
							Fixes 4780490_300.jpg
Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						11 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								e3fcb14347 
								
							
								 
							
						 
						
							
							
								
								dsputil: Split off IDCT bits into their own context  
							
							
								
							
							
						 
						11 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								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  
				
					
						
							
							
								 
						
							
							
							
								
							
								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  
				
					
						
							
							
								 
						
							
							
							
								
							
								9e500efdbe 
								
							
								 
							
						 
						
							
							
								
								Add av_image_check_sar() and use it to validate SAR  
							
							
								
							
							
						 
						11 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								e74433a8e6 
								
							
								 
							
						 
						
							
							
								
								dsputil: Split clear_block*/fill_block* off into a separate context  
							
							
								
							
							
						 
						11 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								0545ef7116 
								
							
								 
							
						 
						
							
							
								
								avcodec/mjpegdec: Improve intel jpeg flip heuristic  
							
							Fixes Ticket3698
Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						11 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								149be91374 
								
							
								 
							
						 
						
							
							
								
								avcodec/mjpegdec: request a AMV sample with non mod 16 height  
							
							Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						11 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								ec33f59fed 
								
							
								 
							
						 
						
							
							
								
								avcodec/mjpegdec: Support pix_fmt_id== 0x42111100  
							
							Fixes: 538782_300.jpg
Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						11 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								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  
				
					
						
							
							
								 
						
							
							
							
								
							
								8532566e80 
								
							
								 
							
						 
						
							
							
								
								avcodec/mjpegdec: use av_mallocz_array()  
							
							Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						11 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								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  
				
					
						
							
							
								 
						
							
							
							
								
							
								b432960528 
								
							
								 
							
						 
						
							
							
								
								avcodec/mjpegdec: Fix undefined shift  
							
							Fixes CID1194388
Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						11 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								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  
				
					
						
							
							
								 
						
							
							
							
								
							
								591c0c26b5 
								
							
								 
							
						 
						
							
							
								
								mjpeg: cosmetics: indentation  
							
							Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com> 
							
						 
						11 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								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  
				
					
						
							
							
								 
						
							
							
							
								
							
								8c161d7884 
								
							
								 
							
						 
						
							
							
								
								lavc/exif: Make EXIF IFD decoding part of private API/ABI.  
							
							Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						11 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								254f653b24 
								
							
								 
							
						 
						
							
							
								
								avcodec/jpeglsdec: add PAL8 support  
							
							Fixes Ticket3478
Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						11 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								d56c373391 
								
							
								 
							
						 
						
							
							
								
								avcodec/mjpegdec: fix cmyk 420 with adobe_transform == 2  
							
							Fixes Ticket3516
Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						11 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								559c8b9ee9 
								
							
								 
							
						 
						
							
							
								
								avcodec/mjpegdec: support subsampled 420 CMYK  
							
							Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						11 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								798490812a 
								
							
								 
							
						 
						
							
							
								
								avcodec/mjpegdec: upgrade upscale_v to support multiple planes  
							
							Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						11 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								f9059ce794 
								
							
								 
							
						 
						
							
							
								
								avcodec/mjpegdec: upgrade upscale_h to support multiple planes  
							
							Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						11 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								dde16f5aae 
								
							
								 
							
						 
						
							
							
								
								avcodec/mjpegdec: Switch default interlaced polarity for MJPG to 1  
							
							Fixes Ticket3229
Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						11 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								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  
				
					
						
							
							
								 
						
							
							
							
								
							
								046a75eea0 
								
							
								 
							
						 
						
							
							
								
								avcodec/mjpeg: print info from parse_avid() if requested  
							
							Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						11 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								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  
				
					
						
							
							
								 
						
							
							
							
								
							
								1083c479eb 
								
							
								 
							
						 
						
							
							
								
								avcodec/mjpegdec: factorize parse_avid out  
							
							Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						11 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								1c1fbc70ca 
								
							
								 
							
						 
						
							
							
								
								mjpeg: set color_range  
							
							
								
							
							
						 
						11 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								e161c1bbfc 
								
							
								 
							
						 
						
							
							
								
								avcodec/mjpegdec: support adob transform 2  
							
							Fixes Ticket3426
Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						11 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								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  
				
					
						
							
							
								 
						
							
							
							
								
							
								501beae6f9 
								
							
								 
							
						 
						
							
							
								
								avcodec/mjpegdec: fix decoding 4th plane  
							
							Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						11 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								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  
				
					
						
							
							
								 
						
							
							
							
								
							
								681e72a668 
								
							
								 
							
						 
						
							
							
								
								avcodec/mjpegdec: parse adobe_transform  
							
							Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						11 years ago