Commit Graph

67 Commits

Author SHA1 Message Date
wm4
b945fed629 avcodec: add metadata to identify wrappers and hardware decoders
Explicitly identify decoder/encoder wrappers with a common name. This
saves API users from guessing by the name suffix. For example, they
don't have to guess that "h264_qsv" is the h264 QSV implementation, and
instead they can just check the AVCodec .codec and .wrapper_name fields.

Explicitly mark AVCodec entries that are hardware decoders or most
likely hardware decoders with new AV_CODEC_CAPs. The purpose is allowing
API users listing hardware decoders in a more generic way. The proposed
AVCodecHWConfig does not provide this information fully, because it's
concerned with decoder configuration, not information about the fact
whether the hardware is used or not.

AV_CODEC_CAP_HYBRID exists specifically for QSV, which can have software
implementations in case the hardware is not capable.

Based on a patch by Philip Langdale <philipl@overt.org>.

Merges Libav commit 47687a2f8a.
2017-12-14 19:37:56 +01:00
James Almer
e621b1ca64 Merge commit '97cfe1d8bd1968143e2ba9aa46ebe9504a835e24'
* commit '97cfe1d8bd1968143e2ba9aa46ebe9504a835e24':
  Convert all AVClass struct declarations to designated initializers.

Merged-by: James Almer <jamrial@gmail.com>
2017-11-01 20:05:09 -03:00
Diego Biurrun
97cfe1d8bd Convert all AVClass struct declarations to designated initializers. 2017-06-12 11:01:10 +02:00
James Almer
b725b482c6 Merge commit '800d91d348c89fc8ca3fbec7696ab1ec8787acc6'
* commit '800d91d348c89fc8ca3fbec7696ab1ec8787acc6':
  Drop pointless void* casts

Merged-by: James Almer <jamrial@gmail.com>
2017-03-31 16:38:37 -03:00
Hendrik Leppkes
07502e473f Merge commit '7a76371437f9562c3414f985523f883489e3936a'
* commit '7a76371437f9562c3414f985523f883489e3936a':
  libopenh264enc: Simplify init by setting FF_CODEC_CAP_INIT_CLEANUP

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2016-11-18 10:47:08 +01:00
Hendrik Leppkes
7e9474ca47 Merge commit '2d097c16b833c532ac974a7f1fd05c0a1f3b7675'
* commit '2d097c16b833c532ac974a7f1fd05c0a1f3b7675':
  libopenh264enc: Return a more sensible error code in some init failure paths

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2016-11-18 10:46:02 +01:00
Diego Biurrun
800d91d348 Drop pointless void* casts 2016-11-13 18:44:01 +01:00
Hendrik Leppkes
edb4c44511 Merge commit '31aa5335c390c83a6c3ea955b155067c36c4a2c4'
* commit '31aa5335c390c83a6c3ea955b155067c36c4a2c4':
  libopenh264enc: Fix inconsistent whitespace

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2016-10-07 13:23:49 +02:00
Martin Storsjö
293676c476 libopenh264: Support building with the 1.6 release
This fixes trac issue #5417.

This is cherry-picked from libav commit
d825b1a530.

Signed-off-by: Martin Storsjö <martin@martin.st>
2016-07-27 10:19:46 +03:00
Martin Storsjö
c5d326f551 Add an OpenH264 decoder wrapper
This is cherrypicked from libav, from commits
82b7525173 and
d0b1e6049b.

Signed-off-by: Martin Storsjö <martin@martin.st>
2016-07-27 10:19:40 +03:00
Martin Storsjö
7a76371437 libopenh264enc: Simplify init by setting FF_CODEC_CAP_INIT_CLEANUP
Also set FF_CODEC_CAP_INIT_THREADSAFE while adding internal capabilities.

Signed-off-by: Martin Storsjö <martin@martin.st>
2016-07-15 13:36:23 +03:00
Martin Storsjö
2d097c16b8 libopenh264enc: Return a more sensible error code in some init failure paths
Previously they returned the default AVERROR_UNKNOWN.

