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
204 Available color spaces are:204 Available color spaces are:
205 205
206 :auto: automatic selection (default)206 :auto: automatic selection (default)
207 :bt.601: ITU-R BT.601 (SD)207 :bt.601: ITU-R Rec. BT.601 (SD)
208 :bt.709: ITU-R BT.709 (HD)208 :bt.709: ITU-R Rec. BT.709 (HD)
209 :bt.2020-ncl: ITU-R BT.2020 non-constant luminance system209 :bt.2020-ncl: ITU-R Rec. BT.2020 (non-constant luminance)
210 :bt.2020-cl: ITU-R BT.2020 constant luminance system210 :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
211 :smpte-240m: SMPTE-240M214 :smpte-240m: SMPTE-240M
212 215
213 ``<colorlevels>``216 ``<colorlevels>``
video/csputils.c+9−0
@@ -37,6 +37,9 @@ const struct m_opt_choice_alternatives pl_csp_names[] = { · 36 unmodified lines
37 {"smpte-240m", PL_COLOR_SYSTEM_SMPTE_240M},37 {"smpte-240m", PL_COLOR_SYSTEM_SMPTE_240M},
38 {"bt.2020-ncl", PL_COLOR_SYSTEM_BT_2020_NC},38 {"bt.2020-ncl", PL_COLOR_SYSTEM_BT_2020_NC},
39 {"bt.2020-cl", PL_COLOR_SYSTEM_BT_2020_C},39 {"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},
40 {"rgb", PL_COLOR_SYSTEM_RGB},43 {"rgb", PL_COLOR_SYSTEM_RGB},
41 {"xyz", PL_COLOR_SYSTEM_XYZ},44 {"xyz", PL_COLOR_SYSTEM_XYZ},
42 {"ycgco", PL_COLOR_SYSTEM_YCGCO},45 {"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
315 enum pl_color_system colorspace = params->repr.sys;318 enum pl_color_system colorspace = params->repr.sys;
316 if (colorspace <= PL_COLOR_SYSTEM_UNKNOWN || colorspace >= PL_COLOR_SYSTEM_COUNT)319 if (colorspace <= PL_COLOR_SYSTEM_UNKNOWN || colorspace >= PL_COLOR_SYSTEM_COUNT)
317 colorspace = PL_COLOR_SYSTEM_BT_601;320 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 }
318 enum pl_color_levels levels_in = params->repr.levels;327 enum pl_color_levels levels_in = params->repr.levels;
319 if (levels_in <= PL_COLOR_LEVELS_UNKNOWN || levels_in >= PL_COLOR_LEVELS_COUNT)328 if (levels_in <= PL_COLOR_LEVELS_UNKNOWN || levels_in >= PL_COLOR_LEVELS_COUNT)
320 levels_in = PL_COLOR_LEVELS_LIMITED;329 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
910 params->repr.sys != PL_COLOR_SYSTEM_BT_709 &&910 params->repr.sys != PL_COLOR_SYSTEM_BT_709 &&
911 params->repr.sys != PL_COLOR_SYSTEM_BT_2020_NC &&911 params->repr.sys != PL_COLOR_SYSTEM_BT_2020_NC &&
912 params->repr.sys != PL_COLOR_SYSTEM_BT_2020_C &&912 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 &&
913 params->repr.sys != PL_COLOR_SYSTEM_SMPTE_240M &&916 params->repr.sys != PL_COLOR_SYSTEM_SMPTE_240M &&
914 params->repr.sys != PL_COLOR_SYSTEM_YCGCO)917 params->repr.sys != PL_COLOR_SYSTEM_YCGCO)
915 {918 {

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