Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
swscale/utils: override forced-zero formats back to full range
Fixes vf_scale outputting RGB AVFrames with limited range flagged in case either input or output specifically sets the range. This is the reverse of the logic utilized for RGB and PAL8 content in sws_setColorspaceDetails.
- Loading branch information
7ea4bcfThere 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.
As noted in the commit message, this logic just mirrors what
sws_setColorspaceDetailsalready did. It would forcibly set dstRange and srcRange to zero for!isYUV(format) && !isGray(format). So the input range information was lost /way/ before this point.This just fixes swscale always reporting the range as being limited for RGB. I did attempt to change swscale to report the actual range given to it, but the RGB behavior would break at the very least in alpha handling if I did so. Thus I gave up.