Signed-off-by: Martin Storsjö <martin@martin.st>
2016-07-15 13:36:22 +03:00
Martin Storsjö
d825b1a530 libopenh264: Support building with the 1.6 release
Signed-off-by: Martin Storsjö <martin@martin.st>
2016-07-09 22:33:58 +03:00
Martin Storsjö
82b7525173 Add an OpenH264 decoder wrapper
While it is less featureful (and slower) than the built-in H264
decoder, one could potentially want to use it to take advantage
of the cisco patent license offer.

Signed-off-by: Martin Storsjö <martin@martin.st>
2016-06-28 14:17:43 +03:00
Martin Storsjö
31aa5335c3 libopenh264enc: Fix inconsistent whitespace
Signed-off-by: Martin Storsjö <martin@martin.st>
2016-06-24 22:30:46 +03:00
Derek Buitenhuis
9d4799c247 Merge commit '8dead2aaca4aa8b84b77b05745755afb56b7d37a'
* commit '8dead2aaca4aa8b84b77b05745755afb56b7d37a':
  Move const qualifier before type name

Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2016-04-17 19:35:03 +01:00
Diego Biurrun
8dead2aaca Move const qualifier before type name 2016-03-23 09:25:30 +01:00
Derek Buitenhuis
899e19f177 Merge commit '936f0d98f864f9f6bb4f9e5458b78537e146bacd'
* commit '936f0d98f864f9f6bb4f9e5458b78537e146bacd':
  lavc: Move rtp_payload_size to codec private options

Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2016-01-31 13:19:50 +00:00
Vittorio Giovara
936f0d98f8 lavc: Move rtp_payload_size to codec private options
This option is only used by mpegvideoenc and openh264.
It is a very codec-specific option, so deprecate the global variant.

The openh264 option is dropped altogether since it is just a fallback
for -max_nal_size anyway.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2016-01-21 15:33:19 -05:00
Hendrik Leppkes
4a80f0bdb0 Merge commit '81c95eb8eee856d98d4ac37367dbc761f2faf875'
* commit '81c95eb8eee856d98d4ac37367dbc761f2faf875':
  openh264: Directly include the deprecation guards header

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2015-12-18 14:52:18 +01:00
Hendrik Leppkes
2630f7f709 Merge commit 'be00ec832c519427cd92218abac77dafdc1d5487'
* commit 'be00ec832c519427cd92218abac77dafdc1d5487':
  lavc: Deprecate coder_type and its symbols

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2015-12-18 14:27:41 +01:00
Hendrik Leppkes
f49264a1c5 Merge commit '11c9bd633f635f07a762be1ecd672de55daf4edc'
* commit '11c9bd633f635f07a762be1ecd672de55daf4edc':
  libopenh264enc: export CPB props side data

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2015-12-17 13:31:21 +01:00
Stefano Sabatini
6e891d51f4 lavc/libopenh264: apply minor options text consistency fixes 2015-12-16 10:48:28 +01:00
Luca Barbato
81c95eb8ee openh264: Directly include the deprecation guards header
Make easier to avoid compile failure when reworking the internal
headers.
2015-12-08 18:12:33 +01:00
Vittorio Giovara
be00ec832c lavc: Deprecate coder_type and its symbols
Most option values are simply unused or ignored and in practice the
majory of codecs only need to check whether to enable rle or not.

