summaryrefslogtreecommitdiff
path: root/libavcodec/ituh263dec.c
Commit message (Collapse)AuthorAge
* get_bits: move check_marker() to mpegvideodec.hAnton Khirnov2022-07-04
| | | | | It is only used by mpegvideo-based decoders - specifically mpeg12, intelh263, ituh263, mpeg4video.
* configure: Use a separate config_components.h header for $ALL_COMPONENTSMartin Storsjö2022-03-16
| | | | | | | | This avoids unnecessary rebuilds of most source files if only the list of enabled components has changed, but not the other properties of the build, set in config.h. Signed-off-by: Martin Storsjö <martin@martin.st>
* avcodec/ituh263dec: Reindent after the last commitAndreas Rheinhardt2022-02-18
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/ituh263dec: Make initializing VLCs thread-safeAndreas Rheinhardt2022-02-18
| | | | | | | This automatically makes the FLV, H.263, H.263+, Intel H.263, MPEG-4, RealVideo 1.0 and RealVideo 2.0 decoders init-threadsafe. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/rv10.h: Split header into decoder- and encoder-only partsAndreas Rheinhardt2022-02-13
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/flv.h: Split header into encoder-only and decoder-only headersAndreas Rheinhardt2022-02-13
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/mpeg4video.h: Move decoder-only parts to a new headerAndreas Rheinhardt2022-02-13
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* all: Remove unnecessary libavcodec/internal.h inclusionsAndreas Rheinhardt2022-02-08
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/ituh263dec: Use stack variable for aspect_ratio_infoAndreas Rheinhardt2022-01-29
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/h263: Move decoding-only stuff to a new header h263dec.hAndreas Rheinhardt2022-01-29
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/mpegvideo: Don't set unrestricted_mv for decodersAndreas Rheinhardt2022-01-13
| | | | | | It is write-only for them. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/h263: Move functions only used once to their callerAndreas Rheinhardt2022-01-09
| | | | | | | In this case it means moving ff_h263_pred_dc() resp. ff_h263_pred_acdc() to ituh263enc.c resp. ituh263dec.c. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/mpegvideo: Move startcodes to mpeg12.hAndreas Rheinhardt2021-09-20
| | | | | | | And remove the MPEG-4-specific SLICE_START_CODE, which duplicates SLICE_STARTCODE. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/h263data, ituh263*: Make initializing RL inter table thread-safeAndreas Rheinhardt2021-01-25
| | | | | | | | | | | | Up until now, ff_h263_rl_inter was initialized by both ituh263dec and ituh263enc; this is an obstacle in making the codecs that use this code init-threadsafe. This obstacle is eliminated by only initializing this RLTable from a single place that is guarded by a dedicated AVOnce. Reviewed-by: Anton Khirnov <anton@khirnov.net> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/ituh263dec: Don't initialize unused parts of RLTableAndreas Rheinhardt2021-01-25
| | | | | | | | | | The RLTable ff_rl_intra_aic is only used by ituh263dec and ituh263enc; the former only uses the RLTable's VLC, the latter only index_run, max_level and max_run. Yet ituh263dec also initializes the latter. This commit stops doing so. Reviewed-by: Anton Khirnov <anton@khirnov.net> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/msmpeg4dec: Reuse identical MV VLCAndreas Rheinhardt2021-01-25
| | | | | | | | | | msmpeg4dec and ituh263dec both create VLCs with identical parameters out of ff_mvtab. Given that ff_msmpeg4_decode_init() always (indirectly) calls ff_h263_decode_init_vlc(), the VLC initialized by the latter can be directly used by msmpeg4dec. Doing so saves a bit more than 2KB from the .bss segment as well as the code to initialize a VLC. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/ituh263dec: Don't initialize unused RL VLCsAndreas Rheinhardt2021-01-25
| | | | | | | | | | The ff_rl_intra_aic RLTable is only used by ituh263dec and ituh263enc; the former is the only user of its RL VLC tables. It uses only the very first one of these VLC tables, but up until now all 32 are initialized, wasting 68696B from the .bss segment (or that amount of memory if this decoder has actually been used). This commit changes this. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* lavu: move LOCAL_ALIGNED from internal.h to mem_internal.hAnton Khirnov2021-01-01
| | | | That is a more appropriate place for it.
* avcodec/rv10: Use symbol table more effectivelyAndreas Rheinhardt2020-12-08
| | | | | | | | | | | | | | | The RealVideo 1.0 decoder uses VLCs to parse DC coefficients. But the values returned from get_vlc2() are not directly used; instead -(val - 128) (which is in the range -127..128) is. This transformation is unnecessary as it can effectively be done when initializing the VLC by modifying the symbols table used. There is just one minor complication: The chroma table is incomplete and in order to distinguish an error from get_vlc2() (due to an invalid code) the ordinary return range is modified to 0..255. This is possible because the only caller of this function is (on success) only interested in the return value modulo 256. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/ituh263dec: Check input for minimal frame sizeMichael Niedermayer2019-10-08
| | | | | | | | Fixes: Timeout (28sec -> 3sec) Fixes: 17559/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_H263_fuzzer-5681050776240128 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/ituh263dec: Make the condition for the studio slice start code match ↵Michael Niedermayer2019-09-28
| | | | | | | | | | | between ff_h263_resync() and ff_mpeg4_decode_studio_slice_header() If they mismatch an infinite loop can occur Fixes: Timeout (infinite loop) Fixes: 17043/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MPEG4_fuzzer-5695051748868096 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/ituh263dec: Fix undefined left shift of negative numberAndreas Rheinhardt2019-09-28
| | | | | | | Fixes ticket #8160. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* mpeg4video: Add support for MPEG-4 Simple Studio Profile.Kieran Kunhya2018-04-02
| | | | This is a profile supporting > 8-bit video and has a higher quality DCT
* libavcodec/blockdsp : add AVX versionMartin Vignali2017-10-03
| | | | | | | Also modify the required alignment, to 32 instead of 16 for several codecs Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/ituh263dec: Use 0xffff as error code in h263p_decode_umotion()Michael Niedermayer2017-03-02
| | | | | | | | | This matches ff_h263_decode_motion() both functions error codes are interpreted by the same common code Fixes: 690/clusterfuzz-testcase-4744944981901312 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/ituh263dec: Check for the bitstream end in ff_h263_decode_mb()Michael Niedermayer2017-02-26
| | | | | | | | | | Fixes invalid shift Fixes: 670/clusterfuzz-testcase-4852021066727424 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/ituh263dec: Fix runtime error: left shift of 1342177279 by 1 places ↵Michael Niedermayer2017-02-24
| | | | | | | | | | | cannot be represented in type 'int' Fixes: 659/clusterfuzz-testcase-5866673603084288 Huge DMV could be created by an encoder ignoring the spec Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/ituh263dec: Fix runtime error: left shift of negative value -22Michael Niedermayer2017-02-21
| | | | | | | Fixes: 639/clusterfuzz-testcase-5143866241974272 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/ituh263dec: Check cbpy in ff_h263_decode_mb()Michael Niedermayer2017-02-20
| | | | | | | Fixes: 618/clusterfuzz-testcase-6594990333493248 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/ituh263dec: Implement U263s interpretation of H.263 B framesMichael Niedermayer2017-02-03
| | | | | | Fixes Ticket1536 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/ituh263dec: Correct timestamp recovery for B framesMichael Niedermayer2017-02-01
| | | | | | Improves u263_b-frames_5.avi Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/ituh263dec: Use correct error codes in ff_h263_decode_mb()Michael Niedermayer2017-02-01
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/ituh263dec: Correct indentionMichael Niedermayer2017-02-01
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/ituh263dec: Implement B frame support with UMVMichael Niedermayer2017-02-01
| | | | | | | | | | Fixes: u263_b-frames_1.avi Fixes part of Ticket1536 return -1 is used here as it is used in similar code in this function, I intend to replace it by proper error codes in the whole function. Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/ituh263dec: Avoid spending a long time in slice syncMichael Niedermayer2016-11-15
| | | | | | | Fixes: 177/fuzz-3-ffmpeg_VIDEO_AV_CODEC_ID_FLV1_fuzzer Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* lavc/get_bits: add a logging context to check_marker()Clément Bœsch2016-06-22
| | | | Based on d338abb664febbc2c7266af7818aab1f12dbc161
* Merge commit '41ed7ab45fc693f7d7fc35664c0233f4c32d69bb'Clément Bœsch2016-06-21
|\ | | | | | | | | | | | | * commit '41ed7ab45fc693f7d7fc35664c0233f4c32d69bb': cosmetics: Fix spelling mistakes Merged-by: Clément Bœsch <u@pkh.me>
| * cosmetics: Fix spelling mistakesVittorio Giovara2016-05-04
| | | | | | | | Signed-off-by: Diego Biurrun <diego@biurrun.de>
* | fix some a/an typosLou Logan2016-03-28
| | | | | | | | Signed-off-by: Lou Logan <lou@lrcd.com>
* | Merge commit '0a49a62f998747cfa564d98d36a459fe70d3299b'Michael Niedermayer2015-06-30
|\| | | | | | | | | | | | | | | | | | | | | * commit '0a49a62f998747cfa564d98d36a459fe70d3299b': h263: Always check both dimensions Conflicts: libavcodec/ituh263dec.c See: 62006b539ddda23594febf0fcb2f21c03de60457 Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * h263: Always check both dimensionsLuca Barbato2015-06-30
| | | | | | | | | | CC: libav-stable@libav.org Found-By: ago@gentoo.org
* | Merge commit '6f4cd33efb5a9ec75db1677d5f7846c60337129f'Michael Niedermayer2015-06-30
|\| | | | | | | | | | | | | * commit '6f4cd33efb5a9ec75db1677d5f7846c60337129f': cosmetic: Reformat ff_h263_decode_mba Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * cosmetic: Reformat ff_h263_decode_mbaLuca Barbato2015-06-30
| |
* | Merge commit 'e7af52a68dde9144b273a9598b60bf0f56e1323b'Michael Niedermayer2015-06-12
|\| | | | | | | | | | | | | * commit 'e7af52a68dde9144b273a9598b60bf0f56e1323b': mpegvideo: rv10: Move function declaration to a separate header Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * mpegvideo: rv10: Move function declaration to a separate headerVittorio Giovara2015-06-12
| |
* | Merge commit 'e3d0f49abb20a551bf6d885f75c354d6d0bbeb9d'Michael Niedermayer2015-06-12
|\| | | | | | | | | | | | | | | | | | | | | * commit 'e3d0f49abb20a551bf6d885f75c354d6d0bbeb9d': mpegvideo: h263: Move all tables to a single file Conflicts: libavcodec/h263.h libavcodec/h263data.h Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * mpegvideo: h263: Move all tables to a single fileVittorio Giovara2015-06-12
| |
* | Merge commit '378a00087fdadcc9b34165c05cd10a1a15f3fe61'Michael Niedermayer2015-06-01
|\| | | | | | | | | | | | | * commit '378a00087fdadcc9b34165c05cd10a1a15f3fe61': mpegvideo: Move tables to a separate file Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * mpegvideo: Move tables to a separate fileVittorio Giovara2015-05-31
| |
* | Merge commit '6f57375d707de40dcec28d3cef886c364e032c21'Michael Niedermayer2015-05-28
|\| | | | | | | | | | | | | | | | | | | | | | | * commit '6f57375d707de40dcec28d3cef886c364e032c21': rl: Rename ff_*_rl() to ff_rl_*() Conflicts: libavcodec/mpeg4videodec.c libavcodec/rl.c libavcodec/rl.h Merged-by: Michael Niedermayer <michaelni@gmx.at>