summaryrefslogtreecommitdiff
path: root/libavcodec/jpeg_ls.c
diff options
context:
space:
mode:
authorDiego Biurrun <diego@biurrun.de>2006-10-11 23:17:58 +0000
committerDiego Biurrun <diego@biurrun.de>2006-10-11 23:17:58 +0000
commitc26abfa5414becf3dd68d976ef5851c5cab477b6 (patch)
tree5a98401cf286223f51c29c0eab36f2a33b5f12e3 /libavcodec/jpeg_ls.c
parent02305ff38ffcc41a72fc1cb79c028b724d2d795d (diff)
Rename ABS macro to FFABS.
Originally committed as revision 6666 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/jpeg_ls.c')
-rw-r--r--libavcodec/jpeg_ls.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/libavcodec/jpeg_ls.c b/libavcodec/jpeg_ls.c
index 4ed8e6d052..11aafeb860 100644
--- a/libavcodec/jpeg_ls.c
+++ b/libavcodec/jpeg_ls.c
@@ -213,7 +213,7 @@ static inline int ls_get_code_regular(GetBitContext *gb, JLSState *state, int Q)
if(!state->near && !k && (2 * state->B[Q] <= -state->N[Q]))
ret = -(ret + 1);
- state->A[Q] += ABS(ret);
+ state->A[Q] += FFABS(ret);
ret *= state->twonear;
state->B[Q] += ret;
@@ -274,7 +274,7 @@ static inline int ls_get_code_runterm(GetBitContext *gb, JLSState *state, int RI
}
/* update state */
- state->A[Q] += ABS(ret) - RItype;
+ state->A[Q] += FFABS(ret) - RItype;
ret *= state->twonear;
if(state->N[Q] == state->reset){
state->A[Q] >>=1;
@@ -306,7 +306,7 @@ static inline void ls_decode_line(JLSState *state, MJpegDecodeContext *s, uint8_
D1 = Rb - Rc;
D2 = Rc - Ra;
/* run mode */
- if((ABS(D0) <= state->near) && (ABS(D1) <= state->near) && (ABS(D2) <= state->near)) {
+ if((FFABS(D0) <= state->near) && (FFABS(D1) <= state->near) && (FFABS(D2) <= state->near)) {
int r;
int RItype;
@@ -340,7 +340,7 @@ static inline void ls_decode_line(JLSState *state, MJpegDecodeContext *s, uint8_
/* decode run termination value */
Rb = last[x];
- RItype = (ABS(Ra - Rb) <= state->near) ? 1 : 0;
+ RItype = (FFABS(Ra - Rb) <= state->near) ? 1 : 0;
err = ls_get_code_runterm(&s->gb, state, RItype, log2_run[state->run_index[comp]]);
if(state->run_index[comp])
state->run_index[comp]--;
@@ -491,13 +491,13 @@ static inline void ls_encode_regular(JLSState *state, PutBitContext *pb, int Q,
err += state->range;
if(err >= ((state->range + 1) >> 1)) {
err -= state->range;
- val = 2 * ABS(err) - 1 - map;
+ val = 2 * FFABS(err) - 1 - map;
} else
val = 2 * err + map;
set_ur_golomb_jpegls(pb, val, k, state->limit, state->qbpp);
- state->A[Q] += ABS(err);
+ state->A[Q] += FFABS(err);
state->B[Q] += err * state->twonear;
if(state->N[Q] == state->reset) {
@@ -598,12 +598,12 @@ static inline void ls_encode_line(JLSState *state, PutBitContext *pb, uint8_t *l
D2 = Rc - Ra;
/* run mode */
- if((ABS(D0) <= state->near) && (ABS(D1) <= state->near) && (ABS(D2) <= state->near)) {
+ if((FFABS(D0) <= state->near) && (FFABS(D1) <= state->near) && (FFABS(D2) <= state->near)) {
int RUNval, RItype, run;
run = 0;
RUNval = Ra;
- while(x < w && (ABS(cur[x] - RUNval) <= state->near)){
+ while(x < w && (FFABS(cur[x] - RUNval) <= state->near)){
run++;
cur[x] = Ra;
x += stride;
@@ -612,7 +612,7 @@ static inline void ls_encode_line(JLSState *state, PutBitContext *pb, uint8_t *l
if(x >= w)
return;
Rb = last[x];
- RItype = (ABS(Ra - Rb) <= state->near);
+ RItype = (FFABS(Ra - Rb) <= state->near);
pred = RItype ? Ra : Rb;
err = cur[x] - pred;