summaryrefslogtreecommitdiff
path: root/libavcodec/h264_ps.c
Commit message (Collapse)AuthorAge
* cosmetics: Fix spelling mistakesVittorio Giovara2016-05-04
| | | | Signed-off-by: Diego Biurrun <diego@biurrun.de>
* 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.
* svq3: drop the build dependency on the h264 decoderAnton Khirnov2016-03-28
|
* lavc: Deduplicate zigzag_scan tableDiego Biurrun2016-03-25
|
* h264: derive the delay from the level when it's not presentAnton Khirnov2015-12-06
| | | | | | | | | | | 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.
* lavc: AV-prefix all codec flagsVittorio Giovara2015-07-27
| | | | | | Convert doxygen to multiline and express bitfields more simply. Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
* h264_ps: Return meaningful error codes and address a memory leakVittorio Giovara2015-04-20
| | | | Bug-Id: CID 1026763
* h264: use the correct SPS during PPS parsingAnton Khirnov2015-04-05
| | | | | There is in general no reason for the currently active SPS to be the one referenced by the PPS being parsed.
* h264_ps: properly check cropping parameters against overflowAnton Khirnov2015-03-21
| | | | CC: libav-stable@libav.org
* cosmetics: Write NULL pointer equality checks more compactlyGabriel Dume2014-08-15
| | | | Signed-off-by: Diego Biurrun <diego@biurrun.de>
* More correct printf format specifiersDiego Biurrun2014-04-02
| | | | This avoids compiler warnings about argument and specifier type mismatch.
* avcodec: more correct printf specifiersDiego Biurrun2014-03-22
|
* h264: Replace mpegvideo-specific MAX_PICTURE_COUNT by private defineVittorio Giovara2014-03-16
|
* h264: parse two additional constraint flagsVittorio Giovara2014-02-28
|
* h264: add MVCD to the list of High profiles in SPSVittorio Giovara2014-02-28
| | | | Also comment all previous profiles.
* h264: use avpriv_request_sample for chroma_format_idcVittorio Giovara2014-02-16
|
* h264: store current_sps_id inside the current spsVittorio Giovara2014-02-14
| | | | In preparation for MVC support.
* h264: print values in case of errorVittorio Giovara2014-02-14
| | | | Also make error style consistent and drop redundant information.
* h264: reset num_reorder_frames if it is invalidAnton Khirnov2014-01-18
| | | | | | | | | An invalid VUI is not considered a fatal error, so the SPS containing it may still be used. Leaving an invalid value of num_reorder_frames there can result in writing over the bounds of H264Context.delayed_pic. Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind CC:libav-stable@libav.org
* h264: reject mismatching luma/chroma bit depths during sps parsingAnton Khirnov2014-01-06
| | | | | | | | | | There is no point in delaying the check and it avoids bugs with a half-initialized context. Fixes invalid reads. Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind CC:libav-stable@libav.org
* h264_ps: when parsing a VUI fails, only abort when explode is setAnton Khirnov2013-10-27
| | | | | | A VUI doesn't contain anything strictly necessary for decoding. Apparently there are many samples with truncated VUIs in the wild, this commit should allow decoding them.
* h264_ps: Use more meaningful error valuesDiego Biurrun2013-08-20
|
* h264_ps: K&R formatting cosmeticsDiego Biurrun2013-08-20
|
* h264_ps: Drop commented-out cruftDiego Biurrun2013-08-20
|
* avcodec: Remove some commented-out debug cruftDiego Biurrun2013-08-20
|
* h264: fully support cropping.Anton Khirnov2013-04-19
| | | | | | Based on a patch by Vittorio Giovara <vittorio.giovara@gmail.com> Fixes Bug 378.
* Remove unnecessary dsputil.h #includesDiego Biurrun2013-02-26
|
* h264: deMpegEncContextizeAnton Khirnov2013-02-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | Most of the changes are just trivial are just trivial replacements of fields from MpegEncContext with equivalent fields in H264Context. Everything in h264* other than h264.c are those trivial changes. The nontrivial parts are: 1) extracting a simplified version of the frame management code from mpegvideo.c. We don't need last/next_picture anymore, since h264 uses its own more complex system already and those were set only to appease the mpegvideo parts. 2) some tables that need to be allocated/freed in appropriate places. 3) hwaccels -- mostly trivial replacements. for dxva, the draw_horiz_band() call is moved from ff_dxva2_common_end_frame() to per-codec end_frame() callbacks, because it's now different for h264 and MpegEncContext-based decoders. 4) svq3 -- it does not use h264 complex reference system, so I just added some very simplistic frame management instead and dropped the use of ff_h264_frame_start(). Because of this I also had to move some initialization code to svq3. Additional fixes for chroma format and bit depth changes by Janne Grunau <janne-libav@jannau.net> Signed-off-by: Anton Khirnov <anton@khirnov.net>
* h264: Allow discarding the cropping information from SPSVittorio Giovara2013-01-25
| | | | | | Some 3D systems overload the meaning of the field for other purposes. Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* h264: fix sps parsing for SVC and CAVLC 4:4:4 Intra profilesVictor Lopez2012-12-19
| | | | | | Fixes bug 396. CC: libav-stable@libav.org
* h264: fix memleak on error during SPS parsingJanne Grunau2012-12-15
| | | | Introduced in d7d6efe42b0d.
* h264: set parameters from SPS whenever it changesJanne Grunau2012-12-13
| | | | | Fixes a crash in the fuzzed sample sample_varPAR.avi_s26638 with alternating bit depths.
* h264: check sps.log2_max_frame_num for validityJanne Grunau2012-12-07
| | | | | | | Fixes infinite or long taking loop in frame num gap code in the fuzzed sample bipbop234.ts_s223302. CC: libav-stable@libav.org
* h264_ps: declare array of colorspace strings on its own line.Ronald S. Bultje2012-07-29
|
* h264: additional protection against unsupported size/bitdepth changes.Ronald S. Bultje2012-05-02
| | | | | | | Fixes crashes in codepaths not covered by original checks. Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind CC: libav-stable@libav.org
* h264: fix memleak in error path.Alexander Strange2012-03-24
| | | | Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
* h264: Add check for invalid chroma_format_idcAlexander Strange2012-03-24
| | | | | | Fixes a crash when FF_DEBUG_PICT_INFO is used. Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
* h264: improve parsing of broken AVC SPSMichael Niedermayer2012-03-13
| | | | | | | | | | | | Parsing the entire NAL as SPS fixes decoding of some AVC bitstreams with broken escaping. Since the size of the NAL unit is known and checked against the buffer end we can parse it entirely without buffer overreads. Fixes playback of http://streams.videolan.org/streams/mp4/Mr_MrsSmith-h264_aac.mp4 Signed-off-by: Janne Grunau <janne-libav@jannau.net>
* Replace computations of remaining bits with calls to get_bits_left().Alex Converse2012-03-05
|
* h264: 4:2:2 intra decoding supportBaptiste Coudurier2011-10-21
| | | | | Signed-off-by: Diego Biurrun <diego@biurrun.de> Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
* h264: fix HRD parameters parsingMans Rullgard2011-10-11
| | | | | | | | | | The bit_rate_value_minus1 and cpb_size_value_minus1 elements allow a wider range than get_ue_golomb() supports. This adds a get_ue_golomb_long() function supporting up to 31 leading zeros, which is the maximum for these syntax elements, and uses it in decode_hrd_parameters(). Signed-off-by: Mans Rullgard <mans@mansr.com>
* h264: fix detection of optional trailing PPS elementsMans Rullgard2011-10-11
| | | | | | | | | | | | | | The PPS may contain a few trailing elements whose presence is only signalled by data remaining after the the mandatory part has been parsed. The current code fails to take into account the rbsp_trailing_bits() when deciding whether to parse these optional elements. Assuming no unnecessary padding bytes are passed to this function, the optional elements are present if either more than 8 extra bits remain or the remaining bits do not form a valid rbsp_trailing_bits() after the mandatory PPS elements have been parsed. Signed-off-by: Mans Rullgard <mans@mansr.com>
* H.264: fix 4:4:4 cropping warningJason Garrett-Glaser2011-06-22
|
* H.264: reference the correct SPS in decode_scaling_matricesJason Garrett-Glaser2011-06-22
|
* 4:4:4 H.264 decoding supportJason Garrett-Glaser2011-06-13
| | | | Note: this is 4:4:4 from the 2007 spec revision, not the previous (now deprecated) 4:4:4 mode in H.264.
* Roll back 4:4:4 H.264 for nowJason Garrett-Glaser2011-06-13
| | | | Needs some ARM/PPC asm modifications.
* 4:4:4 H.264 decoding supportJason Garrett-Glaser2011-06-13
| | | | Note: this is 4:4:4 from the 2007 spec revision, not the previous (now deprecated) 4:4:4 mode in H.264.
* Add support for higher QP values in h264.Oskar Arvidsson2011-05-10
| | | | | | | | In high bit depth, the QP values may now be up to (51 + 6*(bit_depth-8)). Preparatory patch for high bit depth h264 decoding support. Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
* Replace FFmpeg with Libav in licence headersMans Rullgard2011-03-19
| | | | Signed-off-by: Mans Rullgard <mans@mansr.com>
* Merge libavcore into libavutilReinhard Tartler2011-02-15
| | | | | | | | | | | | It is pretty hopeless that other considerable projects will adopt libavutil alone in other projects. Projects that need small footprint are better off with more specialized libraries such as gnulib or rather just copy the necessary parts that they need. With this in mind, nobody is helped by having libavutil and libavcore split. In order to ease maintenance inside and around FFmpeg and to reduce confusion where to put common code, avcore's functionality is merged (back) to avutil. Signed-off-by: Reinhard Tartler <siretart@tauware.de>