PIPE_FORMAT_NV12,
PIPE_FORMAT_NV21,
+ /* PIPE_FORMAT_Y8_U8_V8_420_UNORM = IYUV */
+ /* PIPE_FORMAT_Y8_U8V8_420_UNORM = NV12 */
+ PIPE_FORMAT_Y8_U8_V8_422_UNORM,
+ PIPE_FORMAT_Y8_U8V8_422_UNORM,
+ PIPE_FORMAT_Y8_U8_V8_444_UNORM,
+
+ PIPE_FORMAT_Y16_U16_V16_420_UNORM,
+ /* PIPE_FORMAT_Y16_U16V16_420_UNORM */
+ PIPE_FORMAT_Y16_U16_V16_422_UNORM,
+ PIPE_FORMAT_Y16_U16V16_422_UNORM,
+ PIPE_FORMAT_Y16_U16_V16_444_UNORM,
+
PIPE_FORMAT_A4R4_UNORM,
PIPE_FORMAT_R4A4_UNORM,
PIPE_FORMAT_R8A8_UNORM,
case PIPE_FORMAT_IYUV:
case PIPE_FORMAT_P010:
case PIPE_FORMAT_P016:
+ case PIPE_FORMAT_Y16_U16_V16_420_UNORM:
return PIPE_VIDEO_CHROMA_FORMAT_420;
case PIPE_FORMAT_UYVY:
case PIPE_FORMAT_YUYV:
case PIPE_FORMAT_YV16:
+ case PIPE_FORMAT_Y8_U8_V8_422_UNORM:
+ case PIPE_FORMAT_Y8_U8V8_422_UNORM:
+ case PIPE_FORMAT_Y16_U16_V16_422_UNORM:
+ case PIPE_FORMAT_Y16_U16V16_422_UNORM:
return PIPE_VIDEO_CHROMA_FORMAT_422;
+ case PIPE_FORMAT_Y8_U8_V8_444_UNORM:
+ case PIPE_FORMAT_Y16_U16_V16_444_UNORM:
+ return PIPE_VIDEO_CHROMA_FORMAT_444;
default:
return PIPE_VIDEO_CHROMA_FORMAT_NONE;
}
PIPE_FORMAT_NV12 , planar2, 1, 1, 1, , , , , xyzw, yuv
PIPE_FORMAT_NV21 , planar2, 1, 1, 1, , , , , xyzw, yuv
+PIPE_FORMAT_Y8_U8_V8_422_UNORM , planar3, 1, 1, 1, , , , , xyzw, yuv
+PIPE_FORMAT_Y8_U8V8_422_UNORM , planar2, 1, 1, 1, , , , , xyzw, yuv
+PIPE_FORMAT_Y8_U8_V8_444_UNORM , planar3, 1, 1, 1, , , , , xyzw, yuv
+
+PIPE_FORMAT_Y16_U16_V16_420_UNORM , planar3, 1, 1, 1, , , , , xyzw, yuv
+PIPE_FORMAT_Y16_U16_V16_422_UNORM , planar3, 1, 1, 1, , , , , xyzw, yuv
+PIPE_FORMAT_Y16_U16V16_422_UNORM , planar2, 1, 1, 1, , , , , xyzw, yuv
+PIPE_FORMAT_Y16_U16_V16_444_UNORM , planar3, 1, 1, 1, , , , , xyzw, yuv
+
PIPE_FORMAT_P010 , planar2, 1, 1, 1, , , , , xyzw, yuv
PIPE_FORMAT_P016 , planar2, 1, 1, 1, , , , , xyzw, yuv
case PIPE_FORMAT_YV12:
case PIPE_FORMAT_YV16:
case PIPE_FORMAT_IYUV:
+ case PIPE_FORMAT_Y8_U8_V8_422_UNORM:
+ case PIPE_FORMAT_Y8_U8_V8_444_UNORM:
return PIPE_FORMAT_R8_UNORM;
case PIPE_FORMAT_NV12:
+ case PIPE_FORMAT_Y8_U8V8_422_UNORM:
return !plane ? PIPE_FORMAT_R8_UNORM : PIPE_FORMAT_RG88_UNORM;
case PIPE_FORMAT_NV21:
return !plane ? PIPE_FORMAT_R8_UNORM : PIPE_FORMAT_GR88_UNORM;
+ case PIPE_FORMAT_Y16_U16_V16_420_UNORM:
+ case PIPE_FORMAT_Y16_U16_V16_422_UNORM:
+ case PIPE_FORMAT_Y16_U16_V16_444_UNORM:
+ return PIPE_FORMAT_R16_UNORM;
case PIPE_FORMAT_P010:
case PIPE_FORMAT_P016:
+ case PIPE_FORMAT_Y16_U16V16_422_UNORM:
return !plane ? PIPE_FORMAT_R16_UNORM : PIPE_FORMAT_R16G16_UNORM;
default:
return format;
case PIPE_FORMAT_NV21:
case PIPE_FORMAT_P010:
case PIPE_FORMAT_P016:
+ case PIPE_FORMAT_Y8_U8_V8_422_UNORM:
+ case PIPE_FORMAT_Y8_U8V8_422_UNORM:
+ case PIPE_FORMAT_Y16_U16_V16_420_UNORM:
+ case PIPE_FORMAT_Y16_U16_V16_422_UNORM:
+ case PIPE_FORMAT_Y16_U16V16_422_UNORM:
return !plane ? width : (width + 1) / 2;
default:
return width;
case PIPE_FORMAT_NV21:
case PIPE_FORMAT_P010:
case PIPE_FORMAT_P016:
+ case PIPE_FORMAT_Y16_U16_V16_420_UNORM:
return !plane ? height : (height + 1) / 2;
case PIPE_FORMAT_YV16:
default:
void
util_format_g8r8_b8r8_unorm_fetch_rgba_float(UNUSED float *dst, UNUSED const uint8_t *src,
UNUSED unsigned i, UNUSED unsigned j) {}
+
+void
+util_format_y8_u8_v8_422_unorm_unpack_rgba_8unorm(UNUSED uint8_t *dst_row, UNUSED unsigned dst_stride,
+ UNUSED const uint8_t *src_row, UNUSED unsigned src_stride,
+ UNUSED unsigned width, UNUSED unsigned height) {}
+void
+util_format_y8_u8_v8_422_unorm_pack_rgba_8unorm(UNUSED uint8_t *dst_row, UNUSED unsigned dst_stride,
+ UNUSED const uint8_t *src_row, UNUSED unsigned src_stride,
+ UNUSED unsigned width, UNUSED unsigned height) {}
+void
+util_format_y8_u8_v8_422_unorm_unpack_rgba_float(UNUSED float *dst_row, UNUSED unsigned dst_stride,
+ UNUSED const uint8_t *src_row, UNUSED unsigned src_stride,
+ UNUSED unsigned width, UNUSED unsigned height) {}
+void
+util_format_y8_u8_v8_422_unorm_pack_rgba_float(UNUSED uint8_t *dst_row, UNUSED unsigned dst_stride,
+ UNUSED const float *src_row, UNUSED unsigned src_stride,
+ UNUSED unsigned width, UNUSED unsigned height) {}
+void
+util_format_y8_u8_v8_422_unorm_fetch_rgba_float(UNUSED float *dst, UNUSED const uint8_t *src,
+ UNUSED unsigned i, UNUSED unsigned j) {}
+
+void
+util_format_y8_u8v8_422_unorm_unpack_rgba_8unorm(UNUSED uint8_t *dst_row, UNUSED unsigned dst_stride,
+ UNUSED const uint8_t *src_row, UNUSED unsigned src_stride,
+ UNUSED unsigned width, UNUSED unsigned height) {}
+void
+util_format_y8_u8v8_422_unorm_pack_rgba_8unorm(UNUSED uint8_t *dst_row, UNUSED unsigned dst_stride,
+ UNUSED const uint8_t *src_row, UNUSED unsigned src_stride,
+ UNUSED unsigned width, UNUSED unsigned height) {}
+void
+util_format_y8_u8v8_422_unorm_unpack_rgba_float(UNUSED float *dst_row, UNUSED unsigned dst_stride,
+ UNUSED const uint8_t *src_row, UNUSED unsigned src_stride,
+ UNUSED unsigned width, UNUSED unsigned height) {}
+void
+util_format_y8_u8v8_422_unorm_pack_rgba_float(UNUSED uint8_t *dst_row, UNUSED unsigned dst_stride,
+ UNUSED const float *src_row, UNUSED unsigned src_stride,
+ UNUSED unsigned width, UNUSED unsigned height) {}
+void
+util_format_y8_u8v8_422_unorm_fetch_rgba_float(UNUSED float *dst, UNUSED const uint8_t *src,
+ UNUSED unsigned i, UNUSED unsigned j) {}
+
+void
+util_format_y8_u8_v8_444_unorm_unpack_rgba_8unorm(UNUSED uint8_t *dst_row, UNUSED unsigned dst_stride,
+ UNUSED const uint8_t *src_row, UNUSED unsigned src_stride,
+ UNUSED unsigned width, UNUSED unsigned height) {}
+void
+util_format_y8_u8_v8_444_unorm_pack_rgba_8unorm(UNUSED uint8_t *dst_row, UNUSED unsigned dst_stride,
+ UNUSED const uint8_t *src_row, UNUSED unsigned src_stride,
+ UNUSED unsigned width, UNUSED unsigned height) {}
+void
+util_format_y8_u8_v8_444_unorm_unpack_rgba_float(UNUSED float *dst_row, UNUSED unsigned dst_stride,
+ UNUSED const uint8_t *src_row, UNUSED unsigned src_stride,
+ UNUSED unsigned width, UNUSED unsigned height) {}
+void
+util_format_y8_u8_v8_444_unorm_pack_rgba_float(UNUSED uint8_t *dst_row, UNUSED unsigned dst_stride,
+ UNUSED const float *src_row, UNUSED unsigned src_stride,
+ UNUSED unsigned width, UNUSED unsigned height) {}
+void
+util_format_y8_u8_v8_444_unorm_fetch_rgba_float(UNUSED float *dst, UNUSED const uint8_t *src,
+ UNUSED unsigned i, UNUSED unsigned j) {}
+
+void
+util_format_y16_u16_v16_420_unorm_unpack_rgba_8unorm(UNUSED uint8_t *dst_row, UNUSED unsigned dst_stride,
+ UNUSED const uint8_t *src_row, UNUSED unsigned src_stride,
+ UNUSED unsigned width, UNUSED unsigned height) {}
+void
+util_format_y16_u16_v16_420_unorm_pack_rgba_8unorm(UNUSED uint8_t *dst_row, UNUSED unsigned dst_stride,
+ UNUSED const uint8_t *src_row, UNUSED unsigned src_stride,
+ UNUSED unsigned width, UNUSED unsigned height) {}
+void
+util_format_y16_u16_v16_420_unorm_unpack_rgba_float(UNUSED float *dst_row, UNUSED unsigned dst_stride,
+ UNUSED const uint8_t *src_row, UNUSED unsigned src_stride,
+ UNUSED unsigned width, UNUSED unsigned height) {}
+void
+util_format_y16_u16_v16_420_unorm_pack_rgba_float(UNUSED uint8_t *dst_row, UNUSED unsigned dst_stride,
+ UNUSED const float *src_row, UNUSED unsigned src_stride,
+ UNUSED unsigned width, UNUSED unsigned height) {}
+void
+util_format_y16_u16_v16_420_unorm_fetch_rgba_float(UNUSED float *dst, UNUSED const uint8_t *src,
+ UNUSED unsigned i, UNUSED unsigned j) {}
+
+void
+util_format_y16_u16_v16_422_unorm_unpack_rgba_8unorm(UNUSED uint8_t *dst_row, UNUSED unsigned dst_stride,
+ UNUSED const uint8_t *src_row, UNUSED unsigned src_stride,
+ UNUSED unsigned width, UNUSED unsigned height) {}
+void
+util_format_y16_u16_v16_422_unorm_pack_rgba_8unorm(UNUSED uint8_t *dst_row, UNUSED unsigned dst_stride,
+ UNUSED const uint8_t *src_row, UNUSED unsigned src_stride,
+ UNUSED unsigned width, UNUSED unsigned height) {}
+void
+util_format_y16_u16_v16_422_unorm_unpack_rgba_float(UNUSED float *dst_row, UNUSED unsigned dst_stride,
+ UNUSED const uint8_t *src_row, UNUSED unsigned src_stride,
+ UNUSED unsigned width, UNUSED unsigned height) {}
+void
+util_format_y16_u16_v16_422_unorm_pack_rgba_float(UNUSED uint8_t *dst_row, UNUSED unsigned dst_stride,
+ UNUSED const float *src_row, UNUSED unsigned src_stride,
+ UNUSED unsigned width, UNUSED unsigned height) {}
+void
+util_format_y16_u16_v16_422_unorm_fetch_rgba_float(UNUSED float *dst, UNUSED const uint8_t *src,
+ UNUSED unsigned i, UNUSED unsigned j) {}
+
+void
+util_format_y16_u16v16_422_unorm_unpack_rgba_8unorm(UNUSED uint8_t *dst_row, UNUSED unsigned dst_stride,
+ UNUSED const uint8_t *src_row, UNUSED unsigned src_stride,
+ UNUSED unsigned width, UNUSED unsigned height) {}
+void
+util_format_y16_u16v16_422_unorm_pack_rgba_8unorm(UNUSED uint8_t *dst_row, UNUSED unsigned dst_stride,
+ UNUSED const uint8_t *src_row, UNUSED unsigned src_stride,
+ UNUSED unsigned width, UNUSED unsigned height) {}
+void
+util_format_y16_u16v16_422_unorm_unpack_rgba_float(UNUSED float *dst_row, UNUSED unsigned dst_stride,
+ UNUSED const uint8_t *src_row, UNUSED unsigned src_stride,
+ UNUSED unsigned width, UNUSED unsigned height) {}
+void
+util_format_y16_u16v16_422_unorm_pack_rgba_float(UNUSED uint8_t *dst_row, UNUSED unsigned dst_stride,
+ UNUSED const float *src_row, UNUSED unsigned src_stride,
+ UNUSED unsigned width, UNUSED unsigned height) {}
+void
+util_format_y16_u16v16_422_unorm_fetch_rgba_float(UNUSED float *dst, UNUSED const uint8_t *src,
+ UNUSED unsigned i, UNUSED unsigned j) {}
+
+void
+util_format_y16_u16_v16_444_unorm_unpack_rgba_8unorm(UNUSED uint8_t *dst_row, UNUSED unsigned dst_stride,
+ UNUSED const uint8_t *src_row, UNUSED unsigned src_stride,
+ UNUSED unsigned width, UNUSED unsigned height) {}
+void
+util_format_y16_u16_v16_444_unorm_pack_rgba_8unorm(UNUSED uint8_t *dst_row, UNUSED unsigned dst_stride,
+ UNUSED const uint8_t *src_row, UNUSED unsigned src_stride,
+ UNUSED unsigned width, UNUSED unsigned height) {}
+void
+util_format_y16_u16_v16_444_unorm_unpack_rgba_float(UNUSED float *dst_row, UNUSED unsigned dst_stride,
+ UNUSED const uint8_t *src_row, UNUSED unsigned src_stride,
+ UNUSED unsigned width, UNUSED unsigned height) {}
+void
+util_format_y16_u16_v16_444_unorm_pack_rgba_float(UNUSED uint8_t *dst_row, UNUSED unsigned dst_stride,
+ UNUSED const float *src_row, UNUSED unsigned src_stride,
+ UNUSED unsigned width, UNUSED unsigned height) {}
+void
+util_format_y16_u16_v16_444_unorm_fetch_rgba_float(UNUSED float *dst, UNUSED const uint8_t *src,
+ UNUSED unsigned i, UNUSED unsigned j) {}
util_format_g8r8_b8r8_unorm_fetch_rgba_float(float *dst, const uint8_t *src,
unsigned i, unsigned j);
+void
+util_format_y8_u8_v8_422_unorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride,
+ const uint8_t *src_row, unsigned src_stride,
+ unsigned width, unsigned height);
+void
+util_format_y8_u8_v8_422_unorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride,
+ const uint8_t *src_row, unsigned src_stride,
+ unsigned width, unsigned height);
+void
+util_format_y8_u8_v8_422_unorm_unpack_rgba_float(float *dst_row, unsigned dst_stride,
+ const uint8_t *src_row, unsigned src_stride,
+ unsigned width, unsigned height);
+void
+util_format_y8_u8_v8_422_unorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride,
+ const float *src_row, unsigned src_stride,
+ unsigned width, unsigned height);
+void
+util_format_y8_u8_v8_422_unorm_fetch_rgba_float(float *dst, const uint8_t *src,
+ unsigned i, unsigned j);
+
+void
+util_format_y8_u8v8_422_unorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride,
+ const uint8_t *src_row, unsigned src_stride,
+ unsigned width, unsigned height);
+void
+util_format_y8_u8v8_422_unorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride,
+ const uint8_t *src_row, unsigned src_stride,
+ unsigned width, unsigned height);
+void
+util_format_y8_u8v8_422_unorm_unpack_rgba_float(float *dst_row, unsigned dst_stride,
+ const uint8_t *src_row, unsigned src_stride,
+ unsigned width, unsigned height);
+void
+util_format_y8_u8v8_422_unorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride,
+ const float *src_row, unsigned src_stride,
+ unsigned width, unsigned height);
+void
+util_format_y8_u8v8_422_unorm_fetch_rgba_float(float *dst, const uint8_t *src,
+ unsigned i, unsigned j);
+
+void
+util_format_y8_u8_v8_444_unorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride,
+ const uint8_t *src_row, unsigned src_stride,
+ unsigned width, unsigned height);
+void
+util_format_y8_u8_v8_444_unorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride,
+ const uint8_t *src_row, unsigned src_stride,
+ unsigned width, unsigned height);
+void
+util_format_y8_u8_v8_444_unorm_unpack_rgba_float(float *dst_row, unsigned dst_stride,
+ const uint8_t *src_row, unsigned src_stride,
+ unsigned width, unsigned height);
+void
+util_format_y8_u8_v8_444_unorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride,
+ const float *src_row, unsigned src_stride,
+ unsigned width, unsigned height);
+void
+util_format_y8_u8_v8_444_unorm_fetch_rgba_float(float *dst, const uint8_t *src,
+ unsigned i, unsigned j);
+
+void
+util_format_y16_u16_v16_420_unorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride,
+ const uint8_t *src_row, unsigned src_stride,
+ unsigned width, unsigned height);
+void
+util_format_y16_u16_v16_420_unorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride,
+ const uint8_t *src_row, unsigned src_stride,
+ unsigned width, unsigned height);
+void
+util_format_y16_u16_v16_420_unorm_unpack_rgba_float(float *dst_row, unsigned dst_stride,
+ const uint8_t *src_row, unsigned src_stride,
+ unsigned width, unsigned height);
+void
+util_format_y16_u16_v16_420_unorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride,
+ const float *src_row, unsigned src_stride,
+ unsigned width, unsigned height);
+void
+util_format_y16_u16_v16_420_unorm_fetch_rgba_float(float *dst, const uint8_t *src,
+ unsigned i, unsigned j);
+
+void
+util_format_y16_u16_v16_422_unorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride,
+ const uint8_t *src_row, unsigned src_stride,
+ unsigned width, unsigned height);
+void
+util_format_y16_u16_v16_422_unorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride,
+ const uint8_t *src_row, unsigned src_stride,
+ unsigned width, unsigned height);
+void
+util_format_y16_u16_v16_422_unorm_unpack_rgba_float(float *dst_row, unsigned dst_stride,
+ const uint8_t *src_row, unsigned src_stride,
+ unsigned width, unsigned height);
+void
+util_format_y16_u16_v16_422_unorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride,
+ const float *src_row, unsigned src_stride,
+ unsigned width, unsigned height);
+void
+util_format_y16_u16_v16_422_unorm_fetch_rgba_float(float *dst, const uint8_t *src,
+ unsigned i, unsigned j);
+
+void
+util_format_y16_u16v16_422_unorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride,
+ const uint8_t *src_row, unsigned src_stride,
+ unsigned width, unsigned height);
+void
+util_format_y16_u16v16_422_unorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride,
+ const uint8_t *src_row, unsigned src_stride,
+ unsigned width, unsigned height);
+void
+util_format_y16_u16v16_422_unorm_unpack_rgba_float(float *dst_row, unsigned dst_stride,
+ const uint8_t *src_row, unsigned src_stride,
+ unsigned width, unsigned height);
+void
+util_format_y16_u16v16_422_unorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride,
+ const float *src_row, unsigned src_stride,
+ unsigned width, unsigned height);
+void
+util_format_y16_u16v16_422_unorm_fetch_rgba_float(float *dst, const uint8_t *src,
+ unsigned i, unsigned j);
+
+void
+util_format_y16_u16_v16_444_unorm_unpack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride,
+ const uint8_t *src_row, unsigned src_stride,
+ unsigned width, unsigned height);
+void
+util_format_y16_u16_v16_444_unorm_pack_rgba_8unorm(uint8_t *dst_row, unsigned dst_stride,
+ const uint8_t *src_row, unsigned src_stride,
+ unsigned width, unsigned height);
+void
+util_format_y16_u16_v16_444_unorm_unpack_rgba_float(float *dst_row, unsigned dst_stride,
+ const uint8_t *src_row, unsigned src_stride,
+ unsigned width, unsigned height);
+void
+util_format_y16_u16_v16_444_unorm_pack_rgba_float(uint8_t *dst_row, unsigned dst_stride,
+ const float *src_row, unsigned src_stride,
+ unsigned width, unsigned height);
+void
+util_format_y16_u16_v16_444_unorm_fetch_rgba_float(float *dst, const uint8_t *src,
+ unsigned i, unsigned j);
+
#endif /* U_FORMAT_YUV_H_ */
return PIPE_FORMAT_IYUV;
case VK_FORMAT_G8_B8R8_2PLANE_420_UNORM:
return PIPE_FORMAT_NV12;
+ case VK_FORMAT_G8_B8_R8_3PLANE_422_UNORM:
+ return PIPE_FORMAT_Y8_U8_V8_422_UNORM;
+ case VK_FORMAT_G8_B8R8_2PLANE_422_UNORM:
+ return PIPE_FORMAT_Y8_U8V8_422_UNORM;
+ case VK_FORMAT_G8_B8_R8_3PLANE_444_UNORM:
+ return PIPE_FORMAT_Y8_U8_V8_444_UNORM;
+ case VK_FORMAT_G16_B16_R16_3PLANE_420_UNORM:
+ return PIPE_FORMAT_Y16_U16_V16_420_UNORM;
+ case VK_FORMAT_G16_B16R16_2PLANE_420_UNORM:
+ return PIPE_FORMAT_P016;
+ case VK_FORMAT_G16_B16_R16_3PLANE_422_UNORM:
+ return PIPE_FORMAT_Y16_U16_V16_422_UNORM;
+ case VK_FORMAT_G16_B16R16_2PLANE_422_UNORM:
+ return PIPE_FORMAT_Y16_U16V16_422_UNORM;
+ case VK_FORMAT_G16_B16_R16_3PLANE_444_UNORM:
+ return PIPE_FORMAT_Y16_U16_V16_444_UNORM;
default:
return PIPE_FORMAT_NONE;
}