Commit Graph

1750 Commits

Author SHA1 Message Date
wm4
a383f226f0 lavc: move vdpau decoders under FF_API_VDPAU.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2015-08-18 15:57:20 -04:00
Ronald S. Bultje
030b5a4f77 lavc: put remaining bits of vdpau-in-decoder under FF_API_CAP_VDPAU. 2015-08-18 15:57:19 -04:00
Ronald S. Bultje
6471040f56 FF_OPT_TYPE_* -> AV_OPT_TYPE_*. 2015-08-18 11:48:49 -04:00
wm4
94c0df79c7 lavc: propagate hwaccel errors
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.
2015-08-06 11:05:02 +02:00
Michael Niedermayer
29d147c94d Merge commit '059a934806d61f7af9ab3fd9f74994b838ea5eba'
* 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>
2015-07-27 23:15:19 +02:00
Michael Niedermayer
444e9874a7 Merge commit 'def97856de6021965db86c25a732d78689bd6bb0'
* 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>
2015-07-27 22:50:18 +02:00
Michael Niedermayer
94d68a41fa Merge commit '7c6eb0a1b7bf1aac7f033a7ec6d8cacc3b5c2615'
* 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>
2015-07-27 22:10:35 +02:00
Vittorio Giovara
059a934806 lavc: Consistently prefix input buffer defines
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2015-07-27 15:24:59 +01:00
Vittorio Giovara
def97856de lavc: AV-prefix all codec capabilities
Express bitfields more simply.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2015-07-27 15:24:58 +01:00
Vittorio Giovara
7c6eb0a1b7 lavc: AV-prefix all codec flags
Convert doxygen to multiline and express bitfields more simply.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2015-07-27 15:24:58 +01:00
Michael Niedermayer
441d5a7084 Merge commit 'b0017579b6e8de3d0d13dcfe0a4dd848dc6baa37'
* commit 'b0017579b6e8de3d0d13dcfe0a4dd848dc6baa37':
  h264: Add support for Closed Caption export

Conflicts:
	libavcodec/h264.c
	libavcodec/h264_sei.c

See: 8234f0e3b4
Merged-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-17 14:13:19 +02:00
Kieran Kunhya
b0017579b6 h264: Add support for Closed Caption export
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2015-07-17 01:44:22 +01:00
Carl Eugen Hoyos
8dad213143 lavc: Add properties field to AVCodecContext.
The new field can hold information about losslessness and closed captions for now.
2015-07-16 12:18:30 +02:00
Kieran Kunhya
8234f0e3b4 avcodec: Add support for Closed Caption export in h264
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-07-06 15:25:22 +02:00
Michael Niedermayer
7e9c7b623f Merge commit '271ce76d317c5432e151216cf23f12b77ed6cb7e'
* 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: d6e9566949
See: 22291c372f
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-30 22:54:33 +02:00
Vittorio Giovara
271ce76d31 h264: Parse registered data SEI message and AFD value
Partially based on code by Marton Balint and Kieran Kunhya.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2015-06-30 15:34:38 +02:00
Michael Niedermayer
bd5c6a519e Merge commit '5ec0bdf2c524224f30ba4786f47324970aed4aaa'
* commit '5ec0bdf2c524224f30ba4786f47324970aed4aaa':
  h264: do not update the context fields copied between threads after finish_setup()

Conflicts:
	libavcodec/h264.h
	libavcodec/h264_slice.c

See: f111831ed6 and others
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-27 22:15:01 +02:00
Anton Khirnov
5ec0bdf2c5 h264: do not update the context fields copied between threads after finish_setup()
Should fix a large number of possible races with frame threading.
2015-06-27 16:48:48 +02:00
Kieran Kunhya
22291c372f avcodec: Add support for per-frame AFD output in h264
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-06-26 23:11:17 +02:00
Andreas Cadhalpun
1189af4292 h264: update avctx width/height/pix_fmt when returning frame
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>
2015-06-12 21:22:00 +02:00
Philip Langdale
9ae766d1c6 avcodec/vdpau: Re-factor pre-hwaccel helper functions into separate header
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>
2015-05-25 19:50:41 -07:00
Michael Niedermayer
c9ac9adb46 avcodec/h264: Remove failure on data partitioning
decode all NAL units instead

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-01 12:30:57 +02:00
Michael Niedermayer
36f862e04c Merge commit 'a0f2946068c62e18cb05ac25c0df3d86077251a6'
* 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>
2015-04-29 16:35:24 +02:00
Michael Niedermayer
07a79cf869 Merge commit '7a4f74eed51f914e9bbfebaffd4a92ac6791f819'
* commit '7a4f74eed51f914e9bbfebaffd4a92ac6791f819':
  h264: embed the DPB in the context

