mirror of
https://github.com/mpv-player/mpv
synced 2024-12-22 06:42:03 +00:00
vaapi: replace VA_STR_FOURCC
This commit is contained in:
parent
9fee7077d4
commit
453ea2cb6c
@ -283,12 +283,12 @@ static int map_image(struct gl_hwdec *hw, struct mp_image *hw_image,
|
||||
int mpfmt = va_fourcc_to_imgfmt(va_image->format.fourcc);
|
||||
if (mpfmt != IMGFMT_NV12 && mpfmt != IMGFMT_420P) {
|
||||
MP_FATAL(p, "unsupported VA image format %s\n",
|
||||
VA_STR_FOURCC(va_image->format.fourcc));
|
||||
mp_tag_str(va_image->format.fourcc));
|
||||
goto err;
|
||||
}
|
||||
|
||||
if (!hw->converted_imgfmt) {
|
||||
MP_VERBOSE(p, "format: %s %s\n", VA_STR_FOURCC(va_image->format.fourcc),
|
||||
MP_VERBOSE(p, "format: %s %s\n", mp_tag_str(va_image->format.fourcc),
|
||||
mp_imgfmt_to_name(mpfmt));
|
||||
hw->converted_imgfmt = mpfmt;
|
||||
}
|
||||
|
@ -615,7 +615,7 @@ static int preinit(struct vo *vo)
|
||||
|
||||
for (int i = 0; i < p->va_num_subpic_formats; i++) {
|
||||
MP_VERBOSE(vo, " %s, flags 0x%x\n",
|
||||
VA_STR_FOURCC(p->va_subpic_formats[i].fourcc),
|
||||
mp_tag_str(p->va_subpic_formats[i].fourcc),
|
||||
p->va_subpic_flags[i]);
|
||||
if (p->va_subpic_formats[i].fourcc == OSD_VA_FORMAT) {
|
||||
p->osd_format = p->va_subpic_formats[i];
|
||||
|
@ -104,7 +104,7 @@ static void va_get_formats(struct mp_vaapi_ctx *ctx)
|
||||
return;
|
||||
MP_VERBOSE(ctx, "%d image formats available:\n", formats->num);
|
||||
for (int i = 0; i < formats->num; i++)
|
||||
MP_VERBOSE(ctx, " %s\n", VA_STR_FOURCC(formats->entries[i].fourcc));
|
||||
MP_VERBOSE(ctx, " %s\n", mp_tag_str(formats->entries[i].fourcc));
|
||||
ctx->image_formats = formats;
|
||||
}
|
||||
|
||||
|
@ -23,9 +23,6 @@
|
||||
#include <pthread.h>
|
||||
#include <va/va.h>
|
||||
|
||||
#define VA_STR_FOURCC(fcc) \
|
||||
(const char[]){(fcc), (fcc) >> 8u, (fcc) >> 16u, (fcc) >> 24u, 0}
|
||||
|
||||
#include "mp_image.h"
|
||||
#include "hwdec.h"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user