Add appropriate codec private options which better expose the allowed
features.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2015-12-07 11:01:22 -05:00
Anton Khirnov
11c9bd633f libopenh264enc: export CPB props side data 2015-12-06 10:24:21 +01:00
Michael Niedermayer
cc96018c79 libopenh264enc: Set AVOption data type
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2015-11-06 21:55:15 +01:00
Clément Bœsch
953d358462 avcodec/libopenh264enc: use AV_OPT_TYPE_BOOL for allow_skip_frames option 2015-10-31 17:33:22 +01:00
Michael Niedermayer
81d3986d2d avcodec/libopenh264enc: AV_OPT_TYPE_STRING should use .str default
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-10-31 02:29:01 +01:00
Michael Niedermayer
9319e08380 avcodec/libopenh264enc: Fix project name
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-10-31 02:21:58 +01:00
Michael Niedermayer
a75bebfe9a avcodec/libopenh264enc: set .i64 for AV_OPT_TYPE_INT
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-10-31 02:20:53 +01:00
Hendrik Leppkes
7968b1f853 Merge commit '8edaf625f3c38c695c33745822182e94e17d6e1b'
* commit '8edaf625f3c38c695c33745822182e94e17d6e1b':
  libopenh264enc: Count and warn about the number of skipped frames

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2015-10-29 14:26:17 +01:00
Hendrik Leppkes
f79bb118f5 Merge commit '9e14a992409348630ea96521411127418a92e8a3'
* commit '9e14a992409348630ea96521411127418a92e8a3':
  libopenh264enc: Add an option for controlling the frame skipping

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2015-10-29 14:26:07 +01:00
Martin Storsjö
8edaf625f3 libopenh264enc: Count and warn about the number of skipped frames
Signed-off-by: Martin Storsjö <martin@martin.st>
2015-10-28 23:02:52 +02:00
Martin Storsjö
9e14a99240 libopenh264enc: Add an option for controlling the frame skipping
This allows enabling the frame skipping, which is required for the
encoder to properly hit the target bitrate.

Signed-off-by: Martin Storsjö <martin@martin.st>
2015-10-28 23:02:48 +02:00
Hendrik Leppkes
c4e23ca853 Merge commit 'c3e5c47bdae2bb8219fea62d91b7455650b22c60'
* commit 'c3e5c47bdae2bb8219fea62d91b7455650b22c60':
  libopenh264enc: Added max_nal_size option

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2015-10-10 09:58:42 +02:00
Mario Gasparoni
c3e5c47bda libopenh264enc: Added max_nal_size option
Also added dynamic slice_mode option, needed for the max_nal_size.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-10-09 16:53:44 +02:00
Hendrik Leppkes
4d9b78a875 Merge commit '1a4c5fe56008c61b0362c75bea5d446dc5b256bc'
* commit '1a4c5fe56008c61b0362c75bea5d446dc5b256bc':
  libopenh264enc: Use av_log() to log messages

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2015-09-29 14:23:45 +02:00
Gregory J. Wolfe
1a4c5fe560 libopenh264enc: Use av_log() to log messages
File libopenh264enc.c has been modified so that the encoder uses av_log()
to log messages (error, warning, info, etc.) instead of logging them
directly to stderr.  At the time the encoder is created, the current
libav log level is mapped to an equivalent libopenh264 log level.  This
log level, and a message logging function that invokes av_log() to
actually log messages, are then set on the encoder.

This contains further changes and simplifications by Michael Niedermayer
and Martin Storsjö.

Signed-off-by: Martin Storsjö <martin@martin.st>
2015-09-29 11:37:36 +03:00
Michael Niedermayer
dfd3fd67bb avcodec/libopenh264enc: use AV_LOG_TRACE instead of DEBUG+1
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-09-10 15:00:19 +02:00
Michael Niedermayer
35b7bd2558 avcodec/libopenh264enc: Remove some unneeded intermediate variables
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-09-10 13:13:06 +02:00
Michael Niedermayer
fb000b0f0f avcodec/libopenh264enc: Fix formating to match FFmpegs style
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-09-10 13:02:40 +02:00
Michael Niedermayer
ec5b13fbe4 avcodec/libopenh264enc: remove useless cast
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-09-10 12:59:44 +02:00
Gregory J. Wolfe
e8c45b96f4 avcodec/libopenh264enc: Use av_log() to log messages
File libopenh264enc.c has been modified so that the encoder uses av_log()
to log messages (error, warning, info, etc.) instead of logging them
directly to stderr.  At the time the encoder is created, the current
ffmpeg log level is mapped to an equivalent libopenh264 log level.  This
log level, and a message logging function that invokes av_log() to
actually log messages, are then set on the encoder.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-09-10 12:56:09 +02:00
Stefano Sabatini
ae72b57502 lavc/libopenh264enc: apply minor consistency fixes to options text 2015-09-08 17:54:26 +02:00
Michael Niedermayer
005d006938 avcodec/libopenh264enc: Avoid usage of deprecated ff_alloc_packet()
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-08-07 22:46:27 +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