History

csputils: add missing PL_COLOR_SYSTEM names

Kacper Michajłow committed 2 years ago

Commit 05c8d5a1 parent 391261f3 files · +19 −4Browse files

Unified · Split

3 files
  1. DOCS/man/vf.rst +7 −4
  2. video/csputils.c +9 −0
  3. video/mp_image.c +3 −0
DOCS/man/vf.rst+7−4
@@ -204,10 +204,13 @@ Available mpv-only filters are: · 203 unmodified lines
204204 Available color spaces are:
205205
206206 :auto: automatic selection (default)
207− :bt.601: ITU-R BT.601 (SD)
208− :bt.709: ITU-R BT.709 (HD)
209− :bt.2020-ncl: ITU-R BT.2020 non-constant luminance system
210− :bt.2020-cl: ITU-R BT.2020 constant luminance system
207+ :bt.601: ITU-R Rec. BT.601 (SD)
208+ :bt.709: ITU-R Rec. BT.709 (HD)
209+ :bt.2020-ncl: ITU-R Rec. BT.2020 (non-constant luminance)
210+ :bt.2020-cl: ITU-R Rec. BT.2020 (constant luminance)
211+ :bt.2100-pq: ITU-R Rec. BT.2100 ICtCp PQ variant
212+ :bt.2100-hlg: ITU-R Rec. BT.2100 ICtCp HLG variant
213+ :dolbyvision: Dolby Vision
211214 :smpte-240m: SMPTE-240M
212215
213216 ``<colorlevels>``
video/csputils.c+9−0
@@ -37,6 +37,9 @@ const struct m_opt_choice_alternatives pl_csp_names[] = { · 36 unmodified lines
3737 {"smpte-240m", PL_COLOR_SYSTEM_SMPTE_240M},
3838 {"bt.2020-ncl", PL_COLOR_SYSTEM_BT_2020_NC},
3939 {"bt.2020-cl", PL_COLOR_SYSTEM_BT_2020_C},
40+ {"bt.2100-pq", PL_COLOR_SYSTEM_BT_2100_PQ},
41+ {"bt.2100-hlg", PL_COLOR_SYSTEM_BT_2100_HLG},
42+ {"dolbyvision", PL_COLOR_SYSTEM_DOLBYVISION},
4043 {"rgb", PL_COLOR_SYSTEM_RGB},
4144 {"xyz", PL_COLOR_SYSTEM_XYZ},
4245 {"ycgco", PL_COLOR_SYSTEM_YCGCO},
@@ -315,6 +318,12 @@ void mp_get_csp_matrix(struct mp_csp_params *params, struct pl_transform3x3 *m) · 272 unmodified lines
315318 enum pl_color_system colorspace = params->repr.sys;
316319 if (colorspace <= PL_COLOR_SYSTEM_UNKNOWN || colorspace >= PL_COLOR_SYSTEM_COUNT)
317320 colorspace = PL_COLOR_SYSTEM_BT_601;
321+ // Not supported. TODO: replace with pl_color_repr_decode
322+ if (colorspace == PL_COLOR_SYSTEM_BT_2100_PQ ||
323+ colorspace == PL_COLOR_SYSTEM_BT_2100_HLG ||
324+ colorspace == PL_COLOR_SYSTEM_DOLBYVISION) {
325+ colorspace = PL_COLOR_SYSTEM_BT_2020_NC;
326+ }
318327 enum pl_color_levels levels_in = params->repr.levels;
319328 if (levels_in <= PL_COLOR_LEVELS_UNKNOWN || levels_in >= PL_COLOR_LEVELS_COUNT)
320329 levels_in = PL_COLOR_LEVELS_LIMITED;
video/mp_image.c+3−0
@@ -910,6 +910,9 @@ void mp_image_params_guess_csp(struct mp_image_params *params) · 909 unmodified lines
910910 params->repr.sys != PL_COLOR_SYSTEM_BT_709 &&
911911 params->repr.sys != PL_COLOR_SYSTEM_BT_2020_NC &&
912912 params->repr.sys != PL_COLOR_SYSTEM_BT_2020_C &&
913+ params->repr.sys != PL_COLOR_SYSTEM_BT_2100_PQ &&
914+ params->repr.sys != PL_COLOR_SYSTEM_BT_2100_HLG &&
915+ params->repr.sys != PL_COLOR_SYSTEM_DOLBYVISION &&
913916 params->repr.sys != PL_COLOR_SYSTEM_SMPTE_240M &&
914917 params->repr.sys != PL_COLOR_SYSTEM_YCGCO)
915918 {

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