Revision f7a5e779 libavcodec/ac3dsp.c
libavcodec/ac3dsp.c  

50  50 
return v; 
51  51 
} 
52  52  
53 
static void ac3_lshift_int16_c(int16_t *src, int len, unsigned int shift) 

54 
{ 

55 
int i; 

56  
57 
if (shift > 0) { 

58 
for (i = 0; i < len; i++) 

59 
src[i] <<= shift; 

60 
} 

61 
} 

62  
63 
static void ac3_shift_int32_c(int32_t *src, int len, int shift) 

64 
{ 

65 
int i; 

66  
67 
if (shift > 0) { 

68 
for (i = 0; i < len; i++) 

69 
src[i] <<= shift; 

70 
} else if (shift < 0) { 

71 
shift = shift; 

72 
for (i = 0; i < len; i++) 

73 
src[i] >>= shift; 

74 
} 

75 
} 

76  
77  53 
av_cold void ff_ac3dsp_init(AC3DSPContext *c) 
78  54 
{ 
79  55 
c>ac3_exponent_min = ac3_exponent_min_c; 
80  56 
c>ac3_max_msb_abs_int16 = ac3_max_msb_abs_int16_c; 
81 
c>ac3_lshift_int16 = ac3_lshift_int16_c; 

82 
c>ac3_shift_int32 = ac3_shift_int32_c; 

83  57  
84  58 
if (HAVE_MMX) 
85  59 
ff_ac3dsp_init_x86(c); 
Also available in: Unified diff