Skip to content

Commit

Permalink
{avcodec,tests}: rename the bundled Mesa AV1 vulkan video headers
Browse files Browse the repository at this point in the history
This together with adjusting the inclusion define allows for the
build to not fail with latest Vulkan-Headers that contain the
stabilized Vulkan AV1 decoding definitions.

Compilation fails currently as the AV1 header is getting included
via hwcontext_vulkan.h -> <vulkan/vulkan.h> -> vulkan_core.h, which
finally includes vk_video/vulkan_video_codec_av1std.h and the decode
header, leading to the bundled header to never defining anything
due to the inclusion define being the same.

This fix is imperfect, as it leads to additional re-definition
warnings for things such as
VK_STD_VULKAN_VIDEO_CODEC_AV1_DECODE_SPEC_VERSION. , but it is
not clear how to otherwise have the bundled version trump the
actually standardized one for a short-term compilation fix.

(cherry picked from commit e06ce6d)
  • Loading branch information
jeeb committed Feb 18, 2024
1 parent 3e79074 commit fef22c8
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions libavcodec/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -1284,7 +1284,7 @@ SKIPHEADERS += %_tablegen.h \
aacenc_quantization.h \
aacenc_quantization_misc.h \
bitstream_template.h \
vulkan_video_codec_av1std.h \
vulkan_video_codec_av1std_mesa.h \
$(ARCH)/vpx_arith.h \

SKIPHEADERS-$(CONFIG_AMF) += amfenc.h
Expand All @@ -1306,7 +1306,7 @@ SKIPHEADERS-$(CONFIG_XVMC) += xvmc.h
SKIPHEADERS-$(CONFIG_VAAPI) += vaapi_decode.h vaapi_hevc.h vaapi_encode.h
SKIPHEADERS-$(CONFIG_VDPAU) += vdpau.h vdpau_internal.h
SKIPHEADERS-$(CONFIG_VIDEOTOOLBOX) += videotoolbox.h vt_internal.h
SKIPHEADERS-$(CONFIG_VULKAN) += vulkan.h vulkan_video.h vulkan_decode.h vulkan_video_codec_av1std_decode.h
SKIPHEADERS-$(CONFIG_VULKAN) += vulkan.h vulkan_video.h vulkan_decode.h vulkan_video_codec_av1std_decode_mesa.h
SKIPHEADERS-$(CONFIG_V4L2_M2M) += v4l2_buffers.h v4l2_context.h v4l2_m2m.h
SKIPHEADERS-$(CONFIG_ZLIB) += zlib_wrapper.h

Expand Down
4 changes: 2 additions & 2 deletions libavcodec/vulkan_video.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
#include "vulkan.h"

#include <vk_video/vulkan_video_codecs_common.h>
#include "vulkan_video_codec_av1std.h"
#include "vulkan_video_codec_av1std_decode.h"
#include "vulkan_video_codec_av1std_mesa.h"
#include "vulkan_video_codec_av1std_decode_mesa.h"

#define CODEC_VER_MAJ(ver) (ver >> 22)
#define CODEC_VER_MIN(ver) ((ver >> 12) & ((1 << 10) - 1))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
* limitations under the License.
*/

#ifndef VULKAN_VIDEO_CODEC_AV1STD_DECODE_H_
#define VULKAN_VIDEO_CODEC_AV1STD_DECODE_H_ 1
#ifndef VULKAN_VIDEO_CODEC_AV1STD_DECODE_MESA_H_
#define VULKAN_VIDEO_CODEC_AV1STD_DECODE_MESA_H_ 1

/*
** This header is NOT YET generated from the Khronos Vulkan XML API Registry.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
* limitations under the License.
*/

#ifndef VULKAN_VIDEO_CODEC_AV1STD_H_
#define VULKAN_VIDEO_CODEC_AV1STD_H_ 1
#ifndef VULKAN_VIDEO_CODEC_AV1STD_MESA_H_
#define VULKAN_VIDEO_CODEC_AV1STD_MESA_H_ 1

/*
** This header is NOT YET generated from the Khronos Vulkan XML API Registry.
Expand Down
4 changes: 2 additions & 2 deletions tests/ref/fate/source
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ compat/djgpp/math.h
compat/float/float.h
compat/float/limits.h
libavcodec/bitstream_template.h
libavcodec/vulkan_video_codec_av1std.h
libavcodec/vulkan_video_codec_av1std_decode.h
libavcodec/vulkan_video_codec_av1std_decode_mesa.h
libavcodec/vulkan_video_codec_av1std_mesa.h
tools/decode_simple.h
Use of av_clip() where av_clip_uintp2() could be used:
Use of av_clip() where av_clip_intp2() could be used:

0 comments on commit fef22c8

Please sign in to comment.