3caecf7ce8 
								
							
								 
							
						 
						
							
							
								
								avcodec: do not use init_static_data on some codecs  
							
							They don't modify AVCodec, no needs to call it at register. They will be
wasteful if these codecs are unused. Instead, call static data initialization
at codecs' init.
Benchmark:
old: 51281340 decicycles in avcodec_register_all,       1 runs,      0 skips
new:  6738960 decicycles in avcodec_register_all,       1 runs,      0 skips
Reviewed-by: wm4 <nfxjfg@googlemail.com>
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Muhammad Faiz <mfcc64@gmail.com> 
							
						 
						7 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								658bdc6771 
								
							
								 
							
						 
						
							
							
								
								lavc/jpeg2000dec: Support reading 64-bit atom size.  
							
							Fixes ticket #6935 . 
							
						 
						7 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								80344959f0 
								
							
								 
							
						 
						
							
							
								
								avcodec/jpeg2000dec: Free lengthinc earlier  
							
							Reduces memory needed
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> 
							
						 
						7 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								42274db1c6 
								
							
								 
							
						 
						
							
							
								
								avcodec/jpeg2000dec: Allocate lengthinc and data_start arrays as needed  
							
							Decreases memory requirements
Fixes: OOM
Fixes: 4525/clusterfuzz-testcase-minimized-6400713073623040
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg 
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> 
							
						 
						7 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								3d5822d9cf 
								
							
								 
							
						 
						
							
							
								
								avcodec/jpeg2000: Dynamically allocate codeblock data  
							
							Fixes: OOM
Fixes: 3541/clusterfuzz-testcase-minimized-6469958596820992
Adds support for decoding codeblock data larger than 8kb
Reduces decoder memory consumption
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  
				
					
						
							
							
								 
						
							
							
							
								
							
								b998a56b0a 
								
							
								 
							
						 
						
							
							
								
								lavc/jpeg2000dec: Fix used variables reading palette.  
							
							Affected files with palette and colour-depth < 8. 
							
						 
						8 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								5d0b69f3b7 
								
							
								 
							
						 
						
							
							
								
								avcodec/jpeg2000dec: Fix h/vden typo  
							
							Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> 
							
						 
						8 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								1b00600319 
								
							
								 
							
						 
						
							
							
								
								avcodec/jpeg2000dec: Fix division by zero in jp2_find_codestream()  
							
							Fixes: 2707/clusterfuzz-testcase-minimized-5179636394754048
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  
				
					
						
							
							
								 
						
							
							
							
								
							
								4c1aac893c 
								
							
								 
							
						 
						
							
							
								
								lavc/jpeg2000dec: Read the sample aspect ratio from the jp2 resolution box.  
							
							
								
							
							
						 
						8 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								dfb61ea263 
								
							
								 
							
						 
						
							
							
								
								avcodec/jpeg2000dec: Check nonzerobits more completely  
							
							Fixes: runtime error: shift exponent 36 is too large for 32-bit type 'int'
Fixes: 2239/clusterfuzz-testcase-minimized-5639766592716800
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  
				
					
						
							
							
								 
						
							
							
							
								
							
								f3da6fbff8 
								
							
								 
							
						 
						
							
							
								
								avcodec/jpeg2000dec: Use ff_set_dimensions()  
							
							Fixes: OOM
Fixes: 1890/clusterfuzz-testcase-minimized-6329019509243904
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  
				
					
						
							
							
								 
						
							
							
							
								
							
								9c1812491f 
								
							
								 
							
						 
						
							
							
								
								avcodec/jpeg2000dec: Check tile offsets more completely  
							
							Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> 
							
						 
						8 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								5782e0ba8c 
								
							
								 
							
						 
						
							
							
								
								avcodec/jpeg2000dec: Fix copy and paste error  
							
							Found-by: jamrial
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> 
							
						 
						8 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								89325417e7 
								
							
								 
							
						 
						
							
							
								
								avcodec/jpeg2000dec: Check tile offsets  
							
							Fixes: runtime error: signed integer overflow: 4096 - -2147483648 cannot be represented in type 'int'
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  
				
					
						
							
							
								 
						
							
							
							
								
							
								a75ef1506a 
								
							
								 
							
						 
						
							
							
								
								lavc/jpeg2000dec: Fix jp2 inner atom size used for overread checks.  
							
							
								
							
							
						 
						8 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								585cfabb79 
								
							
								 
							
						 
						
							
							
								
								avcodec/jpeg2000dec: add slice threading support  
							
							Signed-off-by: Paul B Mahol <onemda@gmail.com> 
							
						 
						9 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								e2298b3fcc 
								
							
								 
							
						 
						
							
							
								
								avcodec/jpeg2000dec: account two last bytes from end of bytestream as EOC marker  
							
							This silences missing EOC marker when decoding j2k files with Psot set to 0.
