-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Fix the bitrate scale factor for h264-to-hevc transcoding #9485
Fix the bitrate scale factor for h264-to-hevc transcoding #9485
Conversation
Signed-off-by: nyanmisaka <nst799610810@gmail.com>
92e5649
to
0b01bf1
Compare
Fix the bitrate scale factor for h264-to-hevc transcoding Original-merge: 173a963 Merged-by: Nyanmisaka <nst799610810@gmail.com> Backported-by: crobibero <cody@robibe.ro>
var scaleFactor = outputScaleFactor / inputScaleFactor; | ||
|
||
// Don't scale the real bitrate lower than the requested bitrate | ||
var scaleFactor = Math.Min(outputScaleFactor / inputScaleFactor, 1); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for bringing up this old PR again, I have a quick question:
Don't scale the real bitrate lower than the requested bitrate.
This means scaleFactor >= 1
, correct? Shouldn't it be Math.Max
to get that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
heck.. I got input and output inverted at that time. You are right.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we only ever increase the bitrate via this scaling (and later clamp it to any limit) this should also effectively obsolete an issue I opened #8344 🎉
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This means
scaleFactor >= 1
, correct? Shouldn't it beMath.Max
to get that?
I have noticed that the picture quality of "standard"-transcodes from hevc to h264 (for the web player) has degraded massively in version 10.8.10 and I just wanted to file an issue for this. But I think this change might be the reason, as scaleFactor
is now tied to 1. (I wonder why no one else has complained about the loss of transcoding quality yet...)
Changes
Don't scale the real bitrate lower than the requested bitrate.
Issues