1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-21 10:55:51 +02:00
Commit Graph

266 Commits

Author SHA1 Message Date
Wenbin Chen
31a23149da doc/encoders: Add av1 to qsv encoder's summary
Signed-off-by: Wenbin Chen <wenbin.chen@intel.com>
2023-03-17 14:13:37 +08:00
Wenbin Chen
55c8c9493f libavcodec/qsvenc: Add dynamic setting support of low_delay_brc to av1_qsv
Signed-off-by: Wenbin Chen <wenbin.chen@intel.com>
2023-03-17 14:13:37 +08:00
Marton Balint
3807fbd90a doc: remove docs for options removed at the bump
Signed-off-by: Marton Balint <cus@passwd.hu>
2023-02-19 19:29:17 +01:00
Wenbin Chen
13d04e30d7 libavcodec/qsvenc_av1: Add max_frame_size support to av1_qsv encoder
Signed-off-by: Wenbin Chen <wenbin.chen@intel.com>
2023-01-09 13:56:03 +08:00
Wenbin Chen
c8e73558fe libavcodec/qsvenc_av1: Add low_delay_brc support to av1_qsv encoder
Signed-off-by: Wenbin Chen <wenbin.chen@intel.com>
2023-01-09 13:56:03 +08:00
Wenbin Chen
dc4d3429e1 libavcodec/qsvenc: Add skip_frame support to qsvenc
Add skip_frame support to qsvenc. Use per-frame metadata
"qsv_skip_frame" to control it. skip_frame option defines the behavior
of qsv_skip_frame.
no_skip: Frame skipping is disabled.
insert_dummy: Encoder inserts into bitstream frame where all macroblocks
are encoded as skipped.
insert_nothing: Similar to insert_dummy, but encoder inserts nothing.
The skipped frames are still used in brc. For example, gop still include
skipped frames, and the frames after skipped frames will be larger in
size.
brc_only: skip_frame metadata indicates the number of missed frames
before the current frame.

Signed-off-by: Wenbin Chen <wenbin.chen@intel.com>
2022-11-07 10:57:12 +08:00
nyanmisaka
af67f627d1 doc/encoders: add doc of the tier option for hevc_qsv
Signed-off-by: nyanmisaka <nst799610810@gmail.com>
2022-11-07 10:57:12 +08:00
Wenbin Chen
d79c240196 doc/encoders: Add doc for av1_qsv
Add doc for av1_qsv.

Signed-off-by: Wenbin Chen <wenbin.chen@intel.com>
2022-10-24 13:30:22 +08:00
Wenbin Chen
3771d54989 libavcodec/qsvenc: Add pic_timing_sei reset support to qsv
Signed-off-by: Wenbin Chen <wenbin.chen@intel.com>
2022-09-30 09:20:15 +08:00
Wenbin Chen
29a3ba8693 libavcodec/qsvenc: Add bitrate reset support to qsvenc
Signed-off-by: Wenbin Chen <wenbin.chen@intel.com>
2022-09-30 09:20:15 +08:00
Wenbin Chen
17df61083d libavcodec/qsvenc: Add framerate reset support to qsv
Signed-off-by: Wenbin Chen <wenbin.chen@intel.com>
2022-09-30 09:20:15 +08:00
James Zern
bd7d69fe35 avcodec/libvpxenc: add -min-gf-interval
this maps to the vpxenc argument with the same name and the
VP9E_SET_MIN_GF_INTERVAL codec control

Signed-off-by: James Zern <jzern@google.com>
Reviewed-by: Vignesh Venkatasubramanian <vigneshv@google.com>
2022-09-22 11:52:16 -07:00
Wenbin Chen
a2fd553dd3 libavcodec/qsvenc: Add low_delay_brc reset support to qsvenc
Signed-off-by: Wenbin Chen <wenbin.chen@intel.com>
2022-09-09 09:39:44 +08:00
Wenbin Chen
005c7a4f61 libavcodec/qsvenc: Add max/min qp reset support in qsvenc
Signed-off-by: Wenbin Chen <wenbin.chen@intel.com>
2022-09-09 09:39:44 +08:00
Wenbin Chen
9155ec096b libavcodec/qsvenc: Add intra refresh reset support to qsvenc
Signed-off-by: Wenbin Chen <wenbin.chen@intel.com>
2022-09-09 09:39:44 +08:00
Wenbin Chen
f3ba1458b6 libavcodec/qsvenc: Add "slice" intra refresh type to qsvenc
Add "slice" intra refresh type to h264_qsv and hevc_qsv. This type means
horizontal refresh by slices without overlapping. Also update the doc.

