comparison pcm.c @ 2967:ef2149182f1c libavcodec

COSMETICS: Remove all trailing whitespace.
author diego
date Sat, 17 Dec 2005 18:14:38 +0000
parents 87c11495e393
children bfabfdf9ce55
comparison
equal deleted inserted replaced
2966:564788471dd4 2967:ef2149182f1c
14 * 14 *
15 * You should have received a copy of the GNU Lesser General Public 15 * You should have received a copy of the GNU Lesser General Public
16 * License along with this library; if not, write to the Free Software 16 * License along with this library; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 */ 18 */
19 19
20 /** 20 /**
21 * @file pcm.c 21 * @file pcm.c
22 * PCM codecs 22 * PCM codecs
23 */ 23 */
24 24
25 #include "avcodec.h" 25 #include "avcodec.h"
26 #include "bitstream.h" // for ff_reverse 26 #include "bitstream.h" // for ff_reverse
27 27
28 /* from g711.c by SUN microsystems (unrestricted use) */ 28 /* from g711.c by SUN microsystems (unrestricted use) */
29 29
76 static int linear_to_alaw_ref = 0; 76 static int linear_to_alaw_ref = 0;
77 77
78 static uint8_t *linear_to_ulaw = NULL; 78 static uint8_t *linear_to_ulaw = NULL;
79 static int linear_to_ulaw_ref = 0; 79 static int linear_to_ulaw_ref = 0;
80 80
81 static void build_xlaw_table(uint8_t *linear_to_xlaw, 81 static void build_xlaw_table(uint8_t *linear_to_xlaw,
82 int (*xlaw2linear)(unsigned char), 82 int (*xlaw2linear)(unsigned char),
83 int mask) 83 int mask)
84 { 84 {
85 int i, j, v, v1, v2; 85 int i, j, v, v1, v2;
86 86
87 j = 0; 87 j = 0;
88 for(i=0;i<128;i++) { 88 for(i=0;i<128;i++) {
125 linear_to_ulaw_ref++; 125 linear_to_ulaw_ref++;
126 break; 126 break;
127 default: 127 default:
128 break; 128 break;
129 } 129 }
130 130
131 switch(avctx->codec->id) { 131 switch(avctx->codec->id) {
132 case CODEC_ID_PCM_S32LE: 132 case CODEC_ID_PCM_S32LE:
133 case CODEC_ID_PCM_S32BE: 133 case CODEC_ID_PCM_S32BE:
134 case CODEC_ID_PCM_U32LE: 134 case CODEC_ID_PCM_U32LE:
135 case CODEC_ID_PCM_U32BE: 135 case CODEC_ID_PCM_U32BE:
158 break; 158 break;
159 } 159 }
160 160
161 avctx->coded_frame= avcodec_alloc_frame(); 161 avctx->coded_frame= avcodec_alloc_frame();
162 avctx->coded_frame->key_frame= 1; 162 avctx->coded_frame->key_frame= 1;
163 163
164 return 0; 164 return 0;
165 } 165 }
166 166
167 static int pcm_encode_close(AVCodecContext *avctx) 167 static int pcm_encode_close(AVCodecContext *avctx)
168 { 168 {