radeon/vcn: add vcn2.0 encode skeleton
[mesa.git] / src / gallium / drivers / radeon / radeon_vcn_enc_2_0.c
1 /**************************************************************************
2 *
3 * Copyright 2017 Advanced Micro Devices, Inc.
4 * All Rights Reserved.
5 *
6 * Permission is hereby granted, free of charge, to any person obtaining a
7 * copy of this software and associated documentation files (the
8 * "Software"), to deal in the Software without restriction, including
9 * without limitation the rights to use, copy, modify, merge, publish,
10 * distribute, sub license, and/or sell copies of the Software, and to
11 * permit persons to whom the Software is furnished to do so, subject to
12 * the following conditions:
13 *
14 * The above copyright notice and this permission notice (including the
15 * next paragraph) shall be included in all copies or substantial portions
16 * of the Software.
17 *
18 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
19 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
20 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
21 * IN NO EVENT SHALL THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR
22 * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
23 * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
24 * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
25 *
26 **************************************************************************/
27
28 #include <stdio.h>
29
30 #include "pipe/p_video_codec.h"
31
32 #include "util/u_video.h"
33
34 #include "si_pipe.h"
35 #include "radeon_video.h"
36 #include "radeon_vcn_enc.h"
37
38 #define RENCODE_FW_INTERFACE_MAJOR_VERSION 0
39 #define RENCODE_FW_INTERFACE_MINOR_VERSION 0
40
41 #define RENCODE_IB_PARAM_SESSION_INFO 0x00000001
42 #define RENCODE_IB_PARAM_TASK_INFO 0x00000002
43 #define RENCODE_IB_PARAM_SESSION_INIT 0x00000003
44 #define RENCODE_IB_PARAM_LAYER_CONTROL 0x00000004
45 #define RENCODE_IB_PARAM_LAYER_SELECT 0x00000005
46 #define RENCODE_IB_PARAM_RATE_CONTROL_SESSION_INIT 0x00000006
47 #define RENCODE_IB_PARAM_RATE_CONTROL_LAYER_INIT 0x00000007
48 #define RENCODE_IB_PARAM_RATE_CONTROL_PER_PICTURE 0x00000008
49 #define RENCODE_IB_PARAM_QUALITY_PARAMS 0x00000009
50 #define RENCODE_IB_PARAM_DIRECT_OUTPUT_NALU 0x0000000a
51 #define RENCODE_IB_PARAM_SLICE_HEADER 0x0000000b
52 #define RENCODE_IB_PARAM_INPUT_FORMAT 0x0000000c
53 #define RENCODE_IB_PARAM_OUTPUT_FORMAT 0x0000000d
54 #define RENCODE_IB_PARAM_ENCODE_PARAMS 0x0000000f
55 #define RENCODE_IB_PARAM_INTRA_REFRESH 0x00000010
56 #define RENCODE_IB_PARAM_ENCODE_CONTEXT_BUFFER 0x00000011
57 #define RENCODE_IB_PARAM_VIDEO_BITSTREAM_BUFFER 0x00000012
58 #define RENCODE_IB_PARAM_FEEDBACK_BUFFER 0x00000015
59
60 #define RENCODE_HEVC_IB_PARAM_SLICE_CONTROL 0x00100001
61 #define RENCODE_HEVC_IB_PARAM_SPEC_MISC 0x00100002
62 #define RENCODE_HEVC_IB_PARAM_LOOP_FILTER 0x00100003
63
64 #define RENCODE_H264_IB_PARAM_SLICE_CONTROL 0x00200001
65 #define RENCODE_H264_IB_PARAM_SPEC_MISC 0x00200002
66 #define RENCODE_H264_IB_PARAM_ENCODE_PARAMS 0x00200003
67 #define RENCODE_H264_IB_PARAM_DEBLOCKING_FILTER 0x00200004
68
69 static void encode(struct radeon_encoder *enc)
70 {
71 /* TODO */
72 }
73
74 void radeon_enc_2_0_init(struct radeon_encoder *enc)
75 {
76 /* TODO */
77 }