mirror of
https://github.com/elwrcl/intel-hard-graphics.git
synced 2026-10-31 19:08:03 +03:00
hasvk: add initial video decode support for h264.
This just adds the files with the programming info, it doesn't enable the extensions etc [dancingmirrors: A few forward port fixes.]
This commit is contained in:
1 parent
4d12fc3ec6
commit
1db147a9ce
4 files changed
+678
No files matched your search
@@ -88,6 +88,7 @@
|
||||
#include "vk_queue.h"
|
||||
#include "vk_log.h"
|
||||
#include "vk_ycbcr_conversion.h"
|
||||
#include "vk_video.h"
|
||||
|
||||
/* Pre-declarations needed for WSI entrypoints */
|
||||
struct wl_surface;
|
||||
@@ -2635,6 +2636,11 @@ struct anv_cmd_buffer {
|
||||
*
|
||||
*/
|
||||
struct u_trace trace;
|
||||
|
||||
struct {
|
||||
struct anv_video_session *vid;
|
||||
struct anv_video_session_params *params;
|
||||
} video;
|
||||
};
|
||||
|
||||
extern const struct vk_command_buffer_ops anv_cmd_buffer_ops;
|
||||
@@ -3700,9 +3706,35 @@ static inline uint32_t khr_perf_query_preamble_offset(const struct anv_query_poo
|
||||
return pool->pass_size * pass + 8;
|
||||
}
|
||||
|
||||
struct anv_vid_mem {
|
||||
struct anv_device_memory *mem;
|
||||
VkDeviceSize offset;
|
||||
VkDeviceSize size;
|
||||
};
|
||||
|
||||
#define ANV_VIDEO_MEM_REQS_H264 4
|
||||
#define ANV_MB_WIDTH 16
|
||||
#define ANV_MB_HEIGHT 16
|
||||
|
||||
enum {
|
||||
ANV_VID_MEM_H264_INTRA_ROW_STORE,
|
||||
ANV_VID_MEM_H264_DEBLOCK_FILTER_ROW_STORE,
|
||||
ANV_VID_MEM_H264_BSD_MPC_ROW_SCRATCH,
|
||||
ANV_VID_MEM_H264_MPR_ROW_SCRATCH,
|
||||
ANV_VID_MEM_H264_MAX,
|
||||
};
|
||||
|
||||
struct anv_video_session {
|
||||
struct vk_video_session vk;
|
||||
|
||||
/* the decoder needs some private memory allocations */
|
||||
struct anv_vid_mem vid_mem[ANV_VID_MEM_H264_MAX];
|
||||
};
|
||||
|
||||
struct anv_video_session_params {
|
||||
struct vk_video_session_parameters vk;
|
||||
};
|
||||
|
||||
void
|
||||
anv_dump_pipe_bits(enum anv_pipe_bits bits);
|
||||
|
||||
@@ -3832,6 +3864,8 @@ VK_DEFINE_NONDISP_HANDLE_CASTS(anv_sampler, base, VkSampler,
|
||||
VK_DEFINE_NONDISP_HANDLE_CASTS(anv_performance_configuration_intel, base,
|
||||
VkPerformanceConfigurationINTEL,
|
||||
VK_OBJECT_TYPE_PERFORMANCE_CONFIGURATION_INTEL)
|
||||
VK_DEFINE_NONDISP_HANDLE_CASTS(anv_video_session, vk.base, VkVideoSessionKHR, VK_OBJECT_TYPE_VIDEO_SESSION_KHR)
|
||||
VK_DEFINE_NONDISP_HANDLE_CASTS(anv_video_session_params, vk.base, VkVideoSessionParametersKHR, VK_OBJECT_TYPE_VIDEO_SESSION_PARAMETERS_KHR)
|
||||
|
||||
#define anv_genX(devinfo, thing) ({ \
|
||||
__typeof(&gfx7_##thing) genX_thing; \
|
||||
|
||||
Reference in new issue
Block a user