178e52bfac041d71ce53b5b13c2abf78af742b09dLajos Molnar;//
278e52bfac041d71ce53b5b13c2abf78af742b09dLajos Molnar;// Copyright (C) 2007-2008 ARM Limited
378e52bfac041d71ce53b5b13c2abf78af742b09dLajos Molnar;//
478e52bfac041d71ce53b5b13c2abf78af742b09dLajos Molnar;// Licensed under the Apache License, Version 2.0 (the "License");
578e52bfac041d71ce53b5b13c2abf78af742b09dLajos Molnar;// you may not use this file except in compliance with the License.
678e52bfac041d71ce53b5b13c2abf78af742b09dLajos Molnar;// You may obtain a copy of the License at
778e52bfac041d71ce53b5b13c2abf78af742b09dLajos Molnar;//
878e52bfac041d71ce53b5b13c2abf78af742b09dLajos Molnar;//      http://www.apache.org/licenses/LICENSE-2.0
978e52bfac041d71ce53b5b13c2abf78af742b09dLajos Molnar;//
1078e52bfac041d71ce53b5b13c2abf78af742b09dLajos Molnar;// Unless required by applicable law or agreed to in writing, software
1178e52bfac041d71ce53b5b13c2abf78af742b09dLajos Molnar;// distributed under the License is distributed on an "AS IS" BASIS,
1278e52bfac041d71ce53b5b13c2abf78af742b09dLajos Molnar;// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1378e52bfac041d71ce53b5b13c2abf78af742b09dLajos Molnar;// See the License for the specific language governing permissions and
1478e52bfac041d71ce53b5b13c2abf78af742b09dLajos Molnar;// limitations under the License.
1578e52bfac041d71ce53b5b13c2abf78af742b09dLajos Molnar;//
160c1bc742181ded4930842b46e9507372f0b1b963James Dong;/**
170c1bc742181ded4930842b46e9507372f0b1b963James Dong; *
180c1bc742181ded4930842b46e9507372f0b1b963James Dong; * File Name:  omxVCM4P2_DecodeVLCZigzag_IntraDCVLC_s.s
190c1bc742181ded4930842b46e9507372f0b1b963James Dong; * OpenMAX DL: v1.0.2
200c1bc742181ded4930842b46e9507372f0b1b963James Dong; * Revision:   9641
210c1bc742181ded4930842b46e9507372f0b1b963James Dong; * Date:       Thursday, February 7, 2008
220c1bc742181ded4930842b46e9507372f0b1b963James Dong; *
230c1bc742181ded4930842b46e9507372f0b1b963James Dong; *
240c1bc742181ded4930842b46e9507372f0b1b963James Dong; *
250c1bc742181ded4930842b46e9507372f0b1b963James Dong; *
260c1bc742181ded4930842b46e9507372f0b1b963James Dong; * Description:
270c1bc742181ded4930842b46e9507372f0b1b963James Dong; * Contains modules for zigzag scanning and VLC decoding
280c1bc742181ded4930842b46e9507372f0b1b963James Dong; * for inter block.
290c1bc742181ded4930842b46e9507372f0b1b963James Dong; *
300c1bc742181ded4930842b46e9507372f0b1b963James Dong; *
310c1bc742181ded4930842b46e9507372f0b1b963James Dong; *
320c1bc742181ded4930842b46e9507372f0b1b963James Dong; * Function: omxVCM4P2_DecodeVLCZigzag_Inter
330c1bc742181ded4930842b46e9507372f0b1b963James Dong; *
340c1bc742181ded4930842b46e9507372f0b1b963James Dong; * Description:
350c1bc742181ded4930842b46e9507372f0b1b963James Dong; * Performs VLC decoding and inverse zigzag scan for one intra coded block.
360c1bc742181ded4930842b46e9507372f0b1b963James Dong; *
370c1bc742181ded4930842b46e9507372f0b1b963James Dong; * Remarks:
380c1bc742181ded4930842b46e9507372f0b1b963James Dong; *
390c1bc742181ded4930842b46e9507372f0b1b963James Dong; * Parameters:
400c1bc742181ded4930842b46e9507372f0b1b963James Dong; * [in]    ppBitStream        pointer to the pointer to the current byte in
410c1bc742181ded4930842b46e9507372f0b1b963James Dong; *                    the bitstream buffer
420c1bc742181ded4930842b46e9507372f0b1b963James Dong; * [in]    pBitOffset        pointer to the bit position in the byte pointed
430c1bc742181ded4930842b46e9507372f0b1b963James Dong; *                    to by *ppBitStream. *pBitOffset is valid within    [0-7].
440c1bc742181ded4930842b46e9507372f0b1b963James Dong; * [in] shortVideoHeader     binary flag indicating presence of short_video_header;
450c1bc742181ded4930842b46e9507372f0b1b963James Dong; *                           escape modes 0-3 are used if shortVideoHeader==0,
460c1bc742181ded4930842b46e9507372f0b1b963James Dong; *                           and escape mode 4 is used when shortVideoHeader==1.
470c1bc742181ded4930842b46e9507372f0b1b963James Dong; * [out]    ppBitStream        *ppBitStream is updated after the block is
480c1bc742181ded4930842b46e9507372f0b1b963James Dong; *                    decoded, so that it points to the current byte
490c1bc742181ded4930842b46e9507372f0b1b963James Dong; *                    in the bit stream buffer
500c1bc742181ded4930842b46e9507372f0b1b963James Dong; * [out]    pBitOffset        *pBitOffset is updated so that it points to the
510c1bc742181ded4930842b46e9507372f0b1b963James Dong; *                    current bit position in the byte pointed by
520c1bc742181ded4930842b46e9507372f0b1b963James Dong; *                    *ppBitStream
530c1bc742181ded4930842b46e9507372f0b1b963James Dong; * [out]    pDst            pointer to the coefficient buffer of current
540c1bc742181ded4930842b46e9507372f0b1b963James Dong; *                    block. Must be 16-byte aligned
550c1bc742181ded4930842b46e9507372f0b1b963James Dong; *
560c1bc742181ded4930842b46e9507372f0b1b963James Dong; * Return Value:
570c1bc742181ded4930842b46e9507372f0b1b963James Dong; * OMX_Sts_BadArgErr - bad arguments
580c1bc742181ded4930842b46e9507372f0b1b963James Dong; *   -At least one of the following pointers is NULL: ppBitStream, *ppBitStream, pBitOffset, pDst, or
590c1bc742181ded4930842b46e9507372f0b1b963James Dong; *   -pDst is not 16-byte aligned, or
600c1bc742181ded4930842b46e9507372f0b1b963James Dong; *   -*pBitOffset exceeds [0,7].
610c1bc742181ded4930842b46e9507372f0b1b963James Dong; * OMX_Sts_Err - status error
620c1bc742181ded4930842b46e9507372f0b1b963James Dong; *   -At least one mark bit is equal to zero
630c1bc742181ded4930842b46e9507372f0b1b963James Dong; *   -Encountered an illegal stream code that cannot be found in the VLC table
640c1bc742181ded4930842b46e9507372f0b1b963James Dong; *   -Encountered and illegal code in the VLC FLC table
650c1bc742181ded4930842b46e9507372f0b1b963James Dong; *   -The number of coefficients is greater than 64
660c1bc742181ded4930842b46e9507372f0b1b963James Dong; *
670c1bc742181ded4930842b46e9507372f0b1b963James Dong; */
680c1bc742181ded4930842b46e9507372f0b1b963James Dong
690c1bc742181ded4930842b46e9507372f0b1b963James Dong
700c1bc742181ded4930842b46e9507372f0b1b963James Dong      INCLUDE omxtypes_s.h
710c1bc742181ded4930842b46e9507372f0b1b963James Dong      INCLUDE armCOMM_s.h
720c1bc742181ded4930842b46e9507372f0b1b963James Dong      INCLUDE armCOMM_BitDec_s.h
730c1bc742181ded4930842b46e9507372f0b1b963James Dong
740c1bc742181ded4930842b46e9507372f0b1b963James Dong
750c1bc742181ded4930842b46e9507372f0b1b963James Dong      M_VARIANTS ARM1136JS
760c1bc742181ded4930842b46e9507372f0b1b963James Dong
770c1bc742181ded4930842b46e9507372f0b1b963James Dong
780c1bc742181ded4930842b46e9507372f0b1b963James Dong
790c1bc742181ded4930842b46e9507372f0b1b963James Dong
800c1bc742181ded4930842b46e9507372f0b1b963James Dong
810c1bc742181ded4930842b46e9507372f0b1b963James Dong      IF ARM1136JS :LOR: CortexA8
820c1bc742181ded4930842b46e9507372f0b1b963James Dong
830c1bc742181ded4930842b46e9507372f0b1b963James Dong
840c1bc742181ded4930842b46e9507372f0b1b963James Dong        ;// Import various tables needed for the function
850c1bc742181ded4930842b46e9507372f0b1b963James Dong
860c1bc742181ded4930842b46e9507372f0b1b963James Dong
870c1bc742181ded4930842b46e9507372f0b1b963James Dong        IMPORT          armVCM4P2_IntraVlcL0L1             ;// Contains optimized and packed VLC Tables for both Last =1 and last=0
880c1bc742181ded4930842b46e9507372f0b1b963James Dong                                                               ;// Packed in Run:Level:Last format
890c1bc742181ded4930842b46e9507372f0b1b963James Dong        IMPORT          armVCM4P2_IntraL0L1LMAX            ;// Contains LMAX table entries with both Last=0 and Last=1
900c1bc742181ded4930842b46e9507372f0b1b963James Dong        IMPORT          armVCM4P2_IntraL0L1RMAX            ;// Contains RMAX table entries with both Last=0 and Last=1
910c1bc742181ded4930842b46e9507372f0b1b963James Dong        IMPORT          armVCM4P2_aClassicalZigzagScan     ;// contains CLassical, Horizontal, Vertical Zigzag table entries with double the original values
920c1bc742181ded4930842b46e9507372f0b1b963James Dong        IMPORT          armVCM4P2_aIntraDCLumaChromaIndex  ;// Contains Optimized DCLuma and DCChroma Index table Entries
930c1bc742181ded4930842b46e9507372f0b1b963James Dong
940c1bc742181ded4930842b46e9507372f0b1b963James Dong
950c1bc742181ded4930842b46e9507372f0b1b963James Dong        IMPORT          armVCM4P2_DecodeVLCZigzag_AC_unsafe
960c1bc742181ded4930842b46e9507372f0b1b963James Dong
970c1bc742181ded4930842b46e9507372f0b1b963James Dong;//Input Arguments
980c1bc742181ded4930842b46e9507372f0b1b963James Dong
990c1bc742181ded4930842b46e9507372f0b1b963James DongppBitStream          RN 0
1000c1bc742181ded4930842b46e9507372f0b1b963James DongpBitOffset           RN 1
1010c1bc742181ded4930842b46e9507372f0b1b963James DongpDst                 RN 2
1020c1bc742181ded4930842b46e9507372f0b1b963James DongPredDir              RN 3
1030c1bc742181ded4930842b46e9507372f0b1b963James DongshortVideoHeader     RN 3
1040c1bc742181ded4930842b46e9507372f0b1b963James DongvideoComp            RN 5
1050c1bc742181ded4930842b46e9507372f0b1b963James Dong;//Local Variables
1060c1bc742181ded4930842b46e9507372f0b1b963James Dong
1070c1bc742181ded4930842b46e9507372f0b1b963James DongReturn               RN 0
1080c1bc742181ded4930842b46e9507372f0b1b963James Dong
1090c1bc742181ded4930842b46e9507372f0b1b963James DongpDCLumaChromaIndex   RN 4
1100c1bc742181ded4930842b46e9507372f0b1b963James DongpDCChromaIndex       RN 7
1110c1bc742181ded4930842b46e9507372f0b1b963James DongpVlcTableL0L1        RN 4
1120c1bc742181ded4930842b46e9507372f0b1b963James DongpLMAXTableL0L1       RN 4
1130c1bc742181ded4930842b46e9507372f0b1b963James DongpRMAXTableL0L1       RN 4
1140c1bc742181ded4930842b46e9507372f0b1b963James DongpZigzagTable         RN 4
1150c1bc742181ded4930842b46e9507372f0b1b963James DongCount                RN 6
1160c1bc742181ded4930842b46e9507372f0b1b963James DongDCValueSize          RN 6
1170c1bc742181ded4930842b46e9507372f0b1b963James DongpowOfSize            RN 7
1180c1bc742181ded4930842b46e9507372f0b1b963James Dongtemp1                RN 5
1190c1bc742181ded4930842b46e9507372f0b1b963James Dong
1200c1bc742181ded4930842b46e9507372f0b1b963James Dong
1210c1bc742181ded4930842b46e9507372f0b1b963James Dong;// Scratch Registers
1220c1bc742181ded4930842b46e9507372f0b1b963James Dong
1230c1bc742181ded4930842b46e9507372f0b1b963James DongRBitStream           RN 8
1240c1bc742181ded4930842b46e9507372f0b1b963James DongRBitBuffer           RN 9
1250c1bc742181ded4930842b46e9507372f0b1b963James DongRBitCount            RN 10
1260c1bc742181ded4930842b46e9507372f0b1b963James Dong
1270c1bc742181ded4930842b46e9507372f0b1b963James DongT1                   RN 11
1280c1bc742181ded4930842b46e9507372f0b1b963James DongT2                   RN 12
1290c1bc742181ded4930842b46e9507372f0b1b963James DongDCVal                RN 14
1300c1bc742181ded4930842b46e9507372f0b1b963James Dong
1310c1bc742181ded4930842b46e9507372f0b1b963James Dong
1320c1bc742181ded4930842b46e9507372f0b1b963James Dong        ;// Allocate stack memory to store optimized VLC,Zigzag, RMAX, LMAX Table Addresses
1330c1bc742181ded4930842b46e9507372f0b1b963James Dong
1340c1bc742181ded4930842b46e9507372f0b1b963James Dong        M_ALLOC4        ppVlcTableL0L1,4
1350c1bc742181ded4930842b46e9507372f0b1b963James Dong        M_ALLOC4        ppLMAXTableL0L1,4
1360c1bc742181ded4930842b46e9507372f0b1b963James Dong        M_ALLOC4        ppRMAXTableL0L1,4
1370c1bc742181ded4930842b46e9507372f0b1b963James Dong        M_ALLOC4        ppZigzagTable,4
1380c1bc742181ded4930842b46e9507372f0b1b963James Dong        M_ALLOC4        pDCCoeff,4
1390c1bc742181ded4930842b46e9507372f0b1b963James Dong
1400c1bc742181ded4930842b46e9507372f0b1b963James Dong
1410c1bc742181ded4930842b46e9507372f0b1b963James Dong
1420c1bc742181ded4930842b46e9507372f0b1b963James Dong        M_START omxVCM4P2_DecodeVLCZigzag_IntraDCVLC,r12
1430c1bc742181ded4930842b46e9507372f0b1b963James Dong
1440c1bc742181ded4930842b46e9507372f0b1b963James Dong        M_ARG           shortVideoHeaderonStack,4                                  ;// Pointer to argument on stack
1450c1bc742181ded4930842b46e9507372f0b1b963James Dong        M_ARG           videoComponstack,4                                         ;// Pointer to argument on stack
1460c1bc742181ded4930842b46e9507372f0b1b963James Dong
1470c1bc742181ded4930842b46e9507372f0b1b963James Dong
1480c1bc742181ded4930842b46e9507372f0b1b963James Dong        ;// Decode DC Coefficient
1490c1bc742181ded4930842b46e9507372f0b1b963James Dong
1500c1bc742181ded4930842b46e9507372f0b1b963James Dong
1510c1bc742181ded4930842b46e9507372f0b1b963James Dong        LDR             pDCLumaChromaIndex, =armVCM4P2_aIntraDCLumaChromaIndex ;// Load Optimized VLC Table for Luminance and Chrominance
1520c1bc742181ded4930842b46e9507372f0b1b963James Dong
1530c1bc742181ded4930842b46e9507372f0b1b963James Dong        ;// Initializing the Bitstream Macro
1540c1bc742181ded4930842b46e9507372f0b1b963James Dong
1550c1bc742181ded4930842b46e9507372f0b1b963James Dong        M_BD_INIT0      ppBitStream, pBitOffset, RBitStream, RBitBuffer, RBitCount
1560c1bc742181ded4930842b46e9507372f0b1b963James Dong        M_LDR           videoComp,videoComponstack
1570c1bc742181ded4930842b46e9507372f0b1b963James Dong        M_BD_INIT1      T1, T2, T2
1580c1bc742181ded4930842b46e9507372f0b1b963James Dong        ADD             pDCLumaChromaIndex,pDCLumaChromaIndex,videoComp, LSL #6
1590c1bc742181ded4930842b46e9507372f0b1b963James Dong        M_BD_INIT2      T1, T2, T2
1600c1bc742181ded4930842b46e9507372f0b1b963James Dong
1610c1bc742181ded4930842b46e9507372f0b1b963James Dong
1620c1bc742181ded4930842b46e9507372f0b1b963James Dong        M_BD_VLD        DCValueSize,T1,T2,pDCLumaChromaIndex,4,2                    ;// VLC Decode using optimized Luminance and Chrominance VLC Table
1630c1bc742181ded4930842b46e9507372f0b1b963James Dong
1640c1bc742181ded4930842b46e9507372f0b1b963James Dong
1650c1bc742181ded4930842b46e9507372f0b1b963James Dong
1660c1bc742181ded4930842b46e9507372f0b1b963James Dong
1670c1bc742181ded4930842b46e9507372f0b1b963James DongDecodeDC
1680c1bc742181ded4930842b46e9507372f0b1b963James Dong
1690c1bc742181ded4930842b46e9507372f0b1b963James Dong        CMP             DCValueSize,#12
1700c1bc742181ded4930842b46e9507372f0b1b963James Dong        BGT             ExitError
1710c1bc742181ded4930842b46e9507372f0b1b963James Dong
1720c1bc742181ded4930842b46e9507372f0b1b963James Dong        CMP             DCValueSize,#0
1730c1bc742181ded4930842b46e9507372f0b1b963James Dong        MOVEQ           DCVal,#0                                                    ;// If DCValueSize is zero then DC coeff =0
1740c1bc742181ded4930842b46e9507372f0b1b963James Dong        BEQ             ACDecode                                                    ;// Branch to perform AC Coeff Decoding
1750c1bc742181ded4930842b46e9507372f0b1b963James Dong
1760c1bc742181ded4930842b46e9507372f0b1b963James Dong        M_BD_VREAD16    DCVal,DCValueSize,T1,T2                                     ;// Get DC Value From Bit stream
1770c1bc742181ded4930842b46e9507372f0b1b963James Dong
1780c1bc742181ded4930842b46e9507372f0b1b963James Dong
1790c1bc742181ded4930842b46e9507372f0b1b963James Dong        MOV             powOfSize,#1
1800c1bc742181ded4930842b46e9507372f0b1b963James Dong        LSL             powOfSize,DCValueSize                                       ;// powOfSize=pow(2,DCValueSize)
1810c1bc742181ded4930842b46e9507372f0b1b963James Dong        CMP             DCVal,powOfSize,LSR #1                                      ;// Compare DCVal with powOfSize/2
1820c1bc742181ded4930842b46e9507372f0b1b963James Dong        ADDLT           DCVal,DCVal,#1
1830c1bc742181ded4930842b46e9507372f0b1b963James Dong        SUBLT           DCVal,DCVal,powOfSize                                       ;// If Lessthan powOfSize/2 DCVal=DCVal-powOfSize+1
1840c1bc742181ded4930842b46e9507372f0b1b963James Dong                                                                                    ;// Else DCVal= fetchbits from bit stream
1850c1bc742181ded4930842b46e9507372f0b1b963James Dong
1860c1bc742181ded4930842b46e9507372f0b1b963James DongCheckDCValueSize
1870c1bc742181ded4930842b46e9507372f0b1b963James Dong
1880c1bc742181ded4930842b46e9507372f0b1b963James Dong        CMP             DCValueSize,#8                                              ;// If DCValueSize greater than 8 check marker bit
1890c1bc742181ded4930842b46e9507372f0b1b963James Dong
1900c1bc742181ded4930842b46e9507372f0b1b963James Dong        BLE             ACDecode
1910c1bc742181ded4930842b46e9507372f0b1b963James Dong
1920c1bc742181ded4930842b46e9507372f0b1b963James Dong        M_BD_READ8      temp1,1,T1
1930c1bc742181ded4930842b46e9507372f0b1b963James Dong        TEQ             temp1,#0                                                    ;// If Marker bit is zero Exit with an Error Message
1940c1bc742181ded4930842b46e9507372f0b1b963James Dong        BEQ             ExitError
1950c1bc742181ded4930842b46e9507372f0b1b963James Dong
1960c1bc742181ded4930842b46e9507372f0b1b963James Dong
1970c1bc742181ded4930842b46e9507372f0b1b963James Dong
1980c1bc742181ded4930842b46e9507372f0b1b963James Dong        ;// Decode AC Coefficient
1990c1bc742181ded4930842b46e9507372f0b1b963James Dong
2000c1bc742181ded4930842b46e9507372f0b1b963James DongACDecode
2010c1bc742181ded4930842b46e9507372f0b1b963James Dong
2020c1bc742181ded4930842b46e9507372f0b1b963James Dong        M_STR           DCVal,pDCCoeff                                             ;// Store Decoded DC Coeff on Stack
2030c1bc742181ded4930842b46e9507372f0b1b963James Dong        M_BD_FINI       ppBitStream,pBitOffset                                     ;// Terminating the Bit stream Macro
2040c1bc742181ded4930842b46e9507372f0b1b963James Dong
2050c1bc742181ded4930842b46e9507372f0b1b963James Dong        LDR             pZigzagTable, =armVCM4P2_aClassicalZigzagScan          ;// Load Zigzag talbe address
2060c1bc742181ded4930842b46e9507372f0b1b963James Dong        ADD             pZigzagTable, pZigzagTable, PredDir, LSL #6                ;// Modify the Zigzag table adress based on PredDir
2070c1bc742181ded4930842b46e9507372f0b1b963James Dong
2080c1bc742181ded4930842b46e9507372f0b1b963James Dong        M_STR           pZigzagTable,ppZigzagTable                                 ;// Store zigzag table on stack
2090c1bc742181ded4930842b46e9507372f0b1b963James Dong        LDR             pVlcTableL0L1, =armVCM4P2_IntraVlcL0L1                 ;// Load Optimized VLC Table With both Last=0 and Last=1 Entries
2100c1bc742181ded4930842b46e9507372f0b1b963James Dong        M_STR           pVlcTableL0L1,ppVlcTableL0L1                               ;// Store Optimized VLC Table on stack
2110c1bc742181ded4930842b46e9507372f0b1b963James Dong        LDR             pLMAXTableL0L1, =armVCM4P2_IntraL0L1LMAX               ;// Load LMAX Table
2120c1bc742181ded4930842b46e9507372f0b1b963James Dong        M_STR           pLMAXTableL0L1,ppLMAXTableL0L1                             ;// Store LMAX table on stack
2130c1bc742181ded4930842b46e9507372f0b1b963James Dong        LDR             pRMAXTableL0L1, =armVCM4P2_IntraL0L1RMAX               ;// Load RMAX Table
2140c1bc742181ded4930842b46e9507372f0b1b963James Dong        MOV             Count,#1                                                   ;// Set Start =1
2150c1bc742181ded4930842b46e9507372f0b1b963James Dong
2160c1bc742181ded4930842b46e9507372f0b1b963James Dong        M_STR           pRMAXTableL0L1,ppRMAXTableL0L1                             ;// Store RMAX Table on Stack
2170c1bc742181ded4930842b46e9507372f0b1b963James Dong
2180c1bc742181ded4930842b46e9507372f0b1b963James Dong
2190c1bc742181ded4930842b46e9507372f0b1b963James Dong        M_LDR           shortVideoHeader,shortVideoHeaderonStack                   ;// Load the Input Argument From Stack
2200c1bc742181ded4930842b46e9507372f0b1b963James Dong
2210c1bc742181ded4930842b46e9507372f0b1b963James Dong        BL              armVCM4P2_DecodeVLCZigzag_AC_unsafe                    ;// Call the Unsafe Function
2220c1bc742181ded4930842b46e9507372f0b1b963James Dong
2230c1bc742181ded4930842b46e9507372f0b1b963James Dong        M_LDR           DCVal,pDCCoeff                                             ;// Get the Decoded DC Value From Stack
2240c1bc742181ded4930842b46e9507372f0b1b963James Dong        STRH            DCVal,[pDst]                                               ;// Store the DC Value
2250c1bc742181ded4930842b46e9507372f0b1b963James Dong        B               ExitOK
2260c1bc742181ded4930842b46e9507372f0b1b963James Dong
2270c1bc742181ded4930842b46e9507372f0b1b963James Dong
2280c1bc742181ded4930842b46e9507372f0b1b963James Dong
2290c1bc742181ded4930842b46e9507372f0b1b963James DongExitError
2300c1bc742181ded4930842b46e9507372f0b1b963James Dong
2310c1bc742181ded4930842b46e9507372f0b1b963James Dong        M_BD_FINI       ppBitStream,pBitOffset                                     ;// Terminating the Bit Stream Macro in case of an Error
2320c1bc742181ded4930842b46e9507372f0b1b963James Dong        MOV             Return,#OMX_Sts_Err                                        ;// Exit with an Error Message
2330c1bc742181ded4930842b46e9507372f0b1b963James DongExitOK
2340c1bc742181ded4930842b46e9507372f0b1b963James Dong
2350c1bc742181ded4930842b46e9507372f0b1b963James Dong        M_END
2360c1bc742181ded4930842b46e9507372f0b1b963James Dong        ENDIF
2370c1bc742181ded4930842b46e9507372f0b1b963James Dong
2380c1bc742181ded4930842b46e9507372f0b1b963James Dong        END
239