Signed-off-by: Wenbin Chen <wenbin.chen@intel.com>
2022-09-09 09:39:44 +08:00
Wenbin Chen
d60f657a50 libavcodec/qsvenc: Add gop_size reset support to qsvenc
Signed-off-by: Wenbin Chen <wenbin.chen@intel.com>
2022-09-09 09:39:44 +08:00
Wenbin Chen
c679de9be0 libavcodec/qsvenc: Add max_frame_size reset support to qsv
Signed-off-by: Wenbin Chen <wenbin.chen@intel.com>
2022-09-09 09:39:44 +08:00
Haihao Xiang
a5b6e29227 lavc/qsvenc: use VBR if maxrate is not specified on Windows
Currently AVBR is disabled and VBR is the default method if maxrate is
not specified on Linux, but AVBR is the default one if maxrate is not
specified on Windows. In order to make user experience better accross
Linux and Windows, use VBR by default on Windows if maxrate is not
specified. User need to set both avbr_accuracy and avbr_convergence to
non-zero explicitly and not to specify maxrate if AVBR is expected.

In addition, AVBR works for H264 and HEVC only in the SDK.

$ ffmpeg.exe -v verbose -f lavfi -i yuvtestsrc -vf "format=nv12" -c:v
vp9_qsv -f null -
2022-09-07 14:01:06 +08:00
Haihao Xiang
1adfd28f9e qsvenc_{hevc,h264}: add scenario option
User may get better experience after providing corresponding senario hint
to encoder for the encoding session. See [1] for scenario support in the
SDK

[1]https://github.com/Intel-Media-SDK/MediaSDK/blob/master/doc/mediasdk-man.md#scenarioinfo
2022-08-23 12:42:19 +08:00
Wenbin Chen
ae7d19680b libavcodec/qsvenc: Add adaptive_i/b to hevc_qsv
Add adaptive_i/b feature to hevc_qsv. Adaptive_i allows changing of
frame type from P and B to I. Adaptive_b allows changing of frame type
frome B to P.

Signed-off-by: Wenbin Chen <wenbin.chen@intel.com>
Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
2022-08-23 12:42:19 +08:00
Wenbin Chen
52ad617af5 libavcodec/qsvenc: Use parameter from AVCodecContext to reset qsv codec
Using parameter from AVCodecContext to reset qsv codec is more suitable
for MFXVideoENCODE_Reset()'s usage. Per-frame metadata is more suitable
for the usage of mfxEncodeCtrl being passed to
MFXVideoENCODE_EncodeFrameAsync(). Now change it to use the value
from AVCodecContext.
Because q->param is passed to both "in" and "out" parameters when call
MFXVideoENCODE_Query(), the value in q->param may be changed. New
variables are added to store old configuration, so that we can detect
real parameter change.

Signed-off-by: Wenbin Chen <wenbin.chen@intel.com>
Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
2022-07-20 12:35:23 +08:00
Yue Heng
53baf60603 libavcodec/qsvenc: Enable fixed QP configure in qsv CQP runtime
Enable dynamic QP configuration in runtime on qsv encoder. Through
AVFrame->metadata, we can set key "qsv_config_qp" to change QP
configuration when we encode video in CQP mode.

Signed-off-by: Yue Heng <yue.heng@intel.com>
Signed-off-by: Wenbin Chen <wenbin.chen@intel.com>
Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
2022-06-27 12:09:44 +08:00
Yue Heng
11912f65ef libavcodec/qsvenc: Add min/max QP control options for I/P/B frame
To do more accurate QP control, add min/max QP control on I/P/B frame
separately to qsv encoder. qmax and qmin still work but newly-added
options have higher priority.

Signed-off-by: Yue Heng <yue.heng@intel.com>
Signed-off-by: Wenbin Chen <wenbin.chen@intel.com>
2022-06-06 13:56:10 +08:00
Linjie Fu
e838169181 doc/vaapi_encode: add documentations for max_frame_size
Add docs for max_frame_size option.

