diff mbox series

[FFmpeg-devel,v2] libavcodec/qsvence: Use QSV encoder defaults as ffmpeg defaults

Message ID MN2PR04MB5981DBB609BF38EB0FDF8CF1BAF79@MN2PR04MB5981.namprd04.prod.outlook.com
State New
Headers show
Series [FFmpeg-devel,v2] libavcodec/qsvence: Use QSV encoder defaults as ffmpeg defaults | expand

Checks

Context Check Description
andriy/x86_make success Make finished
andriy/x86_make_fate success Make fate finished
andriy/PPC64_make success Make finished
andriy/PPC64_make_fate success Make fate finished

Commit Message

Soft Works Aug. 10, 2021, 8:53 a.m. UTC
Signed-off-by: softworkz <softworkz@hotmail.com>
---
 libavcodec/qsvenc.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Xiang, Haihao Aug. 11, 2021, 2:55 a.m. UTC | #1
On Tue, 2021-08-10 at 08:53 +0000, Soft Works wrote:
> Signed-off-by: softworkz <softworkz@hotmail.com>
> ---
>  libavcodec/qsvenc.h | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/libavcodec/qsvenc.h b/libavcodec/qsvenc.h
> index fc8a14143e..58984f996f 100644
> --- a/libavcodec/qsvenc.h
> +++ b/libavcodec/qsvenc.h
> @@ -76,8 +76,8 @@
>  
>  #define QSV_COMMON_OPTS \
>  { "async_depth", "Maximum processing parallelism", OFFSET(qsv.async_depth),
> AV_OPT_TYPE_INT, { .i64 = ASYNC_DEPTH_DEFAULT }, 1, INT_MAX, VE
> },                          \
> -{ "avbr_accuracy",    "Accuracy of the AVBR
> ratecontrol",    OFFSET(qsv.avbr_accuracy),    AV_OPT_TYPE_INT, { .i64 = 0 },
> 0, INT_MAX, VE },                             \
> -{ "avbr_convergence", "Convergence of the AVBR ratecontrol",
> OFFSET(qsv.avbr_convergence), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, INT_MAX, VE
> },                             \
> +{ "avbr_accuracy",    "Accuracy of the AVBR ratecontrol (unit of tenth of
> percent)",    OFFSET(qsv.avbr_accuracy),    AV_OPT_TYPE_INT, { .i64 = 1 }, 1,
> UINT16_MAX, VE },                             \
> +{ "avbr_convergence", "Convergence of the AVBR ratecontrol (unit of 100
> frames)", OFFSET(qsv.avbr_convergence), AV_OPT_TYPE_INT, { .i64 = 1 }, 1,
> UINT16_MAX, VE },                             \
>  { "preset", NULL, OFFSET(qsv.preset), AV_OPT_TYPE_INT, { .i64 =
> MFX_TARGETUSAGE_BALANCED }, MFX_TARGETUSAGE_BEST_QUALITY,
> MFX_TARGETUSAGE_BEST_SPEED,   VE, "preset" }, \
>  { "veryfast",    NULL, 0, AV_OPT_TYPE_CONST, { .i64 =
> MFX_TARGETUSAGE_BEST_SPEED  },   INT_MIN, INT_MAX, VE, "preset"
> },                                                \
>  { "faster",      NULL, 0, AV_OPT_TYPE_CONST, { .i64 =
> MFX_TARGETUSAGE_6  },            INT_MIN, INT_MAX, VE, "preset"
> },                   

lgtm. thx!
James Almer Aug. 11, 2021, 12:54 p.m. UTC | #2
On 8/10/2021 11:55 PM, Xiang, Haihao wrote:
> On Tue, 2021-08-10 at 08:53 +0000, Soft Works wrote:
>> Signed-off-by: softworkz <softworkz@hotmail.com>
>> ---
>>   libavcodec/qsvenc.h | 4 ++--
>>   1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/libavcodec/qsvenc.h b/libavcodec/qsvenc.h
>> index fc8a14143e..58984f996f 100644
>> --- a/libavcodec/qsvenc.h
>> +++ b/libavcodec/qsvenc.h
>> @@ -76,8 +76,8 @@
>>   
>>   #define QSV_COMMON_OPTS \
>>   { "async_depth", "Maximum processing parallelism", OFFSET(qsv.async_depth),
>> AV_OPT_TYPE_INT, { .i64 = ASYNC_DEPTH_DEFAULT }, 1, INT_MAX, VE
>> },                          \
>> -{ "avbr_accuracy",    "Accuracy of the AVBR
>> ratecontrol",    OFFSET(qsv.avbr_accuracy),    AV_OPT_TYPE_INT, { .i64 = 0 },
>> 0, INT_MAX, VE },                             \
>> -{ "avbr_convergence", "Convergence of the AVBR ratecontrol",
>> OFFSET(qsv.avbr_convergence), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, INT_MAX, VE
>> },                             \
>> +{ "avbr_accuracy",    "Accuracy of the AVBR ratecontrol (unit of tenth of
>> percent)",    OFFSET(qsv.avbr_accuracy),    AV_OPT_TYPE_INT, { .i64 = 1 }, 1,
>> UINT16_MAX, VE },                             \
>> +{ "avbr_convergence", "Convergence of the AVBR ratecontrol (unit of 100
>> frames)", OFFSET(qsv.avbr_convergence), AV_OPT_TYPE_INT, { .i64 = 1 }, 1,
>> UINT16_MAX, VE },                             \
>>   { "preset", NULL, OFFSET(qsv.preset), AV_OPT_TYPE_INT, { .i64 =
>> MFX_TARGETUSAGE_BALANCED }, MFX_TARGETUSAGE_BEST_QUALITY,
>> MFX_TARGETUSAGE_BEST_SPEED,   VE, "preset" }, \
>>   { "veryfast",    NULL, 0, AV_OPT_TYPE_CONST, { .i64 =
>> MFX_TARGETUSAGE_BEST_SPEED  },   INT_MIN, INT_MAX, VE, "preset"
>> },                                                \
>>   { "faster",      NULL, 0, AV_OPT_TYPE_CONST, { .i64 =
>> MFX_TARGETUSAGE_6  },            INT_MIN, INT_MAX, VE, "preset"
>> },
> 
> lgtm. thx!

Applied.
diff mbox series

Patch

diff --git a/libavcodec/qsvenc.h b/libavcodec/qsvenc.h
index fc8a14143e..58984f996f 100644
--- a/libavcodec/qsvenc.h
+++ b/libavcodec/qsvenc.h
@@ -76,8 +76,8 @@ 
 
 #define QSV_COMMON_OPTS \
 { "async_depth", "Maximum processing parallelism", OFFSET(qsv.async_depth), AV_OPT_TYPE_INT, { .i64 = ASYNC_DEPTH_DEFAULT }, 1, INT_MAX, VE },                          \
-{ "avbr_accuracy",    "Accuracy of the AVBR ratecontrol",    OFFSET(qsv.avbr_accuracy),    AV_OPT_TYPE_INT, { .i64 = 0 }, 0, INT_MAX, VE },                             \
-{ "avbr_convergence", "Convergence of the AVBR ratecontrol", OFFSET(qsv.avbr_convergence), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, INT_MAX, VE },                             \
+{ "avbr_accuracy",    "Accuracy of the AVBR ratecontrol (unit of tenth of percent)",    OFFSET(qsv.avbr_accuracy),    AV_OPT_TYPE_INT, { .i64 = 1 }, 1, UINT16_MAX, VE },                             \
+{ "avbr_convergence", "Convergence of the AVBR ratecontrol (unit of 100 frames)", OFFSET(qsv.avbr_convergence), AV_OPT_TYPE_INT, { .i64 = 1 }, 1, UINT16_MAX, VE },                             \
 { "preset", NULL, OFFSET(qsv.preset), AV_OPT_TYPE_INT, { .i64 = MFX_TARGETUSAGE_BALANCED }, MFX_TARGETUSAGE_BEST_QUALITY, MFX_TARGETUSAGE_BEST_SPEED,   VE, "preset" }, \
 { "veryfast",    NULL, 0, AV_OPT_TYPE_CONST, { .i64 = MFX_TARGETUSAGE_BEST_SPEED  },   INT_MIN, INT_MAX, VE, "preset" },                                                \
 { "faster",      NULL, 0, AV_OPT_TYPE_CONST, { .i64 = MFX_TARGETUSAGE_6  },            INT_MIN, INT_MAX, VE, "preset" },                                                \