From e66adb6b08ed430983ff8d95c63846dc3403347b Mon Sep 17 00:00:00 2001 From: Wang Hangjie Date: Mon, 28 Oct 2024 22:44:44 -0700 Subject: [PATCH 1/2] [caps] add BMG platform support Signed-off-by: Wang Hangjie --- lib/caps/BMG/d3d11 | 110 ++++++++++++++++++++++++++++++++++++++++++++ lib/caps/BMG/d3d12 | 110 ++++++++++++++++++++++++++++++++++++++++++++ lib/caps/BMG/iHD | 109 +++++++++++++++++++++++++++++++++++++++++++ lib/caps/BMG/info | 13 ++++++ lib/caps/BMG/vaon12 | 69 +++++++++++++++++++++++++++ 5 files changed, 411 insertions(+) create mode 100644 lib/caps/BMG/d3d11 create mode 100644 lib/caps/BMG/d3d12 create mode 100644 lib/caps/BMG/iHD create mode 100644 lib/caps/BMG/info create mode 100644 lib/caps/BMG/vaon12 diff --git a/lib/caps/BMG/d3d11 b/lib/caps/BMG/d3d11 new file mode 100644 index 00000000..b88aa5b4 --- /dev/null +++ b/lib/caps/BMG/d3d11 @@ -0,0 +1,110 @@ +### +### Copyright (C) 2024 Intel Corporation +### +### SPDX-License-Identifier: BSD-3-Clause +### + +### +### kate: syntax python; +### + +# https://github.com/intel/media-driver/blob/master/docs/media_features.md +caps = dict( + decode = dict( + avc = dict(maxres = res4k , fmts = ["NV12"]), + mpeg2 = dict(maxres = res2k , fmts = ["NV12"]), + jpeg = dict(maxres = res16k, fmts = ["NV12", "411P", "422H", "422V", "444P", "Y800"]), + hevc_8 = dict( + maxres = res8k, + fmts = ["NV12", "YUY2", "AYUV"], + features = dict(scc = True, msp = True), + ), + hevc_10 = dict(maxres = res8k , fmts = ["P010", "Y210", "Y410"]), + hevc_12 = dict(maxres = res8k , fmts = ["P012", "Y212", "Y412"]), + vp9_8 = dict(maxres = res8k , fmts = ["NV12", "AYUV"]), + vp9_10 = dict(maxres = res8k , fmts = ["P010", "Y410"]), + vp9_12 = dict(maxres = res8k , fmts = ["P012", "Y412"]), + av1_8 = dict(maxres = res8k , fmts = ["NV12"]), + av1_10 = dict(maxres = res8k , fmts = ["P010"]), + ), + encode = dict( + avc = dict(maxres = res4k , fmts = ["NV12", "YUY2", "YUYV", "YVYU", "UYVY", "AYUV"]), + hevc_8 = dict( + maxres = res8k, + fmts = ["NV12", "AYUV"], + features = dict(scc = True), + ), + hevc_10 = dict(maxres = res8k , fmts = ["P010", "Y410"]), + vp9_8 = dict(maxres = res8k , fmts = ["NV12", "AYUV"]), + av1_8 = dict( + maxres = res8k, + fmts = ["NV12"], + ), + av1_10 = dict( + maxres = res8k, + fmts = ["P010"], + ), + vp9_10 = dict(maxres = res8k , fmts = ["P010", "Y410"]), + ), + vdenc = dict( + jpeg = dict(maxres = res16k, fmts = ["NV12", "YUY2", "UYVY", "Y800"]), + ), + vpp = dict( + # brightness, contrast, hue and saturation + procamp = dict( + ifmts = ["NV12", "P010", "YUY2", "Y210", "AYUV", "Y410"], + ofmts = ["NV12", "P010", "YUY2", "Y210", "AYUV", "Y410", "BGRA"], + ), + # mirroring and rotation + transpose = dict( + ifmts = ["NV12", "YV12", "I420", "P010", "YUY2", "UYVY", "Y210", "AYUV", "Y410", "BGRA"], + ofmts = ["NV12", "YV12", "I420", "P010", "YUY2", "Y210", "AYUV", "Y410", "BGRA"], + ), + crop = dict( + ifmts = ["NV12", "YV12", "I420", "P010", "YUY2", "UYVY", "AYUV", "Y410", "BGRA"], + ofmts = ["NV12", "YV12", "I420", "P010", "YUY2", "AYUV", "Y410", "BGRA"], + ), + sharpen = dict( + ifmts = ["NV12", "P010", "YUY2", "UYVY", "AYUV", "Y410", "BGRA"], + ofmts = ["NV12", "P010", "YUY2", "AYUV", "Y410", "BGRA"], + ), + deinterlace = dict( + bob = dict( + ifmts = ["NV12", "YV12", "P010", "YUY2"], + ofmts = ["NV12", "YV12", "P010", "YUY2"], + ), + motion_adaptive = dict( + ifmts = ["NV12", "P010", "YUY2"], + ofmts = ["NV12", "P010", "YUY2"], + ), + ), + denoise = dict( + ifmts = ["NV12", "P010", "YUY2"], + ofmts = ["NV12", "P010", "YUY2"], + ), + scale = dict( + ifmts = ["NV12", "YV12", "I420", "P010", "YUY2", "UYVY", "Y210", "AYUV", "Y410", "BGRA"], + ofmts = ["NV12", "YV12", "I420", "P010", "YUY2", "Y210", "AYUV", "Y410", "BGRA"], + ), + # colorspace conversion + csc = dict( + ifmts = ["NV12", "YV12", "I420", "P010", "YUY2", "UYVY", "Y210", "AYUV", "Y410", "BGRA"], + ofmts = ["NV12", "YV12", "I420", "P010", "YUY2", "Y210", "AYUV", "Y410", "BGRA", "BGRX"], + ), + blend = dict( + ifmts = ["NV12", "YV12", "I420", "P010", "YUY2", "UYVY", "Y210", "AYUV", "Y410", "BGRA"], + ofmts = ["NV12", "YV12", "I420", "P010", "YUY2", "Y210", "AYUV", "Y410", "BGRA", "BGRX"], + ), + # tonemap + tonemap = dict( + h2s = dict( + ifmts = ["P010"], + ofmts = ["NV12", "P010"], + ), + ), + range = dict( + ifmts = ["NV12", "P010"], + ofmts = ["NV12", "P010"], + ), + ), +) diff --git a/lib/caps/BMG/d3d12 b/lib/caps/BMG/d3d12 new file mode 100644 index 00000000..b88aa5b4 --- /dev/null +++ b/lib/caps/BMG/d3d12 @@ -0,0 +1,110 @@ +### +### Copyright (C) 2024 Intel Corporation +### +### SPDX-License-Identifier: BSD-3-Clause +### + +### +### kate: syntax python; +### + +# https://github.com/intel/media-driver/blob/master/docs/media_features.md +caps = dict( + decode = dict( + avc = dict(maxres = res4k , fmts = ["NV12"]), + mpeg2 = dict(maxres = res2k , fmts = ["NV12"]), + jpeg = dict(maxres = res16k, fmts = ["NV12", "411P", "422H", "422V", "444P", "Y800"]), + hevc_8 = dict( + maxres = res8k, + fmts = ["NV12", "YUY2", "AYUV"], + features = dict(scc = True, msp = True), + ), + hevc_10 = dict(maxres = res8k , fmts = ["P010", "Y210", "Y410"]), + hevc_12 = dict(maxres = res8k , fmts = ["P012", "Y212", "Y412"]), + vp9_8 = dict(maxres = res8k , fmts = ["NV12", "AYUV"]), + vp9_10 = dict(maxres = res8k , fmts = ["P010", "Y410"]), + vp9_12 = dict(maxres = res8k , fmts = ["P012", "Y412"]), + av1_8 = dict(maxres = res8k , fmts = ["NV12"]), + av1_10 = dict(maxres = res8k , fmts = ["P010"]), + ), + encode = dict( + avc = dict(maxres = res4k , fmts = ["NV12", "YUY2", "YUYV", "YVYU", "UYVY", "AYUV"]), + hevc_8 = dict( + maxres = res8k, + fmts = ["NV12", "AYUV"], + features = dict(scc = True), + ), + hevc_10 = dict(maxres = res8k , fmts = ["P010", "Y410"]), + vp9_8 = dict(maxres = res8k , fmts = ["NV12", "AYUV"]), + av1_8 = dict( + maxres = res8k, + fmts = ["NV12"], + ), + av1_10 = dict( + maxres = res8k, + fmts = ["P010"], + ), + vp9_10 = dict(maxres = res8k , fmts = ["P010", "Y410"]), + ), + vdenc = dict( + jpeg = dict(maxres = res16k, fmts = ["NV12", "YUY2", "UYVY", "Y800"]), + ), + vpp = dict( + # brightness, contrast, hue and saturation + procamp = dict( + ifmts = ["NV12", "P010", "YUY2", "Y210", "AYUV", "Y410"], + ofmts = ["NV12", "P010", "YUY2", "Y210", "AYUV", "Y410", "BGRA"], + ), + # mirroring and rotation + transpose = dict( + ifmts = ["NV12", "YV12", "I420", "P010", "YUY2", "UYVY", "Y210", "AYUV", "Y410", "BGRA"], + ofmts = ["NV12", "YV12", "I420", "P010", "YUY2", "Y210", "AYUV", "Y410", "BGRA"], + ), + crop = dict( + ifmts = ["NV12", "YV12", "I420", "P010", "YUY2", "UYVY", "AYUV", "Y410", "BGRA"], + ofmts = ["NV12", "YV12", "I420", "P010", "YUY2", "AYUV", "Y410", "BGRA"], + ), + sharpen = dict( + ifmts = ["NV12", "P010", "YUY2", "UYVY", "AYUV", "Y410", "BGRA"], + ofmts = ["NV12", "P010", "YUY2", "AYUV", "Y410", "BGRA"], + ), + deinterlace = dict( + bob = dict( + ifmts = ["NV12", "YV12", "P010", "YUY2"], + ofmts = ["NV12", "YV12", "P010", "YUY2"], + ), + motion_adaptive = dict( + ifmts = ["NV12", "P010", "YUY2"], + ofmts = ["NV12", "P010", "YUY2"], + ), + ), + denoise = dict( + ifmts = ["NV12", "P010", "YUY2"], + ofmts = ["NV12", "P010", "YUY2"], + ), + scale = dict( + ifmts = ["NV12", "YV12", "I420", "P010", "YUY2", "UYVY", "Y210", "AYUV", "Y410", "BGRA"], + ofmts = ["NV12", "YV12", "I420", "P010", "YUY2", "Y210", "AYUV", "Y410", "BGRA"], + ), + # colorspace conversion + csc = dict( + ifmts = ["NV12", "YV12", "I420", "P010", "YUY2", "UYVY", "Y210", "AYUV", "Y410", "BGRA"], + ofmts = ["NV12", "YV12", "I420", "P010", "YUY2", "Y210", "AYUV", "Y410", "BGRA", "BGRX"], + ), + blend = dict( + ifmts = ["NV12", "YV12", "I420", "P010", "YUY2", "UYVY", "Y210", "AYUV", "Y410", "BGRA"], + ofmts = ["NV12", "YV12", "I420", "P010", "YUY2", "Y210", "AYUV", "Y410", "BGRA", "BGRX"], + ), + # tonemap + tonemap = dict( + h2s = dict( + ifmts = ["P010"], + ofmts = ["NV12", "P010"], + ), + ), + range = dict( + ifmts = ["NV12", "P010"], + ofmts = ["NV12", "P010"], + ), + ), +) diff --git a/lib/caps/BMG/iHD b/lib/caps/BMG/iHD new file mode 100644 index 00000000..3d8b2fcc --- /dev/null +++ b/lib/caps/BMG/iHD @@ -0,0 +1,109 @@ +### +### Copyright (C) 2024 Intel Corporation +### +### SPDX-License-Identifier: BSD-3-Clause +### + +### +### kate: syntax python; +### + +# https://github.com/intel/media-driver/blob/master/docs/media_features.md +caps = dict( + decode = dict( + avc = dict(maxres = res4k , fmts = ["NV12"]), + mpeg2 = dict(maxres = res2k , fmts = ["NV12"]), + jpeg = dict(maxres = res16k, fmts = ["NV12", "411P", "422H", "422V", "444P", "Y800"]), + hevc_8 = dict( + maxres = res8k, + fmts = ["NV12", "YUY2", "AYUV"], + features = dict(scc = True, msp = True), + ), + hevc_10 = dict(maxres = res8k , fmts = ["P010", "Y210", "Y410"]), + hevc_12 = dict(maxres = res8k , fmts = ["P012", "Y212", "Y412"]), + vp8 = dict(maxres = res4k , fmts = ["NV12"]), + vp9_8 = dict(maxres = res8k , fmts = ["NV12", "AYUV"]), + vp9_10 = dict(maxres = res8k , fmts = ["P010", "Y410"]), + vp9_12 = dict(maxres = res8k , fmts = ["P012", "Y412"]), + av1_8 = dict(maxres = res8k , fmts = ["NV12"]), + av1_10 = dict(maxres = res8k , fmts = ["P010"]), + ), + encode = dict( + avc = dict(maxres = res4k , fmts = ["NV12", "YUY2", "YUYV", "YVYU", "UYVY", "AYUV"]), + hevc_8 = dict( + maxres = res8k, + fmts = ["NV12", "AYUV"], + features = dict(scc = True), + ), + hevc_10 = dict(maxres = res8k , fmts = ["P010", "Y410"]), + av1_8 = dict( + maxres = res8k, + fmts = ["NV12"], + ), + av1_10 = dict( + maxres = res8k, + fmts = ["P010"], + ), + ), + vdenc = dict( + jpeg = dict(maxres = res16k, fmts = ["NV12", "YUY2", "UYVY", "Y800"]), + ), + vpp = dict( + # brightness, contrast, hue and saturation + procamp = dict( + ifmts = ["NV12", "P010", "YUY2", "Y210", "AYUV", "Y410"], + ofmts = ["NV12", "P010", "YUY2", "Y210", "AYUV", "Y410", "BGRA"], + ), + # mirroring and rotation + transpose = dict( + ifmts = ["NV12", "YV12", "I420", "P010", "YUY2", "UYVY", "Y210", "AYUV", "Y410", "BGRA"], + ofmts = ["NV12", "YV12", "I420", "P010", "YUY2", "Y210", "AYUV", "Y410", "BGRA"], + ), + crop = dict( + ifmts = ["NV12", "YV12", "I420", "P010", "YUY2", "UYVY", "AYUV", "Y410", "BGRA"], + ofmts = ["NV12", "YV12", "I420", "P010", "YUY2", "AYUV", "Y410", "BGRA"], + ), + sharpen = dict( + ifmts = ["NV12", "P010", "YUY2", "UYVY", "AYUV", "Y410", "BGRA"], + ofmts = ["NV12", "P010", "YUY2", "AYUV", "Y410", "BGRA"], + ), + deinterlace = dict( + bob = dict( + ifmts = ["NV12", "YV12", "P010", "YUY2"], + ofmts = ["NV12", "YV12", "P010", "YUY2"], + ), + motion_adaptive = dict( + ifmts = ["NV12", "P010", "YUY2"], + ofmts = ["NV12", "P010", "YUY2"], + ), + ), + denoise = dict( + ifmts = ["NV12", "P010", "YUY2"], + ofmts = ["NV12", "P010", "YUY2"], + ), + scale = dict( + ifmts = ["NV12", "YV12", "I420", "P010", "YUY2", "UYVY", "Y210", "AYUV", "Y410", "BGRA"], + ofmts = ["NV12", "YV12", "I420", "P010", "YUY2", "Y210", "AYUV", "Y410", "BGRA"], + ), + # colorspace conversion + csc = dict( + ifmts = ["NV12", "YV12", "I420", "P010", "YUY2", "UYVY", "Y210", "AYUV", "Y410", "BGRA"], + ofmts = ["NV12", "YV12", "I420", "P010", "YUY2", "Y210", "AYUV", "Y410", "BGRA", "BGRX"], + ), + blend = dict( + ifmts = ["NV12", "YV12", "I420", "P010", "YUY2", "UYVY", "Y210", "AYUV", "Y410", "BGRA"], + ofmts = ["NV12", "YV12", "I420", "P010", "YUY2", "Y210", "AYUV", "Y410", "BGRA", "BGRX"], + ), + # tonemap + tonemap = dict( + h2s = dict( + ifmts = ["P010"], + ofmts = ["NV12", "P010"], + ), + ), + range = dict( + ifmts = ["NV12", "P010"], + ofmts = ["NV12", "P010"], + ), + ), +) diff --git a/lib/caps/BMG/info b/lib/caps/BMG/info new file mode 100644 index 00000000..8a0fb9fd --- /dev/null +++ b/lib/caps/BMG/info @@ -0,0 +1,13 @@ +### +### Copyright (C) 2024 Intel Corporation +### +### SPDX-License-Identifier: BSD-3-Clause +### + +### +### kate: syntax python; +### + +info = dict( + gpu = dict(gen = 13), +) diff --git a/lib/caps/BMG/vaon12 b/lib/caps/BMG/vaon12 new file mode 100644 index 00000000..2638a293 --- /dev/null +++ b/lib/caps/BMG/vaon12 @@ -0,0 +1,69 @@ +### +### Copyright (C) 2024 Intel Corporation +### +### SPDX-License-Identifier: BSD-3-Clause +### + +### +### kate: syntax python; +### + +# https://github.com/intel/media-driver/blob/master/docs/media_features.md +caps = dict( + decode = dict( + avc = dict(minres = res64, maxres = res4k, fmts = ["NV12"]), + hevc_8 = dict( + minres = res64, + maxres = res16k, + fmts = ["NV12"], + features = dict(scc = False, msp = True), + ), + hevc_10 = dict(minres = res64, maxres = res16k , fmts = ["P010"]), + vp9_8 = dict(minres = res64, maxres = res16k , fmts = ["NV12"]), + vp9_10 = dict(minres = res64, maxres = res16k , fmts = ["P010"]), + av1_8 = dict(minres = res64, maxres = res16k , fmts = ["NV12"]), + av1_10 = dict(minres = res64, maxres = res16k , fmts = ["P010"]), + ), + encode = dict( + avc = dict(maxres = res4k , fmts = ["NV12"], bframes = False), + hevc_8 = dict( + maxres = res16k, + fmts = ["NV12"], + features = dict(scc = False), + ), + hevc_10 = dict(maxres = res16k , fmts = ["P010"]), + av1_8 = dict( + maxres = res8k, + fmts = ["NV12"], + ), + av1_10 = dict( + maxres = res8k, + fmts = ["P010"], + ), + ), + vpp = dict( + crop = dict( + ifmts = ["NV12", "P010", "YUY2", "UYVY", "AYUV", "Y410", "BGRA"], + ofmts = ["NV12", "P010", "YUY2", "AYUV", "Y410", "BGRA"], + ), + deinterlace = dict( + bob = dict( + ifmts = ["NV12", "YV12", "P010", "YUY2"], + ofmts = ["NV12", "YV12", "P010", "YUY2"], + ), + motion_adaptive = dict( + ifmts = ["NV12", "P010", "YUY2"], + ofmts = ["NV12", "P010", "YUY2"], + ), + ), + scale = dict( + ifmts = ["NV12", "P010", "YUY2", "UYVY", "Y210", "AYUV", "Y410", "BGRA"], + ofmts = ["NV12", "P010", "YUY2", "Y210", "AYUV", "Y410", "BGRA"], + ), + # colorspace conversion + csc = dict( + ifmts = ["NV12", "P010", "YUY2", "UYVY", "Y210", "AYUV", "Y410", "BGRA"], + ofmts = ["NV12", "P010", "YUY2", "Y210", "AYUV", "Y410", "BGRA"], + ), + ), +) From b8c939c55642d2ee25386ee92e075895e40a06f1 Mon Sep 17 00:00:00 2001 From: Wang Hangjie Date: Tue, 5 Nov 2024 13:38:44 +0800 Subject: [PATCH 2/2] [caps] update LNL iHD caps LNL support decode vp8 feature. Signed-off-by: Wang Hangjie --- lib/caps/LNL/iHD | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/caps/LNL/iHD b/lib/caps/LNL/iHD index bd7c7b10..3d17994f 100644 --- a/lib/caps/LNL/iHD +++ b/lib/caps/LNL/iHD @@ -21,6 +21,7 @@ caps = dict( ), hevc_10 = dict(maxres = res8k , fmts = ["P010", "Y210", "Y410"]), hevc_12 = dict(maxres = res8k , fmts = ["P012", "Y212", "Y412"]), + vp8 = dict(maxres = res4k , fmts = ["NV12"]), vp9_8 = dict(maxres = res8k , fmts = ["NV12", "AYUV"]), vp9_10 = dict(maxres = res8k , fmts = ["P010", "Y410"]), vp9_12 = dict(maxres = res8k , fmts = ["P012", "Y412"]),