1 ;/** 2 ; * 3 ; * File Name: omxVCM4P2_DecodeVLCZigzag_IntraACVLC_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 intra 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_IntraVlcL0L1 ;// Contains optimized and packed VLC Tables for both Last =1 and last=0 73 ;// Packed in Run:Level:Last format 74 IMPORT armVCM4P2_IntraL0L1LMAX ;// Contains LMAX table entries with both Last=0 and Last=1 75 IMPORT armVCM4P2_IntraL0L1RMAX ;// 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 ;//Input Arguments 80 81 ppBitStream RN 0 82 pBitOffset RN 1 83 pDst RN 2 84 PredDir RN 3 85 shortVideoHeader RN 3 86 87 ;//Local Variables 88 89 Return RN 0 90 91 pVlcTableL0L1 RN 4 92 pLMAXTableL0L1 RN 4 93 pRMAXTableL0L1 RN 4 94 pZigzagTable RN 4 95 Count RN 6 96 97 98 99 ;// Allocate stack memory to store optimized VLC,Zigzag, RMAX, LMAX Table Addresses 100 101 M_ALLOC4 ppVlcTableL0L1,4 102 M_ALLOC4 ppLMAXTableL0L1,4 103 M_ALLOC4 ppRMAXTableL0L1,4 104 M_ALLOC4 ppZigzagTable,4 105 106 107 M_START omxVCM4P2_DecodeVLCZigzag_IntraACVLC,r12 108 109 M_ARG shortVideoHeaderonStack,4 ;// pointer to Input Argument on stack 110 111 LDR pZigzagTable, =armVCM4P2_aClassicalZigzagScan ;// Load Address of the Zigzag table 112 ADD pZigzagTable, pZigzagTable, PredDir, LSL #6 ;// Loading Different type of zigzag tables based on PredDir 113 114 M_STR pZigzagTable,ppZigzagTable ;// Store Zigzag table address on stack 115 LDR pVlcTableL0L1, =armVCM4P2_IntraVlcL0L1 ;// Load optimized packed VLC Table with both L=0 and L=1 entries 116 M_STR pVlcTableL0L1,ppVlcTableL0L1 ;// Store VLC Table address on stack 117 LDR pLMAXTableL0L1, =armVCM4P2_IntraL0L1LMAX ;// Load LMAX Table 118 M_STR pLMAXTableL0L1,ppLMAXTableL0L1 ;// Store LMAX Table address on Stack 119 LDR pRMAXTableL0L1, =armVCM4P2_IntraL0L1RMAX ;// Load RMAX Table 120 MOV Count,#0 ;// Set Start=0 121 122 M_STR pRMAXTableL0L1,ppRMAXTableL0L1 ;// Store RMAX Table address on stack 123 124 125 126 M_LDR shortVideoHeader,shortVideoHeaderonStack ;// get the Input Argument from stack 127 128 BL armVCM4P2_DecodeVLCZigzag_AC_unsafe ;// Call Unsafe Function 129 130 131 132 133 M_END 134 ENDIF 135 136 END 137