1bebc99d6fa433c04139294a5057f8439d772dbd9James Dong/**
2bebc99d6fa433c04139294a5057f8439d772dbd9James Dong *
3bebc99d6fa433c04139294a5057f8439d772dbd9James Dong * File Name:  armCOMM.h
4bebc99d6fa433c04139294a5057f8439d772dbd9James Dong * OpenMAX DL: v1.0.2
5bebc99d6fa433c04139294a5057f8439d772dbd9James Dong * Revision:   9641
6bebc99d6fa433c04139294a5057f8439d772dbd9James Dong * Date:       Thursday, February 7, 2008
7bebc99d6fa433c04139294a5057f8439d772dbd9James Dong *
8bebc99d6fa433c04139294a5057f8439d772dbd9James Dong * (c) Copyright 2007-2008 ARM Limited. All Rights Reserved.
9bebc99d6fa433c04139294a5057f8439d772dbd9James Dong *
10bebc99d6fa433c04139294a5057f8439d772dbd9James Dong *
11bebc99d6fa433c04139294a5057f8439d772dbd9James Dong *
12bebc99d6fa433c04139294a5057f8439d772dbd9James Dong * File: armCOMM.h
13bebc99d6fa433c04139294a5057f8439d772dbd9James Dong * Brief: Declares Common APIs/Data Types used across OpenMAX API's
14bebc99d6fa433c04139294a5057f8439d772dbd9James Dong *
15bebc99d6fa433c04139294a5057f8439d772dbd9James Dong */
16bebc99d6fa433c04139294a5057f8439d772dbd9James Dong
17bebc99d6fa433c04139294a5057f8439d772dbd9James Dong
18bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#ifndef _armCommon_H_
19bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#define _armCommon_H_
20bebc99d6fa433c04139294a5057f8439d772dbd9James Dong
21bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#include "omxtypes.h"
22bebc99d6fa433c04139294a5057f8439d772dbd9James Dong
23bebc99d6fa433c04139294a5057f8439d772dbd9James Dongtypedef struct
24bebc99d6fa433c04139294a5057f8439d772dbd9James Dong{
25bebc99d6fa433c04139294a5057f8439d772dbd9James Dong  OMX_F32 Re; /** Real part */
26bebc99d6fa433c04139294a5057f8439d772dbd9James Dong  OMX_F32 Im; /** Imaginary part */
27bebc99d6fa433c04139294a5057f8439d772dbd9James Dong
28bebc99d6fa433c04139294a5057f8439d772dbd9James Dong} OMX_FC32; /** single precision floating point complex number */
29bebc99d6fa433c04139294a5057f8439d772dbd9James Dong
30bebc99d6fa433c04139294a5057f8439d772dbd9James Dongtypedef struct
31bebc99d6fa433c04139294a5057f8439d772dbd9James Dong{
32bebc99d6fa433c04139294a5057f8439d772dbd9James Dong  OMX_F64 Re; /** Real part */
33bebc99d6fa433c04139294a5057f8439d772dbd9James Dong  OMX_F64 Im; /** Imaginary part */
34bebc99d6fa433c04139294a5057f8439d772dbd9James Dong
35bebc99d6fa433c04139294a5057f8439d772dbd9James Dong} OMX_FC64; /** double precision floating point complex number */
36bebc99d6fa433c04139294a5057f8439d772dbd9James Dong
37bebc99d6fa433c04139294a5057f8439d772dbd9James Dong
38bebc99d6fa433c04139294a5057f8439d772dbd9James Dong/* Used by both IP and IC domains for 8x8 JPEG blocks. */
39bebc99d6fa433c04139294a5057f8439d772dbd9James Dongtypedef OMX_S16 ARM_BLOCK8x8[64];
40bebc99d6fa433c04139294a5057f8439d772dbd9James Dong
41bebc99d6fa433c04139294a5057f8439d772dbd9James Dong
42bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#include "armOMX.h"
43bebc99d6fa433c04139294a5057f8439d772dbd9James Dong
44bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#define  armPI (OMX_F64)(3.1415926535897932384626433832795)
45bebc99d6fa433c04139294a5057f8439d772dbd9James Dong
46bebc99d6fa433c04139294a5057f8439d772dbd9James Dong/***********************************************************************/
47bebc99d6fa433c04139294a5057f8439d772dbd9James Dong
48bebc99d6fa433c04139294a5057f8439d772dbd9James Dong/* Compiler extensions */
49bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#ifdef ARM_DEBUG
50bebc99d6fa433c04139294a5057f8439d772dbd9James Dong/* debug version */
51bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#include <stdlib.h>
52bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#include <assert.h>
53bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#include <stdio.h>
54bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#define armError(str) {printf((str)); printf("\n"); exit(-1);}
55bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#define armWarn(str) {printf((str)); printf("\n");}
56bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#define armIgnore(a) ((void)a)
57bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#define armAssert(a) assert(a)
58bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#else
59bebc99d6fa433c04139294a5057f8439d772dbd9James Dong/* release version */
60bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#define armError(str) ((void) (str))
61bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#define armWarn(str)  ((void) (str))
62bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#define armIgnore(a)  ((void) (a))
63bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#define armAssert(a)  ((void) (a))
64bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#endif /* ARM_DEBUG */
65bebc99d6fa433c04139294a5057f8439d772dbd9James Dong
66bebc99d6fa433c04139294a5057f8439d772dbd9James Dong/* Arithmetic operations */
67bebc99d6fa433c04139294a5057f8439d772dbd9James Dong
68bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#define armMin(a,b)             ( (a) > (b) ?  (b):(a) )
69bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#define armMax(a,b)             ( (a) > (b) ?  (a):(b) )
70bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#define armAbs(a)               ( (a) <  0  ? -(a):(a) )
71bebc99d6fa433c04139294a5057f8439d772dbd9James Dong
72bebc99d6fa433c04139294a5057f8439d772dbd9James Dong/* Alignment operation */
73bebc99d6fa433c04139294a5057f8439d772dbd9James Dong
74bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#define armAlignToBytes(Ptr,N)      (Ptr + ( ((N-(int)Ptr)&(N-1)) / sizeof(*Ptr) ))
75bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#define armAlignTo2Bytes(Ptr)       armAlignToBytes(Ptr,2)
76bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#define armAlignTo4Bytes(Ptr)       armAlignToBytes(Ptr,4)
77bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#define armAlignTo8Bytes(Ptr)       armAlignToBytes(Ptr,8)
78bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#define armAlignTo16Bytes(Ptr)      armAlignToBytes(Ptr,16)
79bebc99d6fa433c04139294a5057f8439d772dbd9James Dong
80bebc99d6fa433c04139294a5057f8439d772dbd9James Dong/* Error and Alignment check */
81bebc99d6fa433c04139294a5057f8439d772dbd9James Dong
82bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#define armRetArgErrIf(condition, code)  if(condition) { return (code); }
83bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#define armRetDataErrIf(condition, code) if(condition) { return (code); }
84bebc99d6fa433c04139294a5057f8439d772dbd9James Dong
85bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#ifndef ALIGNMENT_DOESNT_MATTER
86bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#define armIsByteAligned(Ptr,N)     ((((int)(Ptr)) % N)==0)
87bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#define armNotByteAligned(Ptr,N)    ((((int)(Ptr)) % N)!=0)
88bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#else
89bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#define armIsByteAligned(Ptr,N)     (1)
90bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#define armNotByteAligned(Ptr,N)    (0)
91bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#endif
92bebc99d6fa433c04139294a5057f8439d772dbd9James Dong
93bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#define armIs2ByteAligned(Ptr)      armIsByteAligned(Ptr,2)
94bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#define armIs4ByteAligned(Ptr)      armIsByteAligned(Ptr,4)
95bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#define armIs8ByteAligned(Ptr)      armIsByteAligned(Ptr,8)
96bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#define armIs16ByteAligned(Ptr)     armIsByteAligned(Ptr,16)
97bebc99d6fa433c04139294a5057f8439d772dbd9James Dong
98bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#define armNot2ByteAligned(Ptr)     armNotByteAligned(Ptr,2)
99bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#define armNot4ByteAligned(Ptr)     armNotByteAligned(Ptr,4)
100bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#define armNot8ByteAligned(Ptr)     armNotByteAligned(Ptr,8)
101bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#define armNot16ByteAligned(Ptr)    armNotByteAligned(Ptr,16)
102bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#define armNot32ByteAligned(Ptr)    armNotByteAligned(Ptr,32)
103bebc99d6fa433c04139294a5057f8439d772dbd9James Dong
104bebc99d6fa433c04139294a5057f8439d772dbd9James Dong/**
105bebc99d6fa433c04139294a5057f8439d772dbd9James Dong * Function: armRoundFloatToS16_ref/armRoundFloatToS32_ref/armRoundFloatToS64
106bebc99d6fa433c04139294a5057f8439d772dbd9James Dong *
107bebc99d6fa433c04139294a5057f8439d772dbd9James Dong * Description:
108bebc99d6fa433c04139294a5057f8439d772dbd9James Dong * Converts a double precision value into a short int/int after rounding
109bebc99d6fa433c04139294a5057f8439d772dbd9James Dong *
110bebc99d6fa433c04139294a5057f8439d772dbd9James Dong * Parameters:
111bebc99d6fa433c04139294a5057f8439d772dbd9James Dong * [in]  Value                 Float value to be converted
112bebc99d6fa433c04139294a5057f8439d772dbd9James Dong *
113bebc99d6fa433c04139294a5057f8439d772dbd9James Dong * Return Value:
114bebc99d6fa433c04139294a5057f8439d772dbd9James Dong * [out] converted value in OMX_S16/OMX_S32 format
115bebc99d6fa433c04139294a5057f8439d772dbd9James Dong *
116bebc99d6fa433c04139294a5057f8439d772dbd9James Dong */
117bebc99d6fa433c04139294a5057f8439d772dbd9James Dong
118bebc99d6fa433c04139294a5057f8439d772dbd9James DongOMX_S16 armRoundFloatToS16 (OMX_F64 Value);
119bebc99d6fa433c04139294a5057f8439d772dbd9James DongOMX_S32 armRoundFloatToS32 (OMX_F64 Value);
120bebc99d6fa433c04139294a5057f8439d772dbd9James DongOMX_S64 armRoundFloatToS64 (OMX_F64 Value);
121bebc99d6fa433c04139294a5057f8439d772dbd9James Dong
122bebc99d6fa433c04139294a5057f8439d772dbd9James Dong/**
123bebc99d6fa433c04139294a5057f8439d772dbd9James Dong * Function: armSatRoundFloatToS16_ref/armSatRoundFloatToS32
124bebc99d6fa433c04139294a5057f8439d772dbd9James Dong *
125bebc99d6fa433c04139294a5057f8439d772dbd9James Dong * Description:
126bebc99d6fa433c04139294a5057f8439d772dbd9James Dong * Converts a double precision value into a short int/int after rounding and saturation
127bebc99d6fa433c04139294a5057f8439d772dbd9James Dong *
128bebc99d6fa433c04139294a5057f8439d772dbd9James Dong * Parameters:
129bebc99d6fa433c04139294a5057f8439d772dbd9James Dong * [in]  Value                 Float value to be converted
130bebc99d6fa433c04139294a5057f8439d772dbd9James Dong *
131bebc99d6fa433c04139294a5057f8439d772dbd9James Dong * Return Value:
132bebc99d6fa433c04139294a5057f8439d772dbd9James Dong * [out] converted value in OMX_S16/OMX_S32 format
133bebc99d6fa433c04139294a5057f8439d772dbd9James Dong *
134bebc99d6fa433c04139294a5057f8439d772dbd9James Dong */
135bebc99d6fa433c04139294a5057f8439d772dbd9James Dong
136bebc99d6fa433c04139294a5057f8439d772dbd9James DongOMX_S16 armSatRoundFloatToS16 (OMX_F64 Value);
137bebc99d6fa433c04139294a5057f8439d772dbd9James DongOMX_S32 armSatRoundFloatToS32 (OMX_F64 Value);
138bebc99d6fa433c04139294a5057f8439d772dbd9James Dong
139bebc99d6fa433c04139294a5057f8439d772dbd9James Dong/**
140bebc99d6fa433c04139294a5057f8439d772dbd9James Dong * Function: armSatRoundFloatToU16_ref/armSatRoundFloatToU32
141bebc99d6fa433c04139294a5057f8439d772dbd9James Dong *
142bebc99d6fa433c04139294a5057f8439d772dbd9James Dong * Description:
143bebc99d6fa433c04139294a5057f8439d772dbd9James Dong * Converts a double precision value into a unsigned short int/int after rounding and saturation
144bebc99d6fa433c04139294a5057f8439d772dbd9James Dong *
145bebc99d6fa433c04139294a5057f8439d772dbd9James Dong * Parameters:
146bebc99d6fa433c04139294a5057f8439d772dbd9James Dong * [in]  Value                 Float value to be converted
147bebc99d6fa433c04139294a5057f8439d772dbd9James Dong *
148bebc99d6fa433c04139294a5057f8439d772dbd9James Dong * Return Value:
149bebc99d6fa433c04139294a5057f8439d772dbd9James Dong * [out] converted value in OMX_U16/OMX_U32 format
150bebc99d6fa433c04139294a5057f8439d772dbd9James Dong *
151bebc99d6fa433c04139294a5057f8439d772dbd9James Dong */
152bebc99d6fa433c04139294a5057f8439d772dbd9James Dong
153bebc99d6fa433c04139294a5057f8439d772dbd9James DongOMX_U16 armSatRoundFloatToU16 (OMX_F64 Value);
154bebc99d6fa433c04139294a5057f8439d772dbd9James DongOMX_U32 armSatRoundFloatToU32 (OMX_F64 Value);
155bebc99d6fa433c04139294a5057f8439d772dbd9James Dong
156bebc99d6fa433c04139294a5057f8439d772dbd9James Dong/**
157bebc99d6fa433c04139294a5057f8439d772dbd9James Dong * Function: armSignCheck
158bebc99d6fa433c04139294a5057f8439d772dbd9James Dong *
159bebc99d6fa433c04139294a5057f8439d772dbd9James Dong * Description:
160bebc99d6fa433c04139294a5057f8439d772dbd9James Dong * Checks the sign of a variable:
161bebc99d6fa433c04139294a5057f8439d772dbd9James Dong * returns 1 if it is Positive
162bebc99d6fa433c04139294a5057f8439d772dbd9James Dong * returns 0 if it is 0
163bebc99d6fa433c04139294a5057f8439d772dbd9James Dong * returns -1 if it is Negative
164bebc99d6fa433c04139294a5057f8439d772dbd9James Dong *
165bebc99d6fa433c04139294a5057f8439d772dbd9James Dong * Remarks:
166bebc99d6fa433c04139294a5057f8439d772dbd9James Dong *
167bebc99d6fa433c04139294a5057f8439d772dbd9James Dong * Parameters:
168bebc99d6fa433c04139294a5057f8439d772dbd9James Dong * [in]	    var     Variable to be checked
169bebc99d6fa433c04139294a5057f8439d772dbd9James Dong *
170bebc99d6fa433c04139294a5057f8439d772dbd9James Dong * Return Value:
171bebc99d6fa433c04139294a5057f8439d772dbd9James Dong * OMX_INT --   returns 1 if it is Positive
172bebc99d6fa433c04139294a5057f8439d772dbd9James Dong *              returns 0 if it is 0
173bebc99d6fa433c04139294a5057f8439d772dbd9James Dong *              returns -1 if it is Negative
174bebc99d6fa433c04139294a5057f8439d772dbd9James Dong */
175bebc99d6fa433c04139294a5057f8439d772dbd9James Dong
176bebc99d6fa433c04139294a5057f8439d772dbd9James DongOMX_INT armSignCheck (OMX_S16 var);
177bebc99d6fa433c04139294a5057f8439d772dbd9James Dong
178bebc99d6fa433c04139294a5057f8439d772dbd9James Dong/**
179bebc99d6fa433c04139294a5057f8439d772dbd9James Dong * Function: armClip
180bebc99d6fa433c04139294a5057f8439d772dbd9James Dong *
181bebc99d6fa433c04139294a5057f8439d772dbd9James Dong * Description: Clips the input between MAX and MIN value
182bebc99d6fa433c04139294a5057f8439d772dbd9James Dong *
183bebc99d6fa433c04139294a5057f8439d772dbd9James Dong *
184bebc99d6fa433c04139294a5057f8439d772dbd9James Dong * Remarks:
185bebc99d6fa433c04139294a5057f8439d772dbd9James Dong *
186bebc99d6fa433c04139294a5057f8439d772dbd9James Dong * Parameters:
187bebc99d6fa433c04139294a5057f8439d772dbd9James Dong * [in] Min     lower bound
188bebc99d6fa433c04139294a5057f8439d772dbd9James Dong * [in] Max     upper bound
189bebc99d6fa433c04139294a5057f8439d772dbd9James Dong * [in] src     variable to the clipped
190bebc99d6fa433c04139294a5057f8439d772dbd9James Dong *
191bebc99d6fa433c04139294a5057f8439d772dbd9James Dong * Return Value:
192bebc99d6fa433c04139294a5057f8439d772dbd9James Dong * OMX_S32 --   returns clipped value
193bebc99d6fa433c04139294a5057f8439d772dbd9James Dong */
194bebc99d6fa433c04139294a5057f8439d772dbd9James Dong
195bebc99d6fa433c04139294a5057f8439d772dbd9James DongOMX_S32 armClip (
196bebc99d6fa433c04139294a5057f8439d772dbd9James Dong        OMX_INT min,
197bebc99d6fa433c04139294a5057f8439d772dbd9James Dong        OMX_INT max,
198bebc99d6fa433c04139294a5057f8439d772dbd9James Dong        OMX_S32 src
199bebc99d6fa433c04139294a5057f8439d772dbd9James Dong        );
200bebc99d6fa433c04139294a5057f8439d772dbd9James Dong
201bebc99d6fa433c04139294a5057f8439d772dbd9James Dong/**
202bebc99d6fa433c04139294a5057f8439d772dbd9James Dong * Function: armClip_F32
203bebc99d6fa433c04139294a5057f8439d772dbd9James Dong *
204bebc99d6fa433c04139294a5057f8439d772dbd9James Dong * Description: Clips the input between MAX and MIN value
205bebc99d6fa433c04139294a5057f8439d772dbd9James Dong *
206bebc99d6fa433c04139294a5057f8439d772dbd9James Dong *
207bebc99d6fa433c04139294a5057f8439d772dbd9James Dong * Remarks:
208bebc99d6fa433c04139294a5057f8439d772dbd9James Dong *
209bebc99d6fa433c04139294a5057f8439d772dbd9James Dong * Parameters:
210bebc99d6fa433c04139294a5057f8439d772dbd9James Dong * [in] Min     lower bound
211bebc99d6fa433c04139294a5057f8439d772dbd9James Dong * [in] Max     upper bound
212bebc99d6fa433c04139294a5057f8439d772dbd9James Dong * [in] src     variable to the clipped
213bebc99d6fa433c04139294a5057f8439d772dbd9James Dong *
214bebc99d6fa433c04139294a5057f8439d772dbd9James Dong * Return Value:
215bebc99d6fa433c04139294a5057f8439d772dbd9James Dong * OMX_F32 --   returns clipped value
216bebc99d6fa433c04139294a5057f8439d772dbd9James Dong */
217bebc99d6fa433c04139294a5057f8439d772dbd9James Dong
218bebc99d6fa433c04139294a5057f8439d772dbd9James DongOMX_F32 armClip_F32 (
219bebc99d6fa433c04139294a5057f8439d772dbd9James Dong        OMX_F32 min,
220bebc99d6fa433c04139294a5057f8439d772dbd9James Dong        OMX_F32 max,
221bebc99d6fa433c04139294a5057f8439d772dbd9James Dong        OMX_F32 src
222bebc99d6fa433c04139294a5057f8439d772dbd9James Dong        );
223bebc99d6fa433c04139294a5057f8439d772dbd9James Dong
224bebc99d6fa433c04139294a5057f8439d772dbd9James Dong/**
225bebc99d6fa433c04139294a5057f8439d772dbd9James Dong * Function: armShiftSat_F32
226bebc99d6fa433c04139294a5057f8439d772dbd9James Dong *
227bebc99d6fa433c04139294a5057f8439d772dbd9James Dong * Description: Divides a float value by 2^shift and
228bebc99d6fa433c04139294a5057f8439d772dbd9James Dong * saturates it for unsigned value range for satBits.
229bebc99d6fa433c04139294a5057f8439d772dbd9James Dong * Second parameter is like "shifting" the corresponding
230bebc99d6fa433c04139294a5057f8439d772dbd9James Dong * integer value. Takes care of rounding while clipping the final
231bebc99d6fa433c04139294a5057f8439d772dbd9James Dong * value.
232bebc99d6fa433c04139294a5057f8439d772dbd9James Dong *
233bebc99d6fa433c04139294a5057f8439d772dbd9James Dong * Parameters:
234bebc99d6fa433c04139294a5057f8439d772dbd9James Dong * [in] v          Number to be operated upon
235bebc99d6fa433c04139294a5057f8439d772dbd9James Dong * [in] shift      Divides the input "v" by "2^shift"
236bebc99d6fa433c04139294a5057f8439d772dbd9James Dong * [in] satBits    Final range is [0, 2^satBits)
237bebc99d6fa433c04139294a5057f8439d772dbd9James Dong *
238bebc99d6fa433c04139294a5057f8439d772dbd9James Dong * Return Value:
239bebc99d6fa433c04139294a5057f8439d772dbd9James Dong * OMX_S32 --   returns "shifted" saturated value
240bebc99d6fa433c04139294a5057f8439d772dbd9James Dong */
241bebc99d6fa433c04139294a5057f8439d772dbd9James Dong
242bebc99d6fa433c04139294a5057f8439d772dbd9James DongOMX_U32 armShiftSat_F32(
243bebc99d6fa433c04139294a5057f8439d772dbd9James Dong        OMX_F32 v,
244bebc99d6fa433c04139294a5057f8439d772dbd9James Dong        OMX_INT shift,
245bebc99d6fa433c04139294a5057f8439d772dbd9James Dong        OMX_INT satBits
246bebc99d6fa433c04139294a5057f8439d772dbd9James Dong        );
247bebc99d6fa433c04139294a5057f8439d772dbd9James Dong
248bebc99d6fa433c04139294a5057f8439d772dbd9James Dong/**
249bebc99d6fa433c04139294a5057f8439d772dbd9James Dong * Functions: armSwapElem
250bebc99d6fa433c04139294a5057f8439d772dbd9James Dong *
251bebc99d6fa433c04139294a5057f8439d772dbd9James Dong * Description:
252bebc99d6fa433c04139294a5057f8439d772dbd9James Dong * This function swaps two elements at the specified pointer locations.
253bebc99d6fa433c04139294a5057f8439d772dbd9James Dong * The size of each element could be anything as specified by <elemSize>
254bebc99d6fa433c04139294a5057f8439d772dbd9James Dong *
255bebc99d6fa433c04139294a5057f8439d772dbd9James Dong * Return Value:
256bebc99d6fa433c04139294a5057f8439d772dbd9James Dong * OMXResult -- Error status from the function
257bebc99d6fa433c04139294a5057f8439d772dbd9James Dong */
258bebc99d6fa433c04139294a5057f8439d772dbd9James DongOMXResult armSwapElem(OMX_U8 *pBuf1, OMX_U8 *pBuf2, OMX_INT elemSize);
259bebc99d6fa433c04139294a5057f8439d772dbd9James Dong
260bebc99d6fa433c04139294a5057f8439d772dbd9James Dong
261bebc99d6fa433c04139294a5057f8439d772dbd9James Dong/**
262bebc99d6fa433c04139294a5057f8439d772dbd9James Dong * Function: armMedianOf3
263bebc99d6fa433c04139294a5057f8439d772dbd9James Dong *
264bebc99d6fa433c04139294a5057f8439d772dbd9James Dong * Description: Finds the median of three numbers
265bebc99d6fa433c04139294a5057f8439d772dbd9James Dong *
266bebc99d6fa433c04139294a5057f8439d772dbd9James Dong * Remarks:
267bebc99d6fa433c04139294a5057f8439d772dbd9James Dong *
268bebc99d6fa433c04139294a5057f8439d772dbd9James Dong * Parameters:
269bebc99d6fa433c04139294a5057f8439d772dbd9James Dong * [in] fEntry     First entry
270bebc99d6fa433c04139294a5057f8439d772dbd9James Dong * [in] sEntry     second entry
271bebc99d6fa433c04139294a5057f8439d772dbd9James Dong * [in] tEntry     Third entry
272bebc99d6fa433c04139294a5057f8439d772dbd9James Dong *
273bebc99d6fa433c04139294a5057f8439d772dbd9James Dong * Return Value:
274bebc99d6fa433c04139294a5057f8439d772dbd9James Dong * OMX_S32 --   returns the median value
275bebc99d6fa433c04139294a5057f8439d772dbd9James Dong */
276bebc99d6fa433c04139294a5057f8439d772dbd9James Dong
277bebc99d6fa433c04139294a5057f8439d772dbd9James DongOMX_S32 armMedianOf3 (
278bebc99d6fa433c04139294a5057f8439d772dbd9James Dong    OMX_S32 fEntry,
279bebc99d6fa433c04139294a5057f8439d772dbd9James Dong    OMX_S32 sEntry,
280bebc99d6fa433c04139294a5057f8439d772dbd9James Dong    OMX_S32 tEntry
281bebc99d6fa433c04139294a5057f8439d772dbd9James Dong    );
282bebc99d6fa433c04139294a5057f8439d772dbd9James Dong
283bebc99d6fa433c04139294a5057f8439d772dbd9James Dong/**
284bebc99d6fa433c04139294a5057f8439d772dbd9James Dong * Function: armLogSize
285bebc99d6fa433c04139294a5057f8439d772dbd9James Dong *
286bebc99d6fa433c04139294a5057f8439d772dbd9James Dong * Description: Finds the size of a positive value and returns the same
287bebc99d6fa433c04139294a5057f8439d772dbd9James Dong *
288bebc99d6fa433c04139294a5057f8439d772dbd9James Dong * Remarks:
289bebc99d6fa433c04139294a5057f8439d772dbd9James Dong *
290bebc99d6fa433c04139294a5057f8439d772dbd9James Dong * Parameters:
291bebc99d6fa433c04139294a5057f8439d772dbd9James Dong * [in] value    Positive value
292bebc99d6fa433c04139294a5057f8439d772dbd9James Dong *
293bebc99d6fa433c04139294a5057f8439d772dbd9James Dong * Return Value:
294bebc99d6fa433c04139294a5057f8439d772dbd9James Dong * OMX_U8 --   returns the size of the positive value
295bebc99d6fa433c04139294a5057f8439d772dbd9James Dong */
296bebc99d6fa433c04139294a5057f8439d772dbd9James Dong
297bebc99d6fa433c04139294a5057f8439d772dbd9James DongOMX_U8 armLogSize (
298bebc99d6fa433c04139294a5057f8439d772dbd9James Dong    OMX_U16 value
299bebc99d6fa433c04139294a5057f8439d772dbd9James Dong    );
300bebc99d6fa433c04139294a5057f8439d772dbd9James Dong
301bebc99d6fa433c04139294a5057f8439d772dbd9James Dong/***********************************************************************/
302bebc99d6fa433c04139294a5057f8439d772dbd9James Dong                /* Saturating Arithmetic operations */
303bebc99d6fa433c04139294a5057f8439d772dbd9James Dong
304bebc99d6fa433c04139294a5057f8439d772dbd9James Dong/**
305bebc99d6fa433c04139294a5057f8439d772dbd9James Dong * Function :armSatAdd_S32()
306bebc99d6fa433c04139294a5057f8439d772dbd9James Dong *
307bebc99d6fa433c04139294a5057f8439d772dbd9James Dong * Description :
308bebc99d6fa433c04139294a5057f8439d772dbd9James Dong *   Returns the result of saturated addition of the two inputs Value1, Value2
309bebc99d6fa433c04139294a5057f8439d772dbd9James Dong *
310bebc99d6fa433c04139294a5057f8439d772dbd9James Dong * Parametrs:
311bebc99d6fa433c04139294a5057f8439d772dbd9James Dong * [in] Value1       First Operand
312bebc99d6fa433c04139294a5057f8439d772dbd9James Dong * [in] Value2       Second Operand
313bebc99d6fa433c04139294a5057f8439d772dbd9James Dong *
314bebc99d6fa433c04139294a5057f8439d772dbd9James Dong * Return:
315bebc99d6fa433c04139294a5057f8439d772dbd9James Dong * [out]             Result of operation
316bebc99d6fa433c04139294a5057f8439d772dbd9James Dong *
317bebc99d6fa433c04139294a5057f8439d772dbd9James Dong *
318bebc99d6fa433c04139294a5057f8439d772dbd9James Dong **/
319bebc99d6fa433c04139294a5057f8439d772dbd9James Dong
320bebc99d6fa433c04139294a5057f8439d772dbd9James DongOMX_S32 armSatAdd_S32(
321bebc99d6fa433c04139294a5057f8439d772dbd9James Dong                OMX_S32 Value1,
322bebc99d6fa433c04139294a5057f8439d772dbd9James Dong                OMX_S32 Value2
323bebc99d6fa433c04139294a5057f8439d772dbd9James Dong                );
324bebc99d6fa433c04139294a5057f8439d772dbd9James Dong
325bebc99d6fa433c04139294a5057f8439d772dbd9James Dong/**
326bebc99d6fa433c04139294a5057f8439d772dbd9James Dong * Function :armSatAdd_S64()
327bebc99d6fa433c04139294a5057f8439d772dbd9James Dong *
328bebc99d6fa433c04139294a5057f8439d772dbd9James Dong * Description :
329bebc99d6fa433c04139294a5057f8439d772dbd9James Dong *   Returns the result of saturated addition of the two inputs Value1, Value2
330bebc99d6fa433c04139294a5057f8439d772dbd9James Dong *
331bebc99d6fa433c04139294a5057f8439d772dbd9James Dong * Parametrs:
332bebc99d6fa433c04139294a5057f8439d772dbd9James Dong * [in] Value1       First Operand
333bebc99d6fa433c04139294a5057f8439d772dbd9James Dong * [in] Value2       Second Operand
334bebc99d6fa433c04139294a5057f8439d772dbd9James Dong *
335bebc99d6fa433c04139294a5057f8439d772dbd9James Dong * Return:
336bebc99d6fa433c04139294a5057f8439d772dbd9James Dong * [out]             Result of operation
337bebc99d6fa433c04139294a5057f8439d772dbd9James Dong *
338bebc99d6fa433c04139294a5057f8439d772dbd9James Dong *
339bebc99d6fa433c04139294a5057f8439d772dbd9James Dong **/
340bebc99d6fa433c04139294a5057f8439d772dbd9James Dong
341bebc99d6fa433c04139294a5057f8439d772dbd9James DongOMX_S64 armSatAdd_S64(
342bebc99d6fa433c04139294a5057f8439d772dbd9James Dong                OMX_S64 Value1,
343bebc99d6fa433c04139294a5057f8439d772dbd9James Dong                OMX_S64 Value2
344bebc99d6fa433c04139294a5057f8439d772dbd9James Dong                );
345bebc99d6fa433c04139294a5057f8439d772dbd9James Dong
346bebc99d6fa433c04139294a5057f8439d772dbd9James Dong/** Function :armSatSub_S32()
347bebc99d6fa433c04139294a5057f8439d772dbd9James Dong *
348bebc99d6fa433c04139294a5057f8439d772dbd9James Dong * Description :
349bebc99d6fa433c04139294a5057f8439d772dbd9James Dong *     Returns the result of saturated substraction of the two inputs Value1, Value2
350bebc99d6fa433c04139294a5057f8439d772dbd9James Dong *
351bebc99d6fa433c04139294a5057f8439d772dbd9James Dong * Parametrs:
352bebc99d6fa433c04139294a5057f8439d772dbd9James Dong * [in] Value1       First Operand
353bebc99d6fa433c04139294a5057f8439d772dbd9James Dong * [in] Value2       Second Operand
354bebc99d6fa433c04139294a5057f8439d772dbd9James Dong *
355bebc99d6fa433c04139294a5057f8439d772dbd9James Dong * Return:
356bebc99d6fa433c04139294a5057f8439d772dbd9James Dong * [out]             Result of operation
357bebc99d6fa433c04139294a5057f8439d772dbd9James Dong *
358bebc99d6fa433c04139294a5057f8439d772dbd9James Dong **/
359bebc99d6fa433c04139294a5057f8439d772dbd9James Dong
360bebc99d6fa433c04139294a5057f8439d772dbd9James DongOMX_S32 armSatSub_S32(
361bebc99d6fa433c04139294a5057f8439d772dbd9James Dong                    OMX_S32 Value1,
362bebc99d6fa433c04139294a5057f8439d772dbd9James Dong                    OMX_S32 Value2
363bebc99d6fa433c04139294a5057f8439d772dbd9James Dong                    );
364bebc99d6fa433c04139294a5057f8439d772dbd9James Dong
365bebc99d6fa433c04139294a5057f8439d772dbd9James Dong/**
366bebc99d6fa433c04139294a5057f8439d772dbd9James Dong * Function :armSatMac_S32()
367bebc99d6fa433c04139294a5057f8439d772dbd9James Dong *
368bebc99d6fa433c04139294a5057f8439d772dbd9James Dong * Description :
369bebc99d6fa433c04139294a5057f8439d772dbd9James Dong *     Returns the result of Multiplication of Value1 and Value2 and subesquent saturated
370bebc99d6fa433c04139294a5057f8439d772dbd9James Dong *     accumulation with Mac
371bebc99d6fa433c04139294a5057f8439d772dbd9James Dong *
372bebc99d6fa433c04139294a5057f8439d772dbd9James Dong * Parametrs:
373bebc99d6fa433c04139294a5057f8439d772dbd9James Dong * [in] Value1       First Operand
374bebc99d6fa433c04139294a5057f8439d772dbd9James Dong * [in] Value2       Second Operand
375bebc99d6fa433c04139294a5057f8439d772dbd9James Dong * [in] Mac          Accumulator
376bebc99d6fa433c04139294a5057f8439d772dbd9James Dong *
377bebc99d6fa433c04139294a5057f8439d772dbd9James Dong * Return:
378bebc99d6fa433c04139294a5057f8439d772dbd9James Dong * [out]             Result of operation
379bebc99d6fa433c04139294a5057f8439d772dbd9James Dong **/
380bebc99d6fa433c04139294a5057f8439d772dbd9James Dong
381bebc99d6fa433c04139294a5057f8439d772dbd9James DongOMX_S32 armSatMac_S32(
382bebc99d6fa433c04139294a5057f8439d772dbd9James Dong                    OMX_S32 Mac,
383bebc99d6fa433c04139294a5057f8439d772dbd9James Dong                    OMX_S16 Value1,
384bebc99d6fa433c04139294a5057f8439d772dbd9James Dong                    OMX_S16 Value2
385bebc99d6fa433c04139294a5057f8439d772dbd9James Dong                    );
386bebc99d6fa433c04139294a5057f8439d772dbd9James Dong
387bebc99d6fa433c04139294a5057f8439d772dbd9James Dong/**
388bebc99d6fa433c04139294a5057f8439d772dbd9James Dong * Function :armSatMac_S16S32_S32
389bebc99d6fa433c04139294a5057f8439d772dbd9James Dong *
390bebc99d6fa433c04139294a5057f8439d772dbd9James Dong * Description :
391bebc99d6fa433c04139294a5057f8439d772dbd9James Dong *   Returns the result of saturated MAC operation of the three inputs delayElem, filTap , mac
392bebc99d6fa433c04139294a5057f8439d772dbd9James Dong *
393bebc99d6fa433c04139294a5057f8439d772dbd9James Dong *   mac = mac + Saturate_in_32Bits(delayElem * filTap)
394bebc99d6fa433c04139294a5057f8439d772dbd9James Dong *
395bebc99d6fa433c04139294a5057f8439d772dbd9James Dong * Parametrs:
396bebc99d6fa433c04139294a5057f8439d772dbd9James Dong * [in] delayElem    First 32 bit Operand
397bebc99d6fa433c04139294a5057f8439d772dbd9James Dong * [in] filTap       Second 16 bit Operand
398bebc99d6fa433c04139294a5057f8439d772dbd9James Dong * [in] mac          Result of MAC operation
399bebc99d6fa433c04139294a5057f8439d772dbd9James Dong *
400bebc99d6fa433c04139294a5057f8439d772dbd9James Dong * Return:
401bebc99d6fa433c04139294a5057f8439d772dbd9James Dong * [out]  mac        Result of operation
402bebc99d6fa433c04139294a5057f8439d772dbd9James Dong *
403bebc99d6fa433c04139294a5057f8439d772dbd9James Dong **/
404bebc99d6fa433c04139294a5057f8439d772dbd9James Dong
405bebc99d6fa433c04139294a5057f8439d772dbd9James DongOMX_S32 armSatMac_S16S32_S32(
406bebc99d6fa433c04139294a5057f8439d772dbd9James Dong                        OMX_S32 mac,
407bebc99d6fa433c04139294a5057f8439d772dbd9James Dong                        OMX_S32 delayElem,
408bebc99d6fa433c04139294a5057f8439d772dbd9James Dong                        OMX_S16 filTap );
409bebc99d6fa433c04139294a5057f8439d772dbd9James Dong
410bebc99d6fa433c04139294a5057f8439d772dbd9James Dong/**
411bebc99d6fa433c04139294a5057f8439d772dbd9James Dong * Function :armSatRoundRightShift_S32_S16
412bebc99d6fa433c04139294a5057f8439d772dbd9James Dong *
413bebc99d6fa433c04139294a5057f8439d772dbd9James Dong * Description :
414bebc99d6fa433c04139294a5057f8439d772dbd9James Dong *   Returns the result of rounded right shift operation of input by the scalefactor
415bebc99d6fa433c04139294a5057f8439d772dbd9James Dong *
416bebc99d6fa433c04139294a5057f8439d772dbd9James Dong *   output = Saturate_in_16Bits( ( RightShift( (Round(input) , scaleFactor ) )
417bebc99d6fa433c04139294a5057f8439d772dbd9James Dong *
418bebc99d6fa433c04139294a5057f8439d772dbd9James Dong * Parametrs:
419bebc99d6fa433c04139294a5057f8439d772dbd9James Dong * [in] input       The input to be operated on
420bebc99d6fa433c04139294a5057f8439d772dbd9James Dong * [in] scaleFactor The shift number
421bebc99d6fa433c04139294a5057f8439d772dbd9James Dong *
422bebc99d6fa433c04139294a5057f8439d772dbd9James Dong * Return:
423bebc99d6fa433c04139294a5057f8439d772dbd9James Dong * [out]            Result of operation
424bebc99d6fa433c04139294a5057f8439d772dbd9James Dong *
425bebc99d6fa433c04139294a5057f8439d772dbd9James Dong **/
426bebc99d6fa433c04139294a5057f8439d772dbd9James Dong
427bebc99d6fa433c04139294a5057f8439d772dbd9James Dong
428bebc99d6fa433c04139294a5057f8439d772dbd9James DongOMX_S16 armSatRoundRightShift_S32_S16(
429bebc99d6fa433c04139294a5057f8439d772dbd9James Dong                        OMX_S32 input,
430bebc99d6fa433c04139294a5057f8439d772dbd9James Dong                        OMX_INT scaleFactor);
431bebc99d6fa433c04139294a5057f8439d772dbd9James Dong
432bebc99d6fa433c04139294a5057f8439d772dbd9James Dong/**
433bebc99d6fa433c04139294a5057f8439d772dbd9James Dong * Function :armSatRoundLeftShift_S32()
434bebc99d6fa433c04139294a5057f8439d772dbd9James Dong *
435bebc99d6fa433c04139294a5057f8439d772dbd9James Dong * Description :
436bebc99d6fa433c04139294a5057f8439d772dbd9James Dong *     Returns the result of saturating left-shift operation on input
437bebc99d6fa433c04139294a5057f8439d772dbd9James Dong *     Or rounded Right shift if the input Shift is negative.
438bebc99d6fa433c04139294a5057f8439d772dbd9James Dong *
439bebc99d6fa433c04139294a5057f8439d772dbd9James Dong * Parametrs:
440bebc99d6fa433c04139294a5057f8439d772dbd9James Dong * [in] Value        Operand
441bebc99d6fa433c04139294a5057f8439d772dbd9James Dong * [in] shift        Operand for shift operation
442bebc99d6fa433c04139294a5057f8439d772dbd9James Dong *
443bebc99d6fa433c04139294a5057f8439d772dbd9James Dong * Return:
444bebc99d6fa433c04139294a5057f8439d772dbd9James Dong * [out]             Result of operation
445bebc99d6fa433c04139294a5057f8439d772dbd9James Dong *
446bebc99d6fa433c04139294a5057f8439d772dbd9James Dong **/
447bebc99d6fa433c04139294a5057f8439d772dbd9James Dong
448bebc99d6fa433c04139294a5057f8439d772dbd9James DongOMX_S32 armSatRoundLeftShift_S32(
449bebc99d6fa433c04139294a5057f8439d772dbd9James Dong                        OMX_S32 Value,
450bebc99d6fa433c04139294a5057f8439d772dbd9James Dong                        OMX_INT shift
451bebc99d6fa433c04139294a5057f8439d772dbd9James Dong                        );
452bebc99d6fa433c04139294a5057f8439d772dbd9James Dong
453bebc99d6fa433c04139294a5057f8439d772dbd9James Dong/**
454bebc99d6fa433c04139294a5057f8439d772dbd9James Dong * Function :armSatRoundLeftShift_S64()
455bebc99d6fa433c04139294a5057f8439d772dbd9James Dong *
456bebc99d6fa433c04139294a5057f8439d772dbd9James Dong * Description :
457bebc99d6fa433c04139294a5057f8439d772dbd9James Dong *     Returns the result of saturating left-shift operation on input
458bebc99d6fa433c04139294a5057f8439d772dbd9James Dong *     Or rounded Right shift if the input Shift is negative.
459bebc99d6fa433c04139294a5057f8439d772dbd9James Dong *
460bebc99d6fa433c04139294a5057f8439d772dbd9James Dong * Parametrs:
461bebc99d6fa433c04139294a5057f8439d772dbd9James Dong * [in] Value        Operand
462bebc99d6fa433c04139294a5057f8439d772dbd9James Dong * [in] shift        Operand for shift operation
463bebc99d6fa433c04139294a5057f8439d772dbd9James Dong *
464bebc99d6fa433c04139294a5057f8439d772dbd9James Dong * Return:
465bebc99d6fa433c04139294a5057f8439d772dbd9James Dong * [out]             Result of operation
466bebc99d6fa433c04139294a5057f8439d772dbd9James Dong *
467bebc99d6fa433c04139294a5057f8439d772dbd9James Dong **/
468bebc99d6fa433c04139294a5057f8439d772dbd9James Dong
469bebc99d6fa433c04139294a5057f8439d772dbd9James DongOMX_S64 armSatRoundLeftShift_S64(
470bebc99d6fa433c04139294a5057f8439d772dbd9James Dong                        OMX_S64 Value,
471bebc99d6fa433c04139294a5057f8439d772dbd9James Dong                        OMX_INT shift
472bebc99d6fa433c04139294a5057f8439d772dbd9James Dong                        );
473bebc99d6fa433c04139294a5057f8439d772dbd9James Dong
474bebc99d6fa433c04139294a5057f8439d772dbd9James Dong/**
475bebc99d6fa433c04139294a5057f8439d772dbd9James Dong * Function :armSatMulS16S32_S32()
476bebc99d6fa433c04139294a5057f8439d772dbd9James Dong *
477bebc99d6fa433c04139294a5057f8439d772dbd9James Dong * Description :
478bebc99d6fa433c04139294a5057f8439d772dbd9James Dong *     Returns the result of a S16 data type multiplied with an S32 data type
479bebc99d6fa433c04139294a5057f8439d772dbd9James Dong *     in a S32 container
480bebc99d6fa433c04139294a5057f8439d772dbd9James Dong *
481bebc99d6fa433c04139294a5057f8439d772dbd9James Dong * Parametrs:
482bebc99d6fa433c04139294a5057f8439d772dbd9James Dong * [in] input1       Operand 1
483bebc99d6fa433c04139294a5057f8439d772dbd9James Dong * [in] input2       Operand 2
484bebc99d6fa433c04139294a5057f8439d772dbd9James Dong *
485bebc99d6fa433c04139294a5057f8439d772dbd9James Dong * Return:
486bebc99d6fa433c04139294a5057f8439d772dbd9James Dong * [out]             Result of operation
487bebc99d6fa433c04139294a5057f8439d772dbd9James Dong *
488bebc99d6fa433c04139294a5057f8439d772dbd9James Dong **/
489bebc99d6fa433c04139294a5057f8439d772dbd9James Dong
490bebc99d6fa433c04139294a5057f8439d772dbd9James Dong
491bebc99d6fa433c04139294a5057f8439d772dbd9James DongOMX_S32 armSatMulS16S32_S32(
492bebc99d6fa433c04139294a5057f8439d772dbd9James Dong                    OMX_S16 input1,
493bebc99d6fa433c04139294a5057f8439d772dbd9James Dong                    OMX_S32 input2);
494bebc99d6fa433c04139294a5057f8439d772dbd9James Dong
495bebc99d6fa433c04139294a5057f8439d772dbd9James Dong/**
496bebc99d6fa433c04139294a5057f8439d772dbd9James Dong * Function :armSatMulS32S32_S32()
497bebc99d6fa433c04139294a5057f8439d772dbd9James Dong *
498bebc99d6fa433c04139294a5057f8439d772dbd9James Dong * Description :
499bebc99d6fa433c04139294a5057f8439d772dbd9James Dong *     Returns the result of a S32 data type multiplied with an S32 data type
500bebc99d6fa433c04139294a5057f8439d772dbd9James Dong *     in a S32 container
501bebc99d6fa433c04139294a5057f8439d772dbd9James Dong *
502bebc99d6fa433c04139294a5057f8439d772dbd9James Dong * Parametrs:
503bebc99d6fa433c04139294a5057f8439d772dbd9James Dong * [in] input1       Operand 1
504bebc99d6fa433c04139294a5057f8439d772dbd9James Dong * [in] input2       Operand 2
505bebc99d6fa433c04139294a5057f8439d772dbd9James Dong *
506bebc99d6fa433c04139294a5057f8439d772dbd9James Dong * Return:
507bebc99d6fa433c04139294a5057f8439d772dbd9James Dong * [out]             Result of operation
508bebc99d6fa433c04139294a5057f8439d772dbd9James Dong *
509bebc99d6fa433c04139294a5057f8439d772dbd9James Dong **/
510bebc99d6fa433c04139294a5057f8439d772dbd9James Dong
511bebc99d6fa433c04139294a5057f8439d772dbd9James DongOMX_S32 armSatMulS32S32_S32(
512bebc99d6fa433c04139294a5057f8439d772dbd9James Dong                    OMX_S32 input1,
513bebc99d6fa433c04139294a5057f8439d772dbd9James Dong                    OMX_S32 input2);
514bebc99d6fa433c04139294a5057f8439d772dbd9James Dong
515bebc99d6fa433c04139294a5057f8439d772dbd9James Dong
516bebc99d6fa433c04139294a5057f8439d772dbd9James Dong/**
517bebc99d6fa433c04139294a5057f8439d772dbd9James Dong * Function :armIntDivAwayFromZero()
518bebc99d6fa433c04139294a5057f8439d772dbd9James Dong *
519bebc99d6fa433c04139294a5057f8439d772dbd9James Dong * Description : Integer division with rounding to the nearest integer.
520bebc99d6fa433c04139294a5057f8439d772dbd9James Dong *               Half-integer values are rounded away from zero
521bebc99d6fa433c04139294a5057f8439d772dbd9James Dong *               unless otherwise specified. For example 3//2 is rounded
522bebc99d6fa433c04139294a5057f8439d772dbd9James Dong *               to 2, and -3//2 is rounded to -2.
523bebc99d6fa433c04139294a5057f8439d772dbd9James Dong *
524bebc99d6fa433c04139294a5057f8439d772dbd9James Dong * Parametrs:
525bebc99d6fa433c04139294a5057f8439d772dbd9James Dong * [in] Num        Operand 1
526bebc99d6fa433c04139294a5057f8439d772dbd9James Dong * [in] Deno       Operand 2
527bebc99d6fa433c04139294a5057f8439d772dbd9James Dong *
528bebc99d6fa433c04139294a5057f8439d772dbd9James Dong * Return:
529bebc99d6fa433c04139294a5057f8439d772dbd9James Dong * [out]             Result of operation input1//input2
530bebc99d6fa433c04139294a5057f8439d772dbd9James Dong *
531bebc99d6fa433c04139294a5057f8439d772dbd9James Dong **/
532bebc99d6fa433c04139294a5057f8439d772dbd9James Dong
533bebc99d6fa433c04139294a5057f8439d772dbd9James DongOMX_S32 armIntDivAwayFromZero (OMX_S32 Num, OMX_S32 Deno);
534bebc99d6fa433c04139294a5057f8439d772dbd9James Dong
535bebc99d6fa433c04139294a5057f8439d772dbd9James Dong
536bebc99d6fa433c04139294a5057f8439d772dbd9James Dong/***********************************************************************/
537bebc99d6fa433c04139294a5057f8439d772dbd9James Dong/*
538bebc99d6fa433c04139294a5057f8439d772dbd9James Dong * Debugging macros
539bebc99d6fa433c04139294a5057f8439d772dbd9James Dong *
540bebc99d6fa433c04139294a5057f8439d772dbd9James Dong */
541bebc99d6fa433c04139294a5057f8439d772dbd9James Dong
542bebc99d6fa433c04139294a5057f8439d772dbd9James Dong
543bebc99d6fa433c04139294a5057f8439d772dbd9James Dong/*
544bebc99d6fa433c04139294a5057f8439d772dbd9James Dong * Definition of output stream - change to stderr if necessary
545bebc99d6fa433c04139294a5057f8439d772dbd9James Dong */
546bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#define DEBUG_STREAM stdout
547bebc99d6fa433c04139294a5057f8439d772dbd9James Dong
548bebc99d6fa433c04139294a5057f8439d772dbd9James Dong/*
549bebc99d6fa433c04139294a5057f8439d772dbd9James Dong * Debug printf macros, one for each argument count.
550bebc99d6fa433c04139294a5057f8439d772dbd9James Dong * Add more if needed.
551bebc99d6fa433c04139294a5057f8439d772dbd9James Dong */
552bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#ifdef DEBUG_ON
553bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#include <stdio.h>
554bebc99d6fa433c04139294a5057f8439d772dbd9James Dong
555bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#define DEBUG_PRINTF_0(a)                                               fprintf(DEBUG_STREAM, a)
556bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#define DEBUG_PRINTF_1(a, b)                                            fprintf(DEBUG_STREAM, a, b)
557bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#define DEBUG_PRINTF_2(a, b, c)                                         fprintf(DEBUG_STREAM, a, b, c)
558bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#define DEBUG_PRINTF_3(a, b, c, d)                                      fprintf(DEBUG_STREAM, a, b, c, d)
559bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#define DEBUG_PRINTF_4(a, b, c, d, e)                                   fprintf(DEBUG_STREAM, a, b, c, d, e)
560bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#define DEBUG_PRINTF_5(a, b, c, d, e, f)                                fprintf(DEBUG_STREAM, a, b, c, d, e, f)
561bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#define DEBUG_PRINTF_6(a, b, c, d, e, f, g)                             fprintf(DEBUG_STREAM, a, b, c, d, e, f, g)
562bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#define DEBUG_PRINTF_7(a, b, c, d, e, f, g, h)                          fprintf(DEBUG_STREAM, a, b, c, d, e, f, g, h)
563bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#define DEBUG_PRINTF_8(a, b, c, d, e, f, g, h, i)                       fprintf(DEBUG_STREAM, a, b, c, d, e, f, g, h, i)
564bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#define DEBUG_PRINTF_9(a, b, c, d, e, f, g, h, i, j)                    fprintf(DEBUG_STREAM, a, b, c, d, e, f, g, h, i, j)
565bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#define DEBUG_PRINTF_10(a, b, c, d, e, f, g, h, i, j, k)                fprintf(DEBUG_STREAM, a, b, c, d, e, f, g, h, i, j, k)
566bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#define DEBUG_PRINTF_11(a, b, c, d, e, f, g, h, i, j, k, l)             fprintf(DEBUG_STREAM, a, b, c, d, e, f, g, h, i, j, k, l)
567bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#define DEBUG_PRINTF_12(a, b, c, d, e, f, g, h, i, j, k, l, m)          fprintf(DEBUG_STREAM, a, b, c, d, e, f, g, h, i, j, k, l, m)
568bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#define DEBUG_PRINTF_13(a, b, c, d, e, f, g, h, i, j, k, l, m, n)       fprintf(DEBUG_STREAM, a, b, c, d, e, f, g, h, i, j, k, l, m, n)
569bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#define DEBUG_PRINTF_14(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o)    fprintf(DEBUG_STREAM, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o)
570bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#else /* DEBUG_ON */
571bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#define DEBUG_PRINTF_0(a)
572bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#define DEBUG_PRINTF_1(a, b)
573bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#define DEBUG_PRINTF_2(a, b, c)
574bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#define DEBUG_PRINTF_3(a, b, c, d)
575bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#define DEBUG_PRINTF_4(a, b, c, d, e)
576bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#define DEBUG_PRINTF_5(a, b, c, d, e, f)
577bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#define DEBUG_PRINTF_6(a, b, c, d, e, f, g)
578bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#define DEBUG_PRINTF_7(a, b, c, d, e, f, g, h)
579bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#define DEBUG_PRINTF_8(a, b, c, d, e, f, g, h, i)
580bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#define DEBUG_PRINTF_9(a, b, c, d, e, f, g, h, i, j)
581bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#define DEBUG_PRINTF_10(a, b, c, d, e, f, g, h, i, j, k)
582bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#define DEBUG_PRINTF_11(a, b, c, d, e, f, g, h, i, j, k, l)
583bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#define DEBUG_PRINTF_12(a, b, c, d, e, f, g, h, i, j, k, l, m)
584bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#define DEBUG_PRINTF_13(a, b, c, d, e, f, g, h, i, j, k, l, m, n)
585bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#define DEBUG_PRINTF_14(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o)
586bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#endif /* DEBUG_ON */
587bebc99d6fa433c04139294a5057f8439d772dbd9James Dong
588bebc99d6fa433c04139294a5057f8439d772dbd9James Dong
589bebc99d6fa433c04139294a5057f8439d772dbd9James Dong/*
590bebc99d6fa433c04139294a5057f8439d772dbd9James Dong * Domain and sub domain definitions
591bebc99d6fa433c04139294a5057f8439d772dbd9James Dong *
592bebc99d6fa433c04139294a5057f8439d772dbd9James Dong * In order to turn on debug for an entire domain or sub-domain
593bebc99d6fa433c04139294a5057f8439d772dbd9James Dong * at compile time, one of the DEBUG_DOMAIN_* below may be defined,
594bebc99d6fa433c04139294a5057f8439d772dbd9James Dong * which will activate debug in all of the defines it contains.
595bebc99d6fa433c04139294a5057f8439d772dbd9James Dong */
596bebc99d6fa433c04139294a5057f8439d772dbd9James Dong
597bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#ifdef DEBUG_DOMAIN_AC
598bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#define DEBUG_OMXACAAC_DECODECHANPAIRELT_MPEG4
599bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#define DEBUG_OMXACAAC_DECODECHANPAIRELT
600bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#define DEBUG_OMXACAAC_DECODEDATSTRELT
601bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#define DEBUG_OMXACAAC_DECODEFILLELT
602bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#define DEBUG_OMXACAAC_DECODEISSTEREO_S32
603bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#define DEBUG_OMXACAAC_DECODEMSPNS_S32
604bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#define DEBUG_OMXACAAC_DECODEMSSTEREO_S32_I
605bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#define DEBUG_OMXACAAC_DECODEPRGCFGELT
606bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#define DEBUG_OMXACAAC_DECODETNS_S32_I
607bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#define DEBUG_OMXACAAC_DEINTERLEAVESPECTRUM_S32
608bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#define DEBUG_OMXACAAC_ENCODETNS_S32_I
609bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#define DEBUG_OMXACAAC_LONGTERMPREDICT_S32
610bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#define DEBUG_OMXACAAC_LONGTERMRECONSTRUCT_S32
611bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#define DEBUG_OMXACAAC_MDCTFWD_S32
612bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#define DEBUG_OMXACAAC_MDCTINV_S32_S16
613bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#define DEBUG_OMXACAAC_NOISELESSDECODE
614bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#define DEBUG_OMXACAAC_QUANTINV_S32_I
615bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#define DEBUG_OMXACAAC_UNPACKADIFHEADER
616bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#define DEBUG_OMXACAAC_UNPACKADTSFRAMEHEADER
617bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#define DEBUG_OMXACMP3_HUFFMANDECODESFBMBP_S32
618bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#define DEBUG_OMXACMP3_HUFFMANDECODESFB_S32
619bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#define DEBUG_OMXACMP3_HUFFMANDECODE_S32
620bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#define DEBUG_OMXACMP3_MDCTINV_S32
621bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#define DEBUG_OMXACMP3_REQUANTIZESFB_S32_I
622bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#define DEBUG_OMXACMP3_REQUANTIZE_S32_I
623bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#define DEBUG_OMXACMP3_SYNTHPQMF_S32_S16
624bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#define DEBUG_OMXACMP3_UNPACKFRAMEHEADER
625bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#define DEBUG_OMXACMP3_UNPACKSCALEFACTORS_S8
626bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#define DEBUG_OMXACMP3_UNPACKSIDEINFO
627bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#endif /* DEBUG_DOMAIN_AC */
628bebc99d6fa433c04139294a5057f8439d772dbd9James Dong
629bebc99d6fa433c04139294a5057f8439d772dbd9James Dong
630bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#ifdef DEBUG_DOMAIN_VC
631bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#define DEBUG_OMXVCM4P10_AVERAGE_16X
632bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#define DEBUG_OMXVCM4P10_AVERAGE_4X
633bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#define DEBUG_OMXVCM4P10_AVERAGE_8X
634bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#define DEBUG_OMXVCM4P10_DEBLOCKCHROMA_U8_C1IR
635bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#define DEBUG_OMXVCM4P10_DEBLOCKLUMA_U8_C1IR
636bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#define DEBUG_OMXVCM4P10_DECODECHROMADCCOEFFSTOPAIRCAVLC_U8
637bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#define DEBUG_OMXVCM4P10_DECODECOEFFSTOPAIRCAVLC_U8
638bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#define DEBUG_OMXVCM4P10_DEQUANTTRANSFORMACFROMPAIR_U8_S16_C1_DLX
639bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#define DEBUG_OMXVCM4P10_EXPANDFRAME
640bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#define DEBUG_OMXVCM4P10_FILTERDEBLOCKINGCHROMA_HOREDGE_U8_C1IR
641bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#define DEBUG_OMXVCM4P10_FILTERDEBLOCKINGCHROMA_VEREDGE_U8_C1IR
642bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#define DEBUG_OMXVCM4P10_FILTERDEBLOCKINGLUMA_HOREDGE_U8_C1IR
643bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#define DEBUG_OMXVCM4P10_FILTERDEBLOCKINGLUMA_VEREDGE_U8_C1IR
644bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#define DEBUG_OMXVCM4P10_PREDICTINTRACHROMA8X8_U8_C1R
645bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#define DEBUG_OMXVCM4P10_PREDICTINTRA_16X16_U8_C1R
646bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#define DEBUG_OMXVCM4P10_PREDICTINTRA_4X4_U8_C1R
647bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#define DEBUG_OMXVCM4P10_SADQUAR_16X
648bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#define DEBUG_OMXVCM4P10_SADQUAR_4X
649bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#define DEBUG_OMXVCM4P10_SADQUAR_8X
650bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#define DEBUG_OMXVCM4P10_SAD_16X
651bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#define DEBUG_OMXVCM4P10_SAD_4X
652bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#define DEBUG_OMXVCM4P10_SAD_8X
653bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#define DEBUG_OMXVCM4P10_SATD_4X4
654bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#define DEBUG_OMXVCM4P10_TRANSFORMDEQUANTCHROMADCFROMPAIR_U8_S16_C1
655bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#define DEBUG_OMXVCM4P10_TRANSFORMDEQUANTLUMADCFROMPAIR_U8_S16_C1
656bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#define DEBUG_OMXVCM4P10_TRANSFORMQUANT_CHROMADC
657bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#define DEBUG_OMXVCM4P10_TRANSFORMQUANT_LUMADC
658bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#define DEBUG_OMXVCM4P2_BLOCKMATCH_HALF_16X16
659bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#define DEBUG_OMXVCM4P2_BLOCKMATCH_HALF_8X8
660bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#define DEBUG_OMXVCM4P2_BLOCKMATCH_INTEGER_16X16
661bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#define DEBUG_OMXVCM4P2_BLOCKMATCH_INTEGER_8X8
662bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#define DEBUG_OMXVCM4P2_COMPUTETEXTUREERRORBLOCK_SAD_U8_S16
663bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#define DEBUG_OMXVCM4P2_COMPUTETEXTUREERRORBLOCK_U8_S16
664bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#define DEBUG_OMXVCM4P2_DCT8X8BLKDLX
665bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#define DEBUG_OMXVCM4P2_DECODEBLOCKCOEF_INTER_S16
666bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#define DEBUG_OMXVCM4P2_DECODEPADMV_PVOP
667bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#define DEBUG_OMXVCM4P2_DECODEVLCZIGZAG_INTER_S16
668bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#define DEBUG_OMXVCM4P2_DECODEVLCZIGZAG_INTRAACVLC_S16
669bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#define DEBUG_OMXVCM4P2_DECODEVLCZIGZAG_INTRADCVLC_S16
670bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#define DEBUG_OMXVCM4P2_ENCODEMV_U8_S16
671bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#define DEBUG_OMXVCM4P2_ENCODEVLCZIGZAG_INTER_S16
672bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#define DEBUG_OMXVCM4P2_ENCODEVLCZIGZAG_INTRAACVLC_S16
673bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#define DEBUG_OMXVCM4P2_ENCODEVLCZIGZAG_INTRADCVLC_S16
674bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#define DEBUG_OMXVCM4P2_FINDMVPRED
675bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#define DEBUG_OMXVCM4P2_IDCT8X8BLKDLX
676bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#define DEBUG_OMXVCM4P2_LIMITMVTORECT
677bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#define DEBUG_OMXVCM4P2_MOTIONESTIMATIONMB
678bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#define DEBUG_OMXVCM4P2_PADMBGRAY_U8
679bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#define DEBUG_OMXVCM4P2_PADMBHORIZONTAL_U8
680bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#define DEBUG_OMXVCM4P2_PADMBVERTICAL_U8
681bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#define DEBUG_OMXVCM4P2_PADMV
682bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#define DEBUG_OMXVCM4P2_QUANTINTER_S16_I
683bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#define DEBUG_OMXVCM4P2_QUANTINTRA_S16_I
684bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#define DEBUG_OMXVCM4P2_QUANTINVINTER_S16_I
685bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#define DEBUG_OMXVCM4P2_QUANTINVINTRA_S16_I
686bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#define DEBUG_OMXVCM4P2_TRANSRECBLOCKCEOF_INTER
687bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#define DEBUG_OMXVCM4P2_TRANSRECBLOCKCEOF_INTRA
688bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#endif /* DEBUG_DOMAIN_VC */
689bebc99d6fa433c04139294a5057f8439d772dbd9James Dong
690bebc99d6fa433c04139294a5057f8439d772dbd9James Dong
691bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#ifdef DEBUG_DOMAIN_IC
692bebc99d6fa433c04139294a5057f8439d772dbd9James Dong/* To be filled in */
693bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#endif /* DEBUG_DOMAIN_IC */
694bebc99d6fa433c04139294a5057f8439d772dbd9James Dong
695bebc99d6fa433c04139294a5057f8439d772dbd9James Dong
696bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#ifdef DEBUG_DOMAIN_SP
697bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#define DEBUG_OMXACSP_DOTPROD_S16
698bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#define DEBUG_OMXACSP_BLOCKEXP_S16
699bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#define DEBUG_OMXACSP_BLOCKEXP_S32
700bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#define DEBUG_OMXACSP_COPY_S16
701bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#define DEBUG_OMXACSP_DOTPROD_S16
702bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#define DEBUG_OMXACSP_DOTPROD_S16_SFS
703bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#define DEBUG_OMXACSP_FFTFWD_CTOC_SC16_SFS
704bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#define DEBUG_OMXACSP_FFTFWD_CTOC_SC32_SFS
705bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#define DEBUG_OMXACSP_FFTFWD_RTOCCS_S16S32_SFS
706bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#define DEBUG_OMXACSP_FFTFWD_RTOCCS_S32_SFS
707bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#define DEBUG_OMXACSP_FFTGETBUFSIZE_C_SC16
708bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#define DEBUG_OMXACSP_FFTGETBUFSIZE_C_SC32
709bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#define DEBUG_OMXACSP_FFTGETBUFSIZE_R_S16_S32
710bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#define DEBUG_OMXACSP_FFTGETBUFSIZE_R_S32
711bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#define DEBUG_OMXACSP_FFTINIT_C_SC16
712bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#define DEBUG_OMXACSP_FFTINIT_C_SC32
713bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#define DEBUG_OMXACSP_FFTINIT_R_S16_S32
714bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#define DEBUG_OMXACSP_FFTINIT_R_S32
715bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#define DEBUG_OMXACSP_FFTINV_CCSTOR_S32S16_SFS
716bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#define DEBUG_OMXACSP_FFTINV_CCSTOR_S32_SFS
717bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#define DEBUG_OMXACSP_FFTINV_CTOC_SC16_SFS
718bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#define DEBUG_OMXACSP_FFTINV_CTOC_SC32_SFS
719bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#define DEBUG_OMXACSP_FILTERMEDIAN_S32_I
720bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#define DEBUG_OMXACSP_FILTERMEDIAN_S32
721bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#define DEBUG_OMXACSP_FIRONE_DIRECT_S16_ISFS
722bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#define DEBUG_OMXACSP_FIRONE_DIRECT_S16_I
723bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#define DEBUG_OMXACSP_FIRONE_DIRECT_S16
724bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#define DEBUG_OMXACSP_FIRONE_DIRECT_S16_SFS
725bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#define DEBUG_OMXACSP_FIR_DIRECT_S16_ISFS
726bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#define DEBUG_OMXACSP_FIR_DIRECT_S16_I
727bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#define DEBUG_OMXACSP_FIR_DIRECT_S16
728bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#define DEBUG_OMXACSP_FIR_DIRECT_S16_SFS
729bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#define DEBUG_OMXACSP_IIRONE_BIQUADDIRECT_S16_I
730bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#define DEBUG_OMXACSP_IIRONE_BIQUADDIRECT_S16
731bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#define DEBUG_OMXACSP_IIRONE_DIRECT_S16_I
732bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#define DEBUG_OMXACSP_IIRONE_DIRECT_S16
733bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#define DEBUG_OMXACSP_IIR_BIQUADDIRECT_S16_I
734bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#define DEBUG_OMXACSP_IIR_BIQUADDIRECT_S16
735bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#define DEBUG_OMXACSP_IIR_DIRECT_S16_I
736bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#define DEBUG_OMXACSP_IIR_DIRECT_S16
737bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#endif /* DEBUG_DOMAIN_SP */
738bebc99d6fa433c04139294a5057f8439d772dbd9James Dong
739bebc99d6fa433c04139294a5057f8439d772dbd9James Dong
740bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#ifdef DEBUG_DOMAIN_IP
741bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#define DEBUG_OMXIPBM_ADDC_U8_C1R_SFS
742bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#define DEBUG_OMXIPBM_COPY_U8_C1R
743bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#define DEBUG_OMXIPBM_COPY_U8_C3R
744bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#define DEBUG_OMXIPBM_MIRROR_U8_C1R
745bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#define DEBUG_OMXIPBM_MULC_U8_C1R_SFS
746bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#define DEBUG_OMXIPCS_COLORTWISTQ14_U8_C3R
747bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#define DEBUG_OMXIPCS_RGB565TOYCBCR420LS_MCU_U16_S16_C3P3R
748bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#define DEBUG_OMXIPCS_RGB565TOYCBCR422LS_MCU_U16_S16_C3P3R
749bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#define DEBUG_OMXIPCS_RGB565TOYCBCR444LS_MCU_U16_S16_C3P3R
750bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#define DEBUG_OMXIPCS_RGBTOYCBCR420LS_MCU_U8_S16_C3P3R
751bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#define DEBUG_OMXIPCS_RGBTOYCBCR422LS_MCU_U8_S16_C3P3R
752bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#define DEBUG_OMXIPCS_RGBTOYCBCR444LS_MCU_U8_S16_C3P3R
753bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#define DEBUG_OMXIPCS_YCBCR420RSZROT_U8_P3R
754bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#define DEBUG_OMXIPCS_YCBCR420TORGB565LS_MCU_S16_U16_P3C3R
755bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#define DEBUG_OMXIPCS_YCBCR420TORGB565_U8_U16_P3C3R
756bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#define DEBUG_OMXIPCS_YCBCR420TORGBLS_MCU_S16_U8_P3C3R
757bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#define DEBUG_OMXIPCS_YCBCR422RSZCSCROTRGB_U8_C2R
758bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#define DEBUG_OMXIPCS_YCBCR422RSZROT_U8_P3R
759bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#define DEBUG_OMXIPCS_YCBCR422TORGB565LS_MCU_S16_U16_P3C3R
760bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#define DEBUG_OMXIPCS_YCBCR422TORGB565_U8_U16_C2C3R
761bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#define DEBUG_OMXIPCS_YCBCR422TORGBLS_MCU_S16_U8_P3C3R
762bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#define DEBUG_OMXIPCS_YCBCR422TORGB_U8_C2C3R
763bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#define DEBUG_OMXIPCS_YCBCR422TOYCBCR420ROTATE_U8_C2P3R
764bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#define DEBUG_OMXIPCS_YCBCR422TOYCBCR420ROTATE_U8_P3R
765bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#define DEBUG_OMXIPCS_YCBCR444TORGB565LS_MCU_S16_U16_P3C3R
766bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#define DEBUG_OMXIPCS_YCBCR444TORGBLS_MCU_S16_U8_P3C3R
767bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#define DEBUG_OMXIPCS_YCBCRTORGB565_U8_U16_C3R
768bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#define DEBUG_OMXIPCS_YCBCRTORGB565_U8_U16_P3C3R
769bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#define DEBUG_OMXIPCS_YCBCRTORGB_U8_C3R
770bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#define DEBUG_OMXIPPP_GETCENTRALMOMENT_S64
771bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#define DEBUG_OMXIPPP_GETSPATIALMOMENT_S64
772bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#define DEBUG_OMXIPPP_MOMENTGETSTATESIZE_S64
773bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#define DEBUG_OMXIPPP_MOMENTINIT_S64
774bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#define DEBUG_OMXIPPP_MOMENTS64S_U8_C1R
775bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#define DEBUG_OMXIPPP_MOMENTS64S_U8_C3R
776bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#endif /* DEBUG_DOMAIN_IP */
777bebc99d6fa433c04139294a5057f8439d772dbd9James Dong
778bebc99d6fa433c04139294a5057f8439d772dbd9James Dong
779bebc99d6fa433c04139294a5057f8439d772dbd9James Dong#endif /* _armCommon_H_ */
780bebc99d6fa433c04139294a5057f8439d772dbd9James Dong
781bebc99d6fa433c04139294a5057f8439d772dbd9James Dong/*End of File*/
782bebc99d6fa433c04139294a5057f8439d772dbd9James Dong
783bebc99d6fa433c04139294a5057f8439d772dbd9James Dong
784bebc99d6fa433c04139294a5057f8439d772dbd9James Dong
785bebc99d6fa433c04139294a5057f8439d772dbd9James Dong
786