test: di_info_get_supported_signal_colorimetry()

Notifies us if the result ever changes.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
This commit is contained in:
Pekka Paalanen 2023-07-06 16:23:15 +03:00
parent af7d091dc9
commit 0de6fd5f10
23 changed files with 38 additions and 0 deletions

View file

@ -10,3 +10,4 @@ default color primaries:
green: 0.300, 0.600 green: 0.300, 0.600
blue: 0.150, 0.060 blue: 0.150, 0.060
default white: 0.313, 0.329 default white: 0.313, 0.329
signal colorimetry:

View file

@ -10,3 +10,4 @@ default color primaries:
green: 0.265, 0.690 green: 0.265, 0.690
blue: 0.150, 0.060 blue: 0.150, 0.060
default white: 0.312, 0.329 default white: 0.312, 0.329
signal colorimetry: BT2020_RGB

View file

@ -10,3 +10,4 @@ default color primaries:
green: 0.324, 0.613 green: 0.324, 0.613
blue: 0.157, 0.049 blue: 0.157, 0.049
default white: 0.313, 0.329 default white: 0.313, 0.329
signal colorimetry:

View file

@ -10,3 +10,4 @@ default color primaries:
green: 0.300, 0.600 green: 0.300, 0.600
blue: 0.150, 0.060 blue: 0.150, 0.060
default white: 0.313, 0.329 default white: 0.313, 0.329
signal colorimetry:

View file

@ -10,3 +10,4 @@ default color primaries:
green: 0.300, 0.600 green: 0.300, 0.600
blue: 0.150, 0.060 blue: 0.150, 0.060
default white: 0.313, 0.329 default white: 0.313, 0.329
signal colorimetry:

View file

@ -10,3 +10,4 @@ default color primaries:
green: 0.300, 0.600 green: 0.300, 0.600
blue: 0.150, 0.060 blue: 0.150, 0.060
default white: 0.313, 0.329 default white: 0.313, 0.329
signal colorimetry:

View file

@ -10,3 +10,4 @@ default color primaries:
green: 0.300, 0.600 green: 0.300, 0.600
blue: 0.150, 0.060 blue: 0.150, 0.060
default white: 0.313, 0.329 default white: 0.313, 0.329
signal colorimetry:

View file

@ -10,3 +10,4 @@ default color primaries:
green: 0.188, 0.706 green: 0.188, 0.706
blue: 0.148, 0.064 blue: 0.148, 0.064
default white: 0.313, 0.329 default white: 0.313, 0.329
signal colorimetry:

View file

@ -10,3 +10,4 @@ default color primaries:
green: 0.335, 0.608 green: 0.335, 0.608
blue: 0.145, 0.058 blue: 0.145, 0.058
default white: 0.313, 0.329 default white: 0.313, 0.329
signal colorimetry:

View file

@ -10,3 +10,4 @@ default color primaries:
green: 0.287, 0.610 green: 0.287, 0.610
blue: 0.146, 0.069 blue: 0.146, 0.069
default white: 0.285, 0.293 default white: 0.285, 0.293
signal colorimetry:

View file

@ -10,3 +10,4 @@ default color primaries:
green: 0.322, 0.623 green: 0.322, 0.623
blue: 0.146, 0.056 blue: 0.146, 0.056
default white: 0.280, 0.290 default white: 0.280, 0.290
signal colorimetry: BT2020_YCC BT2020_RGB

View file

@ -10,3 +10,4 @@ default color primaries:
green: 0.289, 0.644 green: 0.289, 0.644
blue: 0.149, 0.051 blue: 0.149, 0.051
default white: 0.313, 0.329 default white: 0.313, 0.329
signal colorimetry: BT2020_cYCC BT2020_YCC BT2020_RGB

View file

@ -10,3 +10,4 @@ default color primaries:
green: 0.300, 0.600 green: 0.300, 0.600
blue: 0.150, 0.060 blue: 0.150, 0.060
default white: 0.313, 0.329 default white: 0.313, 0.329
signal colorimetry: BT2020_cYCC BT2020_YCC BT2020_RGB

