pipewire/spa/plugins/vulkan/pixel-formats.h
columbarius c3327742cc vulkan: Add pixel-formats to query format properties
We need a database of pixel format properties to remove hardcoded magic
numbers. This commit creates a simple function to query the bytes per
pixel for common RGBA formats.

This should be promoted to or superseeded by a common spa namespaced
version.
2024-01-22 14:00:41 +00:00

12 lines
290 B
C

/* Spa */
/* SPDX-FileCopyrightText: Copyright © 2023 columbarius */
/* SPDX-License-Identifier: MIT */
#include <stdint.h>
#include <stdbool.h>
struct pixel_format_info {
uint32_t bpp; // bytes per pixel
};
bool get_pixel_format_info(uint32_t format, struct pixel_format_info *info);