vo_gpu_next: `background-color` is affected by gamma adjustments
mpv Information
mpv v0.40.0-443-gbbafb7488 Copyright © 2000-2025 mpv/MPlayer/mplayer2 projects
built on Nov 7 2025 02:13:28
libplacebo version: v7.357.0 (v7.351.0-89-g06992a5-dirty)
FFmpeg version: N-121682-g7435a3180
FFmpeg library versions:
libavcodec 62.19.100
libavdevice 62.2.100
libavfilter 11.9.100
libavformat 62.6.101
libavutil 60.17.100
libswresample 6.2.100
libswscale 9.3.100
Other Information
- Windows version: 10.0.26200.6901
- GPU model, driver and version: AMD latest
- Source of mpv: zhongfly
- Latest known working version: None
- Issue started after the following happened: -
Reproduction Steps
--background=color --background-color=<any near-black or grey color>
Use in combination with either one of the following:
--treat-srgb-as-power22=auto
or
--target-colorspace-hint-strict=no --target-trc=gamma2.2
Expected Behavior
Inputted RGB values for --background-color are not converted to G22 values.
Actual Behavior
Inputted values do not match the outputted values due to gamma conversion.
There could be a new renderer toggle called --blend-background=<yes|no> (default: no) that allows users to choose whether or not they want the background to be affected by color adjustment.
Log File
Sample Files
No response
I carefully read all instruction and confirm that I did the following:
- [x] I tested with the latest mpv version to validate that the issue is not already fixed.
- [x] I provided all required information including system and mpv version.
- [x] I produced the log file with the exact same set of files, parameters, and conditions used in "Reproduction Steps", with the addition of
--log-file=output.txt. - [x] I produced the log file while the behaviors described in "Actual Behavior" were actively observed.
- [x] I attached the full, untruncated log file.
- [x] I attached the backtrace in the case of a crash.
Follow-up from: https://github.com/mpv-player/mpv/pull/17009#issuecomment-3496586575
Fixed by https://code.videolan.org/videolan/libplacebo/-/merge_requests/762
That seems to only affect target-contrast, not target-trc or other options that modify target gamma values. Also, this issue isn't affected by black backgrounds anyways, since complete black is mapped to the same color values in RGB and RGB->G22.