1*495ae853SAndroid Build Coastguard Worker /****************************************************************************** 2*495ae853SAndroid Build Coastguard Worker * 3*495ae853SAndroid Build Coastguard Worker * Copyright (C) 2022 The Android Open Source Project 4*495ae853SAndroid Build Coastguard Worker * 5*495ae853SAndroid Build Coastguard Worker * Licensed under the Apache License, Version 2.0 (the "License"); 6*495ae853SAndroid Build Coastguard Worker * you may not use this file except in compliance with the License. 7*495ae853SAndroid Build Coastguard Worker * You may obtain a copy of the License at: 8*495ae853SAndroid Build Coastguard Worker * 9*495ae853SAndroid Build Coastguard Worker * http://www.apache.org/licenses/LICENSE-2.0 10*495ae853SAndroid Build Coastguard Worker * 11*495ae853SAndroid Build Coastguard Worker * Unless required by applicable law or agreed to in writing, software 12*495ae853SAndroid Build Coastguard Worker * distributed under the License is distributed on an "AS IS" BASIS, 13*495ae853SAndroid Build Coastguard Worker * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14*495ae853SAndroid Build Coastguard Worker * See the License for the specific language governing permissions and 15*495ae853SAndroid Build Coastguard Worker * limitations under the License. 16*495ae853SAndroid Build Coastguard Worker * 17*495ae853SAndroid Build Coastguard Worker ***************************************************************************** 18*495ae853SAndroid Build Coastguard Worker * Originally developed and contributed by Ittiam Systems Pvt. Ltd, Bangalore 19*495ae853SAndroid Build Coastguard Worker */ 20*495ae853SAndroid Build Coastguard Worker 21*495ae853SAndroid Build Coastguard Worker /** 22*495ae853SAndroid Build Coastguard Worker ******************************************************************************* 23*495ae853SAndroid Build Coastguard Worker * @file 24*495ae853SAndroid Build Coastguard Worker * isvce_residual_pred.h 25*495ae853SAndroid Build Coastguard Worker * 26*495ae853SAndroid Build Coastguard Worker * @brief 27*495ae853SAndroid Build Coastguard Worker * Contains function declarations for function declared in 28*495ae853SAndroid Build Coastguard Worker *isvce_residual_pred.c 29*495ae853SAndroid Build Coastguard Worker * 30*495ae853SAndroid Build Coastguard Worker * @author 31*495ae853SAndroid Build Coastguard Worker * ittiam 32*495ae853SAndroid Build Coastguard Worker * 33*495ae853SAndroid Build Coastguard Worker * @remarks 34*495ae853SAndroid Build Coastguard Worker * None 35*495ae853SAndroid Build Coastguard Worker * 36*495ae853SAndroid Build Coastguard Worker ******************************************************************************* 37*495ae853SAndroid Build Coastguard Worker */ 38*495ae853SAndroid Build Coastguard Worker 39*495ae853SAndroid Build Coastguard Worker #ifndef _ISVCE_RESIDUAL_PRED_H_ 40*495ae853SAndroid Build Coastguard Worker #define _ISVCE_RESIDUAL_PRED_H_ 41*495ae853SAndroid Build Coastguard Worker 42*495ae853SAndroid Build Coastguard Worker #include "ih264_typedefs.h" 43*495ae853SAndroid Build Coastguard Worker #include "isvc_macros.h" 44*495ae853SAndroid Build Coastguard Worker #include "ih264_debug.h" 45*495ae853SAndroid Build Coastguard Worker #include "isvc_defs.h" 46*495ae853SAndroid Build Coastguard Worker #include "isvc_structs.h" 47*495ae853SAndroid Build Coastguard Worker #include "isvce_structs.h" 48*495ae853SAndroid Build Coastguard Worker #include "isvce_structs.h" 49*495ae853SAndroid Build Coastguard Worker 50*495ae853SAndroid Build Coastguard Worker /* Structs */ 51*495ae853SAndroid Build Coastguard Worker typedef struct res_pred_constants_t 52*495ae853SAndroid Build Coastguard Worker { 53*495ae853SAndroid Build Coastguard Worker void *pv_state; 54*495ae853SAndroid Build Coastguard Worker } res_pred_constants_t; 55*495ae853SAndroid Build Coastguard Worker 56*495ae853SAndroid Build Coastguard Worker typedef struct res_pred_outputs_t 57*495ae853SAndroid Build Coastguard Worker { 58*495ae853SAndroid Build Coastguard Worker yuv_buf_props_t s_res_pred; 59*495ae853SAndroid Build Coastguard Worker } res_pred_outputs_t; 60*495ae853SAndroid Build Coastguard Worker 61*495ae853SAndroid Build Coastguard Worker typedef struct res_pred_variables_t 62*495ae853SAndroid Build Coastguard Worker { 63*495ae853SAndroid Build Coastguard Worker svc_ilp_data_t *ps_svc_ilp_data; 64*495ae853SAndroid Build Coastguard Worker 65*495ae853SAndroid Build Coastguard Worker coordinates_t s_mb_pos; 66*495ae853SAndroid Build Coastguard Worker 67*495ae853SAndroid Build Coastguard Worker UWORD8 u1_spatial_layer_id; 68*495ae853SAndroid Build Coastguard Worker } res_pred_variables_t; 69*495ae853SAndroid Build Coastguard Worker 70*495ae853SAndroid Build Coastguard Worker typedef struct svc_res_pred_ctxt_t 71*495ae853SAndroid Build Coastguard Worker { 72*495ae853SAndroid Build Coastguard Worker res_pred_constants_t s_res_pred_constants; 73*495ae853SAndroid Build Coastguard Worker 74*495ae853SAndroid Build Coastguard Worker res_pred_variables_t s_res_pred_variables; 75*495ae853SAndroid Build Coastguard Worker 76*495ae853SAndroid Build Coastguard Worker res_pred_outputs_t s_res_pred_outputs; 77*495ae853SAndroid Build Coastguard Worker 78*495ae853SAndroid Build Coastguard Worker } svc_res_pred_ctxt_t; 79*495ae853SAndroid Build Coastguard Worker 80*495ae853SAndroid Build Coastguard Worker extern UWORD32 isvce_get_svc_res_pred_ctxt_size(UWORD8 u1_num_spatial_layers, 81*495ae853SAndroid Build Coastguard Worker DOUBLE d_spatial_res_ratio, UWORD32 u4_wd, 82*495ae853SAndroid Build Coastguard Worker UWORD32 u4_ht); 83*495ae853SAndroid Build Coastguard Worker 84*495ae853SAndroid Build Coastguard Worker extern void isvce_svc_res_pred_ctxt_init(isvce_codec_t *ps_codec, iv_mem_rec_t *ps_mem_rec); 85*495ae853SAndroid Build Coastguard Worker 86*495ae853SAndroid Build Coastguard Worker extern void isvce_get_mb_residual_pred(svc_res_pred_ctxt_t *ps_res_pred_ctxt); 87*495ae853SAndroid Build Coastguard Worker 88*495ae853SAndroid Build Coastguard Worker extern void isvce_get_mb_residual_pred_non_dyadic(svc_res_pred_ctxt_t *ps_res_pred_ctxt); 89*495ae853SAndroid Build Coastguard Worker 90*495ae853SAndroid Build Coastguard Worker extern void isvce_residual_pred_eval(svc_res_pred_ctxt_t *ps_res_pred_ctxt, yuv_buf_props_t *ps_src, 91*495ae853SAndroid Build Coastguard Worker yuv_buf_props_t *ps_pred, yuv_buf_props_t *ps_res, 92*495ae853SAndroid Build Coastguard Worker UWORD32 *pu4_res_pred_sad, 93*495ae853SAndroid Build Coastguard Worker UWORD8 *pu1_residual_prediction_flag, UWORD32 u4_winning_sad); 94*495ae853SAndroid Build Coastguard Worker 95*495ae853SAndroid Build Coastguard Worker extern void isvce_update_res_pred_info(isvce_process_ctxt_t *ps_proc); 96*495ae853SAndroid Build Coastguard Worker 97*495ae853SAndroid Build Coastguard Worker #endif 98