diff --git a/Android.bp b/Android.bp index ff53d87..2c0c8e9 100644 --- a/Android.bp +++ b/Android.bp @@ -54,7 +54,6 @@ cc_library_static { "common/impeg2_idct.c", "common/impeg2_inter_pred.c", "common/impeg2_job_queue.c", - "common/impeg2_mem_func.c", "common/ithread.c", "decoder/impeg2d_api_main.c", "decoder/impeg2d_bitstream.c", @@ -92,7 +91,6 @@ cc_library_static { "common/arm/impeg2_format_conv.s", "common/arm/impeg2_idct.s", "common/arm/impeg2_inter_pred.s", - "common/arm/impeg2_mem_func.s", "decoder/arm/impeg2d_function_selector_a9q.c", ], @@ -124,7 +122,6 @@ cc_library_static { "common/armv8/impeg2_format_conv.s", "common/armv8/impeg2_idct.s", "common/armv8/impeg2_inter_pred.s", - "common/armv8/impeg2_mem_func.s", "common/armv8/impeg2_neon_macros.s", "decoder/arm/impeg2d_function_selector.c", "decoder/arm/impeg2d_function_selector_av8.c", @@ -166,7 +163,6 @@ cc_library_static { "common/x86/ideint_spatial_filter_ssse3.c", "common/x86/impeg2_idct_recon_sse42_intr.c", "common/x86/impeg2_inter_pred_sse42_intr.c", - "common/x86/impeg2_mem_func_sse42_intr.c", "decoder/x86/impeg2d_function_selector.c", "decoder/x86/impeg2d_function_selector_avx2.c", "decoder/x86/impeg2d_function_selector_sse42.c", @@ -198,7 +194,6 @@ cc_library_static { "common/x86/ideint_spatial_filter_ssse3.c", "common/x86/impeg2_idct_recon_sse42_intr.c", "common/x86/impeg2_inter_pred_sse42_intr.c", - "common/x86/impeg2_mem_func_sse42_intr.c", "decoder/x86/impeg2d_function_selector.c", "decoder/x86/impeg2d_function_selector_avx2.c", "decoder/x86/impeg2d_function_selector_sse42.c", diff --git a/CMakeLists.txt b/CMakeLists.txt index e9a4aab..1e84cc0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -54,7 +54,6 @@ list(APPEND LIBMPEG2DEC_SRCS "${MPEG2_ROOT}/common/impeg2_idct.c" "${MPEG2_ROOT}/common/impeg2_inter_pred.c" "${MPEG2_ROOT}/common/impeg2_job_queue.c" - "${MPEG2_ROOT}/common/impeg2_mem_func.c" "${MPEG2_ROOT}/common/ithread.c" "${MPEG2_ROOT}/decoder/impeg2d_api_main.c" "${MPEG2_ROOT}/decoder/impeg2d_bitstream.c" @@ -94,7 +93,6 @@ if("${SYSTEM_PROCESSOR}" STREQUAL "aarch64" OR "${SYSTEM_PROCESSOR}" STREQUAL "a "${MPEG2_ROOT}/common/armv8/impeg2_format_conv.s" "${MPEG2_ROOT}/common/armv8/impeg2_idct.s" "${MPEG2_ROOT}/common/armv8/impeg2_inter_pred.s" - "${MPEG2_ROOT}/common/armv8/impeg2_mem_func.s" "${MPEG2_ROOT}/common/armv8/impeg2_neon_macros.s" "${MPEG2_ROOT}/decoder/arm/impeg2d_function_selector.c" "${MPEG2_ROOT}/decoder/arm/impeg2d_function_selector_av8.c") @@ -113,7 +111,6 @@ elseif("${SYSTEM_PROCESSOR}" STREQUAL "aarch32") "${MPEG2_ROOT}/common/arm/impeg2_format_conv.s" "${MPEG2_ROOT}/common/arm/impeg2_idct.s" "${MPEG2_ROOT}/common/arm/impeg2_inter_pred.s" - "${MPEG2_ROOT}/common/arm/impeg2_mem_func.s" "${MPEG2_ROOT}/decoder/arm/impeg2d_function_selector_a9q.c") include_directories(${MPEG2_ROOT}/common/arm) @@ -130,7 +127,6 @@ else() "${MPEG2_ROOT}/common/x86/ideint_spatial_filter_ssse3.c" "${MPEG2_ROOT}/common/x86/impeg2_idct_recon_sse42_intr.c" "${MPEG2_ROOT}/common/x86/impeg2_inter_pred_sse42_intr.c" - "${MPEG2_ROOT}/common/x86/impeg2_mem_func_sse42_intr.c" "${MPEG2_ROOT}/decoder/x86/impeg2d_function_selector.c" "${MPEG2_ROOT}/decoder/x86/impeg2d_function_selector_avx2.c" "${MPEG2_ROOT}/decoder/x86/impeg2d_function_selector_sse42.c" diff --git a/common/arm/impeg2_mem_func.s b/common/arm/impeg2_mem_func.s deleted file mode 100644 index ea34db4..0000000 --- a/common/arm/impeg2_mem_func.s +++ /dev/null @@ -1,177 +0,0 @@ -@/****************************************************************************** -@ * -@ * Copyright (C) 2015 The Android Open Source Project -@ * -@ * Licensed under the Apache License, Version 2.0 (the "License"); -@ * you may not use this file except in compliance with the License. -@ * You may obtain a copy of the License at: -@ * -@ * http://www.apache.org/licenses/LICENSE-2.0 -@ * -@ * Unless required by applicable law or agreed to in writing, software -@ * distributed under the License is distributed on an "AS IS" BASIS, -@ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -@ * See the License for the specific language governing permissions and -@ * limitations under the License. -@ * -@ ***************************************************************************** -@ * Originally developed and contributed by Ittiam Systems Pvt. Ltd, Bangalore -@*/ - -@/* -@//---------------------------------------------------------------------------- -@// File Name : impeg2_mem_func.s -@// -@// Description : This file has motion compensation related -@// interpolation functions on Neon + CortexA-8 platform -@// -@// Reference Document : -@// -@// Revision History : -@// Date Author Detail Description -@// ------------ ---------------- ---------------------------------- -@// 18 jun 2010 S Hamsalekha Created -@// -@//------------------------------------------------------------------------- -@*/ - -@/* -@// ---------------------------------------------------------------------------- -@// Include Files -@// ---------------------------------------------------------------------------- -@*/ -.text -.p2align 2 - - -@/* -@// ---------------------------------------------------------------------------- -@// Struct/Union Types and Define -@// ---------------------------------------------------------------------------- -@*/ - - -@/* -@// ---------------------------------------------------------------------------- -@// Static Global Data section variables -@// ---------------------------------------------------------------------------- -@*/ -@// -------------------------- NONE -------------------------------------------- - - -@/* -@// ---------------------------------------------------------------------------- -@// Static Prototype Functions -@// ---------------------------------------------------------------------------- -@*/ -@// -------------------------- NONE -------------------------------------------- - -@/* -@// ---------------------------------------------------------------------------- -@// Exported functions -@// ---------------------------------------------------------------------------- -@*/ - -@/* -@//--------------------------------------------------------------------------- -@// Function Name : impeg2_memset_8bit_8x8_block_a9q() -@// -@// Detail Description : This routine intialises the Block matrix buffer contents to a -@// particular Value. This function also assumes the buffer size -@// to be set is 64 Bytes fixed. It also assumes that blk matrix -@// used is 64 bit aligned. -@// -@// Inputs : r0: pi2_blk_mat : Block Pointer -@// r1: u2_val : Value with which the block is initialized -@// r2: u4_dst_width: Destination Width -@// -@// Registers Used : q0 -@// -@// Stack Usage : 4 bytes -@// -@// Outputs : Block Matrix Initialized to given value -@// -@// Return Data : None -@// -@// Programming Note : None -@//----------------------------------------------------------------------------- -@*/ - .global impeg2_memset_8bit_8x8_block_a9q -impeg2_memset_8bit_8x8_block_a9q: - str lr, [sp, #-4]! - - vdup.8 d0, r1 @//r1 is the 8-bit value to be set into - - vst1.8 {d0}, [r0], r2 @//Store the row 1 - vst1.8 {d0}, [r0], r2 @//Store the row 2 - vst1.8 {d0}, [r0], r2 @//Store the row 3 - vst1.8 {d0}, [r0], r2 @//Store the row 4 - vst1.8 {d0}, [r0], r2 @//Store the row 5 - vst1.8 {d0}, [r0], r2 @//Store the row 6 - vst1.8 {d0}, [r0], r2 @//Store the row 7 - vst1.8 {d0}, [r0], r2 @//Store the row 8 - - ldr pc, [sp], #4 - - - - - - - -@/* -@//--------------------------------------------------------------------------- -@// Function Name : impeg2_memset0_16bit_8x8_linear_block_a9q() -@// -@// Detail Description : memsets 128 byte long linear buf to 0 -@// -@// Inputs : r0 - Buffer -@// Registers Used : q0 - -@// -@// Stack Usage : 4 bytes -@// -@// Outputs : None -@// -@// Return Data : None -@// -@// Programming Note : -@//----------------------------------------------------------------------------- -@*/ - - - - .global impeg2_memset0_16bit_8x8_linear_block_a9q - - -impeg2_memset0_16bit_8x8_linear_block_a9q: - - stmfd sp!, {r14} - - vmov.i16 q0, #0 - -@Y data - - vst1.16 {d0, d1} , [r0]! @row1 - - vst1.16 {d0, d1} , [r0]! @row2 - - vst1.16 {d0, d1} , [r0]! @row3 - - vst1.16 {d0, d1} , [r0]! @row4 - - vst1.16 {d0, d1} , [r0]! @row5 - - vst1.16 {d0, d1} , [r0]! @row6 - - vst1.16 {d0, d1} , [r0]! @row7 - - vst1.16 {d0, d1} , [r0]! @row8 - - - - ldmfd sp!, {pc} - - - - diff --git a/common/armv8/impeg2_mem_func.s b/common/armv8/impeg2_mem_func.s deleted file mode 100644 index cf59830..0000000 --- a/common/armv8/impeg2_mem_func.s +++ /dev/null @@ -1,183 +0,0 @@ -//****************************************************************************** -//* -//* Copyright (C) 2015 The Android Open Source Project -//* -//* Licensed under the Apache License, Version 2.0 (the "License"); -//* you may not use this file except in compliance with the License. -//* You may obtain a copy of the License at: -//* -//* http://www.apache.org/licenses/LICENSE-2.0 -//* -//* Unless required by applicable law or agreed to in writing, software -//* distributed under the License is distributed on an "AS IS" BASIS, -//* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -//* See the License for the specific language governing permissions and -//* limitations under the License. -//* -//***************************************************************************** -//* Originally developed and contributed by Ittiam Systems Pvt. Ltd, Bangalore -//*/ - -///* -////---------------------------------------------------------------------------- -//// File Name : mot_comp_neon.s -//// -//// Description : This file has motion compensation related -//// interpolation functions on Neon + CortexA-8 platform -//// -//// Reference Document : -//// -//// Revision History : -//// Date Author Detail Description -//// ------------ ---------------- ---------------------------------- -//// 18 jun 2010 S Hamsalekha Created -//// -////------------------------------------------------------------------------- -//*/ - -///* -//// ---------------------------------------------------------------------------- -//// Include Files -//// ---------------------------------------------------------------------------- -//*/ -// PRESERVE8 -.include "impeg2_neon_macros.s" -.text -///* -//// ---------------------------------------------------------------------------- -//// Struct/Union Types and Define -//// ---------------------------------------------------------------------------- -//*/ - - -///* -//// ---------------------------------------------------------------------------- -//// Static Global Data section variables -//// ---------------------------------------------------------------------------- -//*/ -//// -------------------------- NONE -------------------------------------------- - - -///* -//// ---------------------------------------------------------------------------- -//// Static Prototype Functions -//// ---------------------------------------------------------------------------- -//*/ -//// -------------------------- NONE -------------------------------------------- - -///* -//// ---------------------------------------------------------------------------- -//// Exported functions -//// ---------------------------------------------------------------------------- -//*/ - -///* -////--------------------------------------------------------------------------- -//// Function Name : impeg2_memset_8bit_8x8_block_av8() -//// -//// Detail Description : This routine intialises the Block matrix buffer contents to a -//// particular Value. This function also assumes the buffer size -//// to be set is 64 Bytes fixed. It also assumes that blk matrix -//// used is 64 bit aligned. -//// -//// Inputs : pi2_blk_mat : Block Pointer -//// u2_val : Value with which the block is initialized -//// -//// Registers Used : v0 -//// -//// Stack Usage : 64 bytes -//// -//// Outputs : Block Matrix Iniliazed to given value -//// -//// Return Data : None -//// -//// Programming Note : This implementation assumes that blk matrix buffer -//// is 128 bit aligned -////----------------------------------------------------------------------------- -//*/ -.global impeg2_memset_8bit_8x8_block_av8 -ENTRY impeg2_memset_8bit_8x8_block_av8 - push_v_regs - -// ADD x3,x0,#WIDTH_X_SIZE @//x3 is another copy address offsetted - - dup v0.8b, w1 ////x1 is the 8-bit value to be set into - - st1 {v0.8b}, [x0], x2 ////Store the row 1 - st1 {v0.8b}, [x0], x2 ////Store the row 2 - st1 {v0.8b}, [x0], x2 ////Store the row 3 - st1 {v0.8b}, [x0], x2 ////Store the row 4 - st1 {v0.8b}, [x0], x2 ////Store the row 5 - st1 {v0.8b}, [x0], x2 ////Store the row 6 - st1 {v0.8b}, [x0], x2 ////Store the row 7 - st1 {v0.8b}, [x0], x2 ////Store the row 8 - - pop_v_regs - EXIT_FUNC - ret - - - - - - -///* -////--------------------------------------------------------------------------- -//// Function Name : impeg2_memset0_16bit_8x8_linear_block_av8() -//// -//// Detail Description : memsets resudual buf to 0 -//// -//// Inputs : x0 - pointer to y -//// x1 - pointer to u -//// x2 - pointer to v -//// Registers Used : v0 - -//// -//// Stack Usage : 64 bytes -//// -//// Outputs : The Motion Compensated Block -//// -//// Return Data : None -//// -//// Programming Note : -////----------------------------------------------------------------------------- -//*/ - - - -.global impeg2_memset0_16bit_8x8_linear_block_av8 - - -ENTRY impeg2_memset0_16bit_8x8_linear_block_av8 - - push_v_regs - - movi v0.8h, #0 - - //Y data - - st1 {v0.8h} , [x0], #16 //row1 - - st1 {v0.8h} , [x0], #16 //row2 - - st1 {v0.8h} , [x0], #16 //row3 - - st1 {v0.8h} , [x0], #16 //row4 - - st1 {v0.8h} , [x0], #16 //row5 - - st1 {v0.8h} , [x0], #16 //row6 - - st1 {v0.8h} , [x0], #16 //row7 - - st1 {v0.8h} , [x0], #16 //row8 - - - - pop_v_regs - EXIT_FUNC - ret - - - - diff --git a/common/impeg2_mem_func.c b/common/impeg2_mem_func.c deleted file mode 100644 index 9268c01..0000000 --- a/common/impeg2_mem_func.c +++ /dev/null @@ -1,87 +0,0 @@ -/****************************************************************************** - * - * Copyright (C) 2015 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at: - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - ***************************************************************************** - * Originally developed and contributed by Ittiam Systems Pvt. Ltd, Bangalore -*/ -/** -******************************************************************************* -* @file -* impeg2_utils.c -* -* @brief -* Contains utility function definitions for MPEG2 codec -* -* @author -* Harish -* -* @par List of Functions: -* - impeg2_memset0_16bit_8x8_linear_block() -* - impeg2_memset_8bit_8x8_block() -* -* @remarks -* None -* -******************************************************************************* -*/ - -#include -#include -#include "iv_datatypedef.h" -#include "impeg2_defs.h" - -/******************************************************************************* -* Function Name : impeg2_memset0_16bit_8x8_linear_block -* -* Description : memsets resudial buf to 0 -* -* Arguments : destination buffer -* -* Values Returned : None -*******************************************************************************/ - - -void impeg2_memset0_16bit_8x8_linear_block (WORD16 *pi2_buf) -{ - memset(pi2_buf,0,64 * sizeof(WORD16)); -} - - - -/******************************************************************************* -* Function Name : impeg2_memset_8bit_8x8_block -* -* Description : memsets residual buf to value -* -* Arguments : destination buffer, value and stride -* -* Values Returned : None -*******************************************************************************/ - - -void impeg2_memset_8bit_8x8_block(UWORD8 *pu1_dst, WORD32 u4_dc_val, WORD32 u4_dst_wd) -{ - WORD32 j; - - for(j = BLK_SIZE; j > 0; j--) - { - memset(pu1_dst, u4_dc_val, BLK_SIZE); - pu1_dst += u4_dst_wd; - } -} - - - diff --git a/common/impeg2_mem_func.h b/common/impeg2_mem_func.h deleted file mode 100644 index f73702c..0000000 --- a/common/impeg2_mem_func.h +++ /dev/null @@ -1,41 +0,0 @@ -/****************************************************************************** - * - * Copyright (C) 2015 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at: - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - ***************************************************************************** - * Originally developed and contributed by Ittiam Systems Pvt. Ltd, Bangalore -*/ - -#ifndef IMPEG2_MEM_FUNC_H_ -#define IMPEG2_MEM_FUNC_H_ - -typedef void pf_memset0_one_16bit_buf_t (WORD16 *buf); -typedef void pf_memset_8bit_t (UWORD8 *dst, WORD32 dc_val, WORD32 dst_wd); - -pf_memset0_one_16bit_buf_t impeg2_memset0_16bit_8x8_linear_block; -pf_memset0_one_16bit_buf_t impeg2_memset0_16bit_8x8_linear_block_a9q; - -pf_memset0_one_16bit_buf_t impeg2_memset0_16bit_8x8_linear_block_sse42; - -pf_memset0_one_16bit_buf_t impeg2_memset0_16bit_8x8_linear_block_av8; - -pf_memset_8bit_t impeg2_memset_8bit_8x8_block; -pf_memset_8bit_t impeg2_memset_8bit_8x8_block_a9q; - -pf_memset_8bit_t impeg2_memset_8bit_8x8_block_sse42; - -pf_memset_8bit_t impeg2_memset_8bit_8x8_block_av8; - -#endif /* IMPEG2_MEM_FUNC_H_ */ diff --git a/common/x86/impeg2_mem_func_sse42_intr.c b/common/x86/impeg2_mem_func_sse42_intr.c deleted file mode 100644 index de7de8f..0000000 --- a/common/x86/impeg2_mem_func_sse42_intr.c +++ /dev/null @@ -1,100 +0,0 @@ -/****************************************************************************** - * - * Copyright (C) 2015 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at: - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - ***************************************************************************** - * Originally developed and contributed by Ittiam Systems Pvt. Ltd, Bangalore -*/ - -/** - ******************************************************************************* - * @file - * impeg2_mem_func_sse42_intr.c - * - * @brief - * Contains utility function definitions for MPEG2 codec - * - * @author - * Mohit [100664] - * -* @par List of Functions: -* - impeg2_memset0_16bit_8x8_linear_block_sse42() -* - impeg2_memset_8bit_8x8_block_sse42() - * - * @remarks - * None - * - ******************************************************************************* - */ -#include -#include -#include "iv_datatypedef.h" -#include "impeg2_defs.h" - -#include -#include -#include -#include - -/******************************************************************************* -* Function Name : impeg2_memset0_16bit_8x8_linear_block -* -* Description : memsets resudial buf to 0 -* -* Arguments : destination buffer -* -* Values Returned : None -*******************************************************************************/ - - -void impeg2_memset0_16bit_8x8_linear_block_sse42 (WORD16 *buf) - { - __m128i zero_8x8_16b = _mm_set1_epi16(0); - _mm_storeu_si128((__m128i *) buf, zero_8x8_16b); - _mm_storeu_si128((__m128i *) (buf + 8), zero_8x8_16b); - _mm_storeu_si128((__m128i *) (buf + 16), zero_8x8_16b); - _mm_storeu_si128((__m128i *) (buf + 24), zero_8x8_16b); - _mm_storeu_si128((__m128i *) (buf + 32), zero_8x8_16b); - _mm_storeu_si128((__m128i *) (buf + 40), zero_8x8_16b); - _mm_storeu_si128((__m128i *) (buf + 48), zero_8x8_16b); - _mm_storeu_si128((__m128i *) (buf + 56), zero_8x8_16b); -} - - - -/******************************************************************************* -* Function Name : impeg2_memset_8bit_8x8_block -* -* Description : memsets residual buf to value -* -* Arguments : destination buffer, value and stride -* -* Values Returned : None -*******************************************************************************/ - - -void impeg2_memset_8bit_8x8_block_sse42(UWORD8 *dst, WORD32 dc_val, WORD32 dst_wd) -{ - __m128i value = _mm_set1_epi8((WORD8)dc_val); - - _mm_storel_epi64((__m128i *)dst, value); - _mm_storel_epi64((__m128i *) (dst + dst_wd), value); - _mm_storel_epi64((__m128i *) (dst + 2 * dst_wd), value); - _mm_storel_epi64((__m128i *) (dst + 3 * dst_wd), value); - _mm_storel_epi64((__m128i *) (dst + 4 * dst_wd), value); - _mm_storel_epi64((__m128i *) (dst + 5 * dst_wd), value); - _mm_storel_epi64((__m128i *) (dst + 6 * dst_wd), value); - _mm_storel_epi64((__m128i *) (dst + 7 * dst_wd), value); -} diff --git a/decoder/arm/impeg2d_function_selector.c b/decoder/arm/impeg2d_function_selector.c index bc416af..b0707fa 100644 --- a/decoder/arm/impeg2d_function_selector.c +++ b/decoder/arm/impeg2d_function_selector.c @@ -52,7 +52,6 @@ #include "impeg2_inter_pred.h" #include "impeg2_idct.h" #include "impeg2_globals.h" -#include "impeg2_mem_func.h" #include "impeg2_format_conv.h" #include "impeg2_macros.h" diff --git a/decoder/arm/impeg2d_function_selector_a9q.c b/decoder/arm/impeg2d_function_selector_a9q.c index 024145d..0acf48b 100644 --- a/decoder/arm/impeg2d_function_selector_a9q.c +++ b/decoder/arm/impeg2d_function_selector_a9q.c @@ -52,7 +52,6 @@ #include "impeg2_inter_pred.h" #include "impeg2_idct.h" #include "impeg2_globals.h" -#include "impeg2_mem_func.h" #include "impeg2_format_conv.h" #include "impeg2_macros.h" @@ -88,9 +87,6 @@ void impeg2d_init_function_ptr_a9q(dec_state_t *pv_codec) dec->pf_halfx_halfy_8x8 = &impeg2_mc_halfx_halfy_8x8_a9q; dec->pf_fullx_fully_8x8 = &impeg2_mc_fullx_fully_8x8_a9q; - dec->pf_memset_8bit_8x8_block = &impeg2_memset_8bit_8x8_block_a9q; - dec->pf_memset_16bit_8x8_linear_block = &impeg2_memset0_16bit_8x8_linear_block_a9q; - dec->pf_copy_yuv420p_buf = &impeg2_copy_frm_yuv420p; dec->pf_fmt_conv_yuv420p_to_yuv422ile = &impeg2_fmt_conv_yuv420p_to_yuv422ile; dec->pf_fmt_conv_yuv420p_to_yuv420sp_uv = &impeg2_fmt_conv_yuv420p_to_yuv420sp_uv_a9q; diff --git a/decoder/arm/impeg2d_function_selector_av8.c b/decoder/arm/impeg2d_function_selector_av8.c index d163b54..6fe0dfe 100644 --- a/decoder/arm/impeg2d_function_selector_av8.c +++ b/decoder/arm/impeg2d_function_selector_av8.c @@ -54,7 +54,6 @@ #include "impeg2_platform_macros.h" #include "impeg2_inter_pred.h" #include "impeg2_idct.h" -#include "impeg2_mem_func.h" #include "impeg2_format_conv.h" #include "impeg2_job_queue.h" #include "impeg2_globals.h" @@ -93,9 +92,6 @@ void impeg2d_init_function_ptr_av8(void *pv_codec) dec->pf_halfx_halfy_8x8 = &impeg2_mc_halfx_halfy_8x8_av8; dec->pf_fullx_fully_8x8 = &impeg2_mc_fullx_fully_8x8_av8; - dec->pf_memset_8bit_8x8_block = &impeg2_memset_8bit_8x8_block_av8; - dec->pf_memset_16bit_8x8_linear_block = &impeg2_memset0_16bit_8x8_linear_block_av8; - dec->pf_copy_yuv420p_buf = &impeg2_copy_frm_yuv420p; dec->pf_fmt_conv_yuv420p_to_yuv422ile = &impeg2_fmt_conv_yuv420p_to_yuv422ile; dec->pf_fmt_conv_yuv420p_to_yuv420sp_uv = &impeg2_fmt_conv_yuv420p_to_yuv420sp_uv_av8; diff --git a/decoder/impeg2d_api_main.c b/decoder/impeg2d_api_main.c index b2d8647..b7b8a02 100644 --- a/decoder/impeg2d_api_main.c +++ b/decoder/impeg2d_api_main.c @@ -59,7 +59,6 @@ #include "impeg2_inter_pred.h" #include "impeg2_idct.h" #include "impeg2_format_conv.h" -#include "impeg2_mem_func.h" #include "impeg2d.h" #include "impeg2d_api.h" diff --git a/decoder/impeg2d_d_pic.c b/decoder/impeg2d_d_pic.c index 23c393f..b9c318b 100644 --- a/decoder/impeg2d_d_pic.c +++ b/decoder/impeg2d_d_pic.c @@ -17,14 +17,13 @@ ***************************************************************************** * Originally developed and contributed by Ittiam Systems Pvt. Ltd, Bangalore */ - +#include #include "iv_datatypedef.h" #include "impeg2_defs.h" #include "impeg2_globals.h" #include "impeg2_platform_macros.h" #include "impeg2_inter_pred.h" #include "impeg2_idct.h" -#include "impeg2_mem_func.h" #include "impeg2_format_conv.h" #include "impeg2_disp_mgr.h" #include "impeg2_buf_mgr.h" @@ -147,6 +146,7 @@ IMPEG2D_ERROR_CODES_T impeg2d_dec_d_slice(dec_state_t *ps_dec) UWORD8 *pu1_vld_buf; WORD16 i2_dc_diff; + WORD32 row; UWORD32 u4_frame_width = ps_dec->u2_frame_width; UWORD32 u4_frm_offset = 0; if(ps_dec->u2_picture_structure != FRAME_PICTURE) @@ -200,7 +200,11 @@ IMPEG2D_ERROR_CODES_T impeg2d_dec_d_slice(dec_state_t *ps_dec) ps_dec->u2_def_dc_pred[Y_LUMA] = i2_dc_val; i2_dc_val = CLIP_U8(i2_dc_val); - ps_dec->pf_memset_8bit_8x8_block(pu1_vld_buf, i2_dc_val, u4_dst_wd); + for(row = BLK_SIZE; row > 0; row--) + { + memset(pu1_vld_buf, i2_dc_val, BLK_SIZE); + pu1_vld_buf += u4_dst_wd; + } } @@ -215,7 +219,11 @@ IMPEG2D_ERROR_CODES_T impeg2d_dec_d_slice(dec_state_t *ps_dec) i2_dc_val = ps_dec->u2_def_dc_pred[U_CHROMA] + i2_dc_diff; ps_dec->u2_def_dc_pred[U_CHROMA] = i2_dc_val; i2_dc_val = CLIP_U8(i2_dc_val); - ps_dec->pf_memset_8bit_8x8_block(pu1_vld_buf, i2_dc_val, u4_dst_wd); + for(row = BLK_SIZE; row > 0; row--) + { + memset(pu1_vld_buf, i2_dc_val, BLK_SIZE); + pu1_vld_buf += u4_dst_wd; + } /* Process V block of the MB */ @@ -225,7 +233,11 @@ IMPEG2D_ERROR_CODES_T impeg2d_dec_d_slice(dec_state_t *ps_dec) i2_dc_val = ps_dec->u2_def_dc_pred[V_CHROMA] + i2_dc_diff; ps_dec->u2_def_dc_pred[V_CHROMA] = i2_dc_val; i2_dc_val = CLIP_U8(i2_dc_val); - ps_dec->pf_memset_8bit_8x8_block(pu1_vld_buf, i2_dc_val, u4_dst_wd); + for(row = BLK_SIZE; row > 0; row--) + { + memset(pu1_vld_buf, i2_dc_val, BLK_SIZE); + pu1_vld_buf += u4_dst_wd; + } /* Common MB processing Steps */ diff --git a/decoder/impeg2d_debug.c b/decoder/impeg2d_debug.c index ff33290..4d40ddf 100644 --- a/decoder/impeg2d_debug.c +++ b/decoder/impeg2d_debug.c @@ -33,7 +33,6 @@ #include "impeg2_inter_pred.h" #include "impeg2_idct.h" #include "impeg2_format_conv.h" -#include "impeg2_mem_func.h" #include "impeg2_globals.h" #include "impeg2d_bitstream.h" diff --git a/decoder/impeg2d_dec_hdr.c b/decoder/impeg2d_dec_hdr.c index adb2082..9ef2be6 100644 --- a/decoder/impeg2d_dec_hdr.c +++ b/decoder/impeg2d_dec_hdr.c @@ -31,7 +31,6 @@ #include "impeg2_inter_pred.h" #include "impeg2_idct.h" #include "impeg2_format_conv.h" -#include "impeg2_mem_func.h" #include "impeg2_platform_macros.h" #include "ithread.h" #include "impeg2_job_queue.h" @@ -1257,8 +1256,6 @@ static WORD32 impeg2d_init_thread_dec_ctxt(dec_state_t *ps_dec, ps_dec_thd->pf_halfx_halfy_8x8 = ps_dec->pf_halfx_halfy_8x8; ps_dec_thd->pf_fullx_fully_8x8 = ps_dec->pf_fullx_fully_8x8; - ps_dec_thd->pf_memset_8bit_8x8_block = ps_dec->pf_memset_8bit_8x8_block; - ps_dec_thd->pf_memset_16bit_8x8_linear_block = ps_dec->pf_memset_16bit_8x8_linear_block; ps_dec_thd->pf_copy_yuv420p_buf = ps_dec->pf_copy_yuv420p_buf; ps_dec_thd->pf_fmt_conv_yuv420p_to_yuv422ile = ps_dec->pf_fmt_conv_yuv420p_to_yuv422ile; ps_dec_thd->pf_fmt_conv_yuv420p_to_yuv420sp_uv = ps_dec->pf_fmt_conv_yuv420p_to_yuv420sp_uv; diff --git a/decoder/impeg2d_decoder.c b/decoder/impeg2d_decoder.c index 726d9cd..fe0b870 100644 --- a/decoder/impeg2d_decoder.c +++ b/decoder/impeg2d_decoder.c @@ -59,7 +59,6 @@ #include "impeg2_inter_pred.h" #include "impeg2_idct.h" #include "impeg2_format_conv.h" -#include "impeg2_mem_func.h" #include "impeg2d.h" #include "impeg2d_api.h" diff --git a/decoder/impeg2d_deinterlace.c b/decoder/impeg2d_deinterlace.c index 3787367..65e1adc 100644 --- a/decoder/impeg2d_deinterlace.c +++ b/decoder/impeg2d_deinterlace.c @@ -31,7 +31,6 @@ #include "impeg2_inter_pred.h" #include "impeg2_idct.h" #include "impeg2_globals.h" -#include "impeg2_mem_func.h" #include "impeg2_format_conv.h" #include "impeg2_macros.h" diff --git a/decoder/impeg2d_function_selector_generic.c b/decoder/impeg2d_function_selector_generic.c index b8cdf03..8ff1fab 100644 --- a/decoder/impeg2d_function_selector_generic.c +++ b/decoder/impeg2d_function_selector_generic.c @@ -54,7 +54,6 @@ #include "impeg2_platform_macros.h" #include "impeg2_inter_pred.h" #include "impeg2_idct.h" -#include "impeg2_mem_func.h" #include "impeg2_format_conv.h" #include "impeg2_job_queue.h" #include "impeg2_globals.h" @@ -93,9 +92,6 @@ void impeg2d_init_function_ptr_generic(void *pv_codec) ps_dec->pf_halfx_halfy_8x8 = &impeg2_mc_halfx_halfy_8x8; ps_dec->pf_fullx_fully_8x8 = &impeg2_mc_fullx_fully_8x8; - ps_dec->pf_memset_8bit_8x8_block = &impeg2_memset_8bit_8x8_block; - ps_dec->pf_memset_16bit_8x8_linear_block = &impeg2_memset0_16bit_8x8_linear_block; - ps_dec->pf_copy_yuv420p_buf = &impeg2_copy_frm_yuv420p; ps_dec->pf_fmt_conv_yuv420p_to_yuv422ile = &impeg2_fmt_conv_yuv420p_to_yuv422ile; ps_dec->pf_fmt_conv_yuv420p_to_yuv420sp_uv = &impeg2_fmt_conv_yuv420p_to_yuv420sp_uv; diff --git a/decoder/impeg2d_globals.c b/decoder/impeg2d_globals.c index 8c71ecf..0c88c76 100644 --- a/decoder/impeg2d_globals.c +++ b/decoder/impeg2d_globals.c @@ -28,7 +28,6 @@ #include "impeg2_inter_pred.h" #include "impeg2_idct.h" #include "impeg2_globals.h" -#include "impeg2_mem_func.h" #include "impeg2_format_conv.h" #include "impeg2_macros.h" diff --git a/decoder/impeg2d_i_pic.c b/decoder/impeg2d_i_pic.c index 2e20983..c1e58d5 100644 --- a/decoder/impeg2d_i_pic.c +++ b/decoder/impeg2d_i_pic.c @@ -28,7 +28,6 @@ #include "impeg2_inter_pred.h" #include "impeg2_idct.h" #include "impeg2_globals.h" -#include "impeg2_mem_func.h" #include "impeg2_format_conv.h" #include "impeg2_macros.h" diff --git a/decoder/impeg2d_mc.c b/decoder/impeg2d_mc.c index 229579c..f814860 100644 --- a/decoder/impeg2d_mc.c +++ b/decoder/impeg2d_mc.c @@ -65,7 +65,6 @@ #include "impeg2_inter_pred.h" #include "impeg2_idct.h" #include "impeg2_globals.h" -#include "impeg2_mem_func.h" #include "impeg2_format_conv.h" #include "impeg2_macros.h" diff --git a/decoder/impeg2d_mv_dec.c b/decoder/impeg2d_mv_dec.c index b64d994..2700200 100644 --- a/decoder/impeg2d_mv_dec.c +++ b/decoder/impeg2d_mv_dec.c @@ -29,7 +29,6 @@ #include "impeg2_inter_pred.h" #include "impeg2_idct.h" #include "impeg2_globals.h" -#include "impeg2_mem_func.h" #include "impeg2_format_conv.h" #include "impeg2_macros.h" diff --git a/decoder/impeg2d_pic_proc.c b/decoder/impeg2d_pic_proc.c index ac29f9b..68307a9 100644 --- a/decoder/impeg2d_pic_proc.c +++ b/decoder/impeg2d_pic_proc.c @@ -30,7 +30,6 @@ #include "impeg2_inter_pred.h" #include "impeg2_idct.h" #include "impeg2_globals.h" -#include "impeg2_mem_func.h" #include "impeg2_format_conv.h" #include "impeg2_macros.h" diff --git a/decoder/impeg2d_pnb_pic.c b/decoder/impeg2d_pnb_pic.c index f7937a8..49915ef 100644 --- a/decoder/impeg2d_pnb_pic.c +++ b/decoder/impeg2d_pnb_pic.c @@ -30,7 +30,6 @@ #include "impeg2_inter_pred.h" #include "impeg2_idct.h" #include "impeg2_globals.h" -#include "impeg2_mem_func.h" #include "impeg2_format_conv.h" #include "impeg2_macros.h" diff --git a/decoder/impeg2d_structs.h b/decoder/impeg2d_structs.h index 38a370f..6126dde 100644 --- a/decoder/impeg2d_structs.h +++ b/decoder/impeg2d_structs.h @@ -153,8 +153,6 @@ typedef struct dec_state_struct_t pf_interpolate_t *pf_interpolate; pf_copy_mb_t *pf_copy_mb; - pf_memset0_one_16bit_buf_t *pf_memset_16bit_8x8_linear_block; - pf_memset_8bit_t *pf_memset_8bit_8x8_block; pf_copy_yuv420p_buf_t *pf_copy_yuv420p_buf; pf_fmt_conv_yuv420p_to_yuv422ile_t *pf_fmt_conv_yuv420p_to_yuv422ile; pf_fmt_conv_yuv420p_to_yuv420sp_t *pf_fmt_conv_yuv420p_to_yuv420sp_uv; diff --git a/decoder/impeg2d_vld.c b/decoder/impeg2d_vld.c index 30d7047..95c8f08 100644 --- a/decoder/impeg2d_vld.c +++ b/decoder/impeg2d_vld.c @@ -29,7 +29,6 @@ #include "impeg2_inter_pred.h" #include "impeg2_idct.h" #include "impeg2_globals.h" -#include "impeg2_mem_func.h" #include "impeg2_format_conv.h" #include "impeg2_macros.h" @@ -330,7 +329,7 @@ IMPEG2D_ERROR_CODES_T impeg2d_vld_inv_quant_mpeg1( PROFILE_DISABLE_MEMSET_RESBUF_IF0 if (1 != (ps_dec->u4_non_zero_cols | ps_dec->u4_non_zero_rows)) { - ps_dec->pf_memset_16bit_8x8_linear_block (pi2_out_addr); + memset(pi2_out_addr, 0, 64 * sizeof(WORD16)); } impeg2d_inv_quant_mpeg1(pi2_out_addr, pu1_weighting_matrix, @@ -409,7 +408,7 @@ IMPEG2D_ERROR_CODES_T impeg2d_vld_inv_quant_mpeg2( PROFILE_DISABLE_MEMSET_RESBUF_IF0 if (1 != (ps_dec->u4_non_zero_cols | ps_dec->u4_non_zero_rows)) { - ps_dec->pf_memset_16bit_8x8_linear_block (pi2_out_addr); + memset(pi2_out_addr, 0, 64 * sizeof(WORD16)); } i4_sum = impeg2d_inv_quant_mpeg2(pi2_out_addr, pu1_weighting_matrix, diff --git a/decoder/riscv/impeg2d_function_selector.c b/decoder/riscv/impeg2d_function_selector.c index 780c736..f03963a 100644 --- a/decoder/riscv/impeg2d_function_selector.c +++ b/decoder/riscv/impeg2d_function_selector.c @@ -52,7 +52,6 @@ #include "impeg2_inter_pred.h" #include "impeg2_idct.h" #include "impeg2_globals.h" -#include "impeg2_mem_func.h" #include "impeg2_format_conv.h" #include "impeg2_macros.h" diff --git a/decoder/x86/impeg2d_function_selector.c b/decoder/x86/impeg2d_function_selector.c index 9596aef..03211c6 100644 --- a/decoder/x86/impeg2d_function_selector.c +++ b/decoder/x86/impeg2d_function_selector.c @@ -56,7 +56,6 @@ #include "impeg2_inter_pred.h" #include "impeg2_idct.h" #include "impeg2_format_conv.h" -#include "impeg2_mem_func.h" #include "impeg2d.h" #include "impeg2d_bitstream.h" diff --git a/decoder/x86/impeg2d_function_selector_avx2.c b/decoder/x86/impeg2d_function_selector_avx2.c index ab5d847..e4add9b 100644 --- a/decoder/x86/impeg2d_function_selector_avx2.c +++ b/decoder/x86/impeg2d_function_selector_avx2.c @@ -56,7 +56,6 @@ #include "impeg2_inter_pred.h" #include "impeg2_idct.h" #include "impeg2_format_conv.h" -#include "impeg2_mem_func.h" #include "impeg2d.h" #include "impeg2d_bitstream.h" diff --git a/decoder/x86/impeg2d_function_selector_sse42.c b/decoder/x86/impeg2d_function_selector_sse42.c index a4b6673..3c230b6 100644 --- a/decoder/x86/impeg2d_function_selector_sse42.c +++ b/decoder/x86/impeg2d_function_selector_sse42.c @@ -56,7 +56,6 @@ #include "impeg2_inter_pred.h" #include "impeg2_idct.h" #include "impeg2_format_conv.h" -#include "impeg2_mem_func.h" #include "impeg2d.h" #include "impeg2d_bitstream.h" @@ -79,6 +78,4 @@ void impeg2d_init_function_ptr_sse42(void *pv_codec) dec->pf_fullx_halfy_8x8 = &impeg2_mc_fullx_halfy_8x8_sse42; dec->pf_fullx_fully_8x8 = &impeg2_mc_fullx_fully_8x8_sse42; - dec->pf_memset_8bit_8x8_block = &impeg2_memset_8bit_8x8_block_sse42; - dec->pf_memset_16bit_8x8_linear_block = &impeg2_memset0_16bit_8x8_linear_block_sse42; } diff --git a/decoder/x86/impeg2d_function_selector_ssse3.c b/decoder/x86/impeg2d_function_selector_ssse3.c index fb6c345..11b24b5 100644 --- a/decoder/x86/impeg2d_function_selector_ssse3.c +++ b/decoder/x86/impeg2d_function_selector_ssse3.c @@ -56,7 +56,6 @@ #include "impeg2_inter_pred.h" #include "impeg2_idct.h" #include "impeg2_format_conv.h" -#include "impeg2_mem_func.h" #include "impeg2d.h" #include "impeg2d_bitstream.h" diff --git a/libmpeg2dec_blocklist.txt b/libmpeg2dec_blocklist.txt index 0c5246b..bdcbe98 100644 --- a/libmpeg2dec_blocklist.txt +++ b/libmpeg2dec_blocklist.txt @@ -19,8 +19,6 @@ fun:impeg2_mc_fullx_halfy_8x8_a9q fun:impeg2_mc_halfx_fully_8x8_a9q fun:impeg2_mc_halfx_halfy_8x8_a9q fun:impeg2_mc_fullx_fully_8x8_a9q -fun:impeg2_memset_8bit_8x8_block_a9q -fun:impeg2_memset0_16bit_8x8_linear_block_a9q fun:impeg2_fmt_conv_yuv420p_to_yuv420sp_uv_a9q fun:impeg2_fmt_conv_yuv420p_to_yuv420sp_vu_a9q fun:impeg2_idct_recon_dc_av8 @@ -33,8 +31,6 @@ fun:impeg2_mc_fullx_halfy_8x8_av8 fun:impeg2_mc_halfx_fully_8x8_av8 fun:impeg2_mc_halfx_halfy_8x8_av8 fun:impeg2_mc_fullx_fully_8x8_av8 -fun:impeg2_memset_8bit_8x8_block_av8 -fun:impeg2_memset0_16bit_8x8_linear_block_av8 fun:impeg2_fmt_conv_yuv420p_to_yuv420sp_uv_av8 fun:impeg2_fmt_conv_yuv420p_to_yuv420sp_vu_av8 fun:impeg2_idct_recon_dc_sse42 @@ -47,8 +43,6 @@ fun:impeg2_mc_halfx_halfy_8x8_sse42 fun:impeg2_mc_halfx_fully_8x8_sse42 fun:impeg2_mc_fullx_halfy_8x8_sse42 fun:impeg2_mc_fullx_fully_8x8_sse42 -fun:impeg2_memset_8bit_8x8_block_sse42 -fun:impeg2_memset0_16bit_8x8_linear_block_sse42 fun:icv_sad_8x4_ssse3 fun:icv_variance_8x4_ssse3 fun:ideint_spatial_filter_ssse3