1
mirror of https://git.videolan.org/git/ffmpeg.git synced 2024-09-05 23:58:59 +02:00
Commit Graph

63 Commits

Author SHA1 Message Date
Anton Khirnov
fb240a6276 qsvenc: do not re-execute encoding on all positive status codes
It should only be done for DEVICE_BUSY/IN_EXECUTION

(cherry picked from commit 0956fd4606)
Fixes ticket #5924.
2016-11-04 18:56:01 +00:00
Kyle Schwarz
5d54293668 avcodec/qsv: remove MFX_EXTBUFF_CODING_OPTION3
4th generation Intel CPUs don't support MFX_EXTBUFF_CODING_OPTION3.

This patch fixes bug #5324.
2016-10-31 19:23:40 +00:00
Mark Thompson
1f26a231bb qsv: Merge libav implementation
Merged as-at libav 398f015, and therefore includes outstanding
skipped merges 04b17ff and 130e1f1.

All features not in libav are preserved, and no options change.
2016-10-31 19:23:40 +00:00
Andrey Turkin
63adb3602d libavcodec: factor out SEI generation for A53 captions
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2016-06-19 02:11:20 +02:00
Derek Buitenhuis
acc155ac55 Merge commit 'a1335149fd610b16459d9281b611282cac51c950'
* commit 'a1335149fd610b16459d9281b611282cac51c950':
  qsvenc: store the sync point in heap memory

Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2016-04-11 14:45:57 +01:00
Maxym Dmytrychenko
a1335149fd qsvenc: store the sync point in heap memory
The QSV runtime expects the sync point address passed to
MFXVideoENCODE_EncodeFrameAsync() to be valid until
MFXVideoCORE_SyncOperation().

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2016-02-24 10:14:40 +01:00
Derek Buitenhuis
c63da6e916 Merge commit '9cac1b4b4f1532fb2aeef54799285360656be5eb'
* commit '9cac1b4b4f1532fb2aeef54799285360656be5eb':
  qsvenc: Add private option to replace coder_type

Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2016-02-16 16:51:45 +00:00
Derek Buitenhuis
02bd02da5f qsvenc: Fix b_strategy typo
This was introduced in 0e6c853221.

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2016-01-28 00:08:40 +00:00
Derek Buitenhuis
2e9b995e4f Merge commit '0e6c8532215790bbe560a9eea4f3cc82bb55cf92'
* commit '0e6c8532215790bbe560a9eea4f3cc82bb55cf92'
  lavc: Move b_frame_strategy and b_sensitivity to codec private options

Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2016-01-27 20:18:04 +00:00
Vittorio Giovara
9cac1b4b4f qsvenc: Add private option to replace coder_type
Missing from be00ec832c.
2016-01-25 12:00:16 -05:00
Anton Khirnov
68395f8c99 qsvenc: fix a typo
Introduced in 0e6c853221.
2016-01-23 21:03:31 +01:00
Vittorio Giovara
0e6c853221 lavc: Move b_frame_strategy and b_sensitivity to codec private options
The b_frame_strategy option is only used by mpegvideoenc, qsv, x264, and
xavs, while b_sensitivity is only used by mpegvideoenc.

These are very codec-specific options, so deprecate the global variants.
Set proper limits to the maximum allowed values.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2016-01-21 15:33:19 -05:00
Hendrik Leppkes
ed9cff9edf Merge commit 'd1cd20e4e33f8139e150034b3c457302312d81bd'
* commit 'd1cd20e4e33f8139e150034b3c457302312d81bd':
  qsvenc: split encoding frames and reading from the async FIFO

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2016-01-19 08:44:50 +01:00
Hendrik Leppkes
b5513441e4 Merge commit 'a6259a6ecbad18d58085e4ab23f56151e98d7b53'
* commit 'a6259a6ecbad18d58085e4ab23f56151e98d7b53':
  qsvenc: properly handle the warning from MFXVideoCORE_SyncOperation

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2016-01-19 08:43:03 +01:00
Anton Khirnov
d1cd20e4e3 qsvenc: split encoding frames and reading from the async FIFO
This makes sure all the frames are returned at the end.

