Commit Graph

25 Commits

Author SHA1 Message Date
Anton Khirnov ad9c9440d5 qsvenc: support getting the session from an AVHWFramesContext 2016-06-21 19:53:38 +02: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
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
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
Anton Khirnov 825900248b qsvenc: export CPB props side data 2015-12-06 10:25:49 +01: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
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
Anton Khirnov 83847cc8fa qsvenc: do not try to close the encoder if the session is NULL 2015-09-28 15:42:56 +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
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
Anton Khirnov 69b92f1b99 qsvenc: properly handle asynchronous encoding
Wait for async_depth frames before syncing.
2015-07-19 10:06:53 +02:00
Anton Khirnov 66acb76bb0 lavc: add Intel libmfx-based HEVC encoder 2015-07-08 23:40:11 +02:00
Anton Khirnov 3a85397e8b lavc: add Intel libmfx-based MPEG2 encoder 2015-07-08 23:39:28 +02:00
Anton Khirnov 72b7441a10 lavc: add Intel libmfx-based H.264 encoder 2015-03-27 22:02:10 +01:00