[FFmpeg-devel] [PATCH v6 1/2] lavc, doc, configure: add libxavs2 video encoder wrapper
Mark Thompson
sw at jkqxz.net
Sun Sep 9 20:50:47 EEST 2018
On 06/09/18 14:46, Huiwen Ren wrote:
> At 2018-09-06 08:43:05, "Mark Thompson" <sw at jkqxz.net> wrote:
>> On 05/09/18 14:38, hwren wrote:
>>> + { "i_initial_qp" , "Quantization parameter" , OFFSET(i_initial_qp) , AV_OPT_TYPE_INT, {.i64 = 34 }, 1, 63, VE },
>>
>> If I understand what you said previously correctly, this is only used in constant-QP mode, and there it is used as the QP for every frame (not just the initial one)?
>>
>> If that's the case then it should probably not say "initial" - I would read "initial_qp" as meaning the QP used for the first frame only, so probably in modes with a bitrate target. Maybe change it to just be "qp"? That name is used by several other encoders, including libx264 and libxavs.
>
> If "RateControl" is opened, the "initial_qp" will be used for the first frame and kept for all the other frames (constant-QP) and if there is no rate control, the initial_qp will only work for the first frame (xavs2 will always initial the qp for the first frame). So...maybe better with "initial"?
Oh, so it's actually being used for both cases here? Then I think it should be two separate options to match other encoders ("initial_qp" for the bitrate-target case, "qp" or AVCodecContext.global_quality for the constant-quality case).
Relatedly, the min-QP default value seems to be applied in constant-quality mode as well, where it probably shouldn't be:
$ for i in $(seq 1 63) ; do ./ffmpeg_g -y -i in.mp4 -an -c:v libxavs2 -frames:v 1000 -initial_qp $i out-$i.avs ; done
...
$ rename 's/-(..avs)/-0$1/' out-*
$ du -b out-*
18464881 out-01.avs
18464878 out-02.avs
18464872 out-03.avs
18464872 out-04.avs
18464875 out-05.avs
18464872 out-06.avs
18464875 out-07.avs
18464873 out-08.avs
18464878 out-09.avs
18464878 out-10.avs
18464875 out-11.avs
18464878 out-12.avs
18464875 out-13.avs
18464872 out-14.avs
18464878 out-15.avs
18464875 out-16.avs
18464875 out-17.avs
18464878 out-18.avs
18464872 out-19.avs
18464878 out-20.avs
17015783 out-21.avs
15555727 out-22.avs
14176171 out-23.avs
12707758 out-24.avs
11603156 out-25.avs
10401092 out-26.avs
9392228 out-27.avs
8371627 out-28.avs
7476957 out-29.avs
6706333 out-30.avs
6025691 out-31.avs
5402430 out-32.avs
4877929 out-33.avs
4563285 out-34.avs
4081752 out-35.avs
3672218 out-36.avs
3290184 out-37.avs
2945455 out-38.avs
2637767 out-39.avs
2362608 out-40.avs
2119294 out-41.avs
1902747 out-42.avs
1710491 out-43.avs
1536269 out-44.avs
1390060 out-45.avs
1238536 out-46.avs
1122929 out-47.avs
1005188 out-48.avs
906167 out-49.avs
807448 out-50.avs
729962 out-51.avs
647092 out-52.avs
583707 out-53.avs
520264 out-54.avs
469991 out-55.avs
421588 out-56.avs
380653 out-57.avs
347411 out-58.avs
313181 out-59.avs
287456 out-60.avs
268281 out-61.avs
243882 out-62.avs
232726 out-63.avs
Thanks,
- Mark
More information about the ffmpeg-devel
mailing list