Expand Up
@@ -58,7 +58,7 @@ class TestCopyFrames: public QObject
auto * bufsrc = (unsigned char *)av_malloc (sizesrc);
init (&src, FMT_YV12, bufsrc, WIDTH, HEIGHT, sizesrc,
nullptr , nullptr , 0 , 0 , ALIGN);
0 , 0 , ALIGN);
int stride = ALIGN ? (WIDTH + ALIGN - 1 ) & ~(ALIGN -1 ) : WIDTH;
QCOMPARE (stride, src.pitches [0 ]);
Expand All
@@ -83,7 +83,7 @@ class TestCopyFrames: public QObject
auto * bufdst = (unsigned char *)av_malloc (sizedst);
init (&dst, FMT_YV12, bufdst, WIDTH, HEIGHT, sizedst,
nullptr , nullptr , 0 , 0 , ALIGNDST);
0 , 0 , ALIGNDST);
int stride2 = ALIGNDST ? (WIDTH + ALIGNDST - 1 ) & ~(ALIGNDST -1 ) : WIDTH;
// test the stride sizes
QCOMPARE (stride2, dst.pitches [0 ]);
Expand Down
Expand Up
@@ -148,7 +148,7 @@ class TestCopyFrames: public QObject
auto * bufsrc = (unsigned char *)av_malloc (sizesrc);
init (&src, FMT_NV12, bufsrc, WIDTH, HEIGHT, sizesrc,
nullptr , nullptr , 0 , 0 , ALIGN);
0 , 0 , ALIGN);
int stride = ALIGN ? (WIDTH + ALIGN - 1 ) & ~(ALIGN -1 ) : WIDTH;
QCOMPARE (stride, src.pitches [0 ]);
QCOMPARE (stride, src.pitches [1 ]);
Expand All
@@ -169,7 +169,7 @@ class TestCopyFrames: public QObject
int sizedst = GetBufferSize (FMT_YV12, WIDTH, HEIGHT, ALIGNDST);
auto * bufdst = (unsigned char *)av_malloc (sizedst);
init (&dst, FMT_YV12, bufdst, WIDTH, HEIGHT, sizedst,
nullptr , nullptr , 0 , 0 , ALIGNDST);
0 , 0 , ALIGNDST);
QBENCHMARK
{
Expand Down
Expand Up
@@ -225,7 +225,7 @@ class TestCopyFrames: public QObject
auto * bufsrc = (unsigned char *)av_malloc (sizesrc);
init (&src, FMT_NV12, bufsrc, WIDTH, HEIGHT, sizesrc,
nullptr , nullptr , 0 , 0 , ALIGN);
0 , 0 , ALIGN);
int stride = ALIGN ? (WIDTH + ALIGN - 1 ) & ~(ALIGN -1 ) : WIDTH;
QCOMPARE (stride, src.pitches [0 ]);
QCOMPARE (stride, src.pitches [1 ]);
Expand All
@@ -246,7 +246,7 @@ class TestCopyFrames: public QObject
int sizedst = GetBufferSize (FMT_YV12, WIDTH, HEIGHT, ALIGNDST);
auto * bufdst = (unsigned char *)av_malloc (sizedst);
init (&dst, FMT_YV12, bufdst, WIDTH, HEIGHT, sizedst,
nullptr , nullptr , 0 , 0 , ALIGNDST);
0 , 0 , ALIGNDST);
int stride2 = ALIGNDST ? (WIDTH + ALIGNDST - 1 ) & ~(ALIGNDST -1 ) : WIDTH;
QCOMPARE (stride2, dst.pitches [0 ]);
QCOMPARE (stride2 / 2 , dst.pitches [1 ]);
Expand Down
Expand Up
@@ -306,7 +306,7 @@ class TestCopyFrames: public QObject
(unsigned char *)av_malloc (GetBufferSize (FMT_NV12, WIDTH, HEIGHT, ALIGN));
init (&src, FMT_NV12, bufsrc, WIDTH, HEIGHT, GetBufferSize (FMT_YV12, WIDTH, HEIGHT, ALIGN),
nullptr , nullptr , 0 , 0 , ALIGN);
0 , 0 , ALIGN);
int stride = ALIGN ? (WIDTH + ALIGN - 1 ) & ~(ALIGN -1 ) : WIDTH;
QCOMPARE (stride, src.pitches [0 ]);
QCOMPARE (stride, src.pitches [1 ]);
Expand All
@@ -327,7 +327,7 @@ class TestCopyFrames: public QObject
int sizedst = GetBufferSize (FMT_YV12, WIDTH, HEIGHT, ALIGNDST);
auto * bufdst = (unsigned char *)av_malloc (sizedst);
init (&dst, FMT_YV12, bufdst, WIDTH, HEIGHT, sizedst,
nullptr , nullptr , 0 , 0 , ALIGNDST);
0 , 0 , ALIGNDST);
int stride2 = ALIGNDST ? (WIDTH + ALIGNDST - 1 ) & ~(ALIGNDST -1 ) : WIDTH;
QCOMPARE (stride2, dst.pitches [0 ]);
Expand Down
Expand Up
@@ -388,7 +388,7 @@ class TestCopyFrames: public QObject
(unsigned char *)av_malloc (GetBufferSize (FMT_NV12, WIDTH, HEIGHT, ALIGN));
init (&src, FMT_NV12, bufsrc + 1 , WIDTH, HEIGHT, GetBufferSize (FMT_YV12, WIDTH, HEIGHT, ALIGN),
nullptr , nullptr , 0 , 0 , ALIGN);
0 , 0 , ALIGN);
QCOMPARE (ALIGN ? (WIDTH + ALIGN - 1 ) & ~(ALIGN -1 ) : WIDTH , src.pitches [0 ]);
QCOMPARE (ALIGN ? (WIDTH + ALIGN - 1 ) & ~(ALIGN -1 ) : WIDTH , src.pitches [1 ]);
Expand All
@@ -409,7 +409,7 @@ class TestCopyFrames: public QObject
(unsigned char *)av_malloc (GetBufferSize (FMT_YV12, WIDTH, HEIGHT, ALIGNDST));
init (&dst, FMT_YV12, bufdst, WIDTH, HEIGHT, GetBufferSize (FMT_YV12, WIDTH, HEIGHT, ALIGNDST),
nullptr , nullptr , 0 , 0 , ALIGNDST /* align */ );
0 , 0 , ALIGNDST /* align */ );
int stride = ALIGNDST ? (WIDTH + ALIGNDST - 1 ) & ~(ALIGNDST -1 ) : WIDTH;
QCOMPARE (stride, dst.pitches [0 ]);
QCOMPARE (stride / 2 , dst.pitches [1 ]);
Expand Down
Expand Up
@@ -469,7 +469,7 @@ class TestCopyFrames: public QObject
(unsigned char *)av_malloc (GetBufferSize (FMT_NV12, WIDTH, HEIGHT, ALIGN));
init (&src, FMT_NV12, bufsrc, WIDTH, HEIGHT, GetBufferSize (FMT_YV12, WIDTH, HEIGHT, ALIGN),
nullptr , nullptr , 0 , 0 , ALIGN);
0 , 0 , ALIGN);
QCOMPARE (ALIGN ? (WIDTH + ALIGN - 1 ) & ~(ALIGN -1 ) : WIDTH , src.pitches [0 ]);
QCOMPARE (ALIGN ? (WIDTH + ALIGN - 1 ) & ~(ALIGN -1 ) : WIDTH , src.pitches [1 ]);
Expand All
@@ -490,7 +490,7 @@ class TestCopyFrames: public QObject
(unsigned char *)av_malloc (GetBufferSize (FMT_YV12, WIDTH, HEIGHT, ALIGNDST));
init (&dst, FMT_YV12, bufdst + 1 , WIDTH, HEIGHT, GetBufferSize (FMT_YV12, WIDTH, HEIGHT, ALIGNDST),
nullptr , nullptr , 0 , 0 , ALIGNDST);
0 , 0 , ALIGNDST);
int stride = ALIGNDST ? (WIDTH + ALIGNDST - 1 ) & ~(ALIGNDST -1 ) : WIDTH;
QCOMPARE (stride, dst.pitches [0 ]);
Expand Down
Expand Up
@@ -552,7 +552,7 @@ class TestCopyFrames: public QObject
(unsigned char *)av_malloc (GetBufferSize (FMT_NV12, WIDTH, HEIGHT, ALIGN));
init (&src, FMT_NV12, bufsrc + 1 , WIDTH, HEIGHT, GetBufferSize (FMT_YV12, WIDTH, HEIGHT, ALIGN),
nullptr , nullptr , 0 , 0 , ALIGN);
0 , 0 , ALIGN);
QCOMPARE (ALIGN ? (WIDTH + ALIGN - 1 ) & ~(ALIGN -1 ) : WIDTH , src.pitches [0 ]);
QCOMPARE (ALIGN ? (WIDTH + ALIGN - 1 ) & ~(ALIGN -1 ) : WIDTH , src.pitches [1 ]);
Expand All
@@ -573,7 +573,7 @@ class TestCopyFrames: public QObject
(unsigned char *)av_malloc (GetBufferSize (FMT_YV12, WIDTH, HEIGHT, ALIGNDST));
init (&dst, FMT_YV12, bufdst + 1 , WIDTH, HEIGHT, GetBufferSize (FMT_YV12, WIDTH, HEIGHT, ALIGNDST),
nullptr , nullptr , 0 , 0 , ALIGNDST);
0 , 0 , ALIGNDST);
int stride = ALIGNDST ? (WIDTH + ALIGNDST - 1 ) & ~(ALIGNDST -1 ) : WIDTH;
QCOMPARE (stride, dst.pitches [0 ]);
Expand Down
Expand Up
@@ -636,7 +636,7 @@ class TestCopyFrames: public QObject
auto * bufsrc = (unsigned char *)av_malloc (sizesrc);
init (&src, FMT_NV12, bufsrc, width, HEIGHT, sizesrc,
nullptr , nullptr , 0 , 0 , ALIGN);
0 , 0 , ALIGN);
int stride = ALIGN ? (width + ALIGN - 1 ) & ~(ALIGN -1 ) : width;
QCOMPARE (stride, src.pitches [0 ]);
QCOMPARE (stride, src.pitches [1 ]);
Expand All
@@ -657,7 +657,7 @@ class TestCopyFrames: public QObject
int sizedst = GetBufferSize (FMT_YV12, width, HEIGHT, ALIGNDST);
auto * bufdst = (unsigned char *)av_malloc (sizedst);
init (&dst, FMT_YV12, bufdst, width, HEIGHT, sizedst,
nullptr , nullptr , 0 , 0 , ALIGNDST);
0 , 0 , ALIGNDST);
QBENCHMARK
{
Expand Down
Expand Up
@@ -706,7 +706,7 @@ class TestCopyFrames: public QObject
auto * bufsrc = (unsigned char *)av_malloc (sizesrc);
init (&src, FMT_YV12, bufsrc, WIDTH, HEIGHT, sizesrc,
nullptr , nullptr , 0 , 0 , ALIGN);
0 , 0 , ALIGN);
int stride = ALIGN ? (WIDTH + ALIGN - 1 ) & ~(ALIGN -1 ) : WIDTH;
QCOMPARE (stride, src.pitches [0 ]);
Expand All
@@ -731,7 +731,7 @@ class TestCopyFrames: public QObject
auto * bufdst = (unsigned char *)av_malloc (sizedst);
init (&dst, FMT_YV12, bufdst, WIDTH, HEIGHT, sizedst,
nullptr , nullptr , 0 , 0 , ALIGNDST);
0 , 0 , ALIGNDST);
int stride2 = ALIGNDST ? (WIDTH + ALIGNDST - 1 ) & ~(ALIGNDST -1 ) : WIDTH;
// test the stride sizes
QCOMPARE (stride2, dst.pitches [0 ]);
Expand Down
Expand Up
@@ -799,7 +799,7 @@ class TestCopyFrames: public QObject
auto * bufsrc = (unsigned char *)av_malloc (sizesrc);
init (&src, FMT_NV12, bufsrc, WIDTH, HEIGHT, sizesrc,
nullptr , nullptr , 0 , 0 , ALIGN);
0 , 0 , ALIGN);
int stride = ALIGN ? (WIDTH + ALIGN - 1 ) & ~(ALIGN -1 ) : WIDTH;
QCOMPARE (stride, src.pitches [0 ]);
QCOMPARE (stride, src.pitches [1 ]);
Expand All
@@ -820,7 +820,7 @@ class TestCopyFrames: public QObject
int sizedst = GetBufferSize (FMT_YV12, WIDTH, HEIGHT, ALIGNDST);
auto * bufdst = (unsigned char *)av_malloc (sizedst);
init (&dst, FMT_YV12, bufdst, WIDTH, HEIGHT, sizedst,
nullptr , nullptr , 0 , 0 , ALIGNDST);
0 , 0 , ALIGNDST);
int stride2 = ALIGNDST ? (WIDTH + ALIGNDST - 1 ) & ~(ALIGNDST -1 ) : WIDTH;
QCOMPARE (stride2, dst.pitches [0 ]);
QCOMPARE (stride2 / 2 , dst.pitches [1 ]);
Expand Down
Expand Up
@@ -882,7 +882,7 @@ class TestCopyFrames: public QObject
(unsigned char *)av_malloc (GetBufferSize (FMT_NV12, WIDTH, HEIGHT, ALIGN));
init (&src, FMT_NV12, bufsrc, WIDTH, HEIGHT, GetBufferSize (FMT_YV12, WIDTH, HEIGHT, ALIGN),
nullptr , nullptr , 0 , 0 , ALIGN);
0 , 0 , ALIGN);
int stride = ALIGN ? (WIDTH + ALIGN - 1 ) & ~(ALIGN -1 ) : WIDTH;
QCOMPARE (stride, src.pitches [0 ]);
QCOMPARE (stride, src.pitches [1 ]);
Expand All
@@ -903,7 +903,7 @@ class TestCopyFrames: public QObject
int sizedst = GetBufferSize (FMT_YV12, WIDTH, HEIGHT, ALIGNDST);
auto * bufdst = (unsigned char *)av_malloc (sizedst);
init (&dst, FMT_YV12, bufdst, WIDTH, HEIGHT, sizedst,
nullptr , nullptr , 0 , 0 , ALIGNDST);
0 , 0 , ALIGNDST);
int stride2 = ALIGNDST ? (WIDTH + ALIGNDST - 1 ) & ~(ALIGNDST -1 ) : WIDTH;
QCOMPARE (stride2, dst.pitches [0 ]);
Expand Down
Expand Up
@@ -966,7 +966,7 @@ class TestCopyFrames: public QObject
(unsigned char *)av_malloc (GetBufferSize (FMT_NV12, WIDTH, HEIGHT, ALIGN));
init (&src, FMT_NV12, bufsrc + 1 , WIDTH, HEIGHT, GetBufferSize (FMT_YV12, WIDTH, HEIGHT, ALIGN),
nullptr , nullptr , 0 , 0 , ALIGN);
0 , 0 , ALIGN);
QCOMPARE (ALIGN ? (WIDTH + ALIGN - 1 ) & ~(ALIGN -1 ) : WIDTH , src.pitches [0 ]);
QCOMPARE (ALIGN ? (WIDTH + ALIGN - 1 ) & ~(ALIGN -1 ) : WIDTH , src.pitches [1 ]);
Expand All
@@ -987,7 +987,7 @@ class TestCopyFrames: public QObject
(unsigned char *)av_malloc (GetBufferSize (FMT_YV12, WIDTH, HEIGHT, ALIGNDST));
init (&dst, FMT_YV12, bufdst, WIDTH, HEIGHT, GetBufferSize (FMT_YV12, WIDTH, HEIGHT, ALIGNDST),
nullptr , nullptr , 0 , 0 , ALIGNDST /* align */ );
0 , 0 , ALIGNDST /* align */ );
int stride = ALIGNDST ? (WIDTH + ALIGNDST - 1 ) & ~(ALIGNDST -1 ) : WIDTH;
QCOMPARE (stride, dst.pitches [0 ]);
QCOMPARE (stride / 2 , dst.pitches [1 ]);
Expand Down
Expand Up
@@ -1049,7 +1049,7 @@ class TestCopyFrames: public QObject
(unsigned char *)av_malloc (GetBufferSize (FMT_NV12, WIDTH, HEIGHT, ALIGN));
init (&src, FMT_NV12, bufsrc, WIDTH, HEIGHT, GetBufferSize (FMT_YV12, WIDTH, HEIGHT, ALIGN),
nullptr , nullptr , 0 , 0 , ALIGN);
0 , 0 , ALIGN);
QCOMPARE (ALIGN ? (WIDTH + ALIGN - 1 ) & ~(ALIGN -1 ) : WIDTH , src.pitches [0 ]);
QCOMPARE (ALIGN ? (WIDTH + ALIGN - 1 ) & ~(ALIGN -1 ) : WIDTH , src.pitches [1 ]);
Expand All
@@ -1070,7 +1070,7 @@ class TestCopyFrames: public QObject
(unsigned char *)av_malloc (GetBufferSize (FMT_YV12, WIDTH, HEIGHT, ALIGNDST));
init (&dst, FMT_YV12, bufdst + 1 , WIDTH, HEIGHT, GetBufferSize (FMT_YV12, WIDTH, HEIGHT, ALIGNDST),
nullptr , nullptr , 0 , 0 , ALIGNDST);
0 , 0 , ALIGNDST);
int stride = ALIGNDST ? (WIDTH + ALIGNDST - 1 ) & ~(ALIGNDST -1 ) : WIDTH;
QCOMPARE (stride, dst.pitches [0 ]);
Expand Down
Expand Up
@@ -1134,7 +1134,7 @@ class TestCopyFrames: public QObject
(unsigned char *)av_malloc (GetBufferSize (FMT_NV12, WIDTH, HEIGHT, ALIGN));
init (&src, FMT_NV12, bufsrc + 1 , WIDTH, HEIGHT, GetBufferSize (FMT_YV12, WIDTH, HEIGHT, ALIGN),
nullptr , nullptr , 0 , 0 , ALIGN);
0 , 0 , ALIGN);
QCOMPARE (ALIGN ? (WIDTH + ALIGN - 1 ) & ~(ALIGN -1 ) : WIDTH , src.pitches [0 ]);
QCOMPARE (ALIGN ? (WIDTH + ALIGN - 1 ) & ~(ALIGN -1 ) : WIDTH , src.pitches [1 ]);
Expand All
@@ -1155,7 +1155,7 @@ class TestCopyFrames: public QObject
(unsigned char *)av_malloc (GetBufferSize (FMT_YV12, WIDTH, HEIGHT, ALIGNDST));
init (&dst, FMT_YV12, bufdst + 1 , WIDTH, HEIGHT, GetBufferSize (FMT_YV12, WIDTH, HEIGHT, ALIGNDST),
nullptr , nullptr , 0 , 0 , ALIGNDST);
0 , 0 , ALIGNDST);
int stride = ALIGNDST ? (WIDTH + ALIGNDST - 1 ) & ~(ALIGNDST -1 ) : WIDTH;
QCOMPARE (stride, dst.pitches [0 ]);
Expand Down
Expand Up
@@ -1220,7 +1220,7 @@ class TestCopyFrames: public QObject
auto * bufsrc = (unsigned char *)av_malloc (sizesrc);
init (&src, FMT_NV12, bufsrc, width, HEIGHT, sizesrc,
nullptr , nullptr , 0 , 0 , ALIGN);
0 , 0 , ALIGN);
int stride = ALIGN ? (width + ALIGN - 1 ) & ~(ALIGN -1 ) : width;
QCOMPARE (stride, src.pitches [0 ]);
QCOMPARE (stride, src.pitches [1 ]);
Expand All
@@ -1241,7 +1241,7 @@ class TestCopyFrames: public QObject
int sizedst = GetBufferSize (FMT_YV12, width, HEIGHT, ALIGNDST);
auto * bufdst = (unsigned char *)av_malloc (sizedst);
init (&dst, FMT_YV12, bufdst, width, HEIGHT, sizedst,
nullptr , nullptr , 0 , 0 , ALIGNDST);
0 , 0 , ALIGNDST);
QBENCHMARK
{
Expand Down