1 // SPDX-License-Identifier: GPL-2.0+ 2 /* 3 * Copyright (C) 2018 BayLibre, SAS 4 * Author: Maxime Jourdan <mjourdan@baylibre.com> 5 */ 6 7 #include "vdec_platform.h" 8 #include "vdec.h" 9 10 #include "vdec_1.h" 11 #include "codec_mpeg12.h" 12 13 static const struct amvdec_format vdec_formats_gxbb[] = { 14 { 15 .pixfmt = V4L2_PIX_FMT_MPEG1, 16 .min_buffers = 8, 17 .max_buffers = 8, 18 .max_width = 1920, 19 .max_height = 1080, 20 .vdec_ops = &vdec_1_ops, 21 .codec_ops = &codec_mpeg12_ops, 22 .firmware_path = "meson/vdec/gxl_mpeg12.bin", 23 .pixfmts_cap = { V4L2_PIX_FMT_NV12M, V4L2_PIX_FMT_YUV420M, 0 }, 24 }, { 25 .pixfmt = V4L2_PIX_FMT_MPEG2, 26 .min_buffers = 8, 27 .max_buffers = 8, 28 .max_width = 1920, 29 .max_height = 1080, 30 .vdec_ops = &vdec_1_ops, 31 .codec_ops = &codec_mpeg12_ops, 32 .firmware_path = "meson/vdec/gxl_mpeg12.bin", 33 .pixfmts_cap = { V4L2_PIX_FMT_NV12M, V4L2_PIX_FMT_YUV420M, 0 }, 34 }, 35 }; 36 37 static const struct amvdec_format vdec_formats_gxl[] = { 38 { 39 .pixfmt = V4L2_PIX_FMT_MPEG1, 40 .min_buffers = 8, 41 .max_buffers = 8, 42 .max_width = 1920, 43 .max_height = 1080, 44 .vdec_ops = &vdec_1_ops, 45 .codec_ops = &codec_mpeg12_ops, 46 .firmware_path = "meson/vdec/gxl_mpeg12.bin", 47 .pixfmts_cap = { V4L2_PIX_FMT_NV12M, V4L2_PIX_FMT_YUV420M, 0 }, 48 }, { 49 .pixfmt = V4L2_PIX_FMT_MPEG2, 50 .min_buffers = 8, 51 .max_buffers = 8, 52 .max_width = 1920, 53 .max_height = 1080, 54 .vdec_ops = &vdec_1_ops, 55 .codec_ops = &codec_mpeg12_ops, 56 .firmware_path = "meson/vdec/gxl_mpeg12.bin", 57 .pixfmts_cap = { V4L2_PIX_FMT_NV12M, V4L2_PIX_FMT_YUV420M, 0 }, 58 }, 59 }; 60 61 static const struct amvdec_format vdec_formats_gxm[] = { 62 { 63 .pixfmt = V4L2_PIX_FMT_MPEG1, 64 .min_buffers = 8, 65 .max_buffers = 8, 66 .max_width = 1920, 67 .max_height = 1080, 68 .vdec_ops = &vdec_1_ops, 69 .codec_ops = &codec_mpeg12_ops, 70 .firmware_path = "meson/vdec/gxl_mpeg12.bin", 71 .pixfmts_cap = { V4L2_PIX_FMT_NV12M, V4L2_PIX_FMT_YUV420M, 0 }, 72 }, { 73 .pixfmt = V4L2_PIX_FMT_MPEG2, 74 .min_buffers = 8, 75 .max_buffers = 8, 76 .max_width = 1920, 77 .max_height = 1080, 78 .vdec_ops = &vdec_1_ops, 79 .codec_ops = &codec_mpeg12_ops, 80 .firmware_path = "meson/vdec/gxl_mpeg12.bin", 81 .pixfmts_cap = { V4L2_PIX_FMT_NV12M, V4L2_PIX_FMT_YUV420M, 0 }, 82 }, 83 }; 84 85 const struct vdec_platform vdec_platform_gxbb = { 86 .formats = vdec_formats_gxbb, 87 .num_formats = ARRAY_SIZE(vdec_formats_gxbb), 88 .revision = VDEC_REVISION_GXBB, 89 }; 90 91 const struct vdec_platform vdec_platform_gxl = { 92 .formats = vdec_formats_gxl, 93 .num_formats = ARRAY_SIZE(vdec_formats_gxl), 94 .revision = VDEC_REVISION_GXL, 95 }; 96 97 const struct vdec_platform vdec_platform_gxm = { 98 .formats = vdec_formats_gxm, 99 .num_formats = ARRAY_SIZE(vdec_formats_gxm), 100 .revision = VDEC_REVISION_GXM, 101 }; 102