1e2e838afcf03e603a41a0455846eaf9614537c16Mans Rullgard 2e2e838afcf03e603a41a0455846eaf9614537c16Mans Rullgard/* 3e2e838afcf03e603a41a0455846eaf9614537c16Mans Rullgard ** Copyright 2003-2010, VisualOn, Inc. 4e2e838afcf03e603a41a0455846eaf9614537c16Mans Rullgard ** 5e2e838afcf03e603a41a0455846eaf9614537c16Mans Rullgard ** Licensed under the Apache License, Version 2.0 (the "License"); 6e2e838afcf03e603a41a0455846eaf9614537c16Mans Rullgard ** you may not use this file except in compliance with the License. 7e2e838afcf03e603a41a0455846eaf9614537c16Mans Rullgard ** You may obtain a copy of the License at 8e2e838afcf03e603a41a0455846eaf9614537c16Mans Rullgard ** 9e2e838afcf03e603a41a0455846eaf9614537c16Mans Rullgard ** http://www.apache.org/licenses/LICENSE-2.0 10e2e838afcf03e603a41a0455846eaf9614537c16Mans Rullgard ** 11e2e838afcf03e603a41a0455846eaf9614537c16Mans Rullgard ** Unless required by applicable law or agreed to in writing, software 12e2e838afcf03e603a41a0455846eaf9614537c16Mans Rullgard ** distributed under the License is distributed on an "AS IS" BASIS, 13e2e838afcf03e603a41a0455846eaf9614537c16Mans Rullgard ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14e2e838afcf03e603a41a0455846eaf9614537c16Mans Rullgard ** See the License for the specific language governing permissions and 15e2e838afcf03e603a41a0455846eaf9614537c16Mans Rullgard ** limitations under the License. 16e2e838afcf03e603a41a0455846eaf9614537c16Mans Rullgard */ 17e2e838afcf03e603a41a0455846eaf9614537c16Mans Rullgard 18e2e838afcf03e603a41a0455846eaf9614537c16Mans Rullgard 19e2e838afcf03e603a41a0455846eaf9614537c16Mans Rullgard/*********************************************************************** 20e2e838afcf03e603a41a0455846eaf9614537c16Mans RullgardFile: stream.h 21e2e838afcf03e603a41a0455846eaf9614537c16Mans Rullgard 22e2e838afcf03e603a41a0455846eaf9614537c16Mans RullgardContains: VOME API Buffer Operator Implement Header 23e2e838afcf03e603a41a0455846eaf9614537c16Mans Rullgard 24e2e838afcf03e603a41a0455846eaf9614537c16Mans Rullgard************************************************************************/ 25e2e838afcf03e603a41a0455846eaf9614537c16Mans Rullgard#ifndef __STREAM_H__ 26e2e838afcf03e603a41a0455846eaf9614537c16Mans Rullgard#define __STREAM_H__ 27e2e838afcf03e603a41a0455846eaf9614537c16Mans Rullgard 28e2e838afcf03e603a41a0455846eaf9614537c16Mans Rullgard#include "voMem.h" 29b676a05348e4c516fa8b57e33b10548e6142c3f8Mans Rullgard#define Frame_Maxsize 1024 * 2 //Work Buffer 10K 30e2e838afcf03e603a41a0455846eaf9614537c16Mans Rullgard#define Frame_MaxByte 640 //AMR_WB Encoder one frame 320 samples = 640 Bytes 31e2e838afcf03e603a41a0455846eaf9614537c16Mans Rullgard#define MIN(a,b) ((a) < (b)? (a) : (b)) 32e2e838afcf03e603a41a0455846eaf9614537c16Mans Rullgard 33e2e838afcf03e603a41a0455846eaf9614537c16Mans Rullgardtypedef struct{ 34e2e838afcf03e603a41a0455846eaf9614537c16Mans Rullgard unsigned char *set_ptr; 35e2e838afcf03e603a41a0455846eaf9614537c16Mans Rullgard unsigned char *frame_ptr; 36e2e838afcf03e603a41a0455846eaf9614537c16Mans Rullgard unsigned char *frame_ptr_bk; 37e2e838afcf03e603a41a0455846eaf9614537c16Mans Rullgard int set_len; 38b676a05348e4c516fa8b57e33b10548e6142c3f8Mans Rullgard int framebuffer_len; 39e2e838afcf03e603a41a0455846eaf9614537c16Mans Rullgard int frame_storelen; 40e2e838afcf03e603a41a0455846eaf9614537c16Mans Rullgard int used_len; 41e2e838afcf03e603a41a0455846eaf9614537c16Mans Rullgard}FrameStream; 42e2e838afcf03e603a41a0455846eaf9614537c16Mans Rullgard 43e2e838afcf03e603a41a0455846eaf9614537c16Mans Rullgardvoid voAWB_UpdateFrameBuffer(FrameStream *stream, VO_MEM_OPERATOR *pMemOP); 44e2e838afcf03e603a41a0455846eaf9614537c16Mans Rullgardvoid voAWB_InitFrameBuffer(FrameStream *stream); 45e2e838afcf03e603a41a0455846eaf9614537c16Mans Rullgardvoid voAWB_FlushFrameBuffer(FrameStream *stream); 46e2e838afcf03e603a41a0455846eaf9614537c16Mans Rullgard#endif //__STREAM_H__ 47e2e838afcf03e603a41a0455846eaf9614537c16Mans Rullgard 48