]> git.sesse.net Git - ffmpeg/commit
libavcodec/libx264: fix reference frame computation based on level
authorJosh Brewster <josh.brewster@protonmail.com>
Thu, 16 Apr 2020 20:50:29 +0000 (22:50 +0200)
committerJosh de Kock <josh@itanimul.li>
Wed, 29 Apr 2020 11:01:14 +0000 (12:01 +0100)
commit79f001675a2bae16e243f30a3e7de9da6aeb3c2d
treef1474ef527f3438dc3ae67feeed897d413bbaa96
parent280383a8975bf04f7d05caf55fae75bbff71b347
libavcodec/libx264: fix reference frame computation based on level

The current implementation allows passing levels to libavcodec as
integers (such as "31" instead of "3.1").

However, in this case, the maximum reference frame value per level was
ignored because libavcodec converted the string to 310 instead of 31.

Since libx264 has correctly parsed the level to int
(x4->params.i_level_idc), we should rely on this value instead of
attempting to parse the level string on our own.

Signed-off-by: Josh Brewster <josh.brewster@protonmail.com>
Signed-off-by: Josh de Kock <josh@itanimul.li>
libavcodec/libx264.c