summaryrefslogtreecommitdiffstats
path: root/libavcodec/h264_ps.c
Commit message (Collapse)AuthorAgeFilesLines
* avcodec/h264_ps: Move MAX_LOG2_MAX_FRAME_NUM to header so it can be used in ↵Michael Niedermayer2018-06-111-1/+0
| | | | | | h264_sei Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* h264: Make Truncating SPS/PPS message debug.Kieran Kunhya2017-11-041-2/+2
|
* avcodec/h264dec: export cropping information instead of handling it internallyJames Almer2017-05-261-9/+0
| | | | | | | | | | | | | This merges commit c3e84820d67cb1d8cfb4196f9b43971308a81571 from libav, originally written by Anton Khirnov and skipped in fc63d5ceb357c4b760cb02772de0b50d0557140f. libavcodec/h264_picture.c | 3 --- libavcodec/h264_ps.c | 9 --------- libavcodec/h264_slice.c | 25 +++++++++++++++++++------ libavcodec/h264dec.c | 13 +------------ libavcodec/h264dec.h | 9 +++++---- 5 files changed, 25 insertions(+), 34 deletions(-)
* Merge commit 'ff9db5cfd14558df9cfcc54d6c062bc34bf1f341'Clément Bœsch2017-04-081-3/+5
|\ | | | | | | | | | | | | * commit 'ff9db5cfd14558df9cfcc54d6c062bc34bf1f341': lavc: Use a stricter check for the color properties values Merged-by: Clément Bœsch <u@pkh.me>
| * lavc: Use a stricter check for the color properties valuesVittorio Giovara2016-12-021-3/+5
| | | | | | | | Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
* | Merge commit '67deba8a416d818f3d95aef0aa916589090396e2'Clément Bœsch2017-03-311-2/+2
|\ \ | |/ | | | | | | | | | | * commit '67deba8a416d818f3d95aef0aa916589090396e2': Use avpriv_report_missing_feature() where appropriate Merged-by: Clément Bœsch <cboesch@gopro.com>
| * Use avpriv_report_missing_feature() where appropriateDiego Biurrun2016-11-081-3/+2
| |
* | avcodec/h264_ps: Fix runtime error: signed integer overflow: 2147483647 + 26 ↵Michael Niedermayer2017-03-231-2/+2
| | | | | | | | | | | | | | | | | | | | cannot be represented in type 'int' Fixes: 902/clusterfuzz-testcase-4561155144024064 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg Reviewed-by: "Ronald S. Bultje" <rsbultje@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | Merge commit 'b96f0ab3d29cdd9ea9ddabfb2052f72bf8615661'Clément Bœsch2017-03-191-31/+0
|\ \ | |/ | | | | | | | | | | * commit 'b96f0ab3d29cdd9ea9ddabfb2052f72bf8615661': h264: Kill broken disabled cruft Merged-by: Clément Bœsch <u@pkh.me>
| * h264: Kill broken disabled cruftDiego Biurrun2016-08-171-31/+0
| |
* | avcodec/h264_ps: Forward errors from decode_scaling_list()Michael Niedermayer2017-03-111-18/+26
| | | | | | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avcodec/h264_ps: Check chroma_qp_index_offsetMichael Niedermayer2017-02-231-0/+9
| | | | | | | | | | | | | | | | | | Fixes: 647/clusterfuzz-testcase-5195745823031296 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg Reviewed-by: BBB Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avcodec/h264_ps: Check delta scale for validityMichael Niedermayer2017-02-211-2/+8
| | | | | | | | | | | | | | | | Fixes: signed integer overflow: 5 + 2147483646 cannot be represented in type 'int' Fixes: 634/clusterfuzz-testcase-5285420445204480 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_ps: Fix runtime error: signed integer overflow: -1094995528 * 2 ↵Michael Niedermayer2017-02-191-1/+1
| | | | | | | | | | | | | | | | cannot be represented in type 'int' Fixes: 615/clusterfuzz-testcase-5488002644049920 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 'a8cbe5a0ccebf60a8a8b0aba5d5716dd54c1595c'Hendrik Leppkes2016-11-171-3/+10
|\ \ | |/ | | | | | | | | | | * commit 'a8cbe5a0ccebf60a8a8b0aba5d5716dd54c1595c': h264_ps: export actual height in MBs as SPS.mb_height Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
| * h264_ps: export actual height in MBs as SPS.mb_heightAnton Khirnov2016-07-111-1/+9
| | | | | | | | | | | | | | | | | | | | | | | | Currently, SPS.mb_height is actually what the spec calls PicHeightInMapUnits, which is half the frame height when interlacing is allowed. Calling this 'mb_height' is quite confusing, and there are at least two associated bugs where this field is treated as the actual frame height - in the h264 parser and in the code computing maximum reordering buffer size for a given level. Fix those issues (and avoid possible future ones) by exporting the real frame height in this field.
* | Merge commit '70b1dcef2d859ae6b3e21d61de928c3dd0cf1aa4'James Almer2016-08-011-2/+1
|\ \ | |/ | | | | | | | | | | | | | | | | * commit '70b1dcef2d859ae6b3e21d61de928c3dd0cf1aa4': h264: tighten the valid range for ref_frame_count Conflicts: libavcodec/h264_ps.c Merged-by: James Almer <jamrial@gmail.com>
| * h264: tighten the valid range for ref_frame_countAnton Khirnov2016-06-211-2/+1
| | | | | | | | | | This field (which the spec calls max_num_ref_frames) must be less than or equal to MaxDpbFrames, which is at most 16.
* | Merge commit 'f638b67e5790735f34620bf82025c9b9d6fc7216'James Almer2016-08-011-1/+3
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | * commit 'f638b67e5790735f34620bf82025c9b9d6fc7216': h264: move the parameter set definitions to a new header file Conflicts: libavcodec/h264_parse.h libavcodec/h264_ps.c libavcodec/h264dec.h Merged-by: James Almer <jamrial@gmail.com>
| * h264: move the parameter set definitions to a new header fileAnton Khirnov2016-06-211-1/+3
| | | | | | | | | | The PS parsing code is independent from the decoder, so it makes more sense for it to have its own separate header.
* | Merge commit '9df889a5f116c1ee78c2f239e0ba599c492431aa'Clément Bœsch2016-07-291-1/+1
|\ \ | |/ | | | | | | | | | | * 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-211-1/+1
| | | | | | | | This is more consistent with the naming of other decoders.
* | lavc/h264_ps: Be more verbose when truncating likely oversized PPS.Carl Eugen Hoyos2016-07-241-1/+3
| |
* | Merge commit 'a833ff68f6bf9dc72c3ef0ddf830ebed743c0703'Clément Bœsch2016-07-091-1/+2
|\ \ | |/ | | | | | | | | | | * commit 'a833ff68f6bf9dc72c3ef0ddf830ebed743c0703': h264: Fix decoding delay for Intra only streams Merged-by: Clément Bœsch <u@pkh.me>
| * h264: Fix decoding delay for Intra only streamsAnton Mitrofanov2016-06-121-1/+2
| | | | | | | | Signed-off-by: Anton Khirnov <anton@khirnov.net>
* | h264: make H264ParamSets sps constBenoit Fouet2016-06-301-2/+2
| |
* | h264: straighten dimensions check ff_h264_decode_seq_parameter_setBenoit Fouet2016-06-301-7/+8
| | | | | | | | | | The MBS only flag was not taken into account when checking macroblock dimensions. Also removes the unneeded check in init_dimensions for slices.
* | h264_ps: change decode_scaling_matrices so that it takes const {s,p}psBenoit Fouet2016-06-301-4/+8
| | | | | | | | | | | | | | In order to be able to make SPS const in H264ParamSets, modify decode_scaling_matrices so that it returns if the scaling matrix are present in the SPS, instead of altering the input SPS structure.
* | Merge commit '41ed7ab45fc693f7d7fc35664c0233f4c32d69bb'Clément Bœsch2016-06-211-1/+1
|\ \ | |/ | | | | | | | | | | * commit '41ed7ab45fc693f7d7fc35664c0233f4c32d69bb': cosmetics: Fix spelling mistakes Merged-by: Clément Bœsch <u@pkh.me>
| * cosmetics: Fix spelling mistakesVittorio Giovara2016-05-041-1/+1
| | | | | | | | Signed-off-by: Diego Biurrun <diego@biurrun.de>
* | lavc/h264_ps: add ff_h264_ps_uninit and use itMatthieu Bouron2016-06-201-0/+17
| |
* | Merge commit '3176217c60ca7828712985092d9102d331ea4f3d'Clément Bœsch2016-06-121-194/+303
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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-241-180/+290
| | | | | | | | | | | | | | | | | | 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 'add1467e5e447b79e8743a0b05c54dcf58c61dfe'Derek Buitenhuis2016-05-031-44/+0
|\ \ | |/ | | | | | | | | | | * commit 'add1467e5e447b79e8743a0b05c54dcf58c61dfe': svq3: drop the build dependency on the h264 decoder Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
| * svq3: drop the build dependency on the h264 decoderAnton Khirnov2016-03-281-22/+1
| |
* | Merge commit 'f4d581cda3897f66c1dda7586b93f86a591dbbef'Derek Buitenhuis2016-04-241-1/+2
|\ \ | |/ | | | | | | | | | | * commit 'f4d581cda3897f66c1dda7586b93f86a591dbbef': lavc: Deduplicate zigzag_scan table Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
| * lavc: Deduplicate zigzag_scan tableDiego Biurrun2016-03-251-2/+2
| |
* | Merge commit 'b09ad37c83841c399abb7f2503a2ab214d0c2d48'Hendrik Leppkes2015-12-171-0/+33
|\ \ | |/ | | | | | | | | | | | | | | | | * commit 'b09ad37c83841c399abb7f2503a2ab214d0c2d48': h264: derive the delay from the level when it's not present Merged without changing the strict_std_compliance check, as it breaks FATE and changes decoding behavior. Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
| * h264: derive the delay from the level when it's not presentAnton Khirnov2015-12-061-0/+33
| | | | | | | | | | | | | | | | | | | | | | Fall back to maximum DPB size if the level is unknown. This should be more spec-compliant and does not depend on the caller setting has_b_frames before opening the decoder. The old behaviour, when the delay is supplied by the caller setting has_b_frames, can still be obtained by setting strict_std_compliance below normal.
* | avcodec/h264_ps: Fix copying oversized pps&sps dataMichael Niedermayer2015-10-031-4/+6
| | | | | | | | | | | | | | | | | | Fixes: https://trac.ffmpeg.org/attachment/ticket/685/movie.264 In the available testcase the actual PPS only uses a few bits while there are 7kbyte of apparently random data after it Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avcodec/h264: keep SPS and PPS bitstream datawm42015-10-021-4/+16
| | | | | | | | | | | | | | | | We assume an upper bound of 4096 bytes for each raw SPS/PPS. It's hard to determine an exact maximum size, but this value was was considered high enough and safe. Needed for the following VideotoolBox commit.
* | Merge commit '7c6eb0a1b7bf1aac7f033a7ec6d8cacc3b5c2615'Michael Niedermayer2015-07-271-2/+2
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '7c6eb0a1b7bf1aac7f033a7ec6d8cacc3b5c2615': lavc: AV-prefix all codec flags Conflicts: doc/examples/muxing.c ffmpeg.c ffmpeg_opt.c ffplay.c libavcodec/aacdec.c libavcodec/aacenc.c libavcodec/ac3dec.c libavcodec/ac3enc_float.c libavcodec/atrac1.c libavcodec/atrac3.c libavcodec/atrac3plusdec.c libavcodec/dcadec.c libavcodec/ffv1enc.c libavcodec/h264.c libavcodec/h264_loopfilter.c libavcodec/h264_mb.c libavcodec/imc.c libavcodec/libmp3lame.c libavcodec/libtheoraenc.c libavcodec/libtwolame.c libavcodec/libvpxenc.c libavcodec/libxavs.c libavcodec/libxvid.c libavcodec/mpeg12dec.c libavcodec/mpeg12enc.c libavcodec/mpegaudiodec_template.c libavcodec/mpegvideo.c libavcodec/mpegvideo_enc.c libavcodec/mpegvideo_motion.c libavcodec/nellymoserdec.c libavcodec/nellymoserenc.c libavcodec/nvenc.c libavcodec/on2avc.c libavcodec/options_table.h libavcodec/opus_celt.c libavcodec/pngenc.c libavcodec/ra288.c libavcodec/ratecontrol.c libavcodec/twinvq.c libavcodec/vc1_block.c libavcodec/vc1_loopfilter.c libavcodec/vc1_mc.c libavcodec/vc1dec.c libavcodec/vorbisdec.c libavcodec/vp3.c libavcodec/wma.c libavcodec/wmaprodec.c libavcodec/x86/hpeldsp_init.c libavcodec/x86/me_cmp_init.c Merged-by: Michael Niedermayer <michael@niedermayer.cc>
| * lavc: AV-prefix all codec flagsVittorio Giovara2015-07-271-2/+2
| | | | | | | | | | | | Convert doxygen to multiline and express bitfields more simply. Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
* | Merge commit '86e1a35802df42f51337d3fed8d5d99d0898c8bf'Michael Niedermayer2015-04-201-2/+7
|\ \ | |/ | | | | | | | | | | | | | | | | * commit '86e1a35802df42f51337d3fed8d5d99d0898c8bf': h264_ps: Return meaningful error codes and address a memory leak Conflicts: libavcodec/h264_ps.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * h264_ps: Return meaningful error codes and address a memory leakVittorio Giovara2015-04-201-3/+7
| | | | | | | | Bug-Id: CID 1026763
* | avcodec/h264_ps: Validate num_units_in_tick/time_scale before setting them ↵Michael Niedermayer2015-04-161-5/+8
| | | | | | | | | | | | | | | | in the context This probably makes no big difference but it is more correct Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | h264: Do not fail on unsupported timing infoVittorio Giovara2015-04-161-1/+1
| | | | | | | | | | | | | | | | | | | | The spec madandate both time_scale and num_units_in_tick greater than 0, however since they are not essential for decoding, just ignore the whole block and try to finish parsing the VUI. Related to Ticket4445. Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
* | avcodec/h264: Do not fail with randomly truncated VUIsMichael Niedermayer2015-04-101-3/+4
| | | | | | | | | | | | | | Fixes Ticket4445 Tested-by: Vittorio Giovara <vittorio.giovara@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avcodec/h264_ps: Move truncation check from VUI to SPSMichael Niedermayer2015-04-081-6/+6
| | | | | | | | | | | | This more completely checks for truncation Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit '84f226a3bcd8b39801a4c9051c033ab7d61aaf76'Michael Niedermayer2015-04-051-4/+7
|\ \ | |/ | | | | | | | | | | | | | | | | | | * commit '84f226a3bcd8b39801a4c9051c033ab7d61aaf76': h264: use the correct SPS during PPS parsing Conflicts: libavcodec/h264_ps.c See: dc35b77b28f40c99d27c073fe2c22219ba600202 Merged-by: Michael Niedermayer <michaelni@gmx.at>
OpenPOWER on IntegriCloud