Signed-off-by: Paul B Mahol <onemda@gmail.com> 
							
						 
						9 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								0aada30510 
								
							
								 
							
						 
						
							
							
								
								avcodec/jpeg2000dec: More completely check cdef  
							
							Fixes out of array read
Fixes: j2k-poc.bin
Found-by: Lucas Leong <wmliang.tw@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> 
							
						 
						9 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								2c6811397b 
								
							
								 
							
						 
						
							
							
								
								lavc: add profiles to AVCodecDescriptor  
							
							The profiles are a property of the codec, so it makes sense to export
them through AVCodecDescriptors, not just the codec implementations. 
							
						 
						10 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								a85b02dcf7 
								
							
								 
							
						 
						
							
							
								
								avcodec/jpeg2000dec: Check bpno in decode_cblk()  
							
							Fixes: undefined shift
Fixes: c409ef86f892335a0a164b5871174d5a/asan_heap-oob_1dff564_2159_162b7234616deab02b544410455eb07b.mov
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> 
							
						 
						10 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								0eb7de1973 
								
							
								 
							
						 
						
							
							
								
								avcodec/jpeg2000: Change coord to 32bit to support larger than 32k width or height  
							
							Fixes: 03e0abe721b1174856d41a1eb5d6a896/signal_sigabrt_7ffff6ae7cc9_3813_e71bf3541abed3ccba031cd5ba0269a4.avi
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> 
							
						 
						10 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								65d3359fb3 
								
							
								 
							
						 
						
							
							
								
								avcodec/jpeg2000dec: Fix potential integer overflow with tile dimensions  
							
							Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> 
							
						 
						10 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								6ef819c40b 
								
							
								 
							
						 
						
							
							
								
								avcodec/jpeg2000dec: Check SIZ dimensions to be within the supported range  
							
							Fixes potential integer overflows
Fixes: 03e0abe721b1174856d41a1eb5d6a896/signal_sigabrt_7ffff6ae7cc9_3813_e71bf3541abed3ccba031cd5ba0269a4.avi
This fix is choosen to be simple to backport, better solution
for master is planed
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> 
							
						 
						10 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								44a7f17d0b 
								
							
								 
							
						 
						
							
							
								
								avcodec/jpeg2000dec: Check for duplicate SIZ marker  
							
							Fixes: 0231a17345734228011c6f35a64e4594/asan_heap-oob_1d92a72_3218_1213809a9e3affec77e4c191fdfdc0a9.mov
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> 
							
						 
						10 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								43492ff3ab 
								
							
								 
							
						 
						
							
							
								
								avcodec/jpeg2000dec: Clip all tile coordinates  
							
							Fixes out of array access
