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 Rullgard * Q_PULSE.H * 21e2e838afcf03e603a41a0455846eaf9614537c16Mans Rullgard *--------------------------------------------------------------------------* 22e2e838afcf03e603a41a0455846eaf9614537c16Mans Rullgard * Coding and decoding of algebraic codebook * 23e2e838afcf03e603a41a0455846eaf9614537c16Mans Rullgard *--------------------------------------------------------------------------*/ 24e2e838afcf03e603a41a0455846eaf9614537c16Mans Rullgard 25e2e838afcf03e603a41a0455846eaf9614537c16Mans Rullgard#ifndef __Q_PULSE_H__ 26e2e838afcf03e603a41a0455846eaf9614537c16Mans Rullgard#define __Q_PULSE_H__ 27e2e838afcf03e603a41a0455846eaf9614537c16Mans Rullgard 28e2e838afcf03e603a41a0455846eaf9614537c16Mans Rullgard#include "typedef.h" 29e2e838afcf03e603a41a0455846eaf9614537c16Mans Rullgard 30e2e838afcf03e603a41a0455846eaf9614537c16Mans RullgardWord32 quant_1p_N1( /* (o) return (N+1) bits */ 31e2e838afcf03e603a41a0455846eaf9614537c16Mans Rullgard Word16 pos, /* (i) position of the pulse */ 32e2e838afcf03e603a41a0455846eaf9614537c16Mans Rullgard Word16 N); /* (i) number of bits for position */ 33e2e838afcf03e603a41a0455846eaf9614537c16Mans Rullgard 34e2e838afcf03e603a41a0455846eaf9614537c16Mans RullgardWord32 quant_2p_2N1( /* (o) return (2*N)+1 bits */ 35e2e838afcf03e603a41a0455846eaf9614537c16Mans Rullgard Word16 pos1, /* (i) position of the pulse 1 */ 36e2e838afcf03e603a41a0455846eaf9614537c16Mans Rullgard Word16 pos2, /* (i) position of the pulse 2 */ 37e2e838afcf03e603a41a0455846eaf9614537c16Mans Rullgard Word16 N); /* (i) number of bits for position */ 38e2e838afcf03e603a41a0455846eaf9614537c16Mans Rullgard 39e2e838afcf03e603a41a0455846eaf9614537c16Mans RullgardWord32 quant_3p_3N1( /* (o) return (3*N)+1 bits */ 40e2e838afcf03e603a41a0455846eaf9614537c16Mans Rullgard Word16 pos1, /* (i) position of the pulse 1 */ 41e2e838afcf03e603a41a0455846eaf9614537c16Mans Rullgard Word16 pos2, /* (i) position of the pulse 2 */ 42e2e838afcf03e603a41a0455846eaf9614537c16Mans Rullgard Word16 pos3, /* (i) position of the pulse 3 */ 43e2e838afcf03e603a41a0455846eaf9614537c16Mans Rullgard Word16 N); /* (i) number of bits for position */ 44e2e838afcf03e603a41a0455846eaf9614537c16Mans Rullgard 45e2e838afcf03e603a41a0455846eaf9614537c16Mans RullgardWord32 quant_4p_4N1( /* (o) return (4*N)+1 bits */ 46e2e838afcf03e603a41a0455846eaf9614537c16Mans Rullgard Word16 pos1, /* (i) position of the pulse 1 */ 47e2e838afcf03e603a41a0455846eaf9614537c16Mans Rullgard Word16 pos2, /* (i) position of the pulse 2 */ 48e2e838afcf03e603a41a0455846eaf9614537c16Mans Rullgard Word16 pos3, /* (i) position of the pulse 3 */ 49e2e838afcf03e603a41a0455846eaf9614537c16Mans Rullgard Word16 pos4, /* (i) position of the pulse 4 */ 50e2e838afcf03e603a41a0455846eaf9614537c16Mans Rullgard Word16 N); /* (i) number of bits for position */ 51e2e838afcf03e603a41a0455846eaf9614537c16Mans Rullgard 52e2e838afcf03e603a41a0455846eaf9614537c16Mans RullgardWord32 quant_4p_4N( /* (o) return 4*N bits */ 53e2e838afcf03e603a41a0455846eaf9614537c16Mans Rullgard Word16 pos[], /* (i) position of the pulse 1..4 */ 54e2e838afcf03e603a41a0455846eaf9614537c16Mans Rullgard Word16 N); /* (i) number of bits for position */ 55e2e838afcf03e603a41a0455846eaf9614537c16Mans Rullgard 56e2e838afcf03e603a41a0455846eaf9614537c16Mans RullgardWord32 quant_5p_5N( /* (o) return 5*N bits */ 57e2e838afcf03e603a41a0455846eaf9614537c16Mans Rullgard Word16 pos[], /* (i) position of the pulse 1..5 */ 58e2e838afcf03e603a41a0455846eaf9614537c16Mans Rullgard Word16 N); /* (i) number of bits for position */ 59e2e838afcf03e603a41a0455846eaf9614537c16Mans Rullgard 60e2e838afcf03e603a41a0455846eaf9614537c16Mans RullgardWord32 quant_6p_6N_2( /* (o) return (6*N)-2 bits */ 61e2e838afcf03e603a41a0455846eaf9614537c16Mans Rullgard Word16 pos[], /* (i) position of the pulse 1..6 */ 62e2e838afcf03e603a41a0455846eaf9614537c16Mans Rullgard Word16 N); /* (i) number of bits for position */ 63e2e838afcf03e603a41a0455846eaf9614537c16Mans Rullgard 64e2e838afcf03e603a41a0455846eaf9614537c16Mans Rullgard 65e2e838afcf03e603a41a0455846eaf9614537c16Mans Rullgard#endif //__Q_PULSE_H__ 66e2e838afcf03e603a41a0455846eaf9614537c16Mans Rullgard 67