comparison pcm.c @ 6750:c93570aeb3eb libavcodec

Remove unnecessary parentheses from return calls.
author diego
date Tue, 06 May 2008 09:16:36 +0000
parents 0557f6cc5ed0
children dd70fdc9993a
comparison
equal deleted inserted replaced
6749:b1778cf7f3b1 6750:c93570aeb3eb
54 t = a_val & QUANT_MASK; 54 t = a_val & QUANT_MASK;
55 seg = ((unsigned)a_val & SEG_MASK) >> SEG_SHIFT; 55 seg = ((unsigned)a_val & SEG_MASK) >> SEG_SHIFT;
56 if(seg) t= (t + t + 1 + 32) << (seg + 2); 56 if(seg) t= (t + t + 1 + 32) << (seg + 2);
57 else t= (t + t + 1 ) << 3; 57 else t= (t + t + 1 ) << 3;
58 58
59 return ((a_val & SIGN_BIT) ? t : -t); 59 return (a_val & SIGN_BIT) ? t : -t;
60 } 60 }
61 61
62 static av_cold int ulaw2linear(unsigned char u_val) 62 static av_cold int ulaw2linear(unsigned char u_val)
63 { 63 {
64 int t; 64 int t;
71 * shift up by the segment number and subtract out the bias. 71 * shift up by the segment number and subtract out the bias.
72 */ 72 */
73 t = ((u_val & QUANT_MASK) << 3) + BIAS; 73 t = ((u_val & QUANT_MASK) << 3) + BIAS;
74 t <<= ((unsigned)u_val & SEG_MASK) >> SEG_SHIFT; 74 t <<= ((unsigned)u_val & SEG_MASK) >> SEG_SHIFT;
75 75
76 return ((u_val & SIGN_BIT) ? (BIAS - t) : (t - BIAS)); 76 return (u_val & SIGN_BIT) ? (BIAS - t) : (t - BIAS);
77 } 77 }
78 78
79 /* 16384 entries per table */ 79 /* 16384 entries per table */
80 static uint8_t linear_to_alaw[16384]; 80 static uint8_t linear_to_alaw[16384];
81 static uint8_t linear_to_ulaw[16384]; 81 static uint8_t linear_to_ulaw[16384];