Conflicts:
	libavcodec/h264.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-04-29 15:33:46 +02:00
Michael Niedermayer
1aa3a0f457 Merge commit '440e8dd374b732c48d564d9f1bb0ec3b1b786fb9'
* commit '440e8dd374b732c48d564d9f1bb0ec3b1b786fb9':
  h264: drop a comment that carries no useful information

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-04-29 13:33:17 +02:00
Michael Niedermayer
d3a5dba81b Merge commit '11f024ef0ab923ed8680fc35a087d576e549c849'
* commit '11f024ef0ab923ed8680fc35a087d576e549c849':
  h264: move freeing the escaped RBSP buffer to free_context()

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-04-29 13:26:33 +02:00
Michael Niedermayer
ab7ad5e6a1 Merge commit 'ee62b364be0c30cba83b5ff10a3ca8c3e866ade6'
* commit 'ee62b364be0c30cba83b5ff10a3ca8c3e866ade6':
  h264: eliminate ff_h264_set_parameter_from_sps()

Conflicts:
	libavcodec/h264.c
	libavcodec/h264.h
	libavcodec/h264_slice.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-04-29 13:23:45 +02:00
Michael Niedermayer
cd63252f1f Merge commit 'a6cd154463bea7eb56d28192db4c8c6d83f67fd7'
* commit 'a6cd154463bea7eb56d28192db4c8c6d83f67fd7':
  h264: move the DPB init/uninit to init_context()/free_context()

Conflicts:
	libavcodec/h264.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-04-29 11:48:39 +02:00
Michael Niedermayer
e8a460672f Merge commit '9d33bab583a82cf12286c65258a29c6888e1ff98'
* commit '9d33bab583a82cf12286c65258a29c6888e1ff98':
  h264: drop H264Context.ouputed_poc

Conflicts:
	libavcodec/h264.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-04-29 11:38:42 +02:00
Michael Niedermayer
0d5e615c10 Merge commit '27b0e6ebfd47b0c11156c18b90fa8c571f0f60c3'
* commit '27b0e6ebfd47b0c11156c18b90fa8c571f0f60c3':
  h264: drop needs_realloc

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-04-29 11:28:28 +02:00
Anton Khirnov
a0f2946068 h264: use properly allocated AVFrames 2015-04-29 05:52:58 +02:00
Anton Khirnov
7a4f74eed5 h264: embed the DPB in the context
It now has a fixed size and is initialized only once, so there is no
point in allocating it separately.
2015-04-29 05:52:58 +02:00
Anton Khirnov
440e8dd374 h264: drop a comment that carries no useful information 2015-04-29 05:52:58 +02:00
Anton Khirnov
11f024ef0a h264: move freeing the escaped RBSP buffer to free_context()
It does not logically belong in free_tables(), since it's not allocated
in alloc_tables() and its size has nothing to do with the frame size.
2015-04-29 05:52:58 +02:00
Anton Khirnov
ee62b364be h264: eliminate ff_h264_set_parameter_from_sps()
That function currently does two things -- reinitializing the DSP
contexts and setting low_delay based on the SPS values.

The former more appropriately belongs in h264_slice_header_init(), while
the latter only really makes sense in decode_slice_header().

The third call to ff_h264_set_parameter_from_sps(), done immediately
after parsing a new SPS, appears to serve no useful purpose, so it is
just dropped.

Also, drop now unneeded H264Context.cur_chroma_format_idc.
2015-04-29 05:52:57 +02:00
Anton Khirnov
a6cd154463 h264: move the DPB init/uninit to init_context()/free_context()
Currently, the DPB is initialized in alloc_tables() and uninitialized in
free_tables(), but those functions manage frame size-dependent
variables, so DPB management does not logically belong in there.