View file

@ -10,3 +10,4 @@ default color primaries:
green: 0.295, 0.608 green: 0.295, 0.608
blue: 0.153, 0.061 blue: 0.153, 0.061
default white: 0.313, 0.329 default white: 0.313, 0.329
signal colorimetry:

View file

@ -10,3 +10,4 @@ default color primaries:
green: 0.272, 0.593 green: 0.272, 0.593
blue: 0.144, 0.066 blue: 0.144, 0.066
default white: 0.276, 0.278 default white: 0.276, 0.278
signal colorimetry:

View file

@ -10,3 +10,4 @@ default color primaries:
green: 0.324, 0.589 green: 0.324, 0.589
blue: 0.145, 0.051 blue: 0.145, 0.051
default white: 0.280, 0.290 default white: 0.280, 0.290
signal colorimetry: BT2020_YCC BT2020_RGB

View file

@ -10,3 +10,4 @@ default color primaries:
green: 0.300, 0.600 green: 0.300, 0.600
blue: 0.150, 0.060 blue: 0.150, 0.060
default white: 0.313, 0.329 default white: 0.313, 0.329
signal colorimetry:

View file

@ -10,3 +10,4 @@ default color primaries:
green: 0.271, 0.645 green: 0.271, 0.645
blue: 0.152, 0.054 blue: 0.152, 0.054
default white: 0.281, 0.284 default white: 0.281, 0.284
signal colorimetry:

View file

@ -10,3 +10,4 @@ default color primaries:
green: 0.289, 0.609 green: 0.289, 0.609
blue: 0.146, 0.070 blue: 0.146, 0.070
default white: 0.312, 0.329 default white: 0.312, 0.329
signal colorimetry:

View file

@ -10,3 +10,4 @@ default color primaries:
green: 0.300, 0.600 green: 0.300, 0.600
blue: 0.150, 0.066 blue: 0.150, 0.066
default white: 0.313, 0.328 default white: 0.313, 0.328
signal colorimetry:

View file

@ -10,3 +10,4 @@ default color primaries:
green: 0.280, 0.595 green: 0.280, 0.595
blue: 0.155, 0.070 blue: 0.155, 0.070
default white: 0.283, 0.298 default white: 0.283, 0.298
signal colorimetry:

View file

@ -10,3 +10,4 @@ default color primaries:
green: 0.300, 0.600 green: 0.300, 0.600
blue: 0.150, 0.060 blue: 0.150, 0.060
default white: 0.313, 0.329 default white: 0.313, 0.329
signal colorimetry:

View file

@ -29,6 +29,7 @@ print_info(const struct di_info *info)
{ {
const struct di_hdr_static_metadata *hdr_static; const struct di_hdr_static_metadata *hdr_static;
const struct di_color_primaries *primaries; const struct di_color_primaries *primaries;
const struct di_supported_signal_colorimetry *ssc;
char *str; char *str;
str = di_info_get_make(info); str = di_info_get_make(info);
@ -65,6 +66,21 @@ print_info(const struct di_info *info)
print_chromaticity(" green", &primaries->primary[1]); print_chromaticity(" green", &primaries->primary[1]);
print_chromaticity(" blue", &primaries->primary[2]); print_chromaticity(" blue", &primaries->primary[2]);
print_chromaticity("default white", &primaries->default_white); print_chromaticity("default white", &primaries->default_white);
ssc = di_info_get_supported_signal_colorimetry(info);
assert(ssc);
printf("signal colorimetry:");
if (ssc->bt2020_cycc)
printf(" BT2020_cYCC");
if (ssc->bt2020_ycc)
printf(" BT2020_YCC");
if (ssc->bt2020_rgb)
printf(" BT2020_RGB");
if (ssc->st2113_rgb)
printf(" P3D65+P3DCI");
if (ssc->ictcp)
printf(" ICtCp");
printf("\n");
} }
int int