[FFmpeg-cvslog] r17759 - trunk/libavcodec/alacenc.c
benoit
subversion
Tue Mar 3 14:11:11 CET 2009
Author: benoit
Date: Tue Mar 3 14:11:10 2009
New Revision: 17759
Log:
Use sign_extend().
On behalf of Jai.
Modified:
trunk/libavcodec/alacenc.c
Modified: trunk/libavcodec/alacenc.c
==============================================================================
--- trunk/libavcodec/alacenc.c Tue Mar 3 14:01:38 2009 (r17758)
+++ trunk/libavcodec/alacenc.c Tue Mar 3 14:11:10 2009 (r17759)
@@ -23,6 +23,7 @@
#include "bitstream.h"
#include "dsputil.h"
#include "lpc.h"
+#include "mathops.h"
#define DEFAULT_FRAME_SIZE 4096
#define DEFAULT_SAMPLE_SIZE 16
@@ -253,8 +254,8 @@ static void alac_linear_predictor(AlacEn
sum >>= lpc.lpc_quant;
sum += samples[0];
- residual[i] = (samples[lpc.lpc_order+1] - sum) << (32 - s->write_sample_size) >>
- (32 - s->write_sample_size);
+ residual[i] = sign_extend(samples[lpc.lpc_order+1] - sum,
+ s->write_sample_size);
res_val = residual[i];
if(res_val) {
More information about the ffmpeg-cvslog
mailing list