aboutsummaryrefslogtreecommitdiffstats
path: root/libswscale/input.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-07-18 16:18:32 +0200
committerMichael Niedermayer <michaelni@gmx.at>2012-07-18 16:22:41 +0200
commitba0e69994d509785d541368854ef04a74f120080 (patch)
treeee9825979001838712b6c08f7a35fc7c4528871f /libswscale/input.c
parent56ae5926f739bd26a5aa4add98604b7cd3c2d6ca (diff)
downloadffmpeg-ba0e69994d509785d541368854ef04a74f120080.tar.gz
sws/input: switch to av_assert
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libswscale/input.c')
-rw-r--r--libswscale/input.c23
1 files changed, 12 insertions, 11 deletions
diff --git a/libswscale/input.c b/libswscale/input.c
index 9d03c681ac..7363437158 100644
--- a/libswscale/input.c
+++ b/libswscale/input.c
@@ -30,6 +30,7 @@
#include "libavutil/intreadwrite.h"
#include "libavutil/mathematics.h"
#include "libavutil/pixdesc.h"
+#include "libavutil/avassert.h"
#include "config.h"
#include "rgb2rgb.h"
#include "swscale.h"
@@ -71,7 +72,7 @@ rgb64ToUV_c_template(uint16_t *dstU, uint16_t *dstV,
int width, enum PixelFormat origin)
{
int i;
- assert(src1==src2);
+ av_assert1(src1==src2);
for (i = 0; i < width; i++) {
int r_b = input_pixel(&src1[i*4+0]);
int g = input_pixel(&src1[i*4+1]);
@@ -88,7 +89,7 @@ rgb64ToUV_half_c_template(uint16_t *dstU, uint16_t *dstV,
int width, enum PixelFormat origin)
{
int i;
- assert(src1==src2);
+ av_assert1(src1==src2);
for (i = 0; i < width; i++) {
int r_b = (input_pixel(&src1[8 * i + 0]) + input_pixel(&src1[8 * i + 4]) + 1) >> 1;
int g = (input_pixel(&src1[8 * i + 1]) + input_pixel(&src1[8 * i + 5]) + 1) >> 1;
@@ -153,7 +154,7 @@ static av_always_inline void rgb48ToUV_c_template(uint16_t *dstU,
enum PixelFormat origin)
{
int i;
- assert(src1 == src2);
+ av_assert1(src1 == src2);
for (i = 0; i < width; i++) {
int r_b = input_pixel(&src1[i * 3 + 0]);
int g = input_pixel(&src1[i * 3 + 1]);
@@ -172,7 +173,7 @@ static av_always_inline void rgb48ToUV_half_c_template(uint16_t *dstU,
enum PixelFormat origin)
{
int i;
- assert(src1 == src2);
+ av_assert1(src1 == src2);
for (i = 0; i < width; i++) {
int r_b = (input_pixel(&src1[6 * i + 0]) +
input_pixel(&src1[6 * i + 3]) + 1) >> 1;
@@ -449,7 +450,7 @@ static void palToUV_c(uint16_t *dstU, int16_t *dstV,
int width, uint32_t *pal)
{
int i;
- assert(src1 == src2);
+ av_assert1(src1 == src2);
for (i = 0; i < width; i++) {
int p = pal[src1[i]];
@@ -506,7 +507,7 @@ static void yuy2ToUV_c(uint8_t *dstU, uint8_t *dstV, const uint8_t *unused0, con
dstU[i] = src1[4 * i + 1];
dstV[i] = src1[4 * i + 3];
}
- assert(src1 == src2);
+ av_assert1(src1 == src2);
}
static void bswap16Y_c(uint8_t *_dst, const uint8_t *_src, const uint8_t *unused1, const uint8_t *unused2, int width,
@@ -550,7 +551,7 @@ static void uyvyToUV_c(uint8_t *dstU, uint8_t *dstV, const uint8_t *unused0, con
dstU[i] = src1[4 * i + 0];
dstV[i] = src1[4 * i + 2];
}
- assert(src1 == src2);
+ av_assert1(src1 == src2);
}
static av_always_inline void nvXXtoUV_c(uint8_t *dst1, uint8_t *dst2,
@@ -604,7 +605,7 @@ static void bgr24ToUV_c(int16_t *dstU, int16_t *dstV, const uint8_t *unused0, co
dstU[i] = (RU*r + GU*g + BU*b + (256<<(RGB2YUV_SHIFT-1)) + (1<<(RGB2YUV_SHIFT-7)))>>(RGB2YUV_SHIFT-6);
dstV[i] = (RV*r + GV*g + BV*b + (256<<(RGB2YUV_SHIFT-1)) + (1<<(RGB2YUV_SHIFT-7)))>>(RGB2YUV_SHIFT-6);
}
- assert(src1 == src2);
+ av_assert1(src1 == src2);
}
static void bgr24ToUV_half_c(int16_t *dstU, int16_t *dstV, const uint8_t *unused0, const uint8_t *src1,
@@ -619,7 +620,7 @@ static void bgr24ToUV_half_c(int16_t *dstU, int16_t *dstV, const uint8_t *unused
dstU[i] = (RU*r + GU*g + BU*b + (256<<RGB2YUV_SHIFT) + (1<<(RGB2YUV_SHIFT-6)))>>(RGB2YUV_SHIFT-5);
dstV[i] = (RV*r + GV*g + BV*b + (256<<RGB2YUV_SHIFT) + (1<<(RGB2YUV_SHIFT-6)))>>(RGB2YUV_SHIFT-5);
}
- assert(src1 == src2);
+ av_assert1(src1 == src2);
}
static void rgb24ToY_c(int16_t *dst, const uint8_t *src, const uint8_t *unused1, const uint8_t *unused2, int width,
@@ -639,7 +640,7 @@ static void rgb24ToUV_c(int16_t *dstU, int16_t *dstV, const uint8_t *unused0, co
const uint8_t *src2, int width, uint32_t *unused)
{
int i;
- assert(src1 == src2);
+ av_assert1(src1 == src2);
for (i = 0; i < width; i++) {
int r = src1[3 * i + 0];
int g = src1[3 * i + 1];
@@ -654,7 +655,7 @@ static void rgb24ToUV_half_c(int16_t *dstU, int16_t *dstV, const uint8_t *unused
const uint8_t *src2, int width, uint32_t *unused)
{
int i;
- assert(src1 == src2);
+ av_assert1(src1 == src2);
for (i = 0; i < width; i++) {
int r = src1[6 * i + 0] + src1[6 * i + 3];
int g = src1[6 * i + 1] + src1[6 * i + 4];