Commit ed8b58eb authored by Thomas Guillem's avatar Thomas Guillem

hw: vaapi: add 10 bits support

parent 7a46400e
......@@ -64,6 +64,10 @@ vlc_chroma_to_vaapi(int i_vlc_chroma, unsigned *va_rt_format, int *va_fourcc)
*va_rt_format = VA_RT_FORMAT_YUV420;
*va_fourcc = VA_FOURCC_NV12;
break;
case VLC_CODEC_VAAPI_420_10BPP:
*va_rt_format = VA_RT_FORMAT_YUV420_10BPP;
*va_fourcc = VA_FOURCC_P010;
break;
default:
vlc_assert_unreachable();
}
......@@ -414,9 +418,9 @@ vlc_vaapi_CreateConfigChecked(vlc_object_t *o, VADisplay dpy,
}
/* Not sure what to do if not, I don't have a way to test */
if ((attrib.value & VA_RT_FORMAT_YUV420) == 0)
if ((attrib.value & (VA_RT_FORMAT_YUV420|VA_RT_FORMAT_YUV420_10BPP)) == 0)
{
msg_Err(o, "config doesn't support VA_RT_FORMAT_YUV420");
msg_Err(o, "config doesn't support VA_RT_FORMAT_YUV420*");
return VA_INVALID_ID;
}
......
......@@ -27,6 +27,14 @@
#include <va/va.h>
#ifndef VA_RT_FORMAT_YUV420_10BPP
# define VA_RT_FORMAT_YUV420_10BPP 0x00000100
#endif
#ifndef VA_FOURCC_P010
#define VA_FOURCC_P010 0x30313050
#endif
#include <vlc_common.h>
#include <vlc_fourcc.h>
#include <vlc_picture_pool.h>
......@@ -208,7 +216,8 @@ vlc_vaapi_PicGetDisplay(picture_t *pic);
static inline bool
vlc_vaapi_IsChromaOpaque(int i_vlc_chroma)
{
return i_vlc_chroma == VLC_CODEC_VAAPI_420;
return i_vlc_chroma == VLC_CODEC_VAAPI_420
|| i_vlc_chroma == VLC_CODEC_VAAPI_420_10BPP;
}
#endif /* VLC_VAAPI_H */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment