diff options
Diffstat (limited to 'camera/inc/NV12_resize.h')
-rw-r--r-- | camera/inc/NV12_resize.h | 161 |
1 files changed, 74 insertions, 87 deletions
diff --git a/camera/inc/NV12_resize.h b/camera/inc/NV12_resize.h index 927faf8..4b05a4f 100644 --- a/camera/inc/NV12_resize.h +++ b/camera/inc/NV12_resize.h @@ -1,66 +1,61 @@ +/* + * Copyright (C) Texas Instruments - http://www.ti.com/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + #ifndef NV12_RESIZE_H_ #define NV12_RESIZE_H_ -#ifdef __cplusplus -extern "C" { -#endif - -typedef unsigned char mmBool; -typedef unsigned char mmUchar; -typedef unsigned char mmUint8; -typedef unsigned char mmByte; -typedef unsigned short mmUint16; -typedef unsigned int mmUint32; -typedef unsigned long mmUint64; -typedef signed char mmInt8; -typedef char mmChar; -typedef signed short mmInt16; -typedef signed int mmInt32; -typedef signed long mmLong; -typedef signed int mmHandle; -typedef float mmFloat; -typedef double mmDouble; -typedef int HObj; -typedef HObj HFile; -typedef int HDir; -typedef void* mmMutexHandle; -typedef struct _fstat -{ - mmInt32 fileSize; -}VE_FileAttribute; - -typedef struct -{ - mmInt32 second; - mmInt32 millisecond; -}tsVE_Time; - -typedef struct -{ - mmInt32 year; - mmInt32 month; - mmInt32 day; - mmInt32 hour; - mmInt32 minute; - mmInt32 second; +#include "Common.h" + +typedef unsigned char mmBool; +typedef unsigned char mmUchar; +typedef unsigned char mmUint8; +typedef unsigned char mmByte; +typedef unsigned short mmUint16; +typedef unsigned int mmUint32; +typedef unsigned long mmUint64; +typedef signed char mmInt8; +typedef char mmChar; +typedef signed short mmInt16; +typedef signed int mmInt32; +typedef signed long mmLong; +typedef signed int mmHandle; +typedef float mmFloat; +typedef double mmDouble; +typedef int HObj; +typedef HObj HFile; +typedef int HDir; +typedef void* mmMutexHandle; +typedef struct _fstat { + mmInt32 fileSize; +} VE_FileAttribute; + +typedef struct { + mmInt32 second; + mmInt32 millisecond; +} tsVE_Time; + +typedef struct { + mmInt32 year; + mmInt32 month; + mmInt32 day; + mmInt32 hour; + mmInt32 minute; + mmInt32 second; } TmDateTime; -/*---------------------------------------------------------------------------- - Define : TRUE/FALSE for boolean operations -----------------------------------------------------------------------------*/ - -#ifndef TRUE - #define TRUE 1 -#endif - -#ifndef FALSE - #define FALSE 0 -#endif - -#ifndef NULL - #define NULL 0 -#endif - const mmUint8 bWeights[8][8][4] = { {{64, 0, 0, 0}, {56, 0, 0, 8}, {48, 0, 0,16}, {40, 0, 0,24}, {32, 0, 0,32}, {24, 0, 0,40}, {16, 0, 0,48}, { 8, 0, 0,56}}, @@ -87,8 +82,7 @@ const mmUint8 bWeights[8][8][4] = { { 4,28,28,4 }, { 3,21,35, 5}, { 2,14,42, 6}, { 1,7 ,49, 7}} }; -typedef enum -{ +typedef enum { IC_FORMAT_NONE, IC_FORMAT_RGB565, IC_FORMAT_RGB888, @@ -96,26 +90,24 @@ typedef enum IC_FORMAT_YCbCr, IC_FORMAT_YCbCr420_FRAME_PK, IC_FORMAT_MAX -}enumImageFormat; +} enumImageFormat; /* This structure defines the format of an image */ -typedef struct -{ - mmInt32 uWidth; - mmInt32 uHeight; - mmInt32 uStride; - enumImageFormat eFormat; - mmByte *imgPtr; - mmByte *clrPtr; - mmInt32 uOffset; +typedef struct { + mmInt32 uWidth; + mmInt32 uHeight; + mmInt32 uStride; + enumImageFormat eFormat; + mmByte *imgPtr; + mmByte *clrPtr; + mmInt32 uOffset; } structConvImage; -typedef struct IC_crop_struct -{ - mmUint32 x; /* x pos of rectangle */ - mmUint32 y; /* y pos of rectangle */ - mmUint32 uWidth; /* dx of rectangle */ - mmUint32 uHeight; /* dy of rectangle */ +typedef struct IC_crop_struct { + mmUint32 x; /* x pos of rectangle */ + mmUint32 y; /* y pos of rectangle */ + mmUint32 uWidth; /* dx of rectangle */ + mmUint32 uHeight; /* dy of rectangle */ } IC_rect_type; /*========================================================================== @@ -133,16 +125,11 @@ typedef struct IC_crop_struct * faster version. ============================================================================*/ mmBool -VT_resizeFrame_Video_opt2_lp -( - structConvImage* i_img_ptr, /* Points to the input image */ - structConvImage* o_img_ptr, /* Points to the output image */ - IC_rect_type* cropout, /* how much to resize to in final image */ - mmUint16 dummy /* Transparent pixel value */ - ); - -#ifdef __cplusplus -} -#endif +VT_resizeFrame_Video_opt2_lp( + structConvImage* i_img_ptr, /* Points to the input image */ + structConvImage* o_img_ptr, /* Points to the output image */ + IC_rect_type* cropout, /* how much to resize to in final image */ + mmUint16 dummy /* Transparent pixel value */ + ); #endif //#define NV12_RESIZE_H_ |