[FFmpeg-soc] [soc]: r462 - dirac/dirac.c
marco
subversion at mplayerhq.hu
Tue Jul 17 19:32:21 CEST 2007
Author: marco
Date: Tue Jul 17 19:32:21 2007
New Revision: 462
Log:
Use FFSIGN and FFMIN instead of the current code
Modified:
dirac/dirac.c
Modified: dirac/dirac.c
==============================================================================
--- dirac/dirac.c (original)
+++ dirac/dirac.c Tue Jul 17 19:32:21 2007
@@ -751,8 +751,7 @@ struct context_set context_sets_waveletc
static unsigned int follow_context (int index, struct context_set *context_set) {
int pos;
- pos = (index < context_set->follow_length ? index
- : context_set->follow_length - 1);
+ pos = FFMIN(index, context_set->follow_length - 1);
return context_set->follow[pos];
}
@@ -846,14 +845,14 @@ static int sign_predict(AVCodecContext *
return 0;
else {
if (data[x + (y - 1) * s->padded_width] == 0) return 0;
- return (data[x + (y - 1) * s->padded_width] < 0) ? -1 : 1;
+ return FFSIGN(data[x + (y - 1) * s->padded_width] < 0);
}
case subband_lh:
if (h == 0)
return 0;
else {
if (data[x + y * s->padded_width - 1] == 0) return 0;
- return (data[x + y * s->padded_width - 1] < 0) ? -1 : 1;
+ return FFSIGN(data[x + y * s->padded_width - 1] < 0);
}
}
More information about the FFmpeg-soc
mailing list