summaryrefslogtreecommitdiff
path: root/libavcodec/h264.c
Commit message (Collapse)AuthorAge
* h264: do not return an error when NAL parsing of extradata failedHendrik Leppkes2016-05-07
| | | | | | Fixes AnnexB samples with broken extradata, but proper in-band parameter sets Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
* Merge commit 'ca2f19b9cc37be509d85f05c8f902860475905f8'Hendrik Leppkes2016-05-07
|\ | | | | | | | | | | | | * commit 'ca2f19b9cc37be509d85f05c8f902860475905f8': h264: switch to h2645_parse for NAL parsing Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
| * h264: switch to h2645_parse for NAL parsingAnton Khirnov2016-03-28
| |
* | avcodec/h264: Put the removed SPS handling code backMichael Niedermayer2016-05-03
| | | | | | | | | | | | | | | | | | reverts one hunk from 7966ddfc0bb7ee87dc2606b7b146701db6f6c717 The new code from 7966ddfc0bb7ee87dc2606b7b146701db6f6c717 only covers extradata based SPS Fixes: ffplay -ss 13 58af5798-fa2c-42a2-997d-dc8e49de2d8a.flv Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | Merge commit 'a7829a2a3f8e6ec0b9f2673c11f56916800aeb33'Derek Buitenhuis2016-05-03
|\| | | | | | | | | | | | | * commit 'a7829a2a3f8e6ec0b9f2673c11f56916800aeb33': h264: reimplement 3aa661ec5 in a more explicit way Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
| * h264: reimplement 3aa661ec5 in a more explicit wayAnton Khirnov2016-03-28
| | | | | | | | | | | | Instead of handling the problem inside NAL decoding code, add a higher level wrapper function. This should be more robust against future changes (and easier to read).
* | Merge commit 'ecc31f6b086453ab9811dce2ae5ceb6a7c19e4ad'Derek Buitenhuis2016-04-27
|\| | | | | | | | | | | | | * commit 'ecc31f6b086453ab9811dce2ae5ceb6a7c19e4ad': h264: move ff_h264_check_intra[4x4]_pred_mode() to h264_parse Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
| * h264: move ff_h264_check_intra[4x4]_pred_mode() to h264_parseAnton Khirnov2016-03-28
| | | | | | | | It is shared with svq3.
* | Merge commit '9b30f8dd8fa5bef5f16904cb98745b4a58f8f776'Derek Buitenhuis2016-04-27
|\| | | | | | | | | | | | | * commit '9b30f8dd8fa5bef5f16904cb98745b4a58f8f776': h264: remove the svq3-specific code Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
| * h264: remove the svq3-specific codeAnton Khirnov2016-03-28
| |
* | avcodec/h264: Only recover from reference picturesMichael Niedermayer2016-04-27
| | | | | | | | | | | | | | Fixes spec compliance Fixes Ticket5346 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | Merge commit 'e481458bc308ee838deaeacac51929514762e7a7'Derek Buitenhuis2016-04-26
|\| | | | | | | | | | | | | * commit 'e481458bc308ee838deaeacac51929514762e7a7': h264: factor out pred weight table parsing into a separate file Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
| * h264: factor out pred weight table parsing into a separate fileAnton Khirnov2016-03-28
| | | | | | | | This will allow decoupling the parser from the decoder.
* | avcodec/h264: Fix for H.264 configuration parsingIvan2016-04-17
| | | | | | | | | | | | | | | | | | Sometimes video fails to decode if H.264 configuration changes mid stream. The reason is that configuration parser assumes that nal_ref_idc is equal to 11b while actually some codecs but 01b there. The H.264 spec is somewhat vague about this but it looks like it allows any non-zero nal_ref_idc for sps/pps. Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avcodec/h264: Execute error concealment before marking the frame as done.Michael Niedermayer2016-02-19
| | | | | | | | | | | | | | Fixes race condition causing artifacts Fixes Ticket4122 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avcodec/h264: Fix memleak of a53_captionMichael Niedermayer2016-02-13
| | | | | | | | | | | | Fixes Ticket5111 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avcodec/h264: Fix memleak in case of ff_h264_decode_extradata() failureMichael Niedermayer2016-01-28
| | | | | | | | | | | | Fixes Ticket5139 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | lavc/h264: Show "Increasing reorder buffer" message with loglevel info.Carl Eugen Hoyos2016-01-27
| | | | | | | | See ticket #5138 for a sample.
* | lavc: fix profile declarations for vdpau decodersHendrik Leppkes2016-01-01
| |
* | Merge commit '2c6811397bdf13d43ca206e48d6d6da9c2cd47c6'Hendrik Leppkes2016-01-01
|\| | | | | | | | | | | | | * commit '2c6811397bdf13d43ca206e48d6d6da9c2cd47c6': lavc: add profiles to AVCodecDescriptor Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
| * lavc: add profiles to AVCodecDescriptorAnton Khirnov2015-12-12
| | | | | | | | | | The profiles are a property of the codec, so it makes sense to export them through AVCodecDescriptors, not just the codec implementations.
* | avcodec: Use get_ue_golomb_long() when neededMark Harris2015-12-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | get_ue_golomb() cannot decode values larger than 8190 (the maximum value that can be golomb encoded in 25 bits) and produces the error "Invalid UE golomb code" if a larger value is encountered. Use get_ue_golomb_long() instead (which supports 63 bits, up to 4294967294) when valid h264/hevc values can exceed 8190. This updates decoding of the following values: (maximum) first_mb_in_slice 36863* for level 5.2 abs_diff_pic_num_minus1 131071 difference_of_pic_nums_minus1 131071 idr_pic_id 65535 recovery_frame_cnt 65535 frame_packing_arrangement_id 4294967294 frame_packing_arrangement_repetition_period 16384 display_orientation_repetition_period 16384 An alternative would be to modify get_ue_golomb() to handle encoded values of up to 49 bits as was done for get_se_golomb() in a92816c. In that case get_ue_golomb() could continue to be used for all of these except frame_packing_arrangement_id. Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | Merge commit 'b09ad37c83841c399abb7f2503a2ab214d0c2d48'Hendrik Leppkes2015-12-17
|\| | | | | | | | | | | | | | | | | | | * commit 'b09ad37c83841c399abb7f2503a2ab214d0c2d48': h264: derive the delay from the level when it's not present Merged without changing the strict_std_compliance check, as it breaks FATE and changes decoding behavior. Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
| * 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.
* | avcodec/h264: Set CORRUPT flag on output frames that are not fully recoveredSebastian Dröge2015-12-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In the merge commit 78265fcfeee153e5e26ad4dbc7831a84ade447d6 this behaviour was broken and the CORRUPT flag would never ever be set on a frame. However the flag on the AVCodecContext was taken into account properly, including AV_CODEC_FLAG2_SHOW_ALL. The reason for this was that the recovered field of the next output picture was always set to TRUE whenever one of the two AVCodecContext flags was set, which made it impossible to detect later, before outputting, if the frame was really recovered or not. Now don't set it to TRUE unless the frame is really recovered and check the AVCodecContext flags right before outputting. Signed-off-by: Sebastian Dröge <sebastian@centricular.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avcodec: use AV_OPT_TYPE_BOOL in a bunch of placesClément Bœsch2015-12-04
| |
* | Merge commit 'd15368ee3926152a3a301c13cc638fbf7a062ddf'Hendrik Leppkes2015-10-14
|\| | | | | | | | | | | | | * commit 'd15368ee3926152a3a301c13cc638fbf7a062ddf': h264: Run VLC init under pthread_once Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
| * h264: Run VLC init under pthread_onceDerek Buitenhuis2015-10-14
| | | | | | | | | | | | | | This makes the h.264 decoder threadsafe to initialize. Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com> Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
| * cabac: Make CABAC states hardcodedAnton Khirnov2015-10-08
| | | | | | | | | | | | | | There is not much reason to generate such a small table at runtime. Signed-off-by: Derek Buitenhuis <derekb@vimeo.com> Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
| * h264: Do not print an error when the buffer has to be refilledLuca Barbato2015-08-06
| | | | | | | | Partially amends 9469370fb32679352e66826daf77bdd2e6f067b5
| * h264: Use AVERROR return codes instead of -1Jake Sebastian-Jones2015-08-05
| | | | | | | | | | | | And report why it fails. Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
| * h264: fix AVDISCARD_NONKEY for some interlaced contentJohn Högberg2015-07-27
| | | | | | | | | | | | | | | | | | When skip_frame is set to _NONKEY the decoder skips everything except intra slices, which breaks frames that consist of an intra field together with any other field type; half the frame becomes garbage. This patch fixes the issue by letting non-intra slices through if they're part of a keyframe. Signed-off-by: Anton Khirnov <anton@khirnov.net>
* | cabac: Make cabac starts hardcodedAnton Khirnov2015-10-10
| | | | | | | | | | | | There's not much reason to generate such a small table at runtime. Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
* | avcodec: use HAVE_THREADS header guards to silence -Wunused-functionGanesh Ajjanagadde2015-10-04
| | | | | | | | | | | | | | | | | | | | When compiled with --disable-pthreads, e.g http://fate.ffmpeg.org/report.cgi?time=20150917015044&slot=alpha-debian-qemu-gcc-4.7, a bunch of -Wunused-functions are reported due to missing header guards around threading related functions. This patch should silence such warnings. Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
* | h264: Fix ticket #3147 H264 - Wrong field orderThomas Mundt2015-09-27
| | | | | | | | | | | | | | | | | | Default field order to top field first when interlaced frame is detected and pic_struct_present_flag is not set. Since bottom field first comes from the old NTSC standard and is not used with HD anymore I think it´s straight forward to favor the majority. Signed-off-by: Thomas Mundt <loudmax@yahoo.de> Reviewed-by: Kieran Kunhya <kierank@obe.tv> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* | avcodec/h264: use AV_OPT_TYPE_BOOL for is_avc optionClément Bœsch2015-09-12
| |
* | lavc: move vdpau decoders under FF_API_VDPAU.wm42015-08-18
| | | | | | | | Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
* | lavc: put remaining bits of vdpau-in-decoder under FF_API_CAP_VDPAU.Ronald S. Bultje2015-08-18
| |
* | FF_OPT_TYPE_* -> AV_OPT_TYPE_*.Ronald S. Bultje2015-08-18
| |
* | lavc: propagate hwaccel errorswm42015-08-06
| | | | | | | | | | | | | | | | At least the new videotoolbox decoder does not actually set a frame if end_frame fails. This causes the API to return success and signals that a picture was decoded, even though AVFrame->data[0] is NULL. Fix this by propagating end_frame errors.
* | Merge commit '059a934806d61f7af9ab3fd9f74994b838ea5eba'Michael Niedermayer2015-07-27
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '059a934806d61f7af9ab3fd9f74994b838ea5eba': lavc: Consistently prefix input buffer defines Conflicts: doc/examples/decoding_encoding.c libavcodec/4xm.c libavcodec/aac_adtstoasc_bsf.c libavcodec/aacdec.c libavcodec/aacenc.c libavcodec/ac3dec.h libavcodec/asvenc.c libavcodec/avcodec.h libavcodec/avpacket.c libavcodec/dvdec.c libavcodec/ffv1enc.c libavcodec/g2meet.c libavcodec/gif.c libavcodec/h264.c libavcodec/h264_mp4toannexb_bsf.c libavcodec/huffyuvdec.c libavcodec/huffyuvenc.c libavcodec/jpeglsenc.c libavcodec/libxvid.c libavcodec/mdec.c libavcodec/motionpixels.c libavcodec/mpeg4videodec.c libavcodec/mpegvideo.c libavcodec/noise_bsf.c libavcodec/nuv.c libavcodec/nvenc.c libavcodec/options.c libavcodec/parser.c libavcodec/pngenc.c libavcodec/proresenc_kostya.c libavcodec/qsvdec.c libavcodec/svq1enc.c libavcodec/tiffenc.c libavcodec/truemotion2.c libavcodec/utils.c libavcodec/utvideoenc.c libavcodec/vc1dec.c libavcodec/wmalosslessdec.c libavformat/adxdec.c libavformat/aiffdec.c libavformat/apc.c libavformat/apetag.c libavformat/avidec.c libavformat/bink.c libavformat/cafdec.c libavformat/flvdec.c libavformat/id3v2.c libavformat/isom.c libavformat/matroskadec.c libavformat/mov.c libavformat/mpc.c libavformat/mpc8.c libavformat/mpegts.c libavformat/mvi.c libavformat/mxfdec.c libavformat/mxg.c libavformat/nutdec.c libavformat/oggdec.c libavformat/oggparsecelt.c libavformat/oggparseflac.c libavformat/oggparseopus.c libavformat/oggparsespeex.c libavformat/omadec.c libavformat/rawdec.c libavformat/riffdec.c libavformat/rl2.c libavformat/rmdec.c libavformat/rtpdec_latm.c libavformat/rtpdec_mpeg4.c libavformat/rtpdec_qdm2.c libavformat/rtpdec_svq3.c libavformat/sierravmd.c libavformat/smacker.c libavformat/smush.c libavformat/spdifenc.c libavformat/takdec.c libavformat/tta.c libavformat/utils.c libavformat/vqf.c libavformat/westwood_vqa.c libavformat/xmv.c libavformat/xwma.c libavformat/yop.c Merged-by: Michael Niedermayer <michael@niedermayer.cc>
| * lavc: Consistently prefix input buffer definesVittorio Giovara2015-07-27
| | | | | | | | Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
* | Merge commit 'def97856de6021965db86c25a732d78689bd6bb0'Michael Niedermayer2015-07-27
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit 'def97856de6021965db86c25a732d78689bd6bb0': lavc: AV-prefix all codec capabilities Conflicts: cmdutils.c ffmpeg.c ffplay.c libavcodec/8svx.c libavcodec/aacenc.c libavcodec/ac3dec.c libavcodec/adpcm.c libavcodec/alac.c libavcodec/atrac3plusdec.c libavcodec/bink.c libavcodec/dnxhddec.c libavcodec/dvdec.c libavcodec/dvenc.c libavcodec/ffv1dec.c libavcodec/ffv1enc.c libavcodec/fic.c libavcodec/flacdec.c libavcodec/flacenc.c libavcodec/flvdec.c libavcodec/fraps.c libavcodec/frwu.c libavcodec/gifdec.c libavcodec/h261dec.c libavcodec/hevc.c libavcodec/iff.c libavcodec/imc.c libavcodec/libopenjpegdec.c libavcodec/libvo-aacenc.c libavcodec/libvorbisenc.c libavcodec/libvpxdec.c libavcodec/libvpxenc.c libavcodec/libx264.c libavcodec/mjpegbdec.c libavcodec/mjpegdec.c libavcodec/mpegaudiodec_float.c libavcodec/msmpeg4dec.c libavcodec/mxpegdec.c libavcodec/nvenc_h264.c libavcodec/nvenc_hevc.c libavcodec/pngdec.c libavcodec/qpeg.c libavcodec/ra288.c libavcodec/rv10.c libavcodec/s302m.c libavcodec/sp5xdec.c libavcodec/takdec.c libavcodec/tiff.c libavcodec/tta.c libavcodec/utils.c libavcodec/v210dec.c libavcodec/vp6.c libavcodec/vp9.c libavcodec/wavpack.c libavcodec/yop.c Merged-by: Michael Niedermayer <michael@niedermayer.cc>
| * lavc: AV-prefix all codec capabilitiesVittorio Giovara2015-07-27
| | | | | | | | | | | | Express bitfields more simply. Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
* | Merge commit '7c6eb0a1b7bf1aac7f033a7ec6d8cacc3b5c2615'Michael Niedermayer2015-07-27
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '7c6eb0a1b7bf1aac7f033a7ec6d8cacc3b5c2615': lavc: AV-prefix all codec flags Conflicts: doc/examples/muxing.c ffmpeg.c ffmpeg_opt.c ffplay.c libavcodec/aacdec.c libavcodec/aacenc.c libavcodec/ac3dec.c libavcodec/ac3enc_float.c libavcodec/atrac1.c libavcodec/atrac3.c libavcodec/atrac3plusdec.c libavcodec/dcadec.c libavcodec/ffv1enc.c libavcodec/h264.c libavcodec/h264_loopfilter.c libavcodec/h264_mb.c libavcodec/imc.c libavcodec/libmp3lame.c libavcodec/libtheoraenc.c libavcodec/libtwolame.c libavcodec/libvpxenc.c libavcodec/libxavs.c libavcodec/libxvid.c libavcodec/mpeg12dec.c libavcodec/mpeg12enc.c libavcodec/mpegaudiodec_template.c libavcodec/mpegvideo.c libavcodec/mpegvideo_enc.c libavcodec/mpegvideo_motion.c libavcodec/nellymoserdec.c libavcodec/nellymoserenc.c libavcodec/nvenc.c libavcodec/on2avc.c libavcodec/options_table.h libavcodec/opus_celt.c libavcodec/pngenc.c libavcodec/ra288.c libavcodec/ratecontrol.c libavcodec/twinvq.c libavcodec/vc1_block.c libavcodec/vc1_loopfilter.c libavcodec/vc1_mc.c libavcodec/vc1dec.c libavcodec/vorbisdec.c libavcodec/vp3.c libavcodec/wma.c libavcodec/wmaprodec.c libavcodec/x86/hpeldsp_init.c libavcodec/x86/me_cmp_init.c Merged-by: Michael Niedermayer <michael@niedermayer.cc>
| * 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>
* | Merge commit 'b0017579b6e8de3d0d13dcfe0a4dd848dc6baa37'Michael Niedermayer2015-07-17
|\| | | | | | | | | | | | | | | | | | | | | | | * commit 'b0017579b6e8de3d0d13dcfe0a4dd848dc6baa37': h264: Add support for Closed Caption export Conflicts: libavcodec/h264.c libavcodec/h264_sei.c See: 8234f0e3b485811d60c228c40a94a141c46e61ca Merged-by: Michael Niedermayer <michael@niedermayer.cc>
| * h264: Add support for Closed Caption exportKieran Kunhya2015-07-17
| | | | | | | | Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
* | lavc: Add properties field to AVCodecContext.Carl Eugen Hoyos2015-07-16
| | | | | | | | The new field can hold information about losslessness and closed captions for now.
* | avcodec: Add support for Closed Caption export in h264Kieran Kunhya2015-07-06
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>