lib/igt_fb: Add support for P01x formats, v5.
The P01x formats are planar 16 bits per component, with the unused lower bits set to 0. This means they can all be converted the same way. Only the range is slightly different, and this is handled in the color_encoding implementation. This requires cairo 1.17.2 and pixman 0.36. This works but doesn't give extra precision. For more than 8 bits precision a few more patches are required to pixman, pending review: https://lists.freedesktop.org/archives/pixman/2019-January/004815.html https://lists.freedesktop.org/archives/pixman/2019-January/004809.html Once those are merged, we will require the next pixman release for better precision. Changes since v1: - Add fallback color definitions when compiling on cairo version < 1.17.2. - Skip when FB creation fails on HDR formats, instead of failing. Changes since v2: - Complain slightly harder when pixman/cairo are out of date. - Create a fb with alpha when converting to pixman formats with alpha. - Oops, s/pixman_format_code_t/cairo_format_t/ Changes since v3: - Rebase on top of upstream YUV changes. Changes since v4: - Rebase again. - Use drm_fourcc.h from drm-misc-next. Signed-off-by:Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Reviewed-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com> #v4
Showing
- configure.ac 9 additions, 2 deletionsconfigure.ac
- include/drm-uapi/drm_fourcc.h 40 additions, 0 deletionsinclude/drm-uapi/drm_fourcc.h
- lib/igt_color_encoding.c 4 additions, 0 deletionslib/igt_color_encoding.c
- lib/igt_fb.c 288 additions, 3 deletionslib/igt_fb.c
- lib/igt_fb.h 6 additions, 0 deletionslib/igt_fb.h
- meson.build 10 additions, 0 deletionsmeson.build
Loading
Please register or sign in to comment