18d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S/******************************************************************************
28d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S *
38d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S * Copyright (C) 2015 The Android Open Source Project
48d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S *
58d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S * Licensed under the Apache License, Version 2.0 (the "License");
68d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S * you may not use this file except in compliance with the License.
78d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S * You may obtain a copy of the License at:
88d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S *
98d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S * http://www.apache.org/licenses/LICENSE-2.0
108d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S *
118d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S * Unless required by applicable law or agreed to in writing, software
128d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S * distributed under the License is distributed on an "AS IS" BASIS,
138d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
148d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S * See the License for the specific language governing permissions and
158d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S * limitations under the License.
168d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S *
178d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S *****************************************************************************
188d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S * Originally developed and contributed by Ittiam Systems Pvt. Ltd, Bangalore
198d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S*/
208d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S/**
218d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S*******************************************************************************
228d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S* @file
238d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S*  ih264e_function_selector_generic.c
248d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S*
258d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S* @brief
268d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S*  Contains functions to initialize function pointers of codec context
278d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S*
288d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S* @author
298d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S*  Ittiam
308d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S*
318d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S* @par List of Functions:
328d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S*  - ih264e_init_function_ptr_generic
338d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S*
348d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S* @remarks
358d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S*  None
368d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S*
378d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S*******************************************************************************
388d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S*/
398d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S
408d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S
418d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S/*****************************************************************************/
428d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S/* File Includes                                                             */
438d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S/*****************************************************************************/
448d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S
458d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S/* System Include files */
468d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S#include <stdio.h>
478d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S#include <stddef.h>
488d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S#include <stdlib.h>
498d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S#include <string.h>
508d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S
518d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S/* User Include files */
528d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S#include "ih264_typedefs.h"
538d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S#include "iv2.h"
548d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S#include "ive2.h"
558d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S#include "ih264_defs.h"
568d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S#include "ih264_size_defs.h"
578d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S#include "ih264e_defs.h"
588d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S#include "ih264e_error.h"
598d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S#include "ih264e_bitstream.h"
608d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S#include "ime_distortion_metrics.h"
61134291ea0b1b9794b4d7feee2c3ffdbd941c5237Harinarayanan K K#include "ime_defs.h"
628d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S#include "ime_structs.h"
638d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S#include "ih264_error.h"
648d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S#include "ih264_structs.h"
658d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S#include "ih264_trans_quant_itrans_iquant.h"
668d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S#include "ih264_inter_pred_filters.h"
678d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S#include "ih264_mem_fns.h"
688d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S#include "ih264_padding.h"
698d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S#include "ih264_intra_pred_filters.h"
708d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S#include "ih264_deblk_edge_filters.h"
71134291ea0b1b9794b4d7feee2c3ffdbd941c5237Harinarayanan K K#include "ih264_cabac_tables.h"
728d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S#include "irc_cntrl_param.h"
738d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S#include "irc_frame_info_collector.h"
748d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S#include "ih264e_rate_control.h"
75134291ea0b1b9794b4d7feee2c3ffdbd941c5237Harinarayanan K K#include "ih264e_cabac_structs.h"
768d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S#include "ih264e_structs.h"
778d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S#include "ih264e_platform_macros.h"
78134291ea0b1b9794b4d7feee2c3ffdbd941c5237Harinarayanan K K#include "ih264e_cabac.h"
798d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S#include "ih264e_core_coding.h"
808d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S#include "ih264_cavlc_tables.h"
818d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S#include "ih264e_cavlc.h"
828d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S#include "ih264e_intra_modes_eval.h"
838d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S#include "ih264e_fmt_conv.h"
848d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S#include "ih264e_half_pel.h"
858d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S
868d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S/**
878d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S*******************************************************************************
888d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S*
898d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S* @brief Initialize the intra/inter/transform/deblk function pointers of
908d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S* codec context
918d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S*
928d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S* @par Description: the current routine initializes the function pointers of
938d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S* codec context basing on the architecture in use
948d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S*
958d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S* @param[in] ps_codec
968d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S*  Codec context pointer
978d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S*
988d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S* @returns  none
998d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S*
1008d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S* @remarks none
1018d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S*
1028d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S*******************************************************************************
1038d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S*/
1048d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha Svoid ih264e_init_function_ptr_neon_a9q(codec_t *ps_codec)
1058d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S{
1068d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S    WORD32 i= 0;
107134291ea0b1b9794b4d7feee2c3ffdbd941c5237Harinarayanan K K    /* curr proc ctxt */
108134291ea0b1b9794b4d7feee2c3ffdbd941c5237Harinarayanan K K    process_ctxt_t *ps_proc = NULL;
109134291ea0b1b9794b4d7feee2c3ffdbd941c5237Harinarayanan K K    me_ctxt_t *ps_me_ctxt = NULL;
110134291ea0b1b9794b4d7feee2c3ffdbd941c5237Harinarayanan K K
111134291ea0b1b9794b4d7feee2c3ffdbd941c5237Harinarayanan K K    /* Init function pointers for intra pred leaf level functions luma
112134291ea0b1b9794b4d7feee2c3ffdbd941c5237Harinarayanan K K     * Intra 16x16 */
113134291ea0b1b9794b4d7feee2c3ffdbd941c5237Harinarayanan K K    ps_codec->apf_intra_pred_16_l[0] = ih264_intra_pred_luma_16x16_mode_vert_a9q;
114134291ea0b1b9794b4d7feee2c3ffdbd941c5237Harinarayanan K K    ps_codec->apf_intra_pred_16_l[1] = ih264_intra_pred_luma_16x16_mode_horz_a9q;
115134291ea0b1b9794b4d7feee2c3ffdbd941c5237Harinarayanan K K    ps_codec->apf_intra_pred_16_l[2] = ih264_intra_pred_luma_16x16_mode_dc_a9q;
116134291ea0b1b9794b4d7feee2c3ffdbd941c5237Harinarayanan K K    ps_codec->apf_intra_pred_16_l[3] = ih264_intra_pred_luma_16x16_mode_plane_a9q;
117134291ea0b1b9794b4d7feee2c3ffdbd941c5237Harinarayanan K K
118134291ea0b1b9794b4d7feee2c3ffdbd941c5237Harinarayanan K K    /* Init function pointers for intra pred leaf level functions luma
119134291ea0b1b9794b4d7feee2c3ffdbd941c5237Harinarayanan K K     * Intra 4x4 */
120134291ea0b1b9794b4d7feee2c3ffdbd941c5237Harinarayanan K K    ps_codec->apf_intra_pred_4_l[0] = ih264_intra_pred_luma_4x4_mode_vert_a9q;
121134291ea0b1b9794b4d7feee2c3ffdbd941c5237Harinarayanan K K    ps_codec->apf_intra_pred_4_l[1] = ih264_intra_pred_luma_4x4_mode_horz_a9q;
122134291ea0b1b9794b4d7feee2c3ffdbd941c5237Harinarayanan K K    ps_codec->apf_intra_pred_4_l[2] = ih264_intra_pred_luma_4x4_mode_dc_a9q;
123134291ea0b1b9794b4d7feee2c3ffdbd941c5237Harinarayanan K K    ps_codec->apf_intra_pred_4_l[3] = ih264_intra_pred_luma_4x4_mode_diag_dl_a9q;
124134291ea0b1b9794b4d7feee2c3ffdbd941c5237Harinarayanan K K    ps_codec->apf_intra_pred_4_l[4] = ih264_intra_pred_luma_4x4_mode_diag_dr_a9q;
125134291ea0b1b9794b4d7feee2c3ffdbd941c5237Harinarayanan K K    ps_codec->apf_intra_pred_4_l[5] = ih264_intra_pred_luma_4x4_mode_vert_r_a9q;
126134291ea0b1b9794b4d7feee2c3ffdbd941c5237Harinarayanan K K    ps_codec->apf_intra_pred_4_l[6] = ih264_intra_pred_luma_4x4_mode_horz_d_a9q;
127134291ea0b1b9794b4d7feee2c3ffdbd941c5237Harinarayanan K K    ps_codec->apf_intra_pred_4_l[7] = ih264_intra_pred_luma_4x4_mode_vert_l_a9q;
128134291ea0b1b9794b4d7feee2c3ffdbd941c5237Harinarayanan K K    ps_codec->apf_intra_pred_4_l[8] = ih264_intra_pred_luma_4x4_mode_horz_u_a9q;
129134291ea0b1b9794b4d7feee2c3ffdbd941c5237Harinarayanan K K
130134291ea0b1b9794b4d7feee2c3ffdbd941c5237Harinarayanan K K    /* Init function pointers for intra pred leaf level functions luma
131134291ea0b1b9794b4d7feee2c3ffdbd941c5237Harinarayanan K K     * Intra 8x8 */
132134291ea0b1b9794b4d7feee2c3ffdbd941c5237Harinarayanan K K    ps_codec->apf_intra_pred_8_l[0] = ih264_intra_pred_luma_8x8_mode_vert_a9q;
133134291ea0b1b9794b4d7feee2c3ffdbd941c5237Harinarayanan K K    ps_codec->apf_intra_pred_8_l[2] = ih264_intra_pred_luma_8x8_mode_dc_a9q;
134134291ea0b1b9794b4d7feee2c3ffdbd941c5237Harinarayanan K K    ps_codec->apf_intra_pred_8_l[3] = ih264_intra_pred_luma_8x8_mode_diag_dl_a9q;
135134291ea0b1b9794b4d7feee2c3ffdbd941c5237Harinarayanan K K    ps_codec->apf_intra_pred_8_l[4] = ih264_intra_pred_luma_8x8_mode_diag_dr_a9q;
136134291ea0b1b9794b4d7feee2c3ffdbd941c5237Harinarayanan K K    ps_codec->apf_intra_pred_8_l[5] = ih264_intra_pred_luma_8x8_mode_vert_r_a9q;
137134291ea0b1b9794b4d7feee2c3ffdbd941c5237Harinarayanan K K    ps_codec->apf_intra_pred_8_l[6] = ih264_intra_pred_luma_8x8_mode_horz_d_a9q;
138134291ea0b1b9794b4d7feee2c3ffdbd941c5237Harinarayanan K K    ps_codec->apf_intra_pred_8_l[7] = ih264_intra_pred_luma_8x8_mode_vert_l_a9q;
139134291ea0b1b9794b4d7feee2c3ffdbd941c5237Harinarayanan K K    ps_codec->apf_intra_pred_8_l[8] = ih264_intra_pred_luma_8x8_mode_horz_u_a9q;
140134291ea0b1b9794b4d7feee2c3ffdbd941c5237Harinarayanan K K
141134291ea0b1b9794b4d7feee2c3ffdbd941c5237Harinarayanan K K    /* Init function pointers for intra pred leaf level functions chroma
142134291ea0b1b9794b4d7feee2c3ffdbd941c5237Harinarayanan K K     * Intra 8x8 */
143134291ea0b1b9794b4d7feee2c3ffdbd941c5237Harinarayanan K K    ps_codec->apf_intra_pred_c[0] = ih264_intra_pred_chroma_8x8_mode_dc_a9q;
144134291ea0b1b9794b4d7feee2c3ffdbd941c5237Harinarayanan K K    ps_codec->apf_intra_pred_c[1] = ih264_intra_pred_chroma_8x8_mode_horz_a9q;
145134291ea0b1b9794b4d7feee2c3ffdbd941c5237Harinarayanan K K    ps_codec->apf_intra_pred_c[2] = ih264_intra_pred_chroma_8x8_mode_vert_a9q;
146134291ea0b1b9794b4d7feee2c3ffdbd941c5237Harinarayanan K K    ps_codec->apf_intra_pred_c[3] = ih264_intra_pred_chroma_8x8_mode_plane_a9q;
147134291ea0b1b9794b4d7feee2c3ffdbd941c5237Harinarayanan K K
148134291ea0b1b9794b4d7feee2c3ffdbd941c5237Harinarayanan K K    /* Init forward transform fn ptr */
149134291ea0b1b9794b4d7feee2c3ffdbd941c5237Harinarayanan K K    ps_codec->pf_resi_trans_quant_8x8           = ih264_resi_trans_quant_8x8;
150134291ea0b1b9794b4d7feee2c3ffdbd941c5237Harinarayanan K K    ps_codec->pf_resi_trans_quant_4x4           = ih264_resi_trans_quant_4x4_a9;
151134291ea0b1b9794b4d7feee2c3ffdbd941c5237Harinarayanan K K    ps_codec->pf_resi_trans_quant_chroma_4x4    = ih264_resi_trans_quant_chroma_4x4_a9;
152134291ea0b1b9794b4d7feee2c3ffdbd941c5237Harinarayanan K K    ps_codec->pf_hadamard_quant_4x4             = ih264_hadamard_quant_4x4_a9;
153134291ea0b1b9794b4d7feee2c3ffdbd941c5237Harinarayanan K K    ps_codec->pf_hadamard_quant_2x2_uv          = ih264_hadamard_quant_2x2_uv_a9;
154134291ea0b1b9794b4d7feee2c3ffdbd941c5237Harinarayanan K K
155134291ea0b1b9794b4d7feee2c3ffdbd941c5237Harinarayanan K K    /* Init inverse transform fn ptr */
156134291ea0b1b9794b4d7feee2c3ffdbd941c5237Harinarayanan K K    ps_codec->pf_iquant_itrans_recon_8x8            = ih264_iquant_itrans_recon_8x8;
157134291ea0b1b9794b4d7feee2c3ffdbd941c5237Harinarayanan K K    ps_codec->pf_iquant_itrans_recon_4x4            = ih264_iquant_itrans_recon_4x4_a9;
158134291ea0b1b9794b4d7feee2c3ffdbd941c5237Harinarayanan K K    ps_codec->pf_iquant_itrans_recon_4x4_dc         = ih264_iquant_itrans_recon_4x4_dc_a9;
159134291ea0b1b9794b4d7feee2c3ffdbd941c5237Harinarayanan K K    ps_codec->pf_iquant_itrans_recon_chroma_4x4     = ih264_iquant_itrans_recon_chroma_4x4_a9;
160134291ea0b1b9794b4d7feee2c3ffdbd941c5237Harinarayanan K K    ps_codec->pf_iquant_itrans_recon_chroma_4x4_dc  = ih264_iquant_itrans_recon_chroma_4x4_dc_a9;
161134291ea0b1b9794b4d7feee2c3ffdbd941c5237Harinarayanan K K    ps_codec->pf_ihadamard_scaling_4x4              = ih264_ihadamard_scaling_4x4_a9;
162134291ea0b1b9794b4d7feee2c3ffdbd941c5237Harinarayanan K K    ps_codec->pf_ihadamard_scaling_2x2_uv           = ih264_ihadamard_scaling_2x2_uv_a9;
163134291ea0b1b9794b4d7feee2c3ffdbd941c5237Harinarayanan K K    ps_codec->pf_interleave_copy                    = ih264_interleave_copy_a9;
164134291ea0b1b9794b4d7feee2c3ffdbd941c5237Harinarayanan K K
165134291ea0b1b9794b4d7feee2c3ffdbd941c5237Harinarayanan K K    /* Init fn ptr luma core coding */
166134291ea0b1b9794b4d7feee2c3ffdbd941c5237Harinarayanan K K    ps_codec->luma_energy_compaction[0] = ih264e_code_luma_intra_macroblock_16x16;
167134291ea0b1b9794b4d7feee2c3ffdbd941c5237Harinarayanan K K    ps_codec->luma_energy_compaction[1] = ih264e_code_luma_intra_macroblock_4x4;
168134291ea0b1b9794b4d7feee2c3ffdbd941c5237Harinarayanan K K    ps_codec->luma_energy_compaction[3] = ih264e_code_luma_inter_macroblock_16x16;
169134291ea0b1b9794b4d7feee2c3ffdbd941c5237Harinarayanan K K
170134291ea0b1b9794b4d7feee2c3ffdbd941c5237Harinarayanan K K    /* Init fn ptr chroma core coding */
171134291ea0b1b9794b4d7feee2c3ffdbd941c5237Harinarayanan K K    ps_codec->chroma_energy_compaction[0] = ih264e_code_chroma_intra_macroblock_8x8;
172134291ea0b1b9794b4d7feee2c3ffdbd941c5237Harinarayanan K K    ps_codec->chroma_energy_compaction[1] = ih264e_code_chroma_inter_macroblock_8x8;
173134291ea0b1b9794b4d7feee2c3ffdbd941c5237Harinarayanan K K
174134291ea0b1b9794b4d7feee2c3ffdbd941c5237Harinarayanan K K    /* Init fn ptr luma deblocking */
175134291ea0b1b9794b4d7feee2c3ffdbd941c5237Harinarayanan K K    ps_codec->pf_deblk_luma_vert_bs4 = ih264_deblk_luma_vert_bs4_a9;
176134291ea0b1b9794b4d7feee2c3ffdbd941c5237Harinarayanan K K    ps_codec->pf_deblk_luma_vert_bslt4 = ih264_deblk_luma_vert_bslt4_a9;
177134291ea0b1b9794b4d7feee2c3ffdbd941c5237Harinarayanan K K    ps_codec->pf_deblk_luma_horz_bs4 = ih264_deblk_luma_horz_bs4_a9;
178134291ea0b1b9794b4d7feee2c3ffdbd941c5237Harinarayanan K K    ps_codec->pf_deblk_luma_horz_bslt4 = ih264_deblk_luma_horz_bslt4_a9;
179134291ea0b1b9794b4d7feee2c3ffdbd941c5237Harinarayanan K K
180134291ea0b1b9794b4d7feee2c3ffdbd941c5237Harinarayanan K K    /* Init fn ptr chroma deblocking */
181134291ea0b1b9794b4d7feee2c3ffdbd941c5237Harinarayanan K K    ps_codec->pf_deblk_chroma_vert_bs4 = ih264_deblk_chroma_vert_bs4_a9;
182134291ea0b1b9794b4d7feee2c3ffdbd941c5237Harinarayanan K K    ps_codec->pf_deblk_chroma_vert_bslt4 = ih264_deblk_chroma_vert_bslt4_a9;
183134291ea0b1b9794b4d7feee2c3ffdbd941c5237Harinarayanan K K    ps_codec->pf_deblk_chroma_horz_bs4 = ih264_deblk_chroma_horz_bs4_a9;
184134291ea0b1b9794b4d7feee2c3ffdbd941c5237Harinarayanan K K    ps_codec->pf_deblk_chroma_horz_bslt4 = ih264_deblk_chroma_horz_bslt4_a9;
185134291ea0b1b9794b4d7feee2c3ffdbd941c5237Harinarayanan K K
186134291ea0b1b9794b4d7feee2c3ffdbd941c5237Harinarayanan K K    /* write mb syntax layer */
187134291ea0b1b9794b4d7feee2c3ffdbd941c5237Harinarayanan K K    ps_codec->pf_write_mb_syntax_layer[CAVLC][ISLICE] = ih264e_write_islice_mb_cavlc;
188134291ea0b1b9794b4d7feee2c3ffdbd941c5237Harinarayanan K K    ps_codec->pf_write_mb_syntax_layer[CAVLC][PSLICE] = ih264e_write_pslice_mb_cavlc;
189134291ea0b1b9794b4d7feee2c3ffdbd941c5237Harinarayanan K K    ps_codec->pf_write_mb_syntax_layer[CABAC][ISLICE] = ih264e_write_islice_mb_cabac;
190134291ea0b1b9794b4d7feee2c3ffdbd941c5237Harinarayanan K K    ps_codec->pf_write_mb_syntax_layer[CABAC][PSLICE] = ih264e_write_pslice_mb_cabac;
191134291ea0b1b9794b4d7feee2c3ffdbd941c5237Harinarayanan K K
192134291ea0b1b9794b4d7feee2c3ffdbd941c5237Harinarayanan K K    /* Padding Functions */
193134291ea0b1b9794b4d7feee2c3ffdbd941c5237Harinarayanan K K    ps_codec->pf_pad_top = ih264_pad_top_a9q;
194134291ea0b1b9794b4d7feee2c3ffdbd941c5237Harinarayanan K K    ps_codec->pf_pad_bottom = ih264_pad_bottom;
195134291ea0b1b9794b4d7feee2c3ffdbd941c5237Harinarayanan K K    ps_codec->pf_pad_left_luma = ih264_pad_left_luma_a9q;
196134291ea0b1b9794b4d7feee2c3ffdbd941c5237Harinarayanan K K    ps_codec->pf_pad_left_chroma = ih264_pad_left_chroma_a9q;
197134291ea0b1b9794b4d7feee2c3ffdbd941c5237Harinarayanan K K    ps_codec->pf_pad_right_luma = ih264_pad_right_luma_a9q;
198134291ea0b1b9794b4d7feee2c3ffdbd941c5237Harinarayanan K K    ps_codec->pf_pad_right_chroma = ih264_pad_right_chroma_a9q;
199134291ea0b1b9794b4d7feee2c3ffdbd941c5237Harinarayanan K K
200134291ea0b1b9794b4d7feee2c3ffdbd941c5237Harinarayanan K K    /* Inter pred leaf level functions */
201134291ea0b1b9794b4d7feee2c3ffdbd941c5237Harinarayanan K K    ps_codec->pf_inter_pred_luma_copy = ih264_inter_pred_luma_copy_a9q;
202134291ea0b1b9794b4d7feee2c3ffdbd941c5237Harinarayanan K K    ps_codec->pf_inter_pred_luma_horz = ih264_inter_pred_luma_horz_a9q;
203134291ea0b1b9794b4d7feee2c3ffdbd941c5237Harinarayanan K K    ps_codec->pf_inter_pred_luma_vert = ih264_inter_pred_luma_vert_a9q;
204134291ea0b1b9794b4d7feee2c3ffdbd941c5237Harinarayanan K K    ps_codec->pf_inter_pred_luma_bilinear = ih264_inter_pred_luma_bilinear_a9q;
205134291ea0b1b9794b4d7feee2c3ffdbd941c5237Harinarayanan K K    ps_codec->pf_inter_pred_chroma = ih264_inter_pred_chroma_a9q;
206134291ea0b1b9794b4d7feee2c3ffdbd941c5237Harinarayanan K K
207134291ea0b1b9794b4d7feee2c3ffdbd941c5237Harinarayanan K K    /* sad me level functions */
208134291ea0b1b9794b4d7feee2c3ffdbd941c5237Harinarayanan K K    ps_codec->apf_compute_sad_16x16[0] = ime_compute_sad_16x16_a9q;
209134291ea0b1b9794b4d7feee2c3ffdbd941c5237Harinarayanan K K    ps_codec->apf_compute_sad_16x16[1] = ime_compute_sad_16x16_fast_a9q;
210134291ea0b1b9794b4d7feee2c3ffdbd941c5237Harinarayanan K K    ps_codec->pf_compute_sad_16x8 = ime_compute_sad_16x8_a9q;
211134291ea0b1b9794b4d7feee2c3ffdbd941c5237Harinarayanan K K
212134291ea0b1b9794b4d7feee2c3ffdbd941c5237Harinarayanan K K    /* memor handling operations */
213134291ea0b1b9794b4d7feee2c3ffdbd941c5237Harinarayanan K K    ps_codec->pf_mem_cpy = ih264_memcpy_a9q;
214134291ea0b1b9794b4d7feee2c3ffdbd941c5237Harinarayanan K K    ps_codec->pf_mem_cpy_mul8 = ih264_memcpy_mul_8_a9q;
215134291ea0b1b9794b4d7feee2c3ffdbd941c5237Harinarayanan K K    ps_codec->pf_mem_set = ih264_memset_a9q;
216134291ea0b1b9794b4d7feee2c3ffdbd941c5237Harinarayanan K K    ps_codec->pf_mem_set_mul8 = ih264_memset_mul_8_a9q;
217134291ea0b1b9794b4d7feee2c3ffdbd941c5237Harinarayanan K K
218134291ea0b1b9794b4d7feee2c3ffdbd941c5237Harinarayanan K K    /* sad me level functions */
219134291ea0b1b9794b4d7feee2c3ffdbd941c5237Harinarayanan K K    for (i = 0; i < (MAX_PROCESS_CTXT); i++)
220134291ea0b1b9794b4d7feee2c3ffdbd941c5237Harinarayanan K K    {
221134291ea0b1b9794b4d7feee2c3ffdbd941c5237Harinarayanan K K        ps_proc = &ps_codec->as_process[i];
222134291ea0b1b9794b4d7feee2c3ffdbd941c5237Harinarayanan K K        ps_me_ctxt = &ps_proc->s_me_ctxt;
223134291ea0b1b9794b4d7feee2c3ffdbd941c5237Harinarayanan K K        ps_me_ctxt->pf_ime_compute_sad_16x16[0] = ime_compute_sad_16x16_a9q;
224134291ea0b1b9794b4d7feee2c3ffdbd941c5237Harinarayanan K K        ps_me_ctxt->pf_ime_compute_sad_16x16[1] = ime_compute_sad_16x16_fast_a9q;
225134291ea0b1b9794b4d7feee2c3ffdbd941c5237Harinarayanan K K        ps_me_ctxt->pf_ime_compute_sad_16x8 = ime_compute_sad_16x8_a9q;
226134291ea0b1b9794b4d7feee2c3ffdbd941c5237Harinarayanan K K        ps_me_ctxt->pf_ime_compute_sad4_diamond = ime_calculate_sad4_prog_a9q;
227134291ea0b1b9794b4d7feee2c3ffdbd941c5237Harinarayanan K K        ps_me_ctxt->pf_ime_compute_sad3_diamond = ime_calculate_sad3_prog_a9q;
228134291ea0b1b9794b4d7feee2c3ffdbd941c5237Harinarayanan K K        ps_me_ctxt->pf_ime_compute_sad2_diamond = ime_calculate_sad2_prog_a9q;
229134291ea0b1b9794b4d7feee2c3ffdbd941c5237Harinarayanan K K        ps_me_ctxt->pf_ime_sub_pel_compute_sad_16x16 = ime_sub_pel_compute_sad_16x16_a9q;
230134291ea0b1b9794b4d7feee2c3ffdbd941c5237Harinarayanan K K        ps_me_ctxt->pf_ime_compute_sad_stat_luma_16x16 = ime_compute_satqd_16x16_lumainter_a9q;
2318d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S    }
2328d3d303c7942ced6a987a52db8977d768dc3605fHamsalekha S
233134291ea0b1b9794b4d7feee2c3ffdbd941c5237Harinarayanan K K    /* intra mode eval -encoder level function */
234134291ea0b1b9794b4d7feee2c3ffdbd941c5237Harinarayanan K K    ps_codec->pf_ih264e_evaluate_intra16x16_modes = ih264e_evaluate_intra16x16_modes_a9q;
235134291ea0b1b9794b4d7feee2c3ffdbd941c5237Harinarayanan K K    ps_codec->pf_ih264e_evaluate_intra_chroma_modes = ih264e_evaluate_intra_chroma_modes_a9q;
236134291ea0b1b9794b4d7feee2c3ffdbd941c5237Harinarayanan K K    ps_codec->pf_ih264e_evaluate_intra_4x4_modes = ih264e_evaluate_intra_4x4_modes_a9q;
237134291ea0b1b9794b4d7feee2c3ffdbd941c5237Harinarayanan K K
238134291ea0b1b9794b4d7feee2c3ffdbd941c5237Harinarayanan K K    /* csc */
239134291ea0b1b9794b4d7feee2c3ffdbd941c5237Harinarayanan K K    ps_codec->pf_ih264e_conv_420p_to_420sp = ih264e_fmt_conv_420p_to_420sp_a9q;
240134291ea0b1b9794b4d7feee2c3ffdbd941c5237Harinarayanan K K    ps_codec->pf_ih264e_fmt_conv_422i_to_420sp = ih264e_fmt_conv_422i_to_420sp_a9q;
241134291ea0b1b9794b4d7feee2c3ffdbd941c5237Harinarayanan K K
242134291ea0b1b9794b4d7feee2c3ffdbd941c5237Harinarayanan K K    /* Halp pel generation function - encoder level */
243134291ea0b1b9794b4d7feee2c3ffdbd941c5237Harinarayanan K K    ps_codec->pf_ih264e_sixtapfilter_horz = ih264e_sixtapfilter_horz_a9q;
244134291ea0b1b9794b4d7feee2c3ffdbd941c5237Harinarayanan K K    ps_codec->pf_ih264e_sixtap_filter_2dvh_vert = ih264e_sixtap_filter_2dvh_vert_a9q;
245134291ea0b1b9794b4d7feee2c3ffdbd941c5237Harinarayanan K K
246134291ea0b1b9794b4d7feee2c3ffdbd941c5237Harinarayanan K K}
247134291ea0b1b9794b4d7feee2c3ffdbd941c5237Harinarayanan K K
248