Skip to content

Commit

Permalink
hwdec_drmprime: add P010 and P210 support
Browse files Browse the repository at this point in the history
  • Loading branch information
boogieeeee authored and philipl committed Jan 28, 2024
1 parent c6ccabe commit d90a5ff
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions video/out/hwdec/dmabuf_interop_gl.c
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,7 @@ static bool vaapi_gl_map(struct ra_hwdec_mapper *mapper,
format[2] = DRM_FORMAT_R8;
break;
case DRM_FORMAT_P010:
case DRM_FORMAT_P210:
#ifdef DRM_FORMAT_P030 /* Format added in a newer libdrm version than minimum */
case DRM_FORMAT_P030:
#endif
Expand Down
2 changes: 2 additions & 0 deletions video/out/hwdec/hwdec_drmprime.c
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,8 @@ static int init(struct ra_hwdec *hw)
MP_TARRAY_APPEND(p, p->formats, num_formats, IMGFMT_NV12);
MP_TARRAY_APPEND(p, p->formats, num_formats, IMGFMT_420P);
MP_TARRAY_APPEND(p, p->formats, num_formats, pixfmt2imgfmt(AV_PIX_FMT_NV16));
MP_TARRAY_APPEND(p, p->formats, num_formats, IMGFMT_P010);
MP_TARRAY_APPEND(p, p->formats, num_formats, pixfmt2imgfmt(AV_PIX_FMT_P210));

for (int i = 0; i < MP_ARRAY_SIZE(forked_pix_fmt_names); i++) {
enum AVPixelFormat fmt = av_get_pix_fmt(forked_pix_fmt_names[i]);
Expand Down

0 comments on commit d90a5ff

Please sign in to comment.