Found-By: Maxym Dmytrychenko <maxym.dmytrychenko@intel.com>
2016-01-07 08:20:21 +01:00
Maxym Dmytrychenko
a6259a6ecb qsvenc: properly handle the warning from MFXVideoCORE_SyncOperation
Same as what is done in 3b6473b43e.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2016-01-07 08:20:21 +01:00
Hendrik Leppkes
b2d8b91cf0 Merge commit '825900248b4053515803152d3165efdb034b660b'
* commit '825900248b4053515803152d3165efdb034b660b':
  qsvenc: export CPB props side data

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2015-12-17 13:42:53 +01:00
Anton Khirnov
825900248b qsvenc: export CPB props side data 2015-12-06 10:25:49 +01:00
Will Kelleher
0eac93da0f qsvenc: write a53 caption data to SEI
Signed-off-by: Will Kelleher <wkelleher@gogoair.com>
Previous version reviewed-by: Ivan Uskov <ivan.uskov@nablet.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-11-30 23:31:12 +01:00
Hendrik Leppkes
5bc9c7a6db Merge commit 'fc4c27c4edfc6a5f9bc7c696e823652474a65ce8'
* commit 'fc4c27c4edfc6a5f9bc7c696e823652474a65ce8':
  qsvenc: expose additional encoding options

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2015-11-29 15:22:53 +01:00
Hendrik Leppkes
24563c20f1 Merge commit 'e7d7cf86dcaba8eaaed62c80172ff0aff2588c2a'
* commit 'e7d7cf86dcaba8eaaed62c80172ff0aff2588c2a':
  qsvenc: support more RC methods

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2015-11-29 15:18:08 +01:00
Derek Buitenhuis
98540a2c7d Merge commit '4d8f536b535487063a08609636e712ad86d2ad54'
* commit '4d8f536b535487063a08609636e712ad86d2ad54':
  qsvenc: print the actual video parameters used by MSDK

Merged-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
2015-11-22 17:46:57 +00:00
Anton Khirnov
fc4c27c4ed qsvenc: expose additional encoding options 2015-11-20 09:29:50 +01:00
Anton Khirnov
e7d7cf86dc qsvenc: support more RC methods 2015-11-20 09:29:13 +01:00
Anton Khirnov
3edac01f79 qsvenc: fix setting maxrate for VBR 2015-11-20 09:25:58 +01:00
Anton Khirnov
4d8f536b53 qsvenc: print the actual video parameters used by MSDK 2015-11-20 09:23:22 +01:00
Hendrik Leppkes
866a4174db Merge commit 'dc923bc23b3efd949d0bf67ff1abdb95059e5843'
* commit 'dc923bc23b3efd949d0bf67ff1abdb95059e5843':
  qsvenc: add an API for allocating opaque surfaces

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2015-10-22 15:55:43 +02:00
Hendrik Leppkes
a440886a35 Merge commit '2ec96b6bd5bf7b22978711bcf2cee702bee89c6f'
* commit '2ec96b6bd5bf7b22978711bcf2cee702bee89c6f':
  qsvenc: cosmetics, reindent

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2015-10-22 15:49:26 +02:00
Hendrik Leppkes
2fece1e4d5 Merge commit 'f6f32fc93d39caf329869c1bff8ad024ccab1d42'
* commit 'f6f32fc93d39caf329869c1bff8ad024ccab1d42':
  qsvenc: set the timestamp for PIX_FMT_QSV frames as well

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2015-10-22 15:48:11 +02:00
Hendrik Leppkes
760dbdd3c5 Merge commit '772c87c5a658f36d7c0612f5da583fc2bfa54f79'
* commit '772c87c5a658f36d7c0612f5da583fc2bfa54f79':
  qsvenc: support passing arbitrary external buffers to the encoder

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2015-10-22 15:46:52 +02:00
Anton Khirnov
dc923bc23b qsvenc: add an API for allocating opaque surfaces 2015-10-16 20:00:40 +02:00
Anton Khirnov
2ec96b6bd5 qsvenc: cosmetics, reindent 2015-10-16 20:00:17 +02:00
Anton Khirnov
f6f32fc93d qsvenc: set the timestamp for PIX_FMT_QSV frames as well 2015-10-16 20:00:12 +02:00
Anton Khirnov
772c87c5a6 qsvenc: support passing arbitrary external buffers to the encoder 2015-10-16 20:00:02 +02:00
Sven Dueking
5d4a3563f2 qsvenc.c: use query to catch all kind of setting issues
Reviewed-by: Ivan Uskov <ivan.uskov@nablet.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-10-01 16:12:33 +02:00
Hendrik Leppkes
49a25d02dd Merge commit '83847cc8fa97e0fc637a0962bafb837acdb6eacc'
* commit '83847cc8fa97e0fc637a0962bafb837acdb6eacc':
  qsvenc: do not try to close the encoder if the session is NULL

Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
2015-09-29 14:10:25 +02:00
Anton Khirnov
83847cc8fa qsvenc: do not try to close the encoder if the session is NULL 2015-09-28 15:42:56 +02:00
Sven Dueking
67e87f8050 avcodec/qsv : Added look ahead rate control mode
Reviewed-by: Ivan Uskov <ivan.uskov@nablet.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-08-30 16:00:05 +02:00
Sven Dueking
6eecb91fbc avcodec/qsvenc: Added PicTiming SEI
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-08-19 13:49:37 +02:00
Sven Dueking
f3fbe790d9 avcodec/qsvenc: Set MaxKpbs to rc_max_rate for CBR and VBR (bitrate is equal to rc_max_rate for CBR)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-08-14 14:51:47 +02:00
Ivan Uskov
947c2aa456 libavcodec/qsvenc.c delay in 1 microsecond replaced to more appropriate 500 microseconds
This commit replaces the 1 microsecond delay by 500 microsecond for the
case when the MFX library does return MFX_WRN_DEVICE_BUSY status.
In general this warning never appears for simple encoding or
transcoding session because the GPU is so fast so it almost always is not busy and
any delay value just does not executes.
But for heavy transcoding tasks for example, when several QSV sessions
are running simultaneously then using a 1-microsecond delay may
result in 1000 iterations per each frame.
So here possible a paradoxical case when GPU loading also loads CPU by dummy tasks.
Official MFX/QSV samples by Intel are using 1 millisecond (i.e. 1000
microseconds) everywhere where MFX_WRN_DEVICE_BUSY does appear.
So 500us is a much more optimal value than 1us.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-28 20:37:38 +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
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
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
495eee0123 Merge commit '40cf1bbacc6220a0aa6bed5c331871d43f9ce370'
* commit '40cf1bbacc6220a0aa6bed5c331871d43f9ce370':
  Deprecate avctx.coded_frame

Conflicts:
	ffmpeg.c
	libavcodec/a64multienc.c
	libavcodec/asvenc.c
	libavcodec/cljrenc.c
	libavcodec/dpxenc.c
	libavcodec/gif.c
	libavcodec/mpegvideo_enc.c
	libavcodec/nvenc.c
	libavcodec/proresenc_kostya.c
	libavcodec/pthread_frame.c
	libavcodec/rawenc.c
	libavcodec/sunrastenc.c
	libavcodec/tiffenc.c
	libavcodec/version.h
	libavcodec/xbmenc.c
	libavcodec/xwdenc.c
	libavdevice/v4l2.c

Merged-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-21 01:17:15 +02:00
Michael Niedermayer
b1fad7ac20 Merge commit 'd6604b29ef544793479d7fb4e05ef6622bb3e534'
* commit 'd6604b29ef544793479d7fb4e05ef6622bb3e534':
  Gather all coded_frame allocations and free functions to a single place

Conflicts:
	libavcodec/a64multienc.c
	libavcodec/asvenc.c
	libavcodec/cljrenc.c
	libavcodec/dpxenc.c
	libavcodec/dvenc.c
	libavcodec/gif.c
	libavcodec/huffyuvenc.c
	libavcodec/jpeglsenc.c
	libavcodec/libopenjpegenc.c
	libavcodec/libtheoraenc.c
	libavcodec/libvpxenc.c
	libavcodec/mpegvideo_enc.c
	libavcodec/nvenc.c
	libavcodec/pngenc.c
	libavcodec/proresenc_kostya.c
	libavcodec/sunrastenc.c
	libavcodec/tiffenc.c
	libavcodec/utils.c
	libavcodec/utvideoenc.c
	libavcodec/v210enc.c
	libavcodec/v410enc.c
	libavcodec/xbmenc.c

Merged-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-20 23:43:05 +02:00
Vittorio Giovara
40cf1bbacc Deprecate avctx.coded_frame
The rationale is that coded_frame was only used to communicate key_frame,
pict_type and quality to the caller, as well as a few other random fields,
in a non predictable, let alone consistent way.

There was agreement that there was no use case for coded_frame, as it is
a full-sized AVFrame container used for just 2-3 int-sized properties,
which shouldn't even belong into the AVCodecContext in the first place.

The appropriate AVPacket flag can be used instead of key_frame, while
quality is exported with the new AVPacketSideData quality factor.
There is no replacement for the other fields as they were unreliable,
mishandled or just not used at all.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2015-07-20 15:06:50 +01:00
Vittorio Giovara
d6604b29ef Gather all coded_frame allocations and free functions to a single place
Allocating coded_frame is what most encoders do anyway, so it makes
sense to always allocate and free it in a single place. Moreover a lot
of encoders freed the frame with av_freep() instead of the correct API
av_frame_free().

This bring uniformity to encoder behaviour and prevents applications
from erroneusly accessing this field when not allocated. Additionally
this helps isolating encoders that export information with coded_frame,
and heavily simplifies its deprecation.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2015-07-20 14:16:15 +01:00
Michael Niedermayer
9c943e077b Merge commit '69b92f1b99f3f210be19ee6ec06f6c0de1733031'
* commit '69b92f1b99f3f210be19ee6ec06f6c0de1733031':
  qsvenc: properly handle asynchronous encoding

Conflicts:
	libavcodec/qsvenc.c

Merged-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-19 16:34:12 +02:00