comparison cook.c @ 5523:c2ab2ac31edb libavcodec

use av_clip_int16() where it makes sense
author aurel
date Sat, 11 Aug 2007 22:48:55 +0000
parents 4be3d4a1c94b
children 2ca0a91b0b24
comparison
equal deleted inserted replaced
5522:acaaff7b6fb8 5523:c2ab2ac31edb
904 float *output = q->mono_mdct_output + q->samples_per_channel; 904 float *output = q->mono_mdct_output + q->samples_per_channel;
905 /* Clip and convert floats to 16 bits. 905 /* Clip and convert floats to 16 bits.
906 */ 906 */
907 for (j = 0; j < q->samples_per_channel; j++) { 907 for (j = 0; j < q->samples_per_channel; j++) {
908 out[chan + q->nb_channels * j] = 908 out[chan + q->nb_channels * j] =
909 av_clip(lrintf(output[j]), -32768, 32767); 909 av_clip_int16(lrintf(output[j]));
910 } 910 }
911 } 911 }
912 912
913 /** 913 /**
914 * Final part of subpacket decoding: 914 * Final part of subpacket decoding: