summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile4
-rwxr-xr-xTOOLS/vdpau_functions.pl74
-rw-r--r--video/out/vo_vdpau.c2
-rw-r--r--video/vdpau.h2
-rw-r--r--video/vdpau_functions.inc41
5 files changed, 43 insertions, 80 deletions
diff --git a/Makefile b/Makefile
index 900e7db136..7d70836a55 100644
--- a/Makefile
+++ b/Makefile
@@ -349,10 +349,6 @@ core/input/input.c: core/input/input_conf.h
core/input/input_conf.h: TOOLS/file2string.pl etc/input.conf
./$^ >$@
-video/vdpau.h: video/out/vdpau_template.c
-video/out/vdpau_template.c: TOOLS/vdpau_functions.pl
- ./$< > $@
-
MKVLIB_DEPS = TOOLS/lib/Parse/Matroska.pm \
TOOLS/lib/Parse/Matroska/Definitions.pm \
TOOLS/lib/Parse/Matroska/Element.pm \
diff --git a/TOOLS/vdpau_functions.pl b/TOOLS/vdpau_functions.pl
deleted file mode 100755
index 8bab4e533b..0000000000
--- a/TOOLS/vdpau_functions.pl
+++ /dev/null
@@ -1,74 +0,0 @@
-#! /usr/bin/env perl
-
-# Generates vdpau_template.c
-
-use strict;
-use warnings;
-
-sub camelize($) {
- my $s = shift;
- $s =~ s/(?:^|_)([a-z])/\u$1/g;
- $s;
-}
-
-print <<EOF;
-/* Lists the VDPAU functions used by MPV.
- * Generated by vdpau_functions.pl.
- * First argument on each line is the VDPAU function type name,
- * second is the macro name needed to get the function address,
- * third is the name MPV uses for the function.
- */
-
-EOF
-
-while (my $f = <DATA>) {
- # strip whitespace, ignore anything after a '#'
- $f =~ /^\s*(.*?)\s*(?:(?<!\\)#.*)?$/;
- $f = $1;
- next unless $f; # empty / comment line
-
- my ($mp_name, $vdpau_name) = split /\s+/, $f;
- $vdpau_name = camelize $mp_name unless $vdpau_name;
-
- print "VDP_FUNCTION(Vdp$vdpau_name, VDP_FUNC_ID_\U$mp_name\E, $mp_name)\n";
-}
-
-__DATA__
-# get_error_string should be first, because the function lookup loop should
-# have it available to print errors for other functions
-get_error_string
-
-bitmap_surface_create
-bitmap_surface_destroy
-bitmap_surface_put_bits_native
-bitmap_surface_query_capabilities
-decoder_create
-decoder_destroy
-decoder_render
-device_destroy
-generate_csc_matrix GenerateCSCMatrix # CSC completely capitalized
-output_surface_create
-output_surface_destroy
-output_surface_get_bits_native
-output_surface_put_bits_indexed
-output_surface_put_bits_native
-output_surface_render_bitmap_surface
-output_surface_render_output_surface
-preemption_callback_register
-presentation_queue_block_until_surface_idle
-presentation_queue_create
-presentation_queue_destroy
-presentation_queue_display
-presentation_queue_get_time
-presentation_queue_query_surface_status
-presentation_queue_target_create_x11
-presentation_queue_target_destroy
-video_mixer_create
-video_mixer_destroy
-video_mixer_query_feature_support
-video_mixer_render
-video_mixer_set_attribute_values
-video_mixer_set_feature_enables
-video_surface_create
-video_surface_destroy
-video_surface_put_bits_y_cb_cr
diff --git a/video/out/vo_vdpau.c b/video/out/vo_vdpau.c
index 414071b5a0..57d747dc4b 100644
--- a/video/out/vo_vdpau.c
+++ b/video/out/vo_vdpau.c
@@ -421,7 +421,7 @@ static int win_x11_init_vdpau_procs(struct vo *vo)
static const struct vdp_function vdp_func[] = {
#define VDP_FUNCTION(_, macro_name, mp_name) {macro_name, offsetof(struct vdp_functions, mp_name)},
-#include "vdpau_template.c"
+#include "video/vdpau_functions.inc"
#undef VDP_FUNCTION
{0, -1}
};
diff --git a/video/vdpau.h b/video/vdpau.h
index c8a7288b66..bb8fe1cac8 100644
--- a/video/vdpau.h
+++ b/video/vdpau.h
@@ -27,7 +27,7 @@
struct vdp_functions {
#define VDP_FUNCTION(vdp_type, _, mp_name) vdp_type *mp_name;
-#include "video/out/vdpau_template.c"
+#include "video/vdpau_functions.inc"
#undef VDP_FUNCTION
};
diff --git a/video/vdpau_functions.inc b/video/vdpau_functions.inc
new file mode 100644
index 0000000000..528fe999e2
--- /dev/null
+++ b/video/vdpau_functions.inc
@@ -0,0 +1,41 @@
+/* Lists the VDPAU functions used by MPV.
+ * First argument on each line is the VDPAU function type name,
+ * second is the macro name needed to get the function address,
+ * third is the name MPV uses for the function.
+ */
+
+VDP_FUNCTION(VdpGetErrorString, VDP_FUNC_ID_GET_ERROR_STRING, get_error_string)
+VDP_FUNCTION(VdpBitmapSurfaceCreate, VDP_FUNC_ID_BITMAP_SURFACE_CREATE, bitmap_surface_create)
+VDP_FUNCTION(VdpBitmapSurfaceDestroy, VDP_FUNC_ID_BITMAP_SURFACE_DESTROY, bitmap_surface_destroy)
+VDP_FUNCTION(VdpBitmapSurfacePutBitsNative, VDP_FUNC_ID_BITMAP_SURFACE_PUT_BITS_NATIVE, bitmap_surface_put_bits_native)
+VDP_FUNCTION(VdpBitmapSurfaceQueryCapabilities, VDP_FUNC_ID_BITMAP_SURFACE_QUERY_CAPABILITIES, bitmap_surface_query_capabilities)
+VDP_FUNCTION(VdpDecoderCreate, VDP_FUNC_ID_DECODER_CREATE, decoder_create)
+VDP_FUNCTION(VdpDecoderDestroy, VDP_FUNC_ID_DECODER_DESTROY, decoder_destroy)
+VDP_FUNCTION(VdpDecoderRender, VDP_FUNC_ID_DECODER_RENDER, decoder_render)
+VDP_FUNCTION(VdpDeviceDestroy, VDP_FUNC_ID_DEVICE_DESTROY, device_destroy)
+VDP_FUNCTION(VdpGenerateCSCMatrix, VDP_FUNC_ID_GENERATE_CSC_MATRIX, generate_csc_matrix)
+VDP_FUNCTION(VdpOutputSurfaceCreate, VDP_FUNC_ID_OUTPUT_SURFACE_CREATE, output_surface_create)
+VDP_FUNCTION(VdpOutputSurfaceDestroy, VDP_FUNC_ID_OUTPUT_SURFACE_DESTROY, output_surface_destroy)
+VDP_FUNCTION(VdpOutputSurfaceGetBitsNative, VDP_FUNC_ID_OUTPUT_SURFACE_GET_BITS_NATIVE, output_surface_get_bits_native)
+VDP_FUNCTION(VdpOutputSurfacePutBitsIndexed, VDP_FUNC_ID_OUTPUT_SURFACE_PUT_BITS_INDEXED, output_surface_put_bits_indexed)
+VDP_FUNCTION(VdpOutputSurfacePutBitsNative, VDP_FUNC_ID_OUTPUT_SURFACE_PUT_BITS_NATIVE, output_surface_put_bits_native)
+VDP_FUNCTION(VdpOutputSurfaceRenderBitmapSurface, VDP_FUNC_ID_OUTPUT_SURFACE_RENDER_BITMAP_SURFACE, output_surface_render_bitmap_surface)
+VDP_FUNCTION(VdpOutputSurfaceRenderOutputSurface, VDP_FUNC_ID_OUTPUT_SURFACE_RENDER_OUTPUT_SURFACE, output_surface_render_output_surface)
+VDP_FUNCTION(VdpPreemptionCallbackRegister, VDP_FUNC_ID_PREEMPTION_CALLBACK_REGISTER, preemption_callback_register)
+VDP_FUNCTION(VdpPresentationQueueBlockUntilSurfaceIdle, VDP_FUNC_ID_PRESENTATION_QUEUE_BLOCK_UNTIL_SURFACE_IDLE, presentation_queue_block_until_surface_idle)
+VDP_FUNCTION(VdpPresentationQueueCreate, VDP_FUNC_ID_PRESENTATION_QUEUE_CREATE, presentation_queue_create)
+VDP_FUNCTION(VdpPresentationQueueDestroy, VDP_FUNC_ID_PRESENTATION_QUEUE_DESTROY, presentation_queue_destroy)
+VDP_FUNCTION(VdpPresentationQueueDisplay, VDP_FUNC_ID_PRESENTATION_QUEUE_DISPLAY, presentation_queue_display)
+VDP_FUNCTION(VdpPresentationQueueGetTime, VDP_FUNC_ID_PRESENTATION_QUEUE_GET_TIME, presentation_queue_get_time)
+VDP_FUNCTION(VdpPresentationQueueQuerySurfaceStatus, VDP_FUNC_ID_PRESENTATION_QUEUE_QUERY_SURFACE_STATUS, presentation_queue_query_surface_status)
+VDP_FUNCTION(VdpPresentationQueueTargetCreateX11, VDP_FUNC_ID_PRESENTATION_QUEUE_TARGET_CREATE_X11, presentation_queue_target_create_x11)
+VDP_FUNCTION(VdpPresentationQueueTargetDestroy, VDP_FUNC_ID_PRESENTATION_QUEUE_TARGET_DESTROY, presentation_queue_target_destroy)
+VDP_FUNCTION(VdpVideoMixerCreate, VDP_FUNC_ID_VIDEO_MIXER_CREATE, video_mixer_create)
+VDP_FUNCTION(VdpVideoMixerDestroy, VDP_FUNC_ID_VIDEO_MIXER_DESTROY, video_mixer_destroy)
+VDP_FUNCTION(VdpVideoMixerQueryFeatureSupport, VDP_FUNC_ID_VIDEO_MIXER_QUERY_FEATURE_SUPPORT, video_mixer_query_feature_support)
+VDP_FUNCTION(VdpVideoMixerRender, VDP_FUNC_ID_VIDEO_MIXER_RENDER, video_mixer_render)
+VDP_FUNCTION(VdpVideoMixerSetAttributeValues, VDP_FUNC_ID_VIDEO_MIXER_SET_ATTRIBUTE_VALUES, video_mixer_set_attribute_values)
+VDP_FUNCTION(VdpVideoMixerSetFeatureEnables, VDP_FUNC_ID_VIDEO_MIXER_SET_FEATURE_ENABLES, video_mixer_set_feature_enables)
+VDP_FUNCTION(VdpVideoSurfaceCreate, VDP_FUNC_ID_VIDEO_SURFACE_CREATE, video_surface_create)
+VDP_FUNCTION(VdpVideoSurfaceDestroy, VDP_FUNC_ID_VIDEO_SURFACE_DESTROY, video_surface_destroy)
+VDP_FUNCTION(VdpVideoSurfacePutBitsYCbCr, VDP_FUNC_ID_VIDEO_SURFACE_PUT_BITS_Y_CB_CR, video_surface_put_bits_y_cb_cr)