summaryrefslogtreecommitdiff
path: root/libavcodec/h264_cabac.c
Commit message (Collapse)AuthorAge
* avcodec/h264_*: Remove unnecessary internal.h inclusionsAndreas Rheinhardt2022-01-26
| | | | | | Also remove some other unnecessary headers while at it. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec/h264dec: Move pack8to16 to its only userAndreas Rheinhardt2022-01-26
| | | | | | Namely to h264_cabac.c. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* avcodec: [loongarch] Optimize decode_significance/_8x8_loongarch.Hao Chen2021-12-01
| | | | | | | | Decoding 1080P H264 from 168fps to 170fps. Signed-off-by: Shiyou Yin <yinshiyou-hf@loongson.cn> Reviewed-by: 陈昊 <chenhao@loongson.cn> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* Remove/replace some unnecessary avcodec.h inclusionsAndreas Rheinhardt2021-07-22
| | | | | | | Also remove other unnecessary headers and include headers directly while at it. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
* libavcodec, libpostproc: Remove outcommented START/STOP_TIMERAndreas Rheinhardt2020-03-14
| | | | | | | as well as includes of libavutil/timer.h. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/h264_cabac: Tighten allowed coeff_abs rangeMichael Niedermayer2018-02-15
| | | | | | | | | | Fixes: integer overflows Reported-by: "Xiaohan Wang (王消寒)" <xhwang@chromium.org> Based on limits in "8.5 Transform coefficient decoding process and picture construction process prior to deblocking filter process" Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* Merge commit '45c4bf3df03ef53ae61fa1473424d4ae024f22e4'James Almer2017-11-08
|\ | | | | | | | | | | | | * commit '45c4bf3df03ef53ae61fa1473424d4ae024f22e4': h264dec: track the last seen value of x264_build Merged-by: James Almer <jamrial@gmail.com>
* | avcodec/h264: Declare the local variable decode_chroma as const.Wan-Teh Chang2017-07-21
| | | | | | | | | | | | | | | | | | ff_h264_decode_mb_cabac() and ff_h264_decode_mb_cavlc() are very long functions. Declaring decode_chroma as const makes it clear the variable doesn't change after initialization. Signed-off-by: Wan-Teh Chang <wtc@google.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avcodec/h264: Fix mix of lossless and lossy MBs decodingAnton Mitrofanov2017-06-19
| | | | | | | | Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
* | avcodec/h264_cabac: Fix CABAC+8x8dct in 4:4:4Anton Mitrofanov2017-06-19
| | | | | | | | | | | | | | Use the correct ctxIdxInc calculation for coded_block_flag. Keep old behavior for old versions of x264 for backward compatibility. Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
* | Merge commit '0a35f128f3c6e0ae9a0a2236c557602c108da269'Clément Bœsch2017-04-08
|\| | | | | | | | | | | | | * commit '0a35f128f3c6e0ae9a0a2236c557602c108da269': cabac: x86: Give optimizations header a more meaningful name Merged-by: Clément Bœsch <u@pkh.me>
| * cabac: x86: Give optimizations header a more meaningful nameDiego Biurrun2016-12-01
| |
* | avcodec/h264_cabac: Fix runtime error: negation of -2147483648 cannot be ↵Michael Niedermayer2017-03-16
| | | | | | | | | | | | | | | | | | represented in type 'int'; cast to an unsigned type to negate this value to itself Fixes: 858/clusterfuzz-testcase-5168477042114560 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avcodec/h264_cabac: runtime error: signed integer overflow: 2147483647 + 14 ↵Michael Niedermayer2017-02-19
| | | | | | | | | | | | | | | | | | cannot be represented in type 'int' Fixes: 614/clusterfuzz-testcase-4931860079575040 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | Merge commit '8281cd5cb80582d668ce0848e0e035b383f161f6'James Almer2016-08-01
|\| | | | | | | | | | | | | * commit '8281cd5cb80582d668ce0848e0e035b383f161f6': h264_cabac: drop an always true condition Merged-by: James Almer <jamrial@gmail.com>
| * h264_cabac: drop an always true conditionAnton Khirnov2016-06-21
| |
* | Merge commit '9df889a5f116c1ee78c2f239e0ba599c492431aa'Clément Bœsch2016-07-29
|\| | | | | | | | | | | | | * commit '9df889a5f116c1ee78c2f239e0ba599c492431aa': h264: rename h264.[ch] to h264dec.[ch] Merged-by: Clément Bœsch <u@pkh.me>
| * h264: rename h264.[ch] to h264dec.[ch]Anton Khirnov2016-06-21
| | | | | | | | This is more consistent with the naming of other decoders.
* | Merge commit '6e92181bf836f48627a4733b6fd240a99fd36365'Clément Bœsch2016-07-01
|\| | | | | | | | | | | | | * commit '6e92181bf836f48627a4733b6fd240a99fd36365': h264: pass just the PPS to get_chroma_qp() Merged-by: Clément Bœsch <clement@stupeflix.com>
| * h264: pass just the PPS to get_chroma_qp()Anton Khirnov2016-06-12
| | | | | | | | | | It does not need the whole context. This will simplify the following commit.
* | Merge commit '4f81f8dba735c212efae077c4fec8ad4fe53b352'Clément Bœsch2016-06-29
|\| | | | | | | | | | | | | * commit '4f81f8dba735c212efae077c4fec8ad4fe53b352': Drop unnecessary golomb.h #includes Merged-by: Clément Bœsch <clement@stupeflix.com>
| * Drop unnecessary golomb.h #includesDiego Biurrun2016-06-08
| |
* | 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>
| * h264: Drop broken trace debug outputDiego Biurrun2016-05-03
| |
* | avodec/h264dec: fix compilation with -DTRACEJames Almer2016-06-16
| | | | | | | | Signed-off-by: James Almer <jamrial@gmail.com>
* | Merge commit '3176217c60ca7828712985092d9102d331ea4f3d'Clément Bœsch2016-06-12
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '3176217c60ca7828712985092d9102d331ea4f3d': h264: decouple h264_ps from the h264 decoder Main changes: - a local GetBitContext is created for the various ff_h264_decode_seq_parameter_set() attempts - just like the old code, remove_sps() is adjusted so it doesn't remove the pps. Fixes decode with Ticket #631 http://ffmpeg.org/pipermail/ffmpeg-user/attachments/20111108/dae58f17/attachment.mp4 but see next point as well. - ff_h264_update_thread_context() is updated to work even when SPS isn't set as it breaks current skip_frame code. This makes sure we can still decode the sample from ticket #631 without the need for -flags2 +chunks. (Thanks to Michael) - keep {sps,pps}_ref pointers that stay alive even when the active pps/sps get removed from the available lists (patch by michaelni with additionnal frees in ff_h264_free_context() from mateo) - added a check on sps in avpriv_h264_has_num_reorder_frames() to fix crashes with mpegts_with_dvbsubs.ts from Ticket #4074 http://samples.ffmpeg.org/ffmpeg-bugs/trac/ticket4074/mpegts_with_dvbsubs.ts - in h264_parser.c:h264_parse(), after the ff_h264_decode_extradata() is called, the pps and sps from the local parser context are updated with the pps and sps from the used h264context. This fixes fate-flv-demux. - in h264_slice.c, "PPS changed between slices" error is not triggered anymore in one condition as it makes fate-h264-xavc-4389 fails with THREADS=N (Thanks to Michael) Merged-by: Clément Bœsch <clement@stupeflix.com> Merged-by: Michael Niedermayer <michael@niedermayer.cc> Merged-by: Matthieu Bouron <matthieu.bouron@stupeflix.com>
| * h264: decouple h264_ps from the h264 decoderAnton Khirnov2016-04-24
| | | | | | | | | | | | | | | | | | Make the SPS/PPS parsing independent of the H264Context, to allow decoupling the parser from the decoder. The change is modelled after the one done earlier for HEVC. Move the dequant buffers to the PPS to avoid complex checks whether they changed and an expensive copy for frame threads.
* | Merge commit 'ecc31f6b086453ab9811dce2ae5ceb6a7c19e4ad'Derek Buitenhuis2016-04-27
|\| | | | | | | | | | | | | * commit 'ecc31f6b086453ab9811dce2ae5ceb6a7c19e4ad': h264: move ff_h264_check_intra[4x4]_pred_mode() to h264_parse Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
| * h264: move ff_h264_check_intra[4x4]_pred_mode() to h264_parseAnton Khirnov2016-03-28
| | | | | | | | It is shared with svq3.
* | Merge commit 'a7da517f6a5c472f46f67dd33bb6b95ccc919923'Derek Buitenhuis2016-04-24
|\| | | | | | | | | | | | | * commit 'a7da517f6a5c472f46f67dd33bb6b95ccc919923': h264data: Move all data tables from a header to a .c file Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
| * h264data: Move all data tables from a header to a .c fileDiego Biurrun2016-03-25
| |
| * h264: Use the correct argument context in debug logVittorio Giovara2015-10-04
| |
* | avcodec/h264_cabac: Check decode_cabac_mb_mvd() for failureMichael Niedermayer2016-02-14
| | | | | | | | | | | | | | | | | | Fixes harmless integer overflow Fixes Ticket5150 No speedloss measured, actually its slightly faster, but please benchmark & double check this Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avcodec/cabac: Check initial cabac decoder stateMichael Niedermayer2015-11-27
| | | | | | | | | | | | | | | | | | Fixes integer overflows Fixes: 1430e9c43fae47a24c179c7c54f94918/signal_sigsegv_421427_2340_591e9810c7b09efe501ad84638c9e9f8.264 Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Found-by: xiedingbao (Ticket4727) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avcodec/h264_cabac: Use ff_tlog() for block level informationMichael Niedermayer2015-04-26
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit '6a85dfc830f51f1f5c2d36d4182d265c1ea3ba25'Michael Niedermayer2015-04-20
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '6a85dfc830f51f1f5c2d36d4182d265c1ea3ba25': lavc: Replace av_dlog and tprintf with internal macros Conflicts: libavcodec/aacdec.c libavcodec/audio_frame_queue.c libavcodec/bitstream.c libavcodec/dcadec.c libavcodec/dnxhddec.c libavcodec/dvbsubdec.c libavcodec/dvdec.c libavcodec/dvdsubdec.c libavcodec/get_bits.h libavcodec/gifdec.c libavcodec/h264.h libavcodec/h264_cabac.c libavcodec/h264_cavlc.c libavcodec/h264_loopfilter.c libavcodec/h264_refs.c libavcodec/imc.c libavcodec/interplayvideo.c libavcodec/jpeglsdec.c libavcodec/libopencore-amr.c libavcodec/mjpegdec.c libavcodec/mpeg12dec.c libavcodec/mpegvideo_enc.c libavcodec/mpegvideo_parser.c libavcodec/pngdec.c libavcodec/ratecontrol.c libavcodec/rv10.c libavcodec/svq1dec.c libavcodec/vqavideo.c libavcodec/wmadec.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * lavc: Replace av_dlog and tprintf with internal macrosVittorio Giovara2015-04-19
| |
* | avcodec/h264_cabac: Drop local_ref_countMichael Niedermayer2015-03-22
| | | | | | | | | | | | | | | | | | 7966 -> 7897 decicycles This basically switches to the implementation from f6f7d1504134683c435e2c7d804279d982e52bb4 which seems faster Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit 'b53569e0681ff7bc99103ab4c961dbac3cc0fce6'Michael Niedermayer2015-03-21
|\| | | | | | | | | | | | | | | | | | | * commit 'b53569e0681ff7bc99103ab4c961dbac3cc0fce6': h264_cabac: remove now unnecessary H264Context function parameters Conflicts: libavcodec/h264_cabac.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * h264_cabac: remove now unnecessary H264Context function parametersAnton Khirnov2015-03-21
| |
* | Merge commit 'ba7e165b864d69da4f0c79ec7757cb351535002f'Michael Niedermayer2015-03-21
|\| | | | | | | | | | | | | * commit 'ba7e165b864d69da4f0c79ec7757cb351535002f': h264_cabac: constify all uses of H264Context Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * h264_cabac: constify all uses of H264ContextAnton Khirnov2015-03-21
| | | | | | | | | | All the variables modified by this code are either per-MB arrays or have been moved to the per-slice context
* | Merge commit 'e9b2383bf86b38ad18a001801aee20c8182e29bd'Michael Niedermayer2015-03-21
|\| | | | | | | | | | | | | | | | | | | | | | | * commit 'e9b2383bf86b38ad18a001801aee20c8182e29bd': h264: move mb_mbaff into the per-slice context Conflicts: libavcodec/h264_cabac.c libavcodec/h264_cavlc.c libavcodec/h264_slice.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * h264: move mb_mbaff into the per-slice contextAnton Khirnov2015-03-21
| |
* | Merge commit 'bc98e8c0e0a8babfea35c98855e366b29cbe1191'Michael Niedermayer2015-03-21
|\| | | | | | | | | | | | | | | | | | | * commit 'bc98e8c0e0a8babfea35c98855e366b29cbe1191': h264: move mb_field_decoding_flag into the per-slice context Conflicts: libavcodec/h264_slice.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * h264: move mb_field_decoding_flag into the per-slice contextAnton Khirnov2015-03-21
| |
* | Merge commit 'd4d9068cdf8f4b2b87ae87a2ef880d243f77b977'Michael Niedermayer2015-03-21
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | * commit 'd4d9068cdf8f4b2b87ae87a2ef880d243f77b977': h264: move mb_{x,y} into the per-slice context Conflicts: libavcodec/h264.c libavcodec/h264_cavlc.c libavcodec/h264_mb.c libavcodec/h264_slice.c libavcodec/svq3.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * h264: move mb_{x,y} into the per-slice contextAnton Khirnov2015-03-21
| |
* | Merge commit '0edbe6faa7ef80daf0e84353cbe733389bf1a522'Michael Niedermayer2015-03-21
|\| | | | | | | | | | | | | | | | | | | | | | | * commit '0edbe6faa7ef80daf0e84353cbe733389bf1a522': h264: move mb_xy into the per-slice context Conflicts: libavcodec/h264.c libavcodec/h264_cabac.c libavcodec/svq3.c Merged-by: Michael Niedermayer <michaelni@gmx.at>