summaryrefslogtreecommitdiffstats
path: root/libavcodec/h264.c
Commit message (Collapse)AuthorAgeFilesLines
* avcodec/h264: Fix memleak of a53_captionMichael Niedermayer2016-02-131-0/+3
| | | | | | Fixes Ticket5111 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/h264: Fix memleak in case of ff_h264_decode_extradata() failureMichael Niedermayer2016-01-281-1/+3
| | | | | | Fixes Ticket5139 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* lavc/h264: Show "Increasing reorder buffer" message with loglevel info.Carl Eugen Hoyos2016-01-271-1/+1
| | | | See ticket #5138 for a sample.
* lavc: fix profile declarations for vdpau decodersHendrik Leppkes2016-01-011-1/+1
|
* Merge commit '2c6811397bdf13d43ca206e48d6d6da9c2cd47c6'Hendrik Leppkes2016-01-011-18/+2
|\ | | | | | | | | | | | | * commit '2c6811397bdf13d43ca206e48d6d6da9c2cd47c6': lavc: add profiles to AVCodecDescriptor Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
| * lavc: add profiles to AVCodecDescriptorAnton Khirnov2015-12-121-18/+2
| | | | | | | | | | 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-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-171-11/+4
|\ \ | |/ | | | | | | | | | | | | | | | | * 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-061-11/+4
| | | | | | | | | | | | | | | | | | | | | | 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-081-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-041-1/+1
| |
* | Merge commit 'd15368ee3926152a3a301c13cc638fbf7a062ddf'Hendrik Leppkes2015-10-141-1/+8
|\ \ | |/ | | | | | | | | | | * 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-141-1/+8
| | | | | | | | | | | | | | 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-081-2/+0
| | | | | | | | | | | | | | 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-061-5/+2
| | | | | | | | Partially amends 9469370fb32679352e66826daf77bdd2e6f067b5
| * h264: Use AVERROR return codes instead of -1Jake Sebastian-Jones2015-08-051-3/+8
| | | | | | | | | | | | 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-271-1/+1
| | | | | | | | | | | | | | | | | | 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-101-2/+0
| | | | | | | | | | | | 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-041-0/+2
| | | | | | | | | | | | | | | | | | | | 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-271-1/+5
| | | | | | | | | | | | | | | | | | 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-121-1/+1
| |
* | lavc: move vdpau decoders under FF_API_VDPAU.wm42015-08-181-1/+1
| | | | | | | | 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-181-0/+4
| |
* | FF_OPT_TYPE_* -> AV_OPT_TYPE_*.Ronald S. Bultje2015-08-181-2/+2
| |
* | lavc: propagate hwaccel errorswm42015-08-061-1/+2
| | | | | | | | | | | | | | | | 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-271-1/+1
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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-271-2/+2
| | | | | | | | Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
* | Merge commit 'def97856de6021965db86c25a732d78689bd6bb0'Michael Niedermayer2015-07-271-6/+6
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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-271-3/+3
| | | | | | | | | | | | Express bitfields more simply. Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
* | Merge commit '7c6eb0a1b7bf1aac7f033a7ec6d8cacc3b5c2615'Michael Niedermayer2015-07-271-8/+8
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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-271-6/+6
| | | | | | | | | | | | Convert doxygen to multiline and express bitfields more simply. Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
* | Merge commit 'b0017579b6e8de3d0d13dcfe0a4dd848dc6baa37'Michael Niedermayer2015-07-171-2/+3
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | * 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-171-0/+12
| | | | | | | | Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
* | lavc: Add properties field to AVCodecContext.Carl Eugen Hoyos2015-07-161-0/+1
| | | | | | | | The new field can hold information about losslessness and closed captions for now.
* | avcodec: Add support for Closed Caption export in h264Kieran Kunhya2015-07-061-0/+9
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit '271ce76d317c5432e151216cf23f12b77ed6cb7e'Michael Niedermayer2015-06-301-6/+6
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '271ce76d317c5432e151216cf23f12b77ed6cb7e': h264: Parse registered data SEI message and AFD value Conflicts: libavcodec/h264.c libavcodec/h264.h libavcodec/h264_sei.c libavcodec/version.h See: d6e95669496a89d186f923c34bcaf7d86b7cd59c See: 22291c372fa703242e8429bed61700ba81258f19 Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * h264: Parse registered data SEI message and AFD valueVittorio Giovara2015-06-301-0/+10
| | | | | | | | | | | | Partially based on code by Marton Balint and Kieran Kunhya. Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
* | Merge commit '5ec0bdf2c524224f30ba4786f47324970aed4aaa'Michael Niedermayer2015-06-271-1/+6
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | * commit '5ec0bdf2c524224f30ba4786f47324970aed4aaa': h264: do not update the context fields copied between threads after finish_setup() Conflicts: libavcodec/h264.h libavcodec/h264_slice.c See: f111831ed61103f9fa8fdda41473a23da016bdaa and others Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * h264: do not update the context fields copied between threads after ↵Anton Khirnov2015-06-271-1/+6
| | | | | | | | | | | | finish_setup() Should fix a large number of possible races with frame threading.
* | avcodec: Add support for per-frame AFD output in h264Kieran Kunhya2015-06-261-0/+10
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | h264: update avctx width/height/pix_fmt when returning frameAndreas Cadhalpun2015-06-121-0/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | Inconsistencies between the dimensions/pixel format of avctx and the frame can confuse API users. For example this can crash the demuxing_decoding example. Back up the previous values and restore them, when decoding the next frame. This is necessary, because these can be different between the returned frame and the last decoded frame. Reviewed-by: Michael Niedermayer <michaelni@gmx.at> Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
* | avcodec/vdpau: Re-factor pre-hwaccel helper functions into separate headerPhilip Langdale2015-05-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | h264.h and hevc.h are mutually exclusive due to defining some of the same names. As such, we need to avoid forcing h264.h to be included if we want hevc decode acceleration to be possible. However, some of the pre-hwaccel helper functions need h264.h. To avoid messy collisions, let's move the declaration of all those helpers to a separate header which we will exclude for the hevc support (which will be hwaccel-only). Signed-off-by: Philip Langdale <philipl@overt.org>
* | avcodec/h264: Remove failure on data partitioningMichael Niedermayer2015-05-011-2/+0
| | | | | | | | | | | | decode all NAL units instead Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit 'a0f2946068c62e18cb05ac25c0df3d86077251a6'Michael Niedermayer2015-04-291-35/+49
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | * commit 'a0f2946068c62e18cb05ac25c0df3d86077251a6': h264: use properly allocated AVFrames Conflicts: libavcodec/h264.c libavcodec/h264.h libavcodec/h264_refs.c libavcodec/h264_slice.c libavcodec/svq3.c libavcodec/vda_h264.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * h264: use properly allocated AVFramesAnton Khirnov2015-04-291-36/+45
| |
* | Merge commit '7a4f74eed51f914e9bbfebaffd4a92ac6791f819'Michael Niedermayer2015-04-291-12/+5
|\ \ | |/ | | | | | | | | | | | | | | | | * commit '7a4f74eed51f914e9bbfebaffd4a92ac6791f819': h264: embed the DPB in the context Conflicts: libavcodec/h264.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * h264: embed the DPB in the contextAnton Khirnov2015-04-291-11/+4
| | | | | | | | | | It now has a fixed size and is initialized only once, so there is no point in allocating it separately.
* | Merge commit '440e8dd374b732c48d564d9f1bb0ec3b1b786fb9'Michael Niedermayer2015-04-291-1/+1
|\ \ | |/ | | | | | | | | | | * commit '440e8dd374b732c48d564d9f1bb0ec3b1b786fb9': h264: drop a comment that carries no useful information Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * h264: drop a comment that carries no useful informationAnton Khirnov2015-04-291-1/+1
| |
* | Merge commit '11f024ef0ab923ed8680fc35a087d576e549c849'Michael Niedermayer2015-04-291-9/+6
|\ \ | |/ | | | | | | | | | | * commit '11f024ef0ab923ed8680fc35a087d576e549c849': h264: move freeing the escaped RBSP buffer to free_context() Merged-by: Michael Niedermayer <michaelni@gmx.at>
OpenPOWER on IntegriCloud