Signed-off-by: Linjie Fu <linjie.fu@intel.com>
Signed-off-by: Fei Wang <fei.w.wang@intel.com>
2022-06-06 13:56:10 +08:00
Tomas Härdin
30e2bb0f64 doc/encoders.texi: Document updated behavior
Bitrates of akiyo changed slightly.
2022-05-12 11:19:12 +02:00
Tomas Härdin
61bcd7737d doc/encoders.texi: Document cinepak encoder 2022-05-12 11:19:12 +02:00
Leo Izen
ec07b15477 doc/encoders: document libjxl encoder options
Add more detailed documenation for the libjxl encoder
wrapper than is present currently inside libavcodec.
2022-04-28 13:44:38 +05:30
Marton Balint
ee50cc18b3 avcodec/vbnenc: add VBN encoder
Signed-off-by: Marton Balint <cus@passwd.hu>
2022-04-10 20:12:23 +02:00
He, Fan F
ad21f26492 libavcodec/qsvenc: enable LowDelayBRC and MaxFrameSizeI/MaxFrameSizeP for more accurate bitrate control
Feature introduction of LowDelayBRC, MaxFrameSizeI and MaxFrameSizeP could be found here:
https://github.com/Intel-Media-SDK/MediaSDK/blob/master/doc/mediasdk-man.md

Signed-off-by: Dmitry Ermilov <dmitry.ermilov@intel.com>
Signed-off-by: Fan F He <fan.f.he@intel.com>
2022-04-06 17:12:26 +08:00
Danil Chapovalov
706f12992d avcodec/libvpxenc: enable dynamic max quantizer reconfiguration
Signed-off-by: James Zern <jzern@google.com>
2022-04-05 17:38:52 -07:00
Gyan Doshi
fa12d808d7 doc/encoders: update libwebpenc quality option
A private encoder option 'quality' was added in 716674b151, making
the doc entry obsolete.
2022-03-24 17:33:00 +05:30
Wenbin Chen
342d4fb056 libavcodec/qsvenc: add mbbrc to hevc_qsv
Add mbbrc to hevc_qsv
For detailed description, please see "mbbrc" part in:
https://github.com/Intel-Media-SDK/MediaSDK/blob/master/doc/mediasdk-man.md#mfxextcodingoption2

Signed-off-by: Wenbin Chen <wenbin.chen@intel.com>
2022-02-28 12:40:02 +08:00
Wenbin Chen
d165ce22a4 libavcodec/vaapi_encode: Add async_depth to vaapi_encoder to increase performance
Fix: #7706. After commit 5fdcf85bbf, vaapi encoder's performance
decrease. The reason is that vaRenderPicture() and vaSyncBuffer() are
called at the same time (vaRenderPicture() always followed by a
vaSyncBuffer()). Now I changed them to be called in a asynchronous way,
which will make better use of hardware.
Async_depth is added to increase encoder's performance. The frames that
are sent to hardware are stored in a fifo. Encoder will sync output
after async fifo is full.

Signed-off-by: Wenbin Chen <wenbin.chen@intel.com>
Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
2022-02-28 12:37:02 +08:00
James Almer
1dddb930aa avcodec/libsvtav1: update some options and defaults
And bump the minimum required version to 0.9.0

Signed-off-by: James Almer <jamrial@gmail.com>
2022-02-24 20:36:53 -03:00
James Almer
c33b404885 avcodec/libsvtav1: add a svtav1-params option to pass a list of key=value parameters
Signed-off-by: James Almer <jamrial@gmail.com>
2022-02-24 14:57:00 -03:00
Haihao Xiang
80801e5705 lavc/qsvenc: add tile encoding support for VP9
Add -tile_rows and -tile_cols options to specify the number of tile
rows and columns

Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
2022-01-29 12:02:52 +08:00
Wenbin Chen
e102fd98d6 libavcodec/qsvenc: Add intra refresh to hevc_qsv and add new intra refresh parameter
Add intra refresh support to hevc_qsv as well.
Add an new intra refresh type: "horizontal", and an new param
ref_cycle_dist. This param specify the distance between the
beginnings of the intra-refresh cycles in frames.

Signed-off-by: Wenbin Chen <wenbin.chen@intel.com>
Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
2022-01-27 10:26:39 +08:00
Wenbin Chen
2ecc4fde5f libavcodec/qsvenc: Add b_strategy option to hevc_qsv
Add b_strategy option to hevc_qsv. By enabling this option, encoder can
use b frames as reference.

Signed-off-by: Wenbin Chen <wenbin.chen@intel.com>
Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
2022-01-27 10:26:33 +08:00
Wenbin Chen
168c6e23a5 libavcodec/qsvenc: Add max slice size support to hevc_qsv
Add max_slice_size option to hevc_qsv as well.

