1 ;/** 2 ; * 3 ; * File Name: omxVCM4P2_DecodeVLCZigzag_Inter_s.s 4 ; * OpenMAX DL: v1.0.2 5 ; * Revision: 9641 6 ; * Date: Thursday, February 7, 2008 7 ; * 8 ; * (c) Copyright 2007-2008 ARM Limited. All Rights Reserved. 9 ; * 10 ; * 11 ; * 12 ; * Description: 13 ; * Contains modules for zigzag scanning and VLC decoding 14 ; * for inter block. 15 ; * 16 ; * 17 ; * 18 ; * Function: omxVCM4P2_DecodeVLCZigzag_Inter 19 ; * 20 ; * Description: 21 ; * Performs VLC decoding and inverse zigzag scan for one inter coded block. 22 ; * 23 ; * Remarks: 24 ; * 25 ; * Parameters: 26 ; * [in] ppBitStream pointer to the pointer to the current byte in 27 ; * the bitstream buffer 28 ; * [in] pBitOffset pointer to the bit position in the byte pointed 29 ; * to by *ppBitStream. *pBitOffset is valid within [0-7]. 30 ; * [in] shortVideoHeader binary flag indicating presence of short_video_header; 31 ; * escape modes 0-3 are used if shortVideoHeader==0, 32 ; * and escape mode 4 is used when shortVideoHeader==1. 33 ; * [out] ppBitStream *ppBitStream is updated after the block is 34 ; * decoded, so that it points to the current byte 35 ; * in the bit stream buffer 36 ; * [out] pBitOffset *pBitOffset is updated so that it points to the 37 ; * current bit position in the byte pointed by 38 ; * *ppBitStream 39 ; * [out] pDst pointer to the coefficient buffer of current 40 ; * block. Must be 16-byte aligned 41 ; * 42 ; * Return Value: 43 ; * OMX_Sts_BadArgErr - bad arguments 44 ; * -At least one of the following pointers is NULL: ppBitStream, *ppBitStream, pBitOffset, pDst, or 45 ; * -pDst is not 16-byte aligned, or 46 ; * -*pBitOffset exceeds [0,7]. 47 ; * OMX_Sts_Err - status error 48 ; * -At least one mark bit is equal to zero 49 ; * -Encountered an illegal stream code that cannot be found in the VLC table 50 ; * -Encountered and illegal code in the VLC FLC table 51 ; * -The number of coefficients is greater than 64 52 ; * 53 ; */ 54 55 56 INCLUDE omxtypes_s.h 57 INCLUDE armCOMM_s.h 58 INCLUDE armCOMM_BitDec_s.h 59 60 61 M_VARIANTS ARM1136JS 62 63 64 65 66 67 IF ARM1136JS 68 69 ;// Import various tables needed for the function 70 71 72 IMPORT armVCM4P2_InterVlcL0L1 ;// Contains optimized and packed VLC Tables for both Last =1 and last=0 73 ;// Packed in Run:Level:Last format 74 IMPORT armVCM4P2_InterL0L1LMAX ;// Contains LMAX table entries with both Last=0 and Last=1 75 IMPORT armVCM4P2_InterL0L1RMAX ;// Contains RMAX table entries with both Last=0 and Last=1 76 IMPORT armVCM4P2_aClassicalZigzagScan ;// contains classical Zigzag table entries with double the original values 77 IMPORT armVCM4P2_DecodeVLCZigzag_AC_unsafe 78 79 80 81 ;//Input Arguments 82 83 ppBitStream RN 0 84 pBitOffset RN 1 85 pDst RN 2 86 shortVideoHeader RN 3 87 88 ;//Local Variables 89 90 Return RN 0 91 92 pVlcTableL0L1 RN 4 93 pLMAXTableL0L1 RN 4 94 pRMAXTableL0L1 RN 4 95 pZigzagTable RN 4 96 Count RN 6 97 98 99 100 ;// Allocate stack memory to store the VLC,Zigzag,LMAX and RMAX tables 101 102 103 M_ALLOC4 ppVlcTableL0L1,4 104 M_ALLOC4 ppLMAXTableL0L1,4 105 M_ALLOC4 ppRMAXTableL0L1,4 106 M_ALLOC4 ppZigzagTable,4 107 108 109 M_START omxVCM4P2_DecodeVLCZigzag_Inter,r12 110 111 112 113 114 LDR pZigzagTable, =armVCM4P2_aClassicalZigzagScan ;// Load zigzag table 115 M_STR pZigzagTable,ppZigzagTable ;// Store zigzag table on stack to pass as argument to unsafe function 116 LDR pVlcTableL0L1, =armVCM4P2_InterVlcL0L1 ;// Load optimized VLC table with both L=0 and L=1 entries 117 M_STR pVlcTableL0L1,ppVlcTableL0L1 ;// Store optimized VLC table address on stack 118 LDR pLMAXTableL0L1, =armVCM4P2_InterL0L1LMAX ;// Load Interleaved L=0 and L=1 LMAX Tables 119 M_STR pLMAXTableL0L1,ppLMAXTableL0L1 ;// Store LMAX table address on stack 120 LDR pRMAXTableL0L1, =armVCM4P2_InterL0L1RMAX ;// Load Interleaved L=0 and L=1 RMAX Tables 121 MOV Count,#0 ;// set start=0 122 M_STR pRMAXTableL0L1,ppRMAXTableL0L1 ;// store RMAX table address on stack 123 124 125 BL armVCM4P2_DecodeVLCZigzag_AC_unsafe ;// call Unsafe Function for VLC Zigzag Decoding 126 127 128 129 M_END 130 ENDIF 131 132 END 133