projects/linux·blob master · refs

47 lines · 1.7 KiB

1/* SPDX-License-Identifier: GPL-2.0 OR MIT
2 *
3 * Copyright 2026 Advanced Micro Devices, Inc.
4 *
5 * Permission is hereby granted, free of charge, to any person obtaining a
6 * copy of this software and associated documentation files (the "Software"),
7 * to deal in the Software without restriction, including without limitation
8 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
9 * and/or sell copies of the Software, and to permit persons to whom the
10 * Software is furnished to do so, subject to the following conditions:
11 *
12 * The above copyright notice and this permission notice shall be included in
13 * all copies or substantial portions of the Software.
14 *
15 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
18 * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
19 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
20 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
21 * OTHER DEALINGS IN THE SOFTWARE.
22 */
23#ifndef __AMDGPU_VIDEO_CODECS_H__
24#define __AMDGPU_VIDEO_CODECS_H__
25
26#include <linux/types.h>
27
28#define codec_info_build(type, width, height, level) \
29 .codec_type = type,\
30 .max_width = width,\
31 .max_height = height,\
32 .max_pixels_per_frame = height * width,\
33 .max_level = level,
34
35struct amdgpu_video_codec_info {
36 u32 codec_type;
37 u32 max_width;
38 u32 max_height;
39 u32 max_pixels_per_frame;
40 u32 max_level;
41};
42
43struct amdgpu_video_codecs {
44 const u32 codec_count;
45 const struct amdgpu_video_codec_info *codec_array;
46};
47#endif