Signed-off-by: Wenbin Chen <wenbin.chen@intel.com>
Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
2022-01-27 10:26:26 +08:00
Wenbin Chen
1fe78f8419 libavcodec/qsvenc: Add transform skip to hevc_qsv
Add transform_skip option to hevc_qsv. By enabling this option,
the transform_skip_enabled_flag in PPS will be set to 1.
This option is supported on the platform equal or newer than ICL.

Signed-off-by: Wenbin Chen <wenbin.chen@intel.com>
Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
2022-01-21 12:56:30 +08:00
Wenbin Chen
9d6cc6a544 libavcodec/qsvenc: Add low latency P-pyramid support to qsv
Add low latency P-pyramid support to qsv. This feature relates to
command line option "-p_strategy". To enable this flag, user also
need to set "-bf" to 0. P-strategy has two modes "1-simple" and
"2-pyramid". The details of the two models refer to
https://github.com/Intel-Media-SDK/MediaSDK/blob/master/doc/mediasdk-man.md#preftype

Signed-off-by: Wenbin Chen <wenbin.chen@intel.com>
Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
2022-01-21 12:56:30 +08:00
Wenbin Chen
812b6ee6bd libavcodec/qsvenc: Add DisableDeblockingIdc support to qsv
Add dblk_idc option to 264_qsv and hevc_qsv. Turining on this opion can
disable deblocking.

Signed-off-by: Wenbin Chen <wenbin.chen@intel.com>
Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
2022-01-21 12:56:30 +08:00
Wenbin Chen
ec8bc07104 libavcodec/qsvenc: Add max_frame_size support to hevc_qsv
Add max_frame_size support to hevc_qsv as well.

Signed-off-by: Wenbin Chen <wenbin.chen@intel.com>
Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
2022-01-21 12:56:30 +08:00
Haihao Xiang
641c4346b3 lavc/qsvenc_hevc: add -pic_timing_sei option
The SDK may insert picture timing SEI for hevc and the code to set mfx
parameter has been added in qsvenc, however the corresponding option is
missing in the hevc option array

Reviewed-by: Limin Wang <lance.lmwang@gmail.com>
Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
2022-01-18 16:25:33 +08:00
Haihao Xiang
c4ae6908f2 lavc/qsvenc: add encode support for screen content coding extension
Enables HEVC Screen Content Coding extension support on ICL+ platform

Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
2022-01-18 16:24:57 +08:00
Wenbin Chen
035d2cc463 doc/encoders.texi: Add doc for qsv
Add doc for qsv decoder.
Add more option's introduction to qsv encoder.

Signed-off-by: Wenbin Chen <wenbin.chen@intel.com>
Signed-off-by: Haihao Xiang <haihao.xiang@intel.com>
2022-01-07 14:06:10 +08:00
Limin Wang
7dfc3cc713 avcodec/libx26[45]: add udu_sei option to import user data unregistered SEIs
Most of user data unregistered SEIs are privated data which defined by user/
encoder. currently, the user data unregistered SEIs found in input are forwarded
as side-data to encoders directly, it'll cause the reencoded output including some
useless UDU SEIs.

I prefer to add one option to enable/disable it and default is off after I saw
the patch by Andreas Rheinhardt:

https://patchwork.ffmpeg.org/project/ffmpeg/patch/AM7PR03MB66607C2DB65E1AD49D975CF18F7B9@AM7PR03MB6660.eurprd03.prod.outlook.com/

How to test by cli:
ffmpeg -y -f lavfi -i testsrc -c:v libx264 -frames:v 1 a.ts
ffmpeg -y -i a.ts -c:v libx264 -udu_sei 1 b.ts
ffmpeg -y -i a.ts -c:v libx264 -udu_sei 0 c.ts

# check the user data unregistered SEIs, you'll see two UDU SEIs for b.ts.
# and mediainfo will show with wrong encoding setting info
ffmpeg -i b.ts -vf showinfo -f null -
ffmpeg -i c.ts -vf showinfo -f null -

This fixes tickets #9500 and #9557.

Reviewed-by: "zhilizhao(赵志立)" <quinkblack@foxmail.com>
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
2021-12-28 14:19:38 +08:00
Limin Wang
ed89be1e02 doc/encoders: add available values for libsvtav1 options
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
2021-09-29 18:01:16 +08:00
Gyan Doshi
1aa9dcd091 avcodec/qsvenc: clip global_quality for ICQ modes.
Allowed range is 1 to 51.

Ref: https://software.intel.com/content/www/us/en/develop/articles/advanced-bitrate-control-methods-in-intel-media-sdk.html
2021-07-12 09:33:22 +05:30