aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/h264_parser.c
Commit message (Collapse)AuthorAgeFilesLines
...
* | avcodec/h264_parser: Use av_freep() to avoid leaving stale pointersMichael Niedermayer2014-10-301-1/+1
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avcodec/h264_parser: rewrite the parse_nal_units() loop logic based on h264.cMichael Niedermayer2014-10-271-19/+21
| | | | | | | | | | | | Fixes Ticket4011 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avcodec/h264: fix time_base and framerateMichael Niedermayer2014-10-151-0/+2
| | | | | | | | | | | | | | They are not just inverses of each other. This should restore behavior to before the introduction of framerate Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit 'f929ab0569ff31ed5a59b0b0adb7ce09df3fca39'Michael Niedermayer2014-08-151-1/+1
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit 'f929ab0569ff31ed5a59b0b0adb7ce09df3fca39': cosmetics: Write NULL pointer equality checks more compactly Conflicts: cmdutils.c ffmpeg_opt.c ffplay.c libavcodec/dvbsub.c libavcodec/dvdsubdec.c libavcodec/dvdsubenc.c libavcodec/dxa.c libavcodec/libxvid_rc.c libavcodec/mpegvideo.c libavcodec/mpegvideo_enc.c libavcodec/rv10.c libavcodec/tiffenc.c libavcodec/utils.c libavcodec/vc1dec.c libavcodec/zmbv.c libavdevice/v4l2.c libavformat/matroskadec.c libavformat/movenc.c libavformat/sdp.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * cosmetics: Write NULL pointer equality checks more compactlyGabriel Dume2014-08-151-1/+1
| | | | | | | | Signed-off-by: Diego Biurrun <diego@biurrun.de>
* | Merge commit 'db7f1c7c5a1d37e7f4da64a79a97bea1c4b6e9f8'Michael Niedermayer2014-08-051-1/+1
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit 'db7f1c7c5a1d37e7f4da64a79a97bea1c4b6e9f8': h264: Move start code search functions into separate source files. Conflicts: libavcodec/arm/Makefile libavcodec/arm/h264dsp_init_arm.c libavcodec/h264_parser.c libavcodec/h264dsp.c libavcodec/startcode.c libavcodec/startcode.h See: 270cede3f3772117454a14b620803d731036942d Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * h264: Move start code search functions into separate source files.Ben Avison2014-08-041-1/+1
| | | | | | | | | | | | This permits re-use with parsers for codecs which use similar start codes. Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* | avcodec/h264_parser: remove redundant assignmentMichael Niedermayer2014-08-021-1/+0
| | | | | | | | | | Found-by: CSA Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | libavcodec/h264_parser: Increase parse_history, fix huge resolutionsMichael Niedermayer2014-07-311-2/+2
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit 'e0c16e4e3259cf50b5bac4c23bb6e517f397c74b'Michael Niedermayer2014-03-171-0/+1
|\| | | | | | | | | | | | | | | | | | | | | | | | | * commit 'e0c16e4e3259cf50b5bac4c23bb6e517f397c74b': mpegvideo: move mpegvideo formats-related defines to mpegutils.h Conflicts: libavcodec/h264_cabac.c libavcodec/h264_cavlc.c libavcodec/h264_mvpred.h libavcodec/svq1enc.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * mpegvideo: move mpegvideo formats-related defines to mpegutils.hVittorio Giovara2014-03-161-0/+1
| |
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2014-02-151-3/+5
|\| | | | | | | | | | | | | | | | | | | * qatar/master: h264_parser: use enum values in h264_find_frame_end() Conflicts: libavcodec/h264_parser.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * h264_parser: use enum values in h264_find_frame_end()Vittorio Giovara2014-02-151-3/+5
| |
* | Merge commit '73e8fab31dc19c4371499e612856accbc00b2820'Michael Niedermayer2014-02-141-4/+5
|\| | | | | | | | | | | | | | | | | | | | | * commit '73e8fab31dc19c4371499e612856accbc00b2820': h264: print values in case of error Conflicts: libavcodec/h264.c libavcodec/h264_ps.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * h264: print values in case of errorVittorio Giovara2014-02-141-4/+5
| | | | | | | | Also make error style consistent and drop redundant information.
* | avcodec/h264_parser: heuristically detect non marked keyframesMichael Niedermayer2013-10-261-0/+3
| | | | | | | | | | | | Fixes Ticket3083 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit '103d073dd7ce23b912df32be8c9524ba25dd5991'Michael Niedermayer2013-10-221-5/+2
|\| | | | | | | | | | | | | | | | | | | * commit '103d073dd7ce23b912df32be8c9524ba25dd5991': h264_parser: Use ff_h264_reset_sei() Conflicts: libavcodec/h264_parser.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * h264_parser: Use ff_h264_reset_sei()Yusuke Nakamura2013-10-221-5/+2
| | | | | | | | Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
| * h264_parser: Fix order of operationsMichael Niedermayer2013-10-221-1/+1
| | | | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at> Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* | avcodec/h264_parser: fix order of operationsMichael Niedermayer2013-10-191-1/+1
| | | | | | | | | | | | Fixes CID1108576 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit '4baba6c813b7a1f27370e20fb1a87b05fcb39208'Michael Niedermayer2013-10-161-8/+102
|\| | | | | | | | | | | | | | | | | | | * commit '4baba6c813b7a1f27370e20fb1a87b05fcb39208': h264_parser: Fix POC parsing for the case where MMCO_RESET is present. Conflicts: libavcodec/h264.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * h264_parser: Fix POC parsing for the case where MMCO_RESET is present.Yusuke Nakamura2013-10-151-8/+102
| | | | | | | | Signed-off-by: Anton Khirnov <anton@khirnov.net>
* | Merge commit 'b81dbd6cb7522bea96d78a52f8a4c25a47b820c9'Michael Niedermayer2013-10-161-2/+12
|\| | | | | | | | | | | | | * commit 'b81dbd6cb7522bea96d78a52f8a4c25a47b820c9': h264_parser: Fix POC parsing for the case where MMCO_RESET is absent. Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * h264_parser: Fix POC parsing for the case where MMCO_RESET is absent.Yusuke Nakamura2013-10-151-2/+12
| | | | | | | | | | | | | | 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>
* | Merge commit '218d6844b37d339ffbf2044ad07d8be7767e2734'Michael Niedermayer2013-08-081-24/+3
|\| | | | | | | | | | | | | | | | | | | * commit '218d6844b37d339ffbf2044ad07d8be7767e2734': h264dsp: Factorize code into a new function, h264_find_start_code_candidate Conflicts: libavcodec/h264_parser.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * h264dsp: Factorize code into a new function, h264_find_start_code_candidateBen Avison2013-08-081-24/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Merge commit '7a82022ee2f9b1fad991ace0936901e7419444be'Michael Niedermayer2013-08-081-0/+1
|\| | | | | | | | | | | | | * commit '7a82022ee2f9b1fad991ace0936901e7419444be': h264_parser: Initialize the h264dsp context in the parser as well Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * h264_parser: Initialize the h264dsp context in the parser as wellBen Avison2013-08-081-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Merge commit 'a8b19271c3b40ac3c3dc769fe248887acf14ba5a'Michael Niedermayer2013-08-031-1/+1
|\| | | | | | | | | | | | | | | | | | | | | * commit 'a8b19271c3b40ac3c3dc769fe248887acf14ba5a': avcodec: Add output_picture_number to AVCodecParserContext Conflicts: doc/APIchanges libavcodec/version.h Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * avcodec: Add output_picture_number to AVCodecParserContextYusuke Nakamura2013-08-021-1/+1
| | | | | | | | | | | | Set output_picture_number in H.264 parser. Signed-off-by: Diego Biurrun <diego@biurrun.de>
* | h264: add frame packing as stereo_mode frame metadataJoakim Plate2013-07-211-0/+1
| | | | | | | | | | | | | | This matches the matroska defintion of stereo_mode, with no metadata written if no info exist in sei Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit 'f8a4d5e970f32f8cc747f9fa7bd975ee4a060ea1'Michael Niedermayer2013-06-081-136/+157
|\| | | | | | | | | | | | | | | | | | | | | * commit 'f8a4d5e970f32f8cc747f9fa7bd975ee4a060ea1': h264_parser: K&R formatting cosmetics vorbis: return meaningful errors Conflicts: libavcodec/h264_parser.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * h264_parser: K&R formatting cosmeticsLuca Barbato2013-06-071-130/+151
| |
* | Merge commit 'e9e5a1bdc769a7225ab0d4f8b33bcacc6496bd68'Michael Niedermayer2013-05-241-0/+57
|\| | | | | | | | | | | | | | | | | | | | | | | * commit 'e9e5a1bdc769a7225ab0d4f8b33bcacc6496bd68': Monkey's Audio old versions FATE tests h264_parser: Set field_order and picture_structure. Conflicts: libavcodec/h264_parser.c tests/fate/lossless-audio.mak Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * h264_parser: Set field_order and picture_structure.Yusuke Nakamura2013-05-241-0/+57
| | | | | | | | Signed-off-by: Anton Khirnov <anton@khirnov.net>
* | Merge commit '6fee1b90ce3bf4fbdfde7016e0890057c9000487'Michael Niedermayer2013-05-051-1/+2
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '6fee1b90ce3bf4fbdfde7016e0890057c9000487': avcodec: Add av_cold attributes to init functions missing them Conflicts: libavcodec/aacpsy.c libavcodec/atrac3.c libavcodec/dvdsubdec.c libavcodec/ffv1.c libavcodec/ffv1enc.c libavcodec/h261enc.c libavcodec/h264_parser.c libavcodec/h264dsp.c libavcodec/h264pred.c libavcodec/libschroedingerenc.c libavcodec/libxvid_rc.c libavcodec/mpeg12.c libavcodec/mpeg12enc.c libavcodec/proresdsp.c libavcodec/rangecoder.c libavcodec/videodsp.c libavcodec/x86/proresdsp_init.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * avcodec: Add av_cold attributes to init functions missing themDiego Biurrun2013-05-041-1/+2
| |
* | Merge commit '088f38a4f9f54bb923405c67c9e72d96d90aa284'Michael Niedermayer2013-05-011-3/+3
|\| | | | | | | | | | | | | | | | | | | | | | | * commit '088f38a4f9f54bb923405c67c9e72d96d90aa284': avcodec: Drop unnecessary ff_ name prefixes from static functions Conflicts: libavcodec/ass.c libavcodec/h264_parser.c libavcodec/utils.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * avcodec: Drop unnecessary ff_ name prefixes from static functionsDiego Biurrun2013-04-301-3/+3
| |
* | Merge commit 'f1e9398621af0bc9d166014e4ce6996bb4f141d0'Michael Niedermayer2013-03-261-1/+2
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | * commit 'f1e9398621af0bc9d166014e4ce6996bb4f141d0': lavc: Rename avpriv_mpv_find_start_code after moving out from mpegvideo Conflicts: libavcodec/h264_parser.c libavcodec/internal.h libavcodec/mpeg12.c libavcodec/utils.c libavformat/mpegtsenc.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * lavc: Rename avpriv_mpv_find_start_code after moving out from mpegvideoMartin Storsjö2013-03-261-1/+2
| | | | | | | | | | | | | | 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>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2013-02-161-26/+26
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: h264: deMpegEncContextize Conflicts: libavcodec/dxva2_h264.c libavcodec/h264.c libavcodec/h264.h libavcodec/h264_cabac.c libavcodec/h264_cavlc.c libavcodec/h264_loopfilter.c libavcodec/h264_mb_template.c libavcodec/h264_parser.c libavcodec/h264_ps.c libavcodec/h264_refs.c libavcodec/h264_sei.c libavcodec/svq3.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * h264: deMpegEncContextizeAnton Khirnov2013-02-151-23/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2012-10-011-1/+0
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: avcodec: Convert some commented-out printf/av_log instances to av_dlog avcodec: Drop silly and/or broken printf debug output avcodec: Drop some silly commented-out av_log() invocations avformat: Convert some commented-out printf/av_log instances to av_dlog avformat: Remove non-compiling and/or silly commented-out printf/av_log statements Remove some silly disabled code. ac3dec: ensure get_buffer() gets a buffer for the correct number of channels Conflicts: libavcodec/dnxhddec.c libavcodec/ffv1.c libavcodec/h264.c libavcodec/h264_parser.c libavcodec/mjpegdec.c libavcodec/motion_est_template.c libavcodec/mpegaudiodec.c libavcodec/mpegvideo_enc.c libavcodec/put_bits.h libavcodec/ratecontrol.c libavcodec/wmaenc.c libavdevice/timefilter.c libavformat/asfdec.c libavformat/avidec.c libavformat/avienc.c libavformat/flvenc.c libavformat/utils.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * avcodec: Drop silly and/or broken printf debug outputDiego Biurrun2012-10-011-1/+0
| |
* | Merge commit '36ef5369ee9b336febc2c270f8718cec4476cb85'Michael Niedermayer2012-08-071-1/+1
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '36ef5369ee9b336febc2c270f8718cec4476cb85': Replace all CODEC_ID_* with AV_CODEC_ID_* lavc: add AV prefix to codec ids. Conflicts: doc/APIchanges doc/examples/decoding_encoding.c doc/examples/muxing.c ffmpeg.c ffprobe.c ffserver.c libavcodec/8svx.c libavcodec/avcodec.h libavcodec/dnxhd_parser.c libavcodec/dvdsubdec.c libavcodec/error_resilience.c libavcodec/h263dec.c libavcodec/libvorbisenc.c libavcodec/mjpeg_parser.c libavcodec/mjpegenc.c libavcodec/mpeg12.c libavcodec/mpeg4videodec.c libavcodec/mpegvideo.c libavcodec/mpegvideo_enc.c libavcodec/pcm.c libavcodec/r210dec.c libavcodec/utils.c libavcodec/v210dec.c libavcodec/version.h libavdevice/alsa-audio-dec.c libavdevice/bktr.c libavdevice/v4l2.c libavformat/asfdec.c libavformat/asfenc.c libavformat/avformat.h libavformat/avidec.c libavformat/caf.c libavformat/electronicarts.c libavformat/flacdec.c libavformat/flvdec.c libavformat/flvenc.c libavformat/framecrcenc.c libavformat/img2.c libavformat/img2dec.c libavformat/img2enc.c libavformat/ipmovie.c libavformat/isom.c libavformat/matroska.c libavformat/matroskadec.c libavformat/matroskaenc.c libavformat/mov.c libavformat/movenc.c libavformat/mp3dec.c libavformat/mpeg.c libavformat/mpegts.c libavformat/mxf.c libavformat/mxfdec.c libavformat/mxfenc.c libavformat/nsvdec.c libavformat/nut.c libavformat/oggenc.c libavformat/pmpdec.c libavformat/rawdec.c libavformat/rawenc.c libavformat/riff.c libavformat/sdp.c libavformat/utils.c libavformat/vocenc.c libavformat/wtv.c libavformat/xmv.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * Replace all CODEC_ID_* with AV_CODEC_ID_*Anton Khirnov2012-08-071-1/+1
| |
| * Fix parser not to clobber has_b_frames when extradata is set.Reinhard Tartler2012-02-261-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | h264_parser: use av_assertMichael Niedermayer2012-06-251-3/+1
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | H264 parser: enable header parsing/frame type detection for is_avc.Reimar Döffinger2012-02-191-4/+15
| | | | | | | | Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>