History

mp_image: always force RGB formats to full-range RGB

It turns out mpv doesn't tag at all when doing conversions, so we just re-tag here and hope for the best. This should be improved, but there are many different code paths when conversion can happen, so for now revert to previous behavior.

Kacper Michajłow committed 1 year ago

Commit 96d2c041 parent c089aaa1 file · +2 −4Browse files

Unified · Split

video/mp_image.c+2−4
@@ -960,10 +960,8 @@ void mp_image_params_guess_csp(struct mp_image_params *params) · 959 unmodified lines
960960 if (params->color.transfer == PL_COLOR_TRC_UNKNOWN)
961961 params->color.transfer = PL_COLOR_TRC_BT_1886;
962962 } else if (forced_csp == PL_COLOR_SYSTEM_RGB) {
963− if (params->repr.sys == PL_COLOR_SYSTEM_UNKNOWN)
964− params->repr.sys = PL_COLOR_SYSTEM_RGB;
965− if (params->repr.levels == PL_COLOR_LEVELS_UNKNOWN)
966− params->repr.levels = PL_COLOR_LEVELS_FULL;
963+ params->repr.sys = PL_COLOR_SYSTEM_RGB;
964+ params->repr.levels = PL_COLOR_LEVELS_FULL;
967965
968966 // The majority of RGB content is either sRGB or (rarely) some other
969967 // color space which we don't even handle, like AdobeRGB or

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t