Signed-off-by: Aneesh Dogra <[email protected]>
---
libavcodec/roqvideoenc.c | 9 +++------
1 files changed, 3 insertions(+), 6 deletions(-)
diff --git a/libavcodec/roqvideoenc.c b/libavcodec/roqvideoenc.c
index 2a62d55..73a0f27 100644
--- a/libavcodec/roqvideoenc.c
+++ b/libavcodec/roqvideoenc.c
@@ -74,6 +74,8 @@
/* The cast is useful when multiplying it by INT_MAX */
#define ROQ_LAMBDA_SCALE ((uint64_t) FF_LAMBDA_SCALE)
+#define SQUARE(x) x*x
+
/* Macroblock support functions */
static void unpack_roq_cell(roq_cell *cell, uint8_t u[4*3])
{
@@ -107,17 +109,12 @@ static void enlarge_roq_mb4(uint8_t base[3*16], uint8_t
u[3*64])
*u++ = base[(y/2)*4 + (x/2) + 16*cp];
}
-static inline int square(int x)
-{
- return x*x;
-}
-
static inline int eval_sse(uint8_t *a, uint8_t *b, int count)
{
int diff=0;
while(count--)
- diff += square(*b++ - *a++);
+ diff += SQUARE(*b++ - *a++);
return diff;
}
--
1.7.1
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel