summaryrefslogtreecommitdiff
path: root/libavcodec/h264.c
Commit message (Collapse)AuthorAge
* Merge remote-tracking branch 'qatar/master'Michael Niedermayer2011-11-06
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: http: Remove the custom function for disabling chunked posts rtsp: Disable chunked http post through AVOptions movdec: Set frame_size for AMR h264_weight: remove duplication functions. swscale: align vertical filtersize by 2 on x86. libavfilter: reindent. matroskadec: empty blocks are in fact valid. avfilter: don't abort() on zero-size allocations. h264: improve calculation of codec delay. movenc: Set a correct packet size for AMR-NB mode 15, "no data" avformat: Add functions for doing global network initialization avformat: Add the https protocol avformat: Add the tls protocol, using OpenSSL or gnutls avformat: Initialize gnutls in ff_tls_init() w32threads: Wrap the mutex functions in inline functions returning int configure: Allow linking to the gnutls library avformat: Add ff_tls_init()/deinit() that initialize OpenSSL configure: Allow linking to openssl avcodec: Allow locking and unlocking an avformat specific mutex avformat: Split out functions from network.h to a new file, network.c Conflicts: Changelog configure doc/APIchanges libavcodec/internal.h libavcodec/version.h libavfilter/formats.c libavformat/matroskadec.c libavformat/mov.c libavformat/version.h Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * h264: improve calculation of codec delay.Ronald S. Bultje2011-11-05
| | | | | | | | | | | | Fixes the following conformance suite samples: HCBP1_HHI_A.264, HCBP2_HHI_A.264, HCMP1_HHI_A.264 (main) HCHP1_HHI_B.264, HCHP2_HHI_A.264, HCHP3_HHI_A.264 (frext)
* | Set avctx->coded_width/height to uncropped h264 sizesJoakim Plate2011-11-06
| | | | | | | | | | | | | | | | | | | | | | avctx->width/height remain right/bottom cropped as previous behaviour. Hardware decoders need to know the uncropped data to allocate surfaces of correct height. Some hardware is picky and fails to decoder properly if a surface larger than needed is used during decode, so just aligning up is not enough. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | h264: favor coded_width in resolution chnaged checksMichael Niedermayer2011-11-03
| | | | | | | | | | Suggested-by: Joakim Plate <elupus@ecce.se> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | h264: add nal_length_size and is_avc to the publically readable fieldsMichael Niedermayer2011-11-02
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | HWAccel: adds Video Decoder Acceleration (VDA) module for Mac OS X.Sebastien Zwickert2011-11-02
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2011-10-30
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: (51 commits) cin audio: use sign_extend() instead of casting to int16_t cin audio: restructure decoding loop to avoid a separate counter variable cin audio: use local variable for delta value cin audio: remove unneeded cast from void* cin audio: validate the channel count cin audio: remove unneeded AVCodecContext pointer from CinAudioContext dsicin: fix several audio-related fields in the CIN demuxer flacdec: use av_get_bytes_per_sample() to get sample size dca: handle errors from dca_decode_block() dca: return error if the frame header is invalid dca: return proper error codes instead of -1 utvideo: handle empty Huffman trees binkaudio: change short to int16_t binkaudio: only decode one block at a time. binkaudio: store interleaved overlap samples in BinkAudioContext. binkaudio: pre-calculate quantization factors binkaudio: add some buffer overread checks. atrac3: support float or int16 output using request_sample_fmt atrac3: add CODEC_CAP_SUBFRAMES capability atrac3: return appropriate error codes instead of -1 ... Conflicts: libavcodec/atrac1.c libavcodec/dca.c libavformat/mov.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * Fix decoding of lossless 4:2:2 H.264Anton Mitrofanov2011-10-28
| | | | | | | | Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
| * Fix decoding of lossless 10-bit 4:4:4 H.264Anton Mitrofanov2011-10-28
| | | | | | | | Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
* | Be more verbose about unsupported H.264 bit-depths.Carl Eugen Hoyos2011-10-29
| |
* | Warn if YCgCo colourspace is detected in H.264.Carl Eugen Hoyos2011-10-29
| |
* | h264: use long reading for first_mb_in_sliceMichael Niedermayer2011-10-27
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | h264: 10l fix, missing () after replacing % by &Michael Niedermayer2011-10-25
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | h264: Calculate a tighter recovery_frame.Michael Niedermayer2011-10-24
| | | | | | | | | | | | Reduces delay with mplayers TS demuxer. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | h264: Support invalid output by mplayers TS demuxer.Michael Niedermayer2011-10-24
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2011-10-24
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: Move id3v2 tag writing to a separate file. swscale: add missing colons to x86 assembly yuv2planeX. g722: split decoder and encoder into separate files cosmetics: remove extra spaces before end-of-statement semi-colons vorbisdec: check output buffer size before writing output wavpack: calculate bpp using av_get_bytes_per_sample() ac3enc: Set max value for mode options correctly lavc: move get_b_cbp() from h263.h to mpeg4videoenc.c mpeg12: move closed_gop from MpegEncContext to Mpeg1Context mpeg12: move full_pel from MpegEncContext to Mpeg1Context mpeg12: move Mpeg1Context from mpeg12.c to mpeg12.h mpegvideo: remove some unused variables from MpegEncContext. Conflicts: libavcodec/mpeg12.c libavformat/mp3enc.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * mpegvideo: remove some unused variables from MpegEncContext.Anton Khirnov2011-10-23
| |
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2011-10-23
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: id3v2: fix doxy comment - 'machine byte order' makes no sense on char arrays VC1: restore mistakenly removed code twinvq: check output buffer size before decoding twinvq: return an error when the packet size is too small lavf: export some forgotten symbols with non-av prefixes. swscale: update altivec yuv2planeX asm to new per-plane API. swscale: make yuv2yuvX_10_sse2/avx 8/9/16-bits aware. yuv2planeX10 SIMD swscale: decide whether to use yuv2plane1/X on a per-plane basis. swscale: reintroduce full precision in 16-bit output. Split up yuv2yuvX functions Split out yuv2yuv1 luma and chroma in order to make them generic DSP functions lavc: replace references to deprecated AVCodecContext.error_recognition to use AVCodecContext.err_recognition lavc: translate non-flag-based er options into flag-based ef options at codec open add -err_filter AVOptions to access flag-based error recognition h264_weight: initialize "height" function argument properly. presets: spelling error in libvpx 1080p50_60 avplay: fix fullscreen behaviour with SDL 1.2.14 on Mac OS X Conflicts: ffplay.c libavformat/libavformat.v libswscale/swscale.c libswscale/x86/swscale_template.c tests/ref/lavfi/pixfmts_scale Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * lavc: replace references to deprecated AVCodecContext.error_recognition to ↵Dustin Brody2011-10-22
| | | | | | | | | | | | use AVCodecContext.err_recognition Signed-off-by: Anton Khirnov <anton@khirnov.net>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2011-10-22
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: (35 commits) flvdec: Do not call parse_keyframes_index with a NULL stream libspeexdec: include system headers before local headers libspeexdec: return meaningful error codes libspeexdec: cosmetics: reindent libspeexdec: decode one frame at a time. swscale: fix signed shift overflows in ff_yuv2rgb_c_init_tables() Move timefilter code from lavf to lavd. mov: add support for hdvd and pgapmetadata atoms mov: rename function _stik, some indentation cosmetics mov: rename function _int8 to remove ambiguity, some indentation cosmetics mov: parse the gnre atom mp3on4: check for allocation failures in decode_init_mp3on4() mp3on4: create a separate flush function for MP3onMP4. mp3on4: ensure that the frame channel count does not exceed the codec channel count. mp3on4: set channel layout mp3on4: fix the output channel order mp3on4: allocate temp buffer with av_malloc() instead of on the stack. mp3on4: copy MPADSPContext from first context to all contexts. fmtconvert: port float_to_int16_interleave() 2-channel x86 inline asm to yasm fmtconvert: port int32_to_float_fmul_scalar() x86 inline asm to yasm ... Conflicts: libavcodec/arm/h264dsp_init_arm.c libavcodec/h264.c libavcodec/h264.h libavcodec/h264_cabac.c libavcodec/h264_cavlc.c libavcodec/h264_ps.c libavcodec/h264dsp_template.c libavcodec/h264idct_template.c libavcodec/h264pred.c libavcodec/h264pred_template.c libavcodec/x86/h264dsp_mmx.c libavdevice/Makefile libavdevice/jack_audio.c libavformat/Makefile libavformat/flvdec.c libavformat/flvenc.c libavutil/pixfmt.h libswscale/utils.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * h264: mark some MC functions with av_always_inline instead of inline.Ronald S. Bultje2011-10-21
| | | | | | | | | | This actually causes them to be inlined, leading to a significant speedup (1-1.5% in my measurements).
| * H264: have hl_motion() and its callees take a chroma_idc argument.Ronald S. Bultje2011-10-21
| |
| * H264: change weight/biweight functions to take a height argument.Ronald S. Bultje2011-10-21
| | | | | | | | Neon parts by Mans Rullgard <mans@mansr.com>.
| * Support for lossless and inter H264 4:2:2.Ronald S. Bultje2011-10-21
| |
| * 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>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2011-10-17
|\| | | | | | | | | | | | | | | | | | | | | | | * qatar/master: w32threads: support for frame multithreading avcodec: remove stray @deprecated comment Conflicts: libavcodec/utils.c libavcodec/w32thread.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * w32threads: support for frame multithreadingSteven Walters2011-10-16
| | | | | | | | | | | | | | | | Replace our incomplete w32threads implementation with x264's pthreads w32threads wrapper. Relicensed to LGPL with kind permission by Pegasys Inc. Signed-off-by: Janne Grunau <janne-libav@jannau.net>
| * h264: change unsupported bit depth message to error levelMans Rullgard2011-10-12
| | | | | | | | | | | | | | Unsupported bit depth is certainly an error the user will want to know about. Signed-off-by: Mans Rullgard <mans@mansr.com>
| * h264: reset h->ref_count in case of errors in ↵Laurent Aimar2011-10-10
| | | | | | | | | | | | ff_h264_decode_ref_pic_list_reordering() Signed-off-by: Janne Grunau <janne-libav@jannau.net>
* | h264: Workaround invalid flag combinations of 8x8 inference.Michael Niedermayer2011-10-15
| | | | | | | | | | | | Fixes Ticket555 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2011-10-10
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: mpeg4dec: use unsigned type for startcode in ff_mpeg4_decode_picture_header mpeg124: use sign_extend() function ac3dec: use get_sbits() instead of manually sign-extending 4xm: fix signed overflow wmavoice: fix a signed overflow mpegvideo_enc: fix a signed overflow crc: fix signed overflow fate: run avconv with -nostats flag avtools: add -v as alias for -loglevel avconv: always print stats with AV_LOG_INFO doc/avconv: add forgotten output/per-stream info to -filter avconv: add -stats option to enable/disable printing encoding progress avconv: in output_packet() don't set decoded_data_size for video. avconv: remove pointless always true condition avconv: factorize common code in transcode_init() zmbv: remove memcpy() of decoded frame mpeg12enc: use sign_extend() function h264pred: use unsigned types for pixel values, fix signed overflows h264: fix signed overflows in x*0x01010101 expressions h264pred: remove unused variables Conflicts: avconv.c tests/fate-run.sh Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * h264: fix signed overflows in x*0x01010101 expressionsMans Rullgard2011-10-09
| | | | | | | | Signed-off-by: Mans Rullgard <mans@mansr.com>
* | Start adding pixel definitions for planar rgb.Themaister2011-10-08
| |
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2011-10-08
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: (24 commits) mpegps: Use av_get_packet() instead of poorly emulating it. motionpixels: decode only the 111 complete frames for fate mpc8: Check out of bound bands limit xan: Prevent NULL dereference with missing palette xan: Check for out of bound reads in xan_huffman_decode() xan: Fixed out of bound accesses in xan_unpack() motionpixels: Prevent calling init_vlc() with invalid parameters shorten: Fix out of bound writes in fix_bitshift() dsicinav: Check for out of bounds writes tiertexseqv: Check for out of bound reads quickdraw: Check for out of bound reads dsicinav: Check for out of bounds reads motionpixels: Fix the size of workspace buffers motionpixels: Clear FF_INPUT_BUFFER_PADDING_SIZE bytes at the end of the temporary buffer wmavoice: Check for corrupted extra data wmavoice: Check for out of bound writes xan: Prevent NULL dereferences with missing reference frame bink: Prevent NULL dereferences with missing reference frame wavpack: Reset internal state on corrupted blocks wmapro: Validate the number of audio channels before using it ... Conflicts: libavcodec/h264.c libavcodec/xan.c tests/ref/fate/motionpixels Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * H264: Only wait before triggering ff_thread_setup_complete() until the next ↵Michael Niedermayer2011-10-07
| | | | | | | | | | | | | | | | | | | | | | | | slice that contains a start-of-field/frame macroblock This allows concurrent decoding of the last field/frame, rather than only the last slice, of data packets with multiple NAL units packed together. This will fix the slowdown reported in e.g. bug 52. Signed-off-by: Anton Khirnov <anton@khirnov.net>
* | H264: set colorspace and full range to values indicating unspecified by defaultMichael Niedermayer2011-10-08
| | | | | | | | | | | | | | Code based on ffdshow Author unknown Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2011-10-07
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: vp6: Reset the internal state when aborting key frames header parsing vp56: Release old pictures after a resolution changes vp6: Check for huffman tree build errors vp56: Check for missing reference frame data cinepak: Fix invalid read access on extra data vmd: fix segfaults on corruped streams cook: Fix js_vlc_bits value validation for joint stereo segafilm: Check for memory allocation failures in segafilm demuxer. segafilm: Fix potential division by 0 on corrupted streams in the demuxer Fixed segfault on corrupted sega streams in the demuxer. Fixed deference of NULL pointer in motionpixels decoder. libx264: support 9- and 10-bit output. h264: correct implicit_weight for field-interlaced pictures. mpegvideo: set correct offset for edge emulation buffer. mpegvideo: fix position of bottom edge. Conflicts: libavcodec/motionpixels.c libavcodec/mpegvideo.c libavcodec/version.h libavcodec/vmdav.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * h264: correct implicit_weight for field-interlaced pictures.Ronald S. Bultje2011-10-05
| |
| * h264: check for out of bounds reads in ff_h264_decode_extradata().Laurent Aimar2011-09-25
| | | | | | | | Signed-off-by: Anton Khirnov <anton@khirnov.net>
* | h264: reject unsupported 422 9 bit streamsLaurent Aimar2011-10-07
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | h264: do not let invalid values in h->ref_count after a decoder reset.Laurent Aimar2011-10-05
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | h264: bit depth/chroma idc changes must go through a full format negociation.Laurent Aimar2011-10-05
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | h254: explicitly initialize bit depth/chroma idcLaurent Aimar2011-10-05
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | H264: hotfix for speedloss on frame threading and h264 files with slices.Michael Niedermayer2011-10-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This fix is not ideal as it still limits the multithreading on field pictures to the 2nd field only. Ill try to fix it properly to allow both fields to decode concurrently but this needs more work. This bug exists since and was caused by: commit ea6331f8bbaf3343faec6ffe77a6218a016a3af5 Author: Ronald S. Bultje <rsbultje@gmail.com> Date: Mon Jun 20 10:24:33 2011 -0400 h264-mt: fix deadlock in packets with multiple slices (e.g. MP4).
* | h264: fix intra 16x16 mode check when using mbaff and constrained_intra_pred.Laurent Aimar2011-10-02
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | h264: do not let invalid values in h->ref_count on ↵Laurent Aimar2011-10-02
| | | | | | | | | | | | ff_h264_decode_ref_pic_list_reordering() errors. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | h264: set unused ref_counts to 0 as a precautionary meassure.Michael Niedermayer2011-10-02
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | h264: try reading SPS with wrong escaping, it sometimes works betterMichael Niedermayer2011-10-01
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | h264: More correct ref_count check in decode_slice_header()Michael Niedermayer2011-09-28
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | h264: dont set key_frame when the frame is not a real keyframe.Michael Niedermayer2011-09-28
| | | | | | | | | | | | Fixes Ticket514 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>