summaryrefslogtreecommitdiffstats
path: root/libavcodec/h264.c
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'qatar/master'Michael Niedermayer2012-01-081-1/+0
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: (29 commits) cabac: Move code only used within the CABAC test program into the test program. vp56: Drop unnecessary cabac.h #include. h264-test: Initialize AVCodecContext.av_class. build: Skip compiling network.h and rtsp.h if networking is not enabled. cosmetics: drop some pointless parentheses Disable annoying warning without changing behavior faq: Solutions for common problems with sample paths when running FATE. avcodec: attempt to clarify the CODEC_CAP_DELAY documentation avcodec: fix avcodec_encode_audio() documentation. FATE: xmv-demux test; exercise the XMV demuxer without decoding the perceptual codecs inside. vqf: recognize more metadata chunks FATE test: BMV demuxer and associated video and audio decoders. FATE: indeo4 video decoder test. FATE: update xxan-wc4 test to a sample with more code coverage. Change the recent h264_mp4toannexb bitstream filter test to output to an elementary stream rather than a program stream. g722enc: validate AVCodecContext.trellis g722enc: set frame_size, and also handle an odd number of input samples g722enc: split encoding into separate functions for trellis vs. no trellis mpegaudiodec: Use clearer pointer math tta: Fix returned error code at EOF ... Conflicts: libavcodec/h264.c libavcodec/indeo3.c libavcodec/interplayvideo.c libavcodec/ivi_common.c libavcodec/libxvidff.c libavcodec/mpegvideo.c libavcodec/ppc/mpegvideo_altivec.c libavcodec/tta.c libavcodec/utils.c libavfilter/vsrc_buffer.c libavformat/Makefile tests/fate/indeo.mak tests/ref/acodec/g722 Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * h264-test: Initialize AVCodecContext.av_class.Diego Biurrun2012-01-071-1/+1
| | | | | | | | | | | | This fixes a segfault on startup. Also remove a commented-out and completely unused variable.
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2012-01-071-7/+4
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: flicvideo: fix invalid reads vorbis: Avoid some out-of-bounds reads vqf: add more known extensions cabac: remove unused function renorm_cabac_decoder h264: Only use symbols from the SVQ3 decoder under proper conditionals. add bytestream2_tell() and bytestream2_seek() functions parsers: initialize MpegEncContext.slice_context_count to 1 spdifenc: use special alignment for DTS-HD length_code Conflicts: libavcodec/flicvideo.c libavcodec/h264.c libavcodec/mpeg4video_parser.c libavcodec/vorbis.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * h264: Only use symbols from the SVQ3 decoder under proper conditionals.Diego Biurrun2012-01-061-4/+4
| | | | | | | | Fixes --disable-everything --enable-decoder=h264 --disable-optimizations.
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2012-01-051-9/+4
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: (46 commits) mtv: Make sure audio_subsegments is not 0 v4l2: use V4L2_FMT_FLAG_EMULATED only if it is defined avconv: add symbolic names for -vsync parameters flvdec: Fix compiler warning for uninitialized variables rtsp: Fix compiler warning for uninitialized variable ulti: convert to new bytestream API. swscale: Use standard multiple inclusion guards in ppc/ header files. Place some START_TIMER invocations in separate blocks. v4l2: list available formats v4l2: set the proper codec_tag v4l2: refactor device_open v4l2: simplify away io_method v4l2: cosmetics v4l2: uniform and format options v4l2: do not force interlaced mode avio: exit early in fill_buffer without read_packet vc1dec: fix invalid memory access for small video dimensions rv34: fix invalid memory access for small video dimensions rv34: joint coefficient decoding and dequantization avplay: Don't call avio_set_interrupt_cb(NULL) ... Conflicts: Changelog avconv.c doc/APIchanges doc/indevs.texi libavcodec/adxenc.c libavcodec/dnxhdenc.c libavcodec/h264.c libavdevice/v4l2.c libavformat/flvdec.c libavformat/mtv.c libswscale/utils.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * h264: return index in buffer on end-of-sequence.Ronald S. Bultje2012-01-031-2/+2
| | | | | | | | | | Fixes hangs if the last packet contains an end-of-sequence NAL unit, bug 158.
| * Merge some declarations and initializations.Diego Biurrun2012-01-041-6/+2
| | | | | | | | | | | | This fixes compilation failures related to START_TIMER/STOP_TIMER macros and -Werror=declaration-after-statement. START_TIMER declares variables and thus may not be placed after statements outside of a new block.
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2012-01-031-5/+7
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: mpegenc: use avctx->slices as number of slices v410enc: fix undefined signed left shift caused by integer promotion Release notes: mention cleaned up header includes fix Changelog file Fix a bunch of typos. Drop some pointless void* return value casts from av_malloc() invocations. wavpack: fix typos in previous cosmetic clean-up commit wavpack: cosmetics: K&R pretty-printing avconv: remove the 'codec framerate is different from stream' warning wavpack: determine sample_fmt before requesting a buffer bmv audio: implement new audio decoding API mpegaudiodec: skip all channels when skipping granules mpegenc: simplify muxrate calculation Conflicts: Changelog avconv.c doc/RELEASE_NOTES libavcodec/h264.c libavcodec/mpeg12.c libavcodec/mpegaudiodec.c libavcodec/mpegvideo.c libavformat/mpegenc.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * mpegenc: use avctx->slices as number of slicesJanne Grunau2012-01-021-5/+4
| | | | | | | | | | | | Adds a new member to MpegEncContext to hold the number of used slice contexts. Fixes segfaults with '-threads 17 -thread_type slice' and fate-vsynth{1,2}-mpeg{2,4}thread{,_ilace} with --disable-pthreads.
* | h264: Fix frame sync / random access handling.Michael Niedermayer2012-01-011-5/+3
| | | | | | | | | | | | | | It seems I have misunderstood the spec when I implemented this originally. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | h264: Fix recovery_frame initialization when recovery_frame is -1Michael Niedermayer2012-01-011-1/+2
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | h264: reset picture->sync on allocation.Michael Niedermayer2012-01-011-0/+1
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | h264: add forgotten \n to "Invalid mix of idr and non-idr slices"Michael Niedermayer2012-01-011-1/+1
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | h264: Print pass in NAL debug outputMichael Niedermayer2012-01-011-1/+1
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | svq3: Fix memory corruption introduced by automatic thread_count.Michael Niedermayer2012-01-011-1/+1
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2011-12-241-1/+1
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: vp3dec: Check coefficient index in vp3_dequant() svq1dec: call avcodec_set_dimensions() after dimensions changed. Prepare for 0.8_beta1 snapshot release threads: check defines before using them in automatic thread detection pthread: include sys/types.h before sys/sysctl.h 4xm: remove unused variables. h264: Fix a possible overread in decode_nal_units() allfilters: fix type of avfilter_vsrc_buffer. w32thread: call ResetEvent() in pthread_cond_broadcast(). Conflicts: Changelog RELEASE doc/RELEASE_NOTES libavcodec/pthread.c libavcodec/vp3.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * h264: Fix a possible overread in decode_nal_units()Alexander Strange2011-12-231-1/+1
| | | | | | | | Signed-off-by: Anton Khirnov <anton@khirnov.net>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2011-12-221-4/+4
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: (27 commits) asfdec: add side data to ASFStream packet instead of output packet. idroqdec: set AVFMTCTX_NOHEADER and create streams as they occur. nellymoserdec: Indicate that the decoder can handle changed parameters libavcodec: Apply parameter change side data when decoding audio flvdec: Add param change side data if the sample rate or channels have changed libavformat: Add a utility function for adding parameter change side data libavcodec: Define a side data type for parameter changes aacdec: Handle new extradata passed as side data flvdec: Export new AAC/H.264 extradata as side data on the next packet libavcodec: Define a side data type for new extradata flacdec: skip all track indices at once instead of looping. mxf: Add PictureEssenceCoding UL for V210. mxfdec: consider QuantizationBits between 17 and 24 to be pcm_s24* mxfenc: Add support for MPEG-2 MP@HL-14 in mxf container. mxf: H.264/MPEG-4 AVC Intra support configure: Show whether the safe bitstream reader is enabled x86: Tighten register constraints for decode_significance*_x86. Replace Subversion revisions in comments by Git hashes. h264_cabac: synchronize decode_significance_*_x86 conditionals w32threads: wait for the waked thread in pthread_cond_signal. ... Conflicts: libavcodec/avcodec.h libavcodec/version.h libavformat/flvdec.c libavformat/utils.c tests/ref/lavfi/pixdesc tests/ref/lavfi/pixfmts_copy tests/ref/lavfi/pixfmts_null tests/ref/lavfi/pixfmts_scale tests/ref/lavfi/pixfmts_vflip Merged-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2011-12-201-1/+1
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: h264: clear trailing bits in partially parsed NAL units vc1: Handle WVC1 interlaced stream xl: Fix overreads mpegts: rename payload_index to payload_size segment: introduce segmented chain muxer lavu: add AVERROR_BUG error value avplay: clear pkt_temp when pkt is freed. qcelpdec: K&R formatting cosmetics qcelpdec: cosmetics: drop some pointless parentheses x86: conditionally compile dnxhd encoder optimizations Revert "h264: skip start code search if the size of the nal unit is known" swscale: fix formatting and indentation of unscaled conversion routines. h264: skip start code search if the size of the nal unit is known cljr: fix buf_size sanity check cljr: Check if width and height are positive integers Conflicts: libavcodec/cljr.c libavcodec/vc1dec.c libavformat/Makefile libavformat/mpegtsenc.c libavformat/segment.c libswscale/swscale_unscaled.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * h264: clear trailing bits in partially parsed NAL unitsJanne Grunau2011-12-191-1/+4
| | | | | | | | | | | | | | | | Trailing bits are likely to be non-zero if the NAL unit is truncated. Clearing the bits make overreads of the bitstream less likely in this case. Fixes playback of http://streams.videolan.org/streams/mp4/Mr_MrsSmith-h264_aac.mp4 which has a forbidden byte sequence of 0x00 0x00 0x00 in it SPS.
| * Revert "h264: skip start code search if the size of the nal unit is known"Janne Grunau2011-12-191-9/+2
| | | | | | | | This reverts commit 87eebb3454ff0cd6af6ebf9e1d31bdfd1c3b601b.
| * h264: skip start code search if the size of the nal unit is knownJanne Grunau2011-12-181-2/+9
| | | | | | | | | | | | | | | | 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.
| * h264: don't drop B-frames after next keyframe on POC reset.Ronald S. Bultje2011-12-161-1/+5
| | | | | | | | | | | | | | The keyframe after a POC reset may not be the first to be returned to the user. Therefore, don't reset the expected next POC once we return a keyframe to the user, but once we know that the next frame in the return-queue is a keyframe.
* | h264: disable checking reader, overreads are not possibleMichael Niedermayer2011-12-181-0/+2
| | | | | | | | | | | | in ffmpegs h264 decoder. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | h264: return the consumed amountg in case of Q264Michael Niedermayer2011-12-161-1/+1
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | h264: retuen the amount read in case of NAL_END_SEQUENCEMichael Niedermayer2011-12-161-5/+6
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | h264: reset nal_unit_type so that decoding frames without any nal unitsMichael Niedermayer2011-12-161-0/+2
| | | | | | | | | | | | dont leave its value at something random. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | h264: fix midstream extardata handling with dump.f4vMichael Niedermayer2011-12-151-1/+21
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | h264: Fix build with --disable-everything --enable-decoder='h264' ↵Michael Niedermayer2011-12-151-3/+3
| | | | | | | | | | | | --disable-optimizations Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2011-12-131-9/+9
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: ulti: Fix invalid reads lavf: dealloc private options in av_write_trailer yadif: support 10bit YUV vc1: mark with ER_MB_ERROR bits overconsumption lavc: introduce ER_MB_END and ER_MB_ERROR error_resilience: use the ER_ namespace build: move inclusion of subdir.mak to main subdir loop rv34: NEON optimised 4x4 dequant rv34: move 4x4 dequant to RV34DSPContext aacdec: Use intfloat.h rather than local punning union. Conflicts: libavcodec/h264.c libavcodec/vc1dec.c libavfilter/vf_yadif.c libavformat/Makefile Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * lavc: introduce ER_MB_END and ER_MB_ERRORLuca Barbato2011-12-131-8/+8
| | | | | | | | | | | | Simplify a little error resilience calls Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
| * error_resilience: use the ER_ namespaceLuca Barbato2011-12-131-9/+9
| | | | | | | | | | | | Add the namespace to {AC_,DC_,MV_}{END,ERROR} macros Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2011-12-131-6/+7
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: doxygen: misc consistency, spelling and wording fixes vcr1: drop unnecessary emms_c() calls without MMX code Replace all uses of av_close_input_file() with avformat_close_input(). lavf: add avformat_close_input(). lavf: deprecate av_close_input_stream(). lavf doxy: add some basic demuxing documentation. lavf doxy: add some general lavf information. lavf doxy: add misc utility functions to a group. lavf doxy: add av_guess_codec/format to the encoding group. lavf doxy: add core functions to a doxy group. Add basic libavdevice documentation. lavc: convert error_recognition to err_recognition. avconv: update -map option help text x86: Require 7 registers for the cabac asm x86: bswap: remove test for bswap instruction bswap: make generic implementation more compiler-friendly h264: remove useless cast proresdec: fix decode_slice() prototype Conflicts: configure doc/APIchanges ffprobe.c libavcodec/avcodec.h libavcodec/celp_math.h libavcodec/h264.c libavfilter/src_movie.c libavformat/anm.c libavformat/avformat.h libavformat/version.h libavutil/avstring.h libavutil/bswap.h Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * doxygen: misc consistency, spelling and wording fixesDiego Biurrun2011-12-121-5/+7
| |
| * lavc: convert error_recognition to err_recognition.Dustin Brody2011-12-121-1/+1
| | | | | | | | Signed-off-by: Anton Khirnov <anton@khirnov.net>
| * h264: remove useless castMans Rullgard2011-12-121-1/+1
| | | | | | | | Signed-off-by: Mans Rullgard <mans@mansr.com>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2011-12-121-5/+5
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: x86: cabac: replace explicit memory references with "m" operands avplay: don't request a stereo downmix wmapro: use av_float2int() lavc: avoid invalid memcpy() in avcodec_default_release_buffer() lavu: replace int/float punning functions lavfi: install libavfilter/vsrc_buffer.h Remove extraneous semicolons sdp: Restore the original mp4 format h264 extradata if converted rtpenc: Add support for mp4 format h264 rtpenc: Simplify code by introducing a separate end pointer movenc: Use the actual converted sample for RTP hinting Fix a bunch of common typos. Conflicts: doc/developer.texi doc/eval.texi doc/filters.texi doc/protocols.texi ffmpeg.c ffplay.c libavcodec/mpegvideo.h libavcodec/x86/cabac.h libavfilter/Makefile libavformat/avformat.h libavformat/cafdec.c libavformat/flvdec.c libavformat/flvenc.c libavformat/gxfenc.c libavformat/img2.c libavformat/movenc.c libavformat/mpegts.c libavformat/rtpenc_h264.c libavformat/utils.c libavformat/wtv.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * Remove extraneous semicolonsMans Rullgard2011-12-111-2/+2
| | | | | | | | | | | | These semicolons cause invalid empty top-level declarations. Signed-off-by: Mans Rullgard <mans@mansr.com>
| * Fix a bunch of common typos.Diego Biurrun2011-12-111-3/+3
| |
* | h264: Fix concealment regression introduced by ↵Michael Niedermayer2011-12-101-1/+2
| | | | | | | | | | | | | | | | babf4fe01a808327d53977ba319c113a930180b1 Limit the new case to when the decoder is flushed instead of at each idr frame Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | h264: reset prev_poc_msb to the same value everywhere.Michael Niedermayer2011-12-101-1/+1
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | h264: improve "no picture" debug output.Michael Niedermayer2011-12-101-1/+1
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | h264: switch from qatars has_b_frames calculation back to mine.Michael Niedermayer2011-12-101-68/+29
| | | | | | | | | | | | Their 2nd try does like the first not work at all. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | h264: init prev_frame_num to -1 on initMichael Niedermayer2011-12-071-0/+1
| | | | | | | | | | | | Fixes Ticket711 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | h264: Fix memleaks on close, reset more fieldsMichael Niedermayer2011-12-071-0/+1
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | h264: show when has_b_frames is being increased.Michael Niedermayer2011-12-041-1/+2
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2011-12-041-27/+67
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: h264: fix frame reordering code. fate: Add a test for the VBLE decoder doc: break some long lines in developer.texi drawtext: make x and y parametric drawtext: manage memory allocation better drawtext: refactor draw_text doc: remove space between variable and post increment in example code Conflicts: doc/developer.texi doc/filters.texi libavcodec/h264.c libavfilter/vf_drawtext.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * h264: fix frame reordering code.Ronald S. Bultje2011-12-031-17/+50
| | | | | | | | | | Fixes fate-h264-conformance-{mr2_tandberg_e,mr3_tandberg_b} without requiring -strict 1.
* | Silence warnings when decoding QNAP Systems H264 codec.Carl Eugen Hoyos2011-12-031-1/+2
| | | | | | | | Fixes ticket #571.
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2011-12-021-1/+1
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: (25 commits) rtpenc: Add support for G726 audio rtpdec: Interpret the different G726 names as bits_per_coded_sample rtpenc: Change rtp_send_samples to handle sample sizes other than even bytes rtpenc: Cast a rescaling parameter to int64_t h264: cap max has_b_frames at MAX_DELAYED_PIC_COUNT - 1. ARM: fix indentation in ff_dsputil_init_neon() ARM: NEON put/avg_pixels8/16 cosmetics ARM: add remaining NEON avg_pixels8/16 functions ARM: clean up NEON put/avg_pixels macros fate: split acodec-pcm into individual tests swscale: #include "libavutil/mathematics.h" pmpdec: don't use deprecated av_set_pts_info. rv34: align temporary block of "dct" coefs Add PlayStation Portable PMP format demuxer proto: Realign struct initializers proto: Use .priv_data_size to allocate the private context mmsh: Properly clean up if the second ffurl_alloc failed rtmp: Clean up properly if the handshake failed md5proto: Remove the get_file_handle function applehttpproto: Use the close function if the open function fails ... Conflicts: libavcodec/vble.c libavformat/mmsh.c libavformat/pmpdec.c libavformat/udp.c tests/ref/acodec/pcm Merged-by: Michael Niedermayer <michaelni@gmx.at>
OpenPOWER on IntegriCloud