radv/video: drop incorrect defines for uapi ones.

I missed there's an off by one, and found the kernel defined
the correct bits, so just use that.

Fixes: 9477f117f4 ("radv/video: add initial frameworking.")
Reviewed-by: Lynne <dev@lynne.ee>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23757>
This commit is contained in:
Dave Airlie 2023-06-21 10:33:32 +10:00 committed by Marge Bot
parent 38f941c8a8
commit 146adbd2f4
2 changed files with 8 additions and 13 deletions

View file

@ -2947,17 +2947,6 @@ struct radv_video_session_params {
struct vk_video_session_parameters vk;
};
/* needed for ac_gpu_info codecs */
#define RADV_VIDEO_FORMAT_UNKNOWN 0
#define RADV_VIDEO_FORMAT_MPEG12 1 /**< MPEG1, MPEG2 */
#define RADV_VIDEO_FORMAT_MPEG4 2 /**< DIVX, XVID */
#define RADV_VIDEO_FORMAT_VC1 3 /**< WMV */
#define RADV_VIDEO_FORMAT_MPEG4_AVC 4 /**< H.264 */
#define RADV_VIDEO_FORMAT_HEVC 5 /**< H.265 */
#define RADV_VIDEO_FORMAT_JPEG 6 /**< JPEG */
#define RADV_VIDEO_FORMAT_VP9 7 /**< VP9 */
#define RADV_VIDEO_FORMAT_AV1 8 /**< AV1 */
bool radv_queue_internal_submit(struct radv_queue *queue, struct radeon_cmdbuf *cs);
int radv_queue_init(struct radv_device *device, struct radv_queue *queue, int idx,

View file

@ -27,6 +27,10 @@
**************************************************************************/
#include "radv_private.h"
#ifndef _WIN32
#include "drm-uapi/amdgpu_drm.h"
#endif
#include "vk_video/vulkan_video_codecs_common.h"
#include "ac_uvd_dec.h"
#include "ac_vcn_dec.h"
@ -378,12 +382,14 @@ radv_GetPhysicalDeviceVideoCapabilitiesKHR(VkPhysicalDevice physicalDevice, cons
const struct video_codec_cap *cap = NULL;
switch (pVideoProfile->videoCodecOperation) {
#ifndef _WIN32
case VK_VIDEO_CODEC_OPERATION_DECODE_H264_BIT_KHR:
cap = &pdevice->rad_info.dec_caps.codec_info[RADV_VIDEO_FORMAT_MPEG4_AVC];
cap = &pdevice->rad_info.dec_caps.codec_info[AMDGPU_INFO_VIDEO_CAPS_CODEC_IDX_MPEG4_AVC];
break;
case VK_VIDEO_CODEC_OPERATION_DECODE_H265_BIT_KHR:
cap = &pdevice->rad_info.dec_caps.codec_info[RADV_VIDEO_FORMAT_HEVC];
cap = &pdevice->rad_info.dec_caps.codec_info[AMDGPU_INFO_VIDEO_CAPS_CODEC_IDX_HEVC];
break;
#endif
default:
unreachable("unsupported operation");
}