Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AV1 CBR padding function #11

Open
ckdt1105 opened this issue Jun 2, 2023 · 6 comments
Open

AV1 CBR padding function #11

ckdt1105 opened this issue Jun 2, 2023 · 6 comments

Comments

@ckdt1105
Copy link

ckdt1105 commented Jun 2, 2023

image
CBR Padding feature is seemed to fill the remaining bitrate with meaningless information
so, bitrate on static screens doesn't drop much, so bitrate spikes are less
and as a result, even if the buffer size is large (target bitrate X 2), can achieve almost constant bitrate.

On H264 and HEVC, the CBR Padding feature is works (probably)
so bitrate spikes are very uncommon.

In AV1, the bitrate is reduced during static scenes
this cause more bitrate spikes than H264 and HEVC.

In the current state, for strict CBR in AV1, the buffer size must be extremely lowered
This means that there are losses in many places, such as lookahead quality and video quality.

@ckdt1105
Copy link
Author

ckdt1105 commented Jun 2, 2023

#5 is maybe my mistaking it for a bug, because the lack of CBR padding in AV1.

So, I think that the change of the default buffer size to 'TargetBitrate / 8' in 1.1.0.0_dev2 may not need.

And, it is possible that (Target bitrate/fps) x (LookAheadDepth - 1) = 'minimal buffersize'
ex) (8000/60) x (40-1) = 5200, (8000/60) x (120-1) = 15866
so, current version is potential for problems with encoding modes like LA_EXT.

@ma3uk
Copy link
Owner

ma3uk commented Jun 3, 2023

Thanks for the Issue. I am aware of this problem, all the conditions for CBR Padding to work with AV1 were met on my part, but it did not work, so a week ago I contacted Intel and gave them all the information, at the moment I am waiting for feedback from Intel

@ckdt1105
Copy link
Author

ckdt1105 commented Jun 3, 2023

@ma3uk
Thanks for information.
i hope intel can fix this problem.

@ckdt1105
Copy link
Author

@ma3uk
i found intel finally fix cbr problem
obsproject/obs-studio#10902

@ma3uk
Copy link
Owner

ma3uk commented Aug 20, 2024

@ma3uk i found intel finally fix cbr problem obsproject/obs-studio#10902

Yes, I know this method, but if you look at the content of the PR that you threw off, you can see that it is designed for a new generation of GPUs starting with integrated Lunar Lake GPUs and discrete Battlemage GPUs.
You can try to reproduce this fix by setting the WinBRCMaxAvgKbps parameters yourself to Bitrate * 1.3, WinBRCSize to a value equal to the final FPS, and also enable CustomBufferSize and set it to Bitrate * 2.
You can test both with and without the fix enabled and post the results here, based on the results we will decide whether to enable this fix by default or leave everything as it is now, with the possibility of fine-tuning by the user.
An update has recently been made to the Intel driver repository that adds a driver-level fix starting with Meteor Lake integrated GPUs.

@ckdt1105
Copy link
Author

@ma3uk
Thank you for your massive explain

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants