mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-04-11 03:32:39 +00:00
swscale-example: Remove hack to end loop by setting variables to break.
Originally committed as revision 29505 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
This commit is contained in:
parent
d7cf0a6ff7
commit
e55ed689a2
@ -180,6 +180,8 @@ static void selfTest(uint8_t *src[4], int stride[4], int w, int h){
|
|||||||
|
|
||||||
for (srcFormat = 0; srcFormat < PIX_FMT_NB; srcFormat++) {
|
for (srcFormat = 0; srcFormat < PIX_FMT_NB; srcFormat++) {
|
||||||
for (dstFormat = 0; dstFormat < PIX_FMT_NB; dstFormat++) {
|
for (dstFormat = 0; dstFormat < PIX_FMT_NB; dstFormat++) {
|
||||||
|
int res = 0;
|
||||||
|
|
||||||
printf("%s -> %s\n",
|
printf("%s -> %s\n",
|
||||||
sws_format_name(srcFormat),
|
sws_format_name(srcFormat),
|
||||||
sws_format_name(dstFormat));
|
sws_format_name(dstFormat));
|
||||||
@ -187,21 +189,11 @@ static void selfTest(uint8_t *src[4], int stride[4], int w, int h){
|
|||||||
|
|
||||||
srcW= w;
|
srcW= w;
|
||||||
srcH= h;
|
srcH= h;
|
||||||
for (dstW=w - w/3; dstW<= 4*w/3; dstW+= w/3){
|
for (dstW=w - w/3; !res && dstW<= 4*w/3; dstW+= w/3)
|
||||||
for (dstH=h - h/3; dstH<= 4*h/3; dstH+= h/3){
|
for (dstH=h - h/3; !res && dstH<= 4*h/3; dstH+= h/3)
|
||||||
for (flags=1; flags<33; flags*=2) {
|
for (flags=1; !res && flags<33; flags*=2)
|
||||||
int res;
|
|
||||||
|
|
||||||
res = doTest(src, stride, w, h, srcFormat, dstFormat,
|
res = doTest(src, stride, w, h, srcFormat, dstFormat,
|
||||||
srcW, srcH, dstW, dstH, flags);
|
srcW, srcH, dstW, dstH, flags);
|
||||||
if (res < 0) {
|
|
||||||
dstW = 4 * w / 3;
|
|
||||||
dstH = 4 * h / 3;
|
|
||||||
flags = 33;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user