Fixes: b877a6b788a25c70e8b1d014f8628549/asan_heap-oob_1da2c3f_2324_5a1b329b0b3c4bb6b1d775660ac56717.r3d
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> 
							
						 
						10 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								c980c5e54d 
								
							
								 
							
						 
						
							
							
								
								avcodec/jpeg2000dec: Clear properties in jpeg2000_dec_cleanup() too  
							
							Fixes: Ticket4878
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> 
							
						 
						10 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								c08b06c225 
								
							
								 
							
						 
						
							
							
								
								avcodec/jpeg2000dec: Check that step_x/y are valid before use in JPEG2000_PGOD_PCRL  
							
							Fixes: CID1322305 and CID1322304
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> 
							
						 
						10 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								1b709f23fb 
								
							
								 
							
						 
						
							
							
								
								jpeg2000: Refactor decode_packets  
							
							Move the packet-specific parsers in separate functions. 
							
						 
						10 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								29b00f880f 
								
							
								 
							
						 
						
							
							
								
								jpeg2000: Templatize the frame writer  
							
							
								
							
							
						 
						10 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								41bcc3d152 
								
							
								 
							
						 
						
							
							
								
								jpeg2000: Split codeblock decoding from the main tile decoding  
							
							That loop is completely stand-alone. 
							
						 
						10 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								5788623d29 
								
							
								 
							
						 
						
							
							
								
								jpeg2000: Split codeblock decoding from the main tile decoding  
							
							That loop is completely stand-alone. 
							
						 
						10 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								db53a2306f 
								
							
								 
							
						 
						
							
							
								
								jpeg2000: Do not warn about known and skippable markers  
							
							Matches the openjpeg behaviour. 
							
						 
						10 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								5d8e836d0e 
								
							
								 
							
						 
						
							
							
								
								Replace all remaining occurances of step/depth_minus1 and offset_plus1  
							
							
								
							
							
						 
						10 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								a87ada53c3 
								
							
								 
							
						 
						
							
							
								
								avcodec/jpeg2000dec: Initialize ret to avoid warning and make the code more robust  
							
							"Fixes" CID1322361
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> 
							
						 
						10 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								9e70475551 
								
							
								 
							
						 
						
							
							
								
								avcodec/jpeg2000dec: Assert that step_x/y are valid  
							
							Fixes CID1322304, CID1322305
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> 
							
						 
						10 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								daf2c35f52 
								
							
								 
							
						 
						
							
							
								
								lavc: Remove newline from avpriv_request_sample() calls.  
							
							
								
							
							
						 
						10 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								def97856de 
								
							
								 
							
						 
						
							
							
								
								lavc: AV-prefix all codec capabilities  
							
							Express bitfields more simply.
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com> 
							
						 
						10 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								7c6eb0a1b7 
								
							
								 
							
						 
						
							
							
								
								lavc: AV-prefix all codec flags  
							
							Convert doxygen to multiline and express bitfields more simply.
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com> 
							
						 
						10 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								c239fcb948 
								
							
								 
							
						 
						
							
							
								
								lavc/jpeg2000: Signal lossless / bit-exact video stream.  
							
							
								
							
							
						 
						10 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								d554715f67 
								
							
								 
							
						 
						
							
							
								
								avcodec/jpeg2000dec: Fix decoding of subsampled multi tile images  
							
							Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						10 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								007e27d363 
								
							
								 
							
						 
						
							
							
								
								avcodec: add missing CODEC_CAP_DR1 to codecs using get_buffer()  
							
							
								
							
							
						 
						10 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								ecbd111768 
								
							
								 
							
						 
						
							
							
								
								avcodec/jpeg2000dec: Remove unused variables  
							
							Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						10 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								96e73fa649 
								
							
								 
							
						 
						
							
							
								
								avcodec/jpeg2000dec: Merge i_stepsize/2 decoder special case into dequant  
							
							Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						10 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								5cccbc3b74 
								
							
								 
							
						 
						
							
							
								
								avcodec/jpeg2000dec: Check for mismatching per expected termination  
							
							not just at the end
Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						10 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								8672c0a643 
								
							
								 
							
						 
						
							
							
								
								avcodec/jpeg2000dec: Limit poc end fields to whats available in jpeg2000_decode_packets()  
							
							Fixes: Ticket4677
Solution based on information from
https://code.google.com/p/openjpeg/issues/detail?id=80 
Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						10 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								b75c0a72ed 
								
							
								 
							
						 
						
							
							
								
								avcodec/jpeg2000dec: Fix tp_index for POC  
							
							Fixes Ticket2586
Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						10 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								c56ba5c270 
								
							
								 
							
						 
						
							
							
								
								avcodec/jpeg2000dec: Print what is found in place of EPH if EPH is not found  
							
							Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						10 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								c72a831931 
								
							
								 
							
						 
						
							
							
								
								avcodec/jpeg2000dec: Support progression order changes  
							
							Fixes Ticket4657
Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						10 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								2ec0ba1e22 
								
							
								 
							
						 
						
							
							
								
								avcodec/jpeg2000dec: Parse POCs  
							
							Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						10 years ago  
				
					
						
							
							
								 
						
							
							
							
								
							
								7ca0cd5831 
								
							
								 
							
						 
						
							
							
								
								avcodec/jpeg2000dec: iterate in tile sample space for CPRL & RPCL  
							
							Thats what the spec says should be done
aka iterate in the wrong space and use special cases to patch that up.
It sometimes can result in different order
Signed-off-by: Michael Niedermayer <michaelni@gmx.at> 
							
						 
						10 years ago