static inline void decode_subband_slice_buffered(SnowContext *s, SubBand *b, slice_buffer * sb, int start_y, int h, int save_state[1]){
const int w= b->width;
int y;
- const int qlog= clip(s->qlog + b->qlog, 0, QROOT*16);
+ const int qlog= av_clip(s->qlog + b->qlog, 0, QROOT*16);
int qmul= qexp[qlog&(QROOT-1)]<<(qlog>>QSHIFT);
int qadd= (s->qbias*qmul)>>QBIAS_SHIFT;
int new_index = 0;
}
*b= backup;
- return clip(((ab<<LOG2_OBMC_MAX) + aa/2)/aa, 0, 255); //FIXME we shouldnt need cliping
+ return av_clip(((ab<<LOG2_OBMC_MAX) + aa/2)/aa, 0, 255); //FIXME we shouldnt need cliping
}
static inline int get_block_bits(SnowContext *s, int x, int y, int w){
const int level= b->level;
const int w= b->width;
const int h= b->height;
- const int qlog= clip(s->qlog + b->qlog, 0, QROOT*16);
+ const int qlog= av_clip(s->qlog + b->qlog, 0, QROOT*16);
const int qmul= qexp[qlog&(QROOT-1)]<<(qlog>>QSHIFT);
int x,y, thres1, thres2;
// START_TIMER
static void dequantize_slice_buffered(SnowContext *s, slice_buffer * sb, SubBand *b, DWTELEM *src, int stride, int start_y, int end_y){
const int w= b->width;
- const int qlog= clip(s->qlog + b->qlog, 0, QROOT*16);
+ const int qlog= av_clip(s->qlog + b->qlog, 0, QROOT*16);
const int qmul= qexp[qlog&(QROOT-1)]<<(qlog>>QSHIFT);
const int qadd= (s->qbias*qmul)>>QBIAS_SHIFT;
int x,y;
static void dequantize(SnowContext *s, SubBand *b, DWTELEM *src, int stride){
const int w= b->width;
const int h= b->height;
- const int qlog= clip(s->qlog + b->qlog, 0, QROOT*16);
+ const int qlog= av_clip(s->qlog + b->qlog, 0, QROOT*16);
const int qmul= qexp[qlog&(QROOT-1)]<<(qlog>>QSHIFT);
const int qadd= (s->qbias*qmul)>>QBIAS_SHIFT;
int x,y;
const int w= b->width;
const int h= b->height;
const int stride= b->stride;
- const int qlog= clip(2*QROOT + b->qlog, 0, QROOT*16);
+ const int qlog= av_clip(2*QROOT + b->qlog, 0, QROOT*16);
const int qmul= qexp[qlog&(QROOT-1)]<<(qlog>>QSHIFT);
const int qdiv= (1<<16)/qmul;
int x, y;