Since we want the init/uninit to happen exactly once per the context
lifetime, init_context()/free_context() are the proper place for this
code.
2015-04-29 05:52:57 +02:00
Anton Khirnov
9d33bab583 h264: drop H264Context.ouputed_poc
It is only set, but never used for anything.
2015-04-29 05:52:57 +02:00
Anton Khirnov
27b0e6ebfd h264: drop needs_realloc
It is not needed anymore since switching to refcounted frames.
2015-04-29 05:52:57 +02:00
James Almer
ba625dd8a1 avcodec: use av_mod_uintp2() where useful
Reviewed-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: James Almer <jamrial@gmail.com>
2015-04-21 22:41:20 -03:00
Michael Niedermayer
8f7b022c8c Merge commit '6a85dfc830f51f1f5c2d36d4182d265c1ea3ba25'
* commit '6a85dfc830f51f1f5c2d36d4182d265c1ea3ba25':
  lavc: Replace av_dlog and tprintf with internal macros

Conflicts:
	libavcodec/aacdec.c
	libavcodec/audio_frame_queue.c
	libavcodec/bitstream.c
	libavcodec/dcadec.c
	libavcodec/dnxhddec.c
	libavcodec/dvbsubdec.c
	libavcodec/dvdec.c
	libavcodec/dvdsubdec.c
	libavcodec/get_bits.h
	libavcodec/gifdec.c
	libavcodec/h264.h
	libavcodec/h264_cabac.c
	libavcodec/h264_cavlc.c
	libavcodec/h264_loopfilter.c
	libavcodec/h264_refs.c
	libavcodec/imc.c
	libavcodec/interplayvideo.c
	libavcodec/jpeglsdec.c
	libavcodec/libopencore-amr.c
	libavcodec/mjpegdec.c
	libavcodec/mpeg12dec.c
	libavcodec/mpegvideo_enc.c
	libavcodec/mpegvideo_parser.c
	libavcodec/pngdec.c
	libavcodec/ratecontrol.c
	libavcodec/rv10.c
	libavcodec/svq1dec.c
	libavcodec/vqavideo.c
	libavcodec/wmadec.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-04-20 04:10:10 +02:00
Vittorio Giovara
6a85dfc830 lavc: Replace av_dlog and tprintf with internal macros 2015-04-19 12:41:59 +01:00
Michael Niedermayer
bc48c88918 avcodec/h264: Do not fail with randomly truncated VUIs
Fixes Ticket4445

Tested-by: Vittorio Giovara <vittorio.giovara@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-04-10 18:35:07 +02:00
Michael Niedermayer
7be2d2a70c avcodec/h264: Use only one ERContext
This fixes slice threads with error concealment

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-04-09 17:42:04 +02:00
Michael Niedermayer
98d0c4236c avcodec/h264: Be more tolerant to changing pps id between slices
Fixes Ticket4446

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-04-09 13:50:07 +02:00
Michael Niedermayer
c4b2017ba6 avcodec/h264: finish previous slices before switching to single thread mode
Fixes null pointer dereference
Fixes Ticket4438

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-04-07 02:47:36 +02:00
Michael Niedermayer
39c6834c12 Merge commit 'bd737b5178f361a9b592691848f29a7a79603a7e'
* commit 'bd737b5178f361a9b592691848f29a7a79603a7e':
  h264: reset the private data in init_thread_copy()

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-04-05 22:25:29 +02:00
Michael Niedermayer
097efa4750 Merge commit 'a939e5b2527d0c4628815b1d3d8e29ee921227e8'
* commit 'a939e5b2527d0c4628815b1d3d8e29ee921227e8':
  h264: remove a commented out nonsense line

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-04-05 22:18:43 +02:00
Michael Niedermayer
80a76905eb Merge commit '65afa65e7393e7745427e267d6c6ca814c7c8b45'
* commit '65afa65e7393e7745427e267d6c6ca814c7c8b45':
  h264: drop redundant initialization of the scaling matrices

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-04-05 22:04:58 +02:00
Michael Niedermayer
abae926ef8 Merge commit 'e1f907711a91e5ce19402a1831cfbe8f709b67f7'
* commit 'e1f907711a91e5ce19402a1831cfbe8f709b67f7':
  h264: factor out common code from init() and init_thread_copy()

Conflicts:
	libavcodec/h264.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-04-05 21:56:50 +02:00
Michael Niedermayer
14d241b19d Merge commit '43fd3dd80ca2d1c2ccf6a7b7632db544c809c690'
* commit '43fd3dd80ca2d1c2ccf6a7b7632db544c809c690':
  h264: drop redundant initialization in init()

Conflicts:
	libavcodec/h264.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-04-05 21:11:25 +02:00