radeonsi/vcn: add vcn 4.0 encode support
authorBoyuan Zhang <boyuan.zhang@amd.com>
Sun, 27 Feb 2022 00:29:16 +0000 (19:29 -0500)
committerMarge Bot <emma+marge@anholt.net>
Tue, 10 May 2022 04:29:55 +0000 (04:29 +0000)
Add new file "radeon_vcn_enc_4_0.c" for VCN 4.0 encode.

Signed-off-by: Boyuan Zhang <boyuan.zhang@amd.com>
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16328>

src/gallium/drivers/radeonsi/meson.build
src/gallium/drivers/radeonsi/radeon_vcn_enc.h
src/gallium/drivers/radeonsi/radeon_vcn_enc_4_0.c [new file with mode: 0644]

index f0270c0..3a303ce 100644 (file)
@@ -94,6 +94,7 @@ files_libradeonsi = files(
   'radeon_vcn_enc_1_2.c',
   'radeon_vcn_enc_2_0.c',
   'radeon_vcn_enc_3_0.c',
+  'radeon_vcn_enc_4_0.c',
   'radeon_video.c',
   'radeon_video.h',
 )
index aa6c80f..25f0d29 100644 (file)
@@ -649,4 +649,6 @@ void radeon_enc_2_0_init(struct radeon_encoder *enc);
 
 void radeon_enc_3_0_init(struct radeon_encoder *enc);
 
+void radeon_enc_4_0_init(struct radeon_encoder *enc);
+
 #endif // _RADEON_VCN_ENC_H
diff --git a/src/gallium/drivers/radeonsi/radeon_vcn_enc_4_0.c b/src/gallium/drivers/radeonsi/radeon_vcn_enc_4_0.c
new file mode 100644 (file)
index 0000000..9bd2c80
--- /dev/null
@@ -0,0 +1,41 @@
+/**************************************************************************
+ *
+ * Copyright 2022 Advanced Micro Devices, Inc.
+ * All Rights Reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, sub license, and/or sell copies of the Software, and to
+ * permit persons to whom the Software is furnished to do so, subject to
+ * the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the
+ * next paragraph) shall be included in all copies or substantial portions
+ * of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
+ * IN NO EVENT SHALL THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR
+ * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ *
+ **************************************************************************/
+
+#include <stdio.h>
+
+#include "pipe/p_video_codec.h"
+
+#include "util/u_video.h"
+
+#include "si_pipe.h"
+#include "radeon_video.h"
+#include "radeon_vcn_enc.h"
+
+void radeon_enc_4_0_init(struct radeon_encoder *enc)
+{
+   radeon_enc_3_0_init(enc);
+}