[FFmpeg-devel] [PATCH v8 1/2] lavc, doc, configure: add libxavs2 video encoder wrapper

Mark Thompson sw at jkqxz.net
Wed Sep 12 00:22:46 EEST 2018


On 10/09/18 21:18, Mark Thompson wrote:
> On 10/09/18 04:59, hwren wrote:
>> Signed-off-by: hwren <hwrenx at 126.com>
>> ---
>>  Changelog              |   1 +
>>  configure              |   4 +
>>  doc/encoders.texi      |  49 ++++++++
>>  doc/general.texi       |  14 +++
>>  libavcodec/Makefile    |   1 +
>>  libavcodec/allcodecs.c |   1 +
>>  libavcodec/libxavs2.c  | 300 +++++++++++++++++++++++++++++++++++++++++++++++++
>>  libavcodec/version.h   |   4 +-
>>  8 files changed, 372 insertions(+), 2 deletions(-)
>>  create mode 100644 libavcodec/libxavs2.c
>>
>> ...> diff --git a/libavcodec/libxavs2.c b/libavcodec/libxavs2.c
>> new file mode 100644
>> index 0000000..a834f6e
>> --- /dev/null
>> +++ b/libavcodec/libxavs2.c
>> ...
>> +
>> +    /* Rate control */
>> +    if (avctx->bit_rate > 0) {
>> +        xavs2_opt_set2("RateControl",   "%d", 1);
>> +        xavs2_opt_set2("initial_qp",    "%d", cae->qp);
>> +        xavs2_opt_set2("TargetBitRate", "%"PRId64"", avctx->bit_rate);
>> +    } else {
>> +        xavs2_opt_set2("initial_qp","%d", cae->initial_qp);
>> +        xavs2_opt_set2("max_qp",    "%d", cae->max_qp);
>> +        xavs2_opt_set2("min_qp",    "%d", cae->min_qp);
>> +    }
> 
> The QP settings are the wrong way around - initial_qp, max_qp and min_qp should go with the rate control case.
> 
>> ...
> 
> Everything else LGTM now.
> 
> Does anyone else have any comments on this?  If not, I'll push it tomorrow with that fixed.

And applied :)

Thanks,

- Mark


More information about the ffmpeg-devel mailing list