xref: /rockchip-linux_mpp/mpp/hal/vpu/mpg4d/hal_m4vd_com.c (revision 437bfbeb9567cca9cd9080e3f6954aa9d6a94f18)
1 /*
2  * Copyright 2017 Rockchip Electronics Co. LTD
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 #include "mpp_debug.h"
18 #include "hal_m4vd_com.h"
19 
20 RK_U8 default_intra_matrix[64] = {
21     8, 17, 18, 19, 21, 23, 25, 27,
22     17, 18, 19, 21, 23, 25, 27, 28,
23     20, 21, 22, 23, 24, 26, 28, 30,
24     21, 22, 23, 24, 26, 28, 30, 32,
25     22, 23, 24, 26, 28, 30, 32, 35,
26     23, 24, 26, 28, 30, 32, 35, 38,
27     25, 26, 28, 30, 32, 35, 38, 41,
28     27, 28, 30, 32, 35, 38, 41, 45
29 };
30 
31 RK_U8 default_inter_matrix[64] = {
32     16, 17, 18, 19, 20, 21, 22, 23,
33     17, 18, 19, 20, 21, 22, 23, 24,
34     18, 19, 20, 21, 22, 23, 24, 25,
35     19, 20, 21, 22, 23, 24, 26, 27,
36     20, 21, 22, 23, 25, 26, 27, 28,
37     21, 22, 23, 24, 26, 27, 28, 30,
38     22, 23, 24, 26, 27, 28, 30, 31,
39     23, 24, 25, 27, 28, 30, 31, 33
40 };
41 
vpu_mpg4d_get_buffer_by_index(hal_mpg4_ctx * ctx,RK_S32 index,MppBuffer * buffer)42 void vpu_mpg4d_get_buffer_by_index(hal_mpg4_ctx *ctx, RK_S32 index, MppBuffer *buffer)
43 {
44     if (index >= 0) {
45         mpp_buf_slot_get_prop(ctx->frm_slots, index, SLOT_BUFFER, buffer);
46         mpp_assert(*buffer);
47     }
48 }
49