omxVCM4P10_InterpolateLuma_s.s revision 0c1bc742181ded4930842b46e9507372f0b1b963
10c1bc742181ded4930842b46e9507372f0b1b963James Dong;// 20c1bc742181ded4930842b46e9507372f0b1b963James Dong;// 30c1bc742181ded4930842b46e9507372f0b1b963James Dong;// File Name: omxVCM4P10_InterpolateLuma_s.s 40c1bc742181ded4930842b46e9507372f0b1b963James Dong;// OpenMAX DL: v1.0.2 50c1bc742181ded4930842b46e9507372f0b1b963James Dong;// Revision: 9641 60c1bc742181ded4930842b46e9507372f0b1b963James Dong;// Date: Thursday, February 7, 2008 70c1bc742181ded4930842b46e9507372f0b1b963James Dong;// 80c1bc742181ded4930842b46e9507372f0b1b963James Dong;// (c) Copyright 2007-2008 ARM Limited. All Rights Reserved. 90c1bc742181ded4930842b46e9507372f0b1b963James Dong;// 100c1bc742181ded4930842b46e9507372f0b1b963James Dong;// 110c1bc742181ded4930842b46e9507372f0b1b963James Dong;// 120c1bc742181ded4930842b46e9507372f0b1b963James Dong 130c1bc742181ded4930842b46e9507372f0b1b963James Dong;// Function: 140c1bc742181ded4930842b46e9507372f0b1b963James Dong;// omxVCM4P10_InterpolateLuma 150c1bc742181ded4930842b46e9507372f0b1b963James Dong;// 160c1bc742181ded4930842b46e9507372f0b1b963James Dong;// This function implements omxVCM4P10_InterpolateLuma in v6 assembly. 170c1bc742181ded4930842b46e9507372f0b1b963James Dong;// Performs quarter pel interpolation of inter luma MB. 180c1bc742181ded4930842b46e9507372f0b1b963James Dong;// It's assumed that the frame is already padded when calling this function. 190c1bc742181ded4930842b46e9507372f0b1b963James Dong;// Parameters: 200c1bc742181ded4930842b46e9507372f0b1b963James Dong;// [in] pSrc Pointer to the source reference frame buffer 210c1bc742181ded4930842b46e9507372f0b1b963James Dong;// [in] srcStep Reference frame step in byte 220c1bc742181ded4930842b46e9507372f0b1b963James Dong;// [in] dstStep Destination frame step in byte. Must be multiple of roi.width 230c1bc742181ded4930842b46e9507372f0b1b963James Dong;// [in] dx Fractional part of horizontal motion vector 240c1bc742181ded4930842b46e9507372f0b1b963James Dong;// component in 1/4 pixel unit; valid in the range [0,3] 250c1bc742181ded4930842b46e9507372f0b1b963James Dong;// [in] dy Fractional part of vertical motion vector 260c1bc742181ded4930842b46e9507372f0b1b963James Dong;// component in 1/4 pixel unit; valid in the range [0,3] 270c1bc742181ded4930842b46e9507372f0b1b963James Dong;// [in] roi Dimension of the interpolation region;the parameters roi.width and roi.height must 280c1bc742181ded4930842b46e9507372f0b1b963James Dong;// be equal to either 4, 8, or 16. 290c1bc742181ded4930842b46e9507372f0b1b963James Dong;// [out] pDst Pointer to the destination frame buffer. 300c1bc742181ded4930842b46e9507372f0b1b963James Dong;// if roi.width==4, 4-byte alignment required 310c1bc742181ded4930842b46e9507372f0b1b963James Dong;// if roi.width==8, 8-byte alignment required 320c1bc742181ded4930842b46e9507372f0b1b963James Dong;// if roi.width==16, 16-byte alignment required 330c1bc742181ded4930842b46e9507372f0b1b963James Dong;// 340c1bc742181ded4930842b46e9507372f0b1b963James Dong;// Return Value: 350c1bc742181ded4930842b46e9507372f0b1b963James Dong;// If the function runs without error, it returns OMX_Sts_NoErr. 360c1bc742181ded4930842b46e9507372f0b1b963James Dong;// It is assued that following cases are satisfied before calling this function: 370c1bc742181ded4930842b46e9507372f0b1b963James Dong;// pSrc or pDst is not NULL. 380c1bc742181ded4930842b46e9507372f0b1b963James Dong;// srcStep or dstStep >= roi.width. 390c1bc742181ded4930842b46e9507372f0b1b963James Dong;// dx or dy is in the range [0-3]. 400c1bc742181ded4930842b46e9507372f0b1b963James Dong;// roi.width or roi.height is not out of range {4, 8, 16}. 410c1bc742181ded4930842b46e9507372f0b1b963James Dong;// If roi.width is equal to 4, Dst is 4 byte aligned. 420c1bc742181ded4930842b46e9507372f0b1b963James Dong;// If roi.width is equal to 8, pDst is 8 byte aligned. 430c1bc742181ded4930842b46e9507372f0b1b963James Dong;// If roi.width is equal to 16, pDst is 16 byte aligned. 440c1bc742181ded4930842b46e9507372f0b1b963James Dong;// srcStep and dstStep is multiple of 8. 450c1bc742181ded4930842b46e9507372f0b1b963James Dong;// 460c1bc742181ded4930842b46e9507372f0b1b963James Dong;// 470c1bc742181ded4930842b46e9507372f0b1b963James Dong 480c1bc742181ded4930842b46e9507372f0b1b963James Dong 490c1bc742181ded4930842b46e9507372f0b1b963James Dong INCLUDE omxtypes_s.h 500c1bc742181ded4930842b46e9507372f0b1b963James Dong INCLUDE armCOMM_s.h 510c1bc742181ded4930842b46e9507372f0b1b963James Dong 520c1bc742181ded4930842b46e9507372f0b1b963James Dong M_VARIANTS ARM1136JS 530c1bc742181ded4930842b46e9507372f0b1b963James Dong 540c1bc742181ded4930842b46e9507372f0b1b963James Dong EXPORT omxVCM4P10_InterpolateLuma 550c1bc742181ded4930842b46e9507372f0b1b963James Dong 560c1bc742181ded4930842b46e9507372f0b1b963James Dong IF ARM1136JS 570c1bc742181ded4930842b46e9507372f0b1b963James Dong IMPORT armVCM4P10_InterpolateLuma_Copy4x4_unsafe 580c1bc742181ded4930842b46e9507372f0b1b963James Dong IMPORT armVCM4P10_InterpolateLuma_HorAlign9x_unsafe 590c1bc742181ded4930842b46e9507372f0b1b963James Dong IMPORT armVCM4P10_InterpolateLuma_VerAlign4x_unsafe 600c1bc742181ded4930842b46e9507372f0b1b963James Dong IMPORT armVCM4P10_Average_4x4_Align0_unsafe 610c1bc742181ded4930842b46e9507372f0b1b963James Dong IMPORT armVCM4P10_Average_4x4_Align2_unsafe 620c1bc742181ded4930842b46e9507372f0b1b963James Dong IMPORT armVCM4P10_Average_4x4_Align3_unsafe 630c1bc742181ded4930842b46e9507372f0b1b963James Dong IMPORT armVCM4P10_InterpolateLuma_HorDiagCopy_unsafe 640c1bc742181ded4930842b46e9507372f0b1b963James Dong IMPORT armVCM4P10_InterpolateLuma_VerDiagCopy_unsafe 650c1bc742181ded4930842b46e9507372f0b1b963James Dong ENDIF 660c1bc742181ded4930842b46e9507372f0b1b963James Dong 670c1bc742181ded4930842b46e9507372f0b1b963James Dong IF ARM1136JS 680c1bc742181ded4930842b46e9507372f0b1b963James Dong IMPORT armVCM4P10_InterpolateLuma_HalfVer4x4_unsafe 690c1bc742181ded4930842b46e9507372f0b1b963James Dong IMPORT armVCM4P10_InterpolateLuma_HalfHor4x4_unsafe 700c1bc742181ded4930842b46e9507372f0b1b963James Dong IMPORT armVCM4P10_InterpolateLuma_HalfDiagVerHor4x4_unsafe 710c1bc742181ded4930842b46e9507372f0b1b963James Dong IMPORT armVCM4P10_InterpolateLuma_HalfDiagHorVer4x4_unsafe 720c1bc742181ded4930842b46e9507372f0b1b963James Dong ENDIF 730c1bc742181ded4930842b46e9507372f0b1b963James Dong 740c1bc742181ded4930842b46e9507372f0b1b963James Dong 750c1bc742181ded4930842b46e9507372f0b1b963James Dong 760c1bc742181ded4930842b46e9507372f0b1b963James Dong;// Declare input registers 770c1bc742181ded4930842b46e9507372f0b1b963James DongpSrc RN 0 780c1bc742181ded4930842b46e9507372f0b1b963James DongsrcStep RN 1 790c1bc742181ded4930842b46e9507372f0b1b963James DongpDst RN 2 800c1bc742181ded4930842b46e9507372f0b1b963James DongdstStep RN 3 810c1bc742181ded4930842b46e9507372f0b1b963James DongiHeight RN 4 820c1bc742181ded4930842b46e9507372f0b1b963James DongiWidth RN 5 830c1bc742181ded4930842b46e9507372f0b1b963James Dong 840c1bc742181ded4930842b46e9507372f0b1b963James Dong;// Declare other intermediate registers 850c1bc742181ded4930842b46e9507372f0b1b963James Dongidx RN 6 860c1bc742181ded4930842b46e9507372f0b1b963James Dongidy RN 7 870c1bc742181ded4930842b46e9507372f0b1b963James Dongindex RN 6 880c1bc742181ded4930842b46e9507372f0b1b963James DongTemp RN 12 890c1bc742181ded4930842b46e9507372f0b1b963James DongpArgs RN 11 900c1bc742181ded4930842b46e9507372f0b1b963James Dong 910c1bc742181ded4930842b46e9507372f0b1b963James Dong 920c1bc742181ded4930842b46e9507372f0b1b963James Dong ;// End of CortexA8 930c1bc742181ded4930842b46e9507372f0b1b963James Dong 940c1bc742181ded4930842b46e9507372f0b1b963James Dong;//------------------------------------------------------------------------------------------------------------------------- 950c1bc742181ded4930842b46e9507372f0b1b963James Dong;//------------------------------------------------------------------------------------------------------------------------- 960c1bc742181ded4930842b46e9507372f0b1b963James Dong IF ARM1136JS 970c1bc742181ded4930842b46e9507372f0b1b963James Dong 980c1bc742181ded4930842b46e9507372f0b1b963James Dong 990c1bc742181ded4930842b46e9507372f0b1b963James Dong M_ALLOC4 ppDst, 8 1000c1bc742181ded4930842b46e9507372f0b1b963James Dong M_ALLOC4 ppSrc, 8 1010c1bc742181ded4930842b46e9507372f0b1b963James Dong M_ALLOC4 ppArgs, 16 1020c1bc742181ded4930842b46e9507372f0b1b963James Dong M_ALLOC4 pBuffer, 120 ;// 120 = 12x10 1030c1bc742181ded4930842b46e9507372f0b1b963James Dong M_ALLOC8 pInterBuf, 120 ;// 120 = 12*5*2 1040c1bc742181ded4930842b46e9507372f0b1b963James Dong M_ALLOC8 pTempBuf, 32 ;// 32 = 8*4 1050c1bc742181ded4930842b46e9507372f0b1b963James Dong 1060c1bc742181ded4930842b46e9507372f0b1b963James Dong ;// Function header 1070c1bc742181ded4930842b46e9507372f0b1b963James Dong ;// Interpolation of luma is implemented by processing block of pixels, size 4x4 at a time. 1080c1bc742181ded4930842b46e9507372f0b1b963James Dong ;// Depending on the values of motion vector fractional parts (dx,dy), one out of 16 cases will be processed. 1090c1bc742181ded4930842b46e9507372f0b1b963James Dong ;// Registers r4, r5, r6 to be preserved by internal unsafe functions 1100c1bc742181ded4930842b46e9507372f0b1b963James Dong ;// r4 - iHeight 1110c1bc742181ded4930842b46e9507372f0b1b963James Dong ;// r5 - iWidth 1120c1bc742181ded4930842b46e9507372f0b1b963James Dong ;// r6 - index 1130c1bc742181ded4930842b46e9507372f0b1b963James Dong M_START omxVCM4P10_InterpolateLuma, r11 1140c1bc742181ded4930842b46e9507372f0b1b963James Dong 1150c1bc742181ded4930842b46e9507372f0b1b963James Dong;// Declare other intermediate registers 1160c1bc742181ded4930842b46e9507372f0b1b963James Dongidx RN 6 1170c1bc742181ded4930842b46e9507372f0b1b963James Dongidy RN 7 1180c1bc742181ded4930842b46e9507372f0b1b963James Dongindex RN 6 1190c1bc742181ded4930842b46e9507372f0b1b963James DongTemp RN 12 1200c1bc742181ded4930842b46e9507372f0b1b963James DongpArgs RN 11 1210c1bc742181ded4930842b46e9507372f0b1b963James Dong 1220c1bc742181ded4930842b46e9507372f0b1b963James DongpBuf RN 8 1230c1bc742181ded4930842b46e9507372f0b1b963James DongHeight RN 9 1240c1bc742181ded4930842b46e9507372f0b1b963James DongbufStep RN 9 1250c1bc742181ded4930842b46e9507372f0b1b963James Dong 1260c1bc742181ded4930842b46e9507372f0b1b963James Dong ;// Define stack arguments 1270c1bc742181ded4930842b46e9507372f0b1b963James Dong M_ARG ptridx, 4 1280c1bc742181ded4930842b46e9507372f0b1b963James Dong M_ARG ptridy, 4 1290c1bc742181ded4930842b46e9507372f0b1b963James Dong M_ARG ptrWidth, 4 1300c1bc742181ded4930842b46e9507372f0b1b963James Dong M_ARG ptrHeight, 4 1310c1bc742181ded4930842b46e9507372f0b1b963James Dong 1320c1bc742181ded4930842b46e9507372f0b1b963James Dong ;// Load structure elements of roi 1330c1bc742181ded4930842b46e9507372f0b1b963James Dong M_LDR idx, ptridx 1340c1bc742181ded4930842b46e9507372f0b1b963James Dong M_LDR idy, ptridy 1350c1bc742181ded4930842b46e9507372f0b1b963James Dong M_LDR iWidth, ptrWidth 1360c1bc742181ded4930842b46e9507372f0b1b963James Dong M_LDR iHeight, ptrHeight 1370c1bc742181ded4930842b46e9507372f0b1b963James Dong 1380c1bc742181ded4930842b46e9507372f0b1b963James Dong M_PRINTF "roi.width %d\n", iWidth 1390c1bc742181ded4930842b46e9507372f0b1b963James Dong M_PRINTF "roi.height %d\n", iHeight 1400c1bc742181ded4930842b46e9507372f0b1b963James Dong 1410c1bc742181ded4930842b46e9507372f0b1b963James Dong ADD index, idx, idy, LSL #2 ;// [index] = [idy][idx] 1420c1bc742181ded4930842b46e9507372f0b1b963James Dong M_ADR pArgs, ppArgs 1430c1bc742181ded4930842b46e9507372f0b1b963James Dong 1440c1bc742181ded4930842b46e9507372f0b1b963James DongInterpolateLuma 1450c1bc742181ded4930842b46e9507372f0b1b963James DongBlock4x4WidthLoop 1460c1bc742181ded4930842b46e9507372f0b1b963James DongBlock4x4HeightLoop 1470c1bc742181ded4930842b46e9507372f0b1b963James Dong 1480c1bc742181ded4930842b46e9507372f0b1b963James Dong STM pArgs, {pSrc,srcStep,pDst,dstStep} 1490c1bc742181ded4930842b46e9507372f0b1b963James Dong M_ADR pBuf, pBuffer 1500c1bc742181ded4930842b46e9507372f0b1b963James Dong 1510c1bc742181ded4930842b46e9507372f0b1b963James Dong ;// switch table using motion vector as index 1520c1bc742181ded4930842b46e9507372f0b1b963James Dong M_SWITCH index, L 1530c1bc742181ded4930842b46e9507372f0b1b963James Dong M_CASE Case_0 1540c1bc742181ded4930842b46e9507372f0b1b963James Dong M_CASE Case_1 1550c1bc742181ded4930842b46e9507372f0b1b963James Dong M_CASE Case_2 1560c1bc742181ded4930842b46e9507372f0b1b963James Dong M_CASE Case_3 1570c1bc742181ded4930842b46e9507372f0b1b963James Dong M_CASE Case_4 1580c1bc742181ded4930842b46e9507372f0b1b963James Dong M_CASE Case_5 1590c1bc742181ded4930842b46e9507372f0b1b963James Dong M_CASE Case_6 1600c1bc742181ded4930842b46e9507372f0b1b963James Dong M_CASE Case_7 1610c1bc742181ded4930842b46e9507372f0b1b963James Dong M_CASE Case_8 1620c1bc742181ded4930842b46e9507372f0b1b963James Dong M_CASE Case_9 1630c1bc742181ded4930842b46e9507372f0b1b963James Dong M_CASE Case_a 1640c1bc742181ded4930842b46e9507372f0b1b963James Dong M_CASE Case_b 1650c1bc742181ded4930842b46e9507372f0b1b963James Dong M_CASE Case_c 1660c1bc742181ded4930842b46e9507372f0b1b963James Dong M_CASE Case_d 1670c1bc742181ded4930842b46e9507372f0b1b963James Dong M_CASE Case_e 1680c1bc742181ded4930842b46e9507372f0b1b963James Dong M_CASE Case_f 1690c1bc742181ded4930842b46e9507372f0b1b963James Dong M_ENDSWITCH 1700c1bc742181ded4930842b46e9507372f0b1b963James Dong 1710c1bc742181ded4930842b46e9507372f0b1b963James DongCase_0 1720c1bc742181ded4930842b46e9507372f0b1b963James Dong ;// Case G 1730c1bc742181ded4930842b46e9507372f0b1b963James Dong M_PRINTF "Case 0 \n" 1740c1bc742181ded4930842b46e9507372f0b1b963James Dong 1750c1bc742181ded4930842b46e9507372f0b1b963James Dong BL armVCM4P10_InterpolateLuma_Copy4x4_unsafe 1760c1bc742181ded4930842b46e9507372f0b1b963James Dong B Block4x4LoopEnd 1770c1bc742181ded4930842b46e9507372f0b1b963James Dong 1780c1bc742181ded4930842b46e9507372f0b1b963James DongCase_1 1790c1bc742181ded4930842b46e9507372f0b1b963James Dong ;// Case a 1800c1bc742181ded4930842b46e9507372f0b1b963James Dong M_PRINTF "Case 1 \n" 1810c1bc742181ded4930842b46e9507372f0b1b963James Dong 1820c1bc742181ded4930842b46e9507372f0b1b963James Dong SUB pSrc, pSrc, #2 1830c1bc742181ded4930842b46e9507372f0b1b963James Dong MOV Height, #4 1840c1bc742181ded4930842b46e9507372f0b1b963James Dong BL armVCM4P10_InterpolateLuma_HorAlign9x_unsafe 1850c1bc742181ded4930842b46e9507372f0b1b963James Dong BL armVCM4P10_InterpolateLuma_HalfHor4x4_unsafe 1860c1bc742181ded4930842b46e9507372f0b1b963James Dong BL armVCM4P10_Average_4x4_Align2_unsafe 1870c1bc742181ded4930842b46e9507372f0b1b963James Dong B Block4x4LoopEnd 1880c1bc742181ded4930842b46e9507372f0b1b963James DongCase_2 1890c1bc742181ded4930842b46e9507372f0b1b963James Dong ;// Case b 1900c1bc742181ded4930842b46e9507372f0b1b963James Dong M_PRINTF "Case 2 \n" 1910c1bc742181ded4930842b46e9507372f0b1b963James Dong 1920c1bc742181ded4930842b46e9507372f0b1b963James Dong SUB pSrc, pSrc, #2 1930c1bc742181ded4930842b46e9507372f0b1b963James Dong MOV Height, #4 1940c1bc742181ded4930842b46e9507372f0b1b963James Dong BL armVCM4P10_InterpolateLuma_HorAlign9x_unsafe 1950c1bc742181ded4930842b46e9507372f0b1b963James Dong BL armVCM4P10_InterpolateLuma_HalfHor4x4_unsafe 1960c1bc742181ded4930842b46e9507372f0b1b963James Dong B Block4x4LoopEnd 1970c1bc742181ded4930842b46e9507372f0b1b963James DongCase_3 1980c1bc742181ded4930842b46e9507372f0b1b963James Dong ;// Case c 1990c1bc742181ded4930842b46e9507372f0b1b963James Dong M_PRINTF "Case 3 \n" 2000c1bc742181ded4930842b46e9507372f0b1b963James Dong 2010c1bc742181ded4930842b46e9507372f0b1b963James Dong SUB pSrc, pSrc, #2 2020c1bc742181ded4930842b46e9507372f0b1b963James Dong MOV Height, #4 2030c1bc742181ded4930842b46e9507372f0b1b963James Dong BL armVCM4P10_InterpolateLuma_HorAlign9x_unsafe 2040c1bc742181ded4930842b46e9507372f0b1b963James Dong BL armVCM4P10_InterpolateLuma_HalfHor4x4_unsafe 2050c1bc742181ded4930842b46e9507372f0b1b963James Dong BL armVCM4P10_Average_4x4_Align3_unsafe 2060c1bc742181ded4930842b46e9507372f0b1b963James Dong B Block4x4LoopEnd 2070c1bc742181ded4930842b46e9507372f0b1b963James DongCase_4 2080c1bc742181ded4930842b46e9507372f0b1b963James Dong ;// Case d 2090c1bc742181ded4930842b46e9507372f0b1b963James Dong M_PRINTF "Case 4 \n" 2100c1bc742181ded4930842b46e9507372f0b1b963James Dong 2110c1bc742181ded4930842b46e9507372f0b1b963James Dong SUB pSrc, pSrc, srcStep, LSL #1 2120c1bc742181ded4930842b46e9507372f0b1b963James Dong MOV Height, #9 2130c1bc742181ded4930842b46e9507372f0b1b963James Dong BL armVCM4P10_InterpolateLuma_VerAlign4x_unsafe 2140c1bc742181ded4930842b46e9507372f0b1b963James Dong BL armVCM4P10_InterpolateLuma_HalfVer4x4_unsafe 2150c1bc742181ded4930842b46e9507372f0b1b963James Dong BL armVCM4P10_Average_4x4_Align0_unsafe 2160c1bc742181ded4930842b46e9507372f0b1b963James Dong 2170c1bc742181ded4930842b46e9507372f0b1b963James Dong B Block4x4LoopEnd 2180c1bc742181ded4930842b46e9507372f0b1b963James DongCase_5 2190c1bc742181ded4930842b46e9507372f0b1b963James Dong ;// Case e 2200c1bc742181ded4930842b46e9507372f0b1b963James Dong M_PRINTF "Case 5 \n" 2210c1bc742181ded4930842b46e9507372f0b1b963James Dong 2220c1bc742181ded4930842b46e9507372f0b1b963James Dong SUB pSrc, pSrc, #2 2230c1bc742181ded4930842b46e9507372f0b1b963James Dong MOV Height, #4 2240c1bc742181ded4930842b46e9507372f0b1b963James Dong M_ADR pDst, pTempBuf 2250c1bc742181ded4930842b46e9507372f0b1b963James Dong MOV dstStep, #4 2260c1bc742181ded4930842b46e9507372f0b1b963James Dong BL armVCM4P10_InterpolateLuma_HorAlign9x_unsafe 2270c1bc742181ded4930842b46e9507372f0b1b963James Dong BL armVCM4P10_InterpolateLuma_HalfHor4x4_unsafe 2280c1bc742181ded4930842b46e9507372f0b1b963James Dong M_ADR pArgs, ppArgs 2290c1bc742181ded4930842b46e9507372f0b1b963James Dong LDM pArgs, {pSrc, srcStep, pDst, dstStep} 2300c1bc742181ded4930842b46e9507372f0b1b963James Dong SUB pSrc, pSrc, srcStep, LSL #1 2310c1bc742181ded4930842b46e9507372f0b1b963James Dong M_ADR pBuf, pBuffer 2320c1bc742181ded4930842b46e9507372f0b1b963James Dong MOV Height, #9 2330c1bc742181ded4930842b46e9507372f0b1b963James Dong BL armVCM4P10_InterpolateLuma_VerAlign4x_unsafe 2340c1bc742181ded4930842b46e9507372f0b1b963James Dong BL armVCM4P10_InterpolateLuma_HalfVer4x4_unsafe 2350c1bc742181ded4930842b46e9507372f0b1b963James Dong M_ADR pSrc, pTempBuf 2360c1bc742181ded4930842b46e9507372f0b1b963James Dong MOV srcStep, #4 2370c1bc742181ded4930842b46e9507372f0b1b963James Dong BL armVCM4P10_Average_4x4_Align0_unsafe 2380c1bc742181ded4930842b46e9507372f0b1b963James Dong 2390c1bc742181ded4930842b46e9507372f0b1b963James Dong 2400c1bc742181ded4930842b46e9507372f0b1b963James Dong B Block4x4LoopEnd 2410c1bc742181ded4930842b46e9507372f0b1b963James DongCase_6 2420c1bc742181ded4930842b46e9507372f0b1b963James Dong ;// Case f 2430c1bc742181ded4930842b46e9507372f0b1b963James Dong M_PRINTF "Case 6 \n" 2440c1bc742181ded4930842b46e9507372f0b1b963James Dong 2450c1bc742181ded4930842b46e9507372f0b1b963James Dong SUB pSrc, pSrc, #2 2460c1bc742181ded4930842b46e9507372f0b1b963James Dong SUB pSrc, pSrc, srcStep, LSL #1 2470c1bc742181ded4930842b46e9507372f0b1b963James Dong MOV Height, #9 2480c1bc742181ded4930842b46e9507372f0b1b963James Dong BL armVCM4P10_InterpolateLuma_HorAlign9x_unsafe 2490c1bc742181ded4930842b46e9507372f0b1b963James Dong M_ADR pBuf, pInterBuf 2500c1bc742181ded4930842b46e9507372f0b1b963James Dong BL armVCM4P10_InterpolateLuma_HalfDiagHorVer4x4_unsafe 2510c1bc742181ded4930842b46e9507372f0b1b963James Dong M_ADR idy, pTempBuf 2520c1bc742181ded4930842b46e9507372f0b1b963James Dong BL armVCM4P10_InterpolateLuma_VerDiagCopy_unsafe 2530c1bc742181ded4930842b46e9507372f0b1b963James Dong BL armVCM4P10_Average_4x4_Align0_unsafe 2540c1bc742181ded4930842b46e9507372f0b1b963James Dong B Block4x4LoopEnd 2550c1bc742181ded4930842b46e9507372f0b1b963James DongCase_7 2560c1bc742181ded4930842b46e9507372f0b1b963James Dong ;// Case g 2570c1bc742181ded4930842b46e9507372f0b1b963James Dong M_PRINTF "Case 7 \n" 2580c1bc742181ded4930842b46e9507372f0b1b963James Dong 2590c1bc742181ded4930842b46e9507372f0b1b963James Dong SUB pSrc, pSrc, #2 2600c1bc742181ded4930842b46e9507372f0b1b963James Dong MOV Height, #4 2610c1bc742181ded4930842b46e9507372f0b1b963James Dong M_ADR pDst, pTempBuf 2620c1bc742181ded4930842b46e9507372f0b1b963James Dong MOV dstStep, #4 2630c1bc742181ded4930842b46e9507372f0b1b963James Dong BL armVCM4P10_InterpolateLuma_HorAlign9x_unsafe 2640c1bc742181ded4930842b46e9507372f0b1b963James Dong BL armVCM4P10_InterpolateLuma_HalfHor4x4_unsafe 2650c1bc742181ded4930842b46e9507372f0b1b963James Dong M_ADR pArgs, ppArgs 2660c1bc742181ded4930842b46e9507372f0b1b963James Dong LDM pArgs, {pSrc, srcStep, pDst, dstStep} 2670c1bc742181ded4930842b46e9507372f0b1b963James Dong SUB pSrc, pSrc, srcStep, LSL #1 2680c1bc742181ded4930842b46e9507372f0b1b963James Dong ADD pSrc, pSrc, #1 2690c1bc742181ded4930842b46e9507372f0b1b963James Dong M_ADR pBuf, pBuffer 2700c1bc742181ded4930842b46e9507372f0b1b963James Dong MOV Height, #9 2710c1bc742181ded4930842b46e9507372f0b1b963James Dong BL armVCM4P10_InterpolateLuma_VerAlign4x_unsafe 2720c1bc742181ded4930842b46e9507372f0b1b963James Dong BL armVCM4P10_InterpolateLuma_HalfVer4x4_unsafe 2730c1bc742181ded4930842b46e9507372f0b1b963James Dong M_ADR pSrc, pTempBuf 2740c1bc742181ded4930842b46e9507372f0b1b963James Dong MOV srcStep, #4 2750c1bc742181ded4930842b46e9507372f0b1b963James Dong BL armVCM4P10_Average_4x4_Align0_unsafe 2760c1bc742181ded4930842b46e9507372f0b1b963James Dong 2770c1bc742181ded4930842b46e9507372f0b1b963James Dong B Block4x4LoopEnd 2780c1bc742181ded4930842b46e9507372f0b1b963James DongCase_8 2790c1bc742181ded4930842b46e9507372f0b1b963James Dong ;// Case h 2800c1bc742181ded4930842b46e9507372f0b1b963James Dong M_PRINTF "Case 8 \n" 2810c1bc742181ded4930842b46e9507372f0b1b963James Dong 2820c1bc742181ded4930842b46e9507372f0b1b963James Dong SUB pSrc, pSrc, srcStep, LSL #1 2830c1bc742181ded4930842b46e9507372f0b1b963James Dong MOV Height, #9 2840c1bc742181ded4930842b46e9507372f0b1b963James Dong BL armVCM4P10_InterpolateLuma_VerAlign4x_unsafe 2850c1bc742181ded4930842b46e9507372f0b1b963James Dong BL armVCM4P10_InterpolateLuma_HalfVer4x4_unsafe 2860c1bc742181ded4930842b46e9507372f0b1b963James Dong B Block4x4LoopEnd 2870c1bc742181ded4930842b46e9507372f0b1b963James DongCase_9 2880c1bc742181ded4930842b46e9507372f0b1b963James Dong ;// Case i 2890c1bc742181ded4930842b46e9507372f0b1b963James Dong M_PRINTF "Case 9 \n" 2900c1bc742181ded4930842b46e9507372f0b1b963James Dong 2910c1bc742181ded4930842b46e9507372f0b1b963James Dong SUB pSrc, pSrc, #2 2920c1bc742181ded4930842b46e9507372f0b1b963James Dong SUB pSrc, pSrc, srcStep, LSL #1 2930c1bc742181ded4930842b46e9507372f0b1b963James Dong MOV Height, #9 2940c1bc742181ded4930842b46e9507372f0b1b963James Dong BL armVCM4P10_InterpolateLuma_HorAlign9x_unsafe 2950c1bc742181ded4930842b46e9507372f0b1b963James Dong ADD pSrc, pSrc, srcStep, LSL #1 2960c1bc742181ded4930842b46e9507372f0b1b963James Dong M_ADR pBuf, pInterBuf 2970c1bc742181ded4930842b46e9507372f0b1b963James Dong BL armVCM4P10_InterpolateLuma_HalfDiagVerHor4x4_unsafe 2980c1bc742181ded4930842b46e9507372f0b1b963James Dong M_ADR idy, pTempBuf 2990c1bc742181ded4930842b46e9507372f0b1b963James Dong BL armVCM4P10_InterpolateLuma_HorDiagCopy_unsafe 3000c1bc742181ded4930842b46e9507372f0b1b963James Dong BL armVCM4P10_Average_4x4_Align2_unsafe 3010c1bc742181ded4930842b46e9507372f0b1b963James Dong B Block4x4LoopEnd 3020c1bc742181ded4930842b46e9507372f0b1b963James DongCase_a 3030c1bc742181ded4930842b46e9507372f0b1b963James Dong ;// Case j 3040c1bc742181ded4930842b46e9507372f0b1b963James Dong M_PRINTF "Case a \n" 3050c1bc742181ded4930842b46e9507372f0b1b963James Dong 3060c1bc742181ded4930842b46e9507372f0b1b963James Dong SUB pSrc, pSrc, #2 3070c1bc742181ded4930842b46e9507372f0b1b963James Dong SUB pSrc, pSrc, srcStep, LSL #1 3080c1bc742181ded4930842b46e9507372f0b1b963James Dong MOV Height, #9 3090c1bc742181ded4930842b46e9507372f0b1b963James Dong BL armVCM4P10_InterpolateLuma_HorAlign9x_unsafe 3100c1bc742181ded4930842b46e9507372f0b1b963James Dong ADD pSrc, pSrc, srcStep, LSL #1 3110c1bc742181ded4930842b46e9507372f0b1b963James Dong M_ADR pBuf, pInterBuf 3120c1bc742181ded4930842b46e9507372f0b1b963James Dong BL armVCM4P10_InterpolateLuma_HalfDiagVerHor4x4_unsafe 3130c1bc742181ded4930842b46e9507372f0b1b963James Dong B Block4x4LoopEnd 3140c1bc742181ded4930842b46e9507372f0b1b963James DongCase_b 3150c1bc742181ded4930842b46e9507372f0b1b963James Dong ;// Case k 3160c1bc742181ded4930842b46e9507372f0b1b963James Dong M_PRINTF "Case b \n" 3170c1bc742181ded4930842b46e9507372f0b1b963James Dong SUB pSrc, pSrc, #2 3180c1bc742181ded4930842b46e9507372f0b1b963James Dong SUB pSrc, pSrc, srcStep, LSL #1 3190c1bc742181ded4930842b46e9507372f0b1b963James Dong MOV Height, #9 3200c1bc742181ded4930842b46e9507372f0b1b963James Dong BL armVCM4P10_InterpolateLuma_HorAlign9x_unsafe 3210c1bc742181ded4930842b46e9507372f0b1b963James Dong ADD pSrc, pSrc, srcStep, LSL #1 3220c1bc742181ded4930842b46e9507372f0b1b963James Dong M_ADR pBuf, pInterBuf 3230c1bc742181ded4930842b46e9507372f0b1b963James Dong BL armVCM4P10_InterpolateLuma_HalfDiagVerHor4x4_unsafe 3240c1bc742181ded4930842b46e9507372f0b1b963James Dong M_ADR idy, pTempBuf 3250c1bc742181ded4930842b46e9507372f0b1b963James Dong BL armVCM4P10_InterpolateLuma_HorDiagCopy_unsafe 3260c1bc742181ded4930842b46e9507372f0b1b963James Dong BL armVCM4P10_Average_4x4_Align3_unsafe 3270c1bc742181ded4930842b46e9507372f0b1b963James Dong B Block4x4LoopEnd 3280c1bc742181ded4930842b46e9507372f0b1b963James DongCase_c 3290c1bc742181ded4930842b46e9507372f0b1b963James Dong ;// Case n 3300c1bc742181ded4930842b46e9507372f0b1b963James Dong M_PRINTF "Case c \n" 3310c1bc742181ded4930842b46e9507372f0b1b963James Dong 3320c1bc742181ded4930842b46e9507372f0b1b963James Dong SUB pSrc, pSrc, srcStep, LSL #1 3330c1bc742181ded4930842b46e9507372f0b1b963James Dong MOV Height, #9 3340c1bc742181ded4930842b46e9507372f0b1b963James Dong BL armVCM4P10_InterpolateLuma_VerAlign4x_unsafe 3350c1bc742181ded4930842b46e9507372f0b1b963James Dong BL armVCM4P10_InterpolateLuma_HalfVer4x4_unsafe 3360c1bc742181ded4930842b46e9507372f0b1b963James Dong ADD pSrc, pSrc, srcStep ;// Update pSrc to one row down 3370c1bc742181ded4930842b46e9507372f0b1b963James Dong BL armVCM4P10_Average_4x4_Align0_unsafe 3380c1bc742181ded4930842b46e9507372f0b1b963James Dong B Block4x4LoopEnd 3390c1bc742181ded4930842b46e9507372f0b1b963James DongCase_d 3400c1bc742181ded4930842b46e9507372f0b1b963James Dong ;// Case p 3410c1bc742181ded4930842b46e9507372f0b1b963James Dong M_PRINTF "Case d \n" 3420c1bc742181ded4930842b46e9507372f0b1b963James Dong SUB pSrc, pSrc, #2 3430c1bc742181ded4930842b46e9507372f0b1b963James Dong ADD pSrc, pSrc, srcStep 3440c1bc742181ded4930842b46e9507372f0b1b963James Dong MOV Height, #4 3450c1bc742181ded4930842b46e9507372f0b1b963James Dong M_ADR pDst, pTempBuf 3460c1bc742181ded4930842b46e9507372f0b1b963James Dong MOV dstStep, #4 3470c1bc742181ded4930842b46e9507372f0b1b963James Dong BL armVCM4P10_InterpolateLuma_HorAlign9x_unsafe 3480c1bc742181ded4930842b46e9507372f0b1b963James Dong BL armVCM4P10_InterpolateLuma_HalfHor4x4_unsafe 3490c1bc742181ded4930842b46e9507372f0b1b963James Dong M_ADR pArgs, ppArgs 3500c1bc742181ded4930842b46e9507372f0b1b963James Dong LDM pArgs, {pSrc, srcStep, pDst, dstStep} 3510c1bc742181ded4930842b46e9507372f0b1b963James Dong SUB pSrc, pSrc, srcStep, LSL #1 3520c1bc742181ded4930842b46e9507372f0b1b963James Dong M_ADR pBuf, pBuffer 3530c1bc742181ded4930842b46e9507372f0b1b963James Dong MOV Height, #9 3540c1bc742181ded4930842b46e9507372f0b1b963James Dong BL armVCM4P10_InterpolateLuma_VerAlign4x_unsafe 3550c1bc742181ded4930842b46e9507372f0b1b963James Dong BL armVCM4P10_InterpolateLuma_HalfVer4x4_unsafe 3560c1bc742181ded4930842b46e9507372f0b1b963James Dong M_ADR pSrc, pTempBuf 3570c1bc742181ded4930842b46e9507372f0b1b963James Dong MOV srcStep, #4 3580c1bc742181ded4930842b46e9507372f0b1b963James Dong BL armVCM4P10_Average_4x4_Align0_unsafe 3590c1bc742181ded4930842b46e9507372f0b1b963James Dong B Block4x4LoopEnd 3600c1bc742181ded4930842b46e9507372f0b1b963James DongCase_e 3610c1bc742181ded4930842b46e9507372f0b1b963James Dong ;// Case q 3620c1bc742181ded4930842b46e9507372f0b1b963James Dong M_PRINTF "Case e \n" 3630c1bc742181ded4930842b46e9507372f0b1b963James Dong 3640c1bc742181ded4930842b46e9507372f0b1b963James Dong SUB pSrc, pSrc, #2 3650c1bc742181ded4930842b46e9507372f0b1b963James Dong SUB pSrc, pSrc, srcStep, LSL #1 3660c1bc742181ded4930842b46e9507372f0b1b963James Dong MOV Height, #9 3670c1bc742181ded4930842b46e9507372f0b1b963James Dong BL armVCM4P10_InterpolateLuma_HorAlign9x_unsafe 3680c1bc742181ded4930842b46e9507372f0b1b963James Dong M_ADR pBuf, pInterBuf 3690c1bc742181ded4930842b46e9507372f0b1b963James Dong BL armVCM4P10_InterpolateLuma_HalfDiagHorVer4x4_unsafe 3700c1bc742181ded4930842b46e9507372f0b1b963James Dong M_ADR idy, pTempBuf 3710c1bc742181ded4930842b46e9507372f0b1b963James Dong BL armVCM4P10_InterpolateLuma_VerDiagCopy_unsafe 3720c1bc742181ded4930842b46e9507372f0b1b963James Dong ADD pSrc, pSrc, #4 3730c1bc742181ded4930842b46e9507372f0b1b963James Dong BL armVCM4P10_Average_4x4_Align0_unsafe 3740c1bc742181ded4930842b46e9507372f0b1b963James Dong 3750c1bc742181ded4930842b46e9507372f0b1b963James Dong B Block4x4LoopEnd 3760c1bc742181ded4930842b46e9507372f0b1b963James DongCase_f 3770c1bc742181ded4930842b46e9507372f0b1b963James Dong ;// Case r 3780c1bc742181ded4930842b46e9507372f0b1b963James Dong M_PRINTF "Case f \n" 3790c1bc742181ded4930842b46e9507372f0b1b963James Dong SUB pSrc, pSrc, #2 3800c1bc742181ded4930842b46e9507372f0b1b963James Dong ADD pSrc, pSrc, srcStep 3810c1bc742181ded4930842b46e9507372f0b1b963James Dong MOV Height, #4 3820c1bc742181ded4930842b46e9507372f0b1b963James Dong M_ADR pDst, pTempBuf 3830c1bc742181ded4930842b46e9507372f0b1b963James Dong MOV dstStep, #4 3840c1bc742181ded4930842b46e9507372f0b1b963James Dong BL armVCM4P10_InterpolateLuma_HorAlign9x_unsafe 3850c1bc742181ded4930842b46e9507372f0b1b963James Dong BL armVCM4P10_InterpolateLuma_HalfHor4x4_unsafe 3860c1bc742181ded4930842b46e9507372f0b1b963James Dong M_ADR pArgs, ppArgs 3870c1bc742181ded4930842b46e9507372f0b1b963James Dong LDM pArgs, {pSrc, srcStep, pDst, dstStep} 3880c1bc742181ded4930842b46e9507372f0b1b963James Dong SUB pSrc, pSrc, srcStep, LSL #1 3890c1bc742181ded4930842b46e9507372f0b1b963James Dong ADD pSrc, pSrc, #1 3900c1bc742181ded4930842b46e9507372f0b1b963James Dong M_ADR pBuf, pBuffer 3910c1bc742181ded4930842b46e9507372f0b1b963James Dong MOV Height, #9 3920c1bc742181ded4930842b46e9507372f0b1b963James Dong BL armVCM4P10_InterpolateLuma_VerAlign4x_unsafe 3930c1bc742181ded4930842b46e9507372f0b1b963James Dong BL armVCM4P10_InterpolateLuma_HalfVer4x4_unsafe 3940c1bc742181ded4930842b46e9507372f0b1b963James Dong M_ADR pSrc, pTempBuf 3950c1bc742181ded4930842b46e9507372f0b1b963James Dong MOV srcStep, #4 3960c1bc742181ded4930842b46e9507372f0b1b963James Dong BL armVCM4P10_Average_4x4_Align0_unsafe 3970c1bc742181ded4930842b46e9507372f0b1b963James Dong 3980c1bc742181ded4930842b46e9507372f0b1b963James DongBlock4x4LoopEnd 3990c1bc742181ded4930842b46e9507372f0b1b963James Dong 4000c1bc742181ded4930842b46e9507372f0b1b963James Dong ;// Width Loop 4010c1bc742181ded4930842b46e9507372f0b1b963James Dong SUBS iWidth, iWidth, #4 4020c1bc742181ded4930842b46e9507372f0b1b963James Dong M_ADR pArgs, ppArgs 4030c1bc742181ded4930842b46e9507372f0b1b963James Dong LDM pArgs, {pSrc,srcStep,pDst,dstStep} ;// Load arguments 4040c1bc742181ded4930842b46e9507372f0b1b963James Dong ADD pSrc, pSrc, #4 4050c1bc742181ded4930842b46e9507372f0b1b963James Dong ADD pDst, pDst, #4 4060c1bc742181ded4930842b46e9507372f0b1b963James Dong BGT Block4x4WidthLoop 4070c1bc742181ded4930842b46e9507372f0b1b963James Dong 4080c1bc742181ded4930842b46e9507372f0b1b963James Dong ;// Height Loop 4090c1bc742181ded4930842b46e9507372f0b1b963James Dong SUBS iHeight, iHeight, #4 4100c1bc742181ded4930842b46e9507372f0b1b963James Dong M_LDR iWidth, ptrWidth 4110c1bc742181ded4930842b46e9507372f0b1b963James Dong M_ADR pArgs, ppArgs 4120c1bc742181ded4930842b46e9507372f0b1b963James Dong ADD pSrc, pSrc, srcStep, LSL #2 4130c1bc742181ded4930842b46e9507372f0b1b963James Dong ADD pDst, pDst, dstStep, LSL #2 4140c1bc742181ded4930842b46e9507372f0b1b963James Dong SUB pSrc, pSrc, iWidth 4150c1bc742181ded4930842b46e9507372f0b1b963James Dong SUB pDst, pDst, iWidth 4160c1bc742181ded4930842b46e9507372f0b1b963James Dong BGT Block4x4HeightLoop 4170c1bc742181ded4930842b46e9507372f0b1b963James Dong 4180c1bc742181ded4930842b46e9507372f0b1b963James DongEndOfInterpolation 4190c1bc742181ded4930842b46e9507372f0b1b963James Dong MOV r0, #0 4200c1bc742181ded4930842b46e9507372f0b1b963James Dong M_END 4210c1bc742181ded4930842b46e9507372f0b1b963James Dong 4220c1bc742181ded4930842b46e9507372f0b1b963James Dong ENDIF 4230c1bc742181ded4930842b46e9507372f0b1b963James Dong 4240c1bc742181ded4930842b46e9507372f0b1b963James Dong 4250c1bc742181ded4930842b46e9507372f0b1b963James Dong END 4260c1bc742181ded4930842b46e9507372f0b1b963James Dong