summaryrefslogtreecommitdiff
path: root/libavcodec/h264_parser.c
Commit message (Collapse)AuthorAge
* cosmetics: Fix spelling mistakesVittorio Giovara2016-05-04
| | | | Signed-off-by: Diego Biurrun <diego@biurrun.de>
* h264_parser: remove the remaining dependencies on the h264 decoderAnton Khirnov2016-04-24
|
* h264: decouple extradata parsing from the decoderAnton Khirnov2016-04-24
| | | | This will allow decoupling the parser from the decoder.
* h264: decouple h264_sei from the h264 decoderAnton Khirnov2016-04-24
| | | | | Make the SEI parsing independent of the H264Context, to allow decoupling the parser from the decoder.
* h264: factor out calculating the POC count into a separate fileAnton Khirnov2016-04-24
| | | | This will allow decoupling the parser from the decoder.
* h264_parser: move the H264DSPContext to the parser contextAnton Khirnov2016-04-24
|
* 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.
* h264_parser: eliminate H264SliceContext usageAnton Khirnov2016-04-24
| | | | It is no longer needed for anything.
* h264: factor out parsing the reference count into a separate fileAnton Khirnov2016-04-24
| | | | This will allow decoupling the parser from the decoder.
* h264: move reading direct_spatial_mv_pred out of ff_set_ref_count()Anton Khirnov2016-04-24
| | | | | It has nothing to do with the reference count and so does not belong in this function.
* h264_parser: switch to h2645_parse for NAL unescapingAnton Khirnov2016-04-24
| | | | Remove now unused ff_h264_decode_nal().
* h264: factor out pred weight table parsing into a separate fileAnton Khirnov2016-03-28
| | | | This will allow decoupling the parser from the decoder.
* h264data: Move all data tables from a header to a .c fileDiego Biurrun2016-03-25
|
* h264: Clean up #includesDiego Biurrun2016-03-25
|
* h264_parser: Rename close() to h264_close()Diego Biurrun2015-11-01
| | | | At least on AIX it conflicts with the close() libc function from unistd.h.
* h264: drop the now unused per-slice H264ContextsAnton Khirnov2015-03-21
|
* h264: move rbsp_buffer into the per-slice contextAnton Khirnov2015-03-21
|
* h264: use a separate GetBitContext for slice dataAnton Khirnov2015-03-21
|
* h264: move the ref lists variables into the per-slice contextAnton Khirnov2015-03-21
|
* h264: move the slice type variables into the per-slice contextAnton Khirnov2015-03-21
|
* h264: split weighted pred-related vars into per-slice contextAnton Khirnov2015-03-21
|
* h264_parser: export video format and dimensionsAnton Khirnov2015-02-19
|
* h264_parser: restore a comment lost in 0268a54Anton Khirnov2015-01-27
|
* h264: move parser-only variables to their own contextAnton Khirnov2015-01-27
|
* h264_parser: don't stop on SPS_EXT in splitJohn Stebbins2014-11-11
| | | | | Add SPS_EXT, SEI, and subset SPS to codes that are skipped during split. These codes can come before the PPS and results in incomplete extradata.
* cosmetics: Write NULL pointer equality checks more compactlyGabriel Dume2014-08-15
| | | | Signed-off-by: Diego Biurrun <diego@biurrun.de>
* h264: Move start code search functions into separate source files.Ben Avison2014-08-04
| | | | | | This permits re-use with parsers for codecs which use similar start codes. Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* mpegvideo: move mpegvideo formats-related defines to mpegutils.hVittorio Giovara2014-03-16
|
* h264_parser: use enum values in h264_find_frame_end()Vittorio Giovara2014-02-15
|
* h264: print values in case of errorVittorio Giovara2014-02-14
| | | | Also make error style consistent and drop redundant information.
* h264_parser: Use ff_h264_reset_sei()Yusuke Nakamura2013-10-22
| | | | Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* h264_parser: Fix order of operationsMichael Niedermayer2013-10-22
| | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at> Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* h264_parser: Fix POC parsing for the case where MMCO_RESET is present.Yusuke Nakamura2013-10-15
| | | | Signed-off-by: Anton Khirnov <anton@khirnov.net>
* h264_parser: Fix POC parsing for the case where MMCO_RESET is absent.Yusuke Nakamura2013-10-15
| | | | | | | The prev_ values were not set after parsing POC. Increase length of the buffer decoded to parse enough safely. Signed-off-by: Anton Khirnov <anton@khirnov.net>
* h264dsp: Factorize code into a new function, h264_find_start_code_candidateBen Avison2013-08-08
| | | | | | | | | | | | | | | This performs the start code search which was previously part of h264_find_frame_end() - the most CPU intensive part of the function. By itself, this results in a performance regression: Before After Mean StdDev Mean StdDev Change Overall time 2925.6 26.2 3068.5 31.7 -4.7% but this can more than be made up for by platform-optimised implementations of the function. Signed-off-by: Martin Storsjö <martin@martin.st>
* h264_parser: Initialize the h264dsp context in the parser as wellBen Avison2013-08-08
| | | | | | | | | | | | | | | Each AVStream struct for an H.264 elementary stream actually has two copies of the H264DSPContext struct (and in fact all the other members of H264Context as well): ((H264Context *) ((AVStream *)st)->codec->priv_data)->h264dsp ((H264Context *) ((AVStream *)st)->parser->priv_data)->h264dsp but only the first of these was actually being initialised. This prevented the addition of platform-specific implementations of parser-related functions. Signed-off-by: Martin Storsjö <martin@martin.st>
* avcodec: Add output_picture_number to AVCodecParserContextYusuke Nakamura2013-08-02
| | | | | | Set output_picture_number in H.264 parser. Signed-off-by: Diego Biurrun <diego@biurrun.de>
* h264_parser: K&R formatting cosmeticsLuca Barbato2013-06-07
|
* h264_parser: Set field_order and picture_structure.Yusuke Nakamura2013-05-24
| | | | Signed-off-by: Anton Khirnov <anton@khirnov.net>
* avcodec: Add av_cold attributes to init functions missing themDiego Biurrun2013-05-04
|
* avcodec: Drop unnecessary ff_ name prefixes from static functionsDiego Biurrun2013-04-30
|
* lavc: Rename avpriv_mpv_find_start_code after moving out from mpegvideoMartin Storsjö2013-03-26
| | | | | | | Also move the declaration to internal.h, and add restrict qualifiers to the declaration (as in the implementation). Signed-off-by: Martin Storsjö <martin@martin.st>
* 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>
* avcodec: Drop silly and/or broken printf debug outputDiego Biurrun2012-10-01
|
* Replace all CODEC_ID_* with AV_CODEC_ID_*Anton Khirnov2012-08-07
|
* Fix parser not to clobber has_b_frames when extradata is set.Reinhard Tartler2012-02-26
| | | | | | | | | | | | | | | | | | | | | | Because in contrast to the decoder, the parser does not setup low_delay. The code in parse_nal_units would always end up setting has_b_frames to "1", except when stream is explicitly marked as low delay. Since the parser itself would create 'extradata', simply reopening the parser would cause this. This happens for instance in estimate_timings_from_pts(), which causes the parser to be reopened on the same stream. This fixes Libav #22 and FFmpeg (trac) #360 CC: libav-stable@libav.org Based on a patch by Reimar Döffinger <Reimar.Doeffinger@gmx.de> (commit 31ac0ac29b6bba744493f7d1040757a3f51b9ad7) Comments and description adapted by Reinhard Tartler. Signed-off-by: Reinhard Tartler <siretart@tauware.de>
* parsers: initialize MpegEncContext.slice_context_count to 1Janne Grunau2012-01-06
| | | | | | | | | The mpeg4 video, H264 and VC-1 parser hold (directly or indirectly) a MpegEncContext in their private context. Since they do not call the common mpegvideo init function slice_context_count has explicitly set to 1. Prevents a null pointer dereference in the h264 parser and fixes bug 193.
* Revert "h264: skip start code search if the size of the nal unit is known"Janne Grunau2011-12-19
| | | | This reverts commit 87eebb3454ff0cd6af6ebf9e1d31bdfd1c3b601b.
* h264: skip start code search if the size of the nal unit is knownJanne Grunau2011-12-18
| | | | | | | | Start code emulation prevention is only required in Annex B bytestream packed NAL units. For other coding formats the size is already known. Looking for a start code prefix can result in false positives like in http://streams.videolan.org/streams/mp4/Mr_MrsSmith-h264_aac.mp4 which has a false positive in the SPS.
* lavc: use designated initialisers for parsers.Anton Khirnov2011-11-02
|