summaryrefslogtreecommitdiffstats
path: root/libswscale/swscale_template.c
diff options
context:
space:
mode:
authorflameeyes <flameeyes@b3059339-0415-0410-9bf9-f77b7e298cf2>2008-10-09 11:10:30 +0000
committerflameeyes <flameeyes@b3059339-0415-0410-9bf9-f77b7e298cf2>2008-10-09 11:10:30 +0000
commit3ab65de119b118fb17f51c5fb4876e35dd737868 (patch)
treeb4678328abf4c3d46f9e469e159b66ef0722c4eb /libswscale/swscale_template.c
parenta0d55235a7867cf3c42c4b6d0dafc9a677333288 (diff)
downloadmpv-3ab65de119b118fb17f51c5fb4876e35dd737868.tar.bz2
mpv-3ab65de119b118fb17f51c5fb4876e35dd737868.tar.xz
Invert logic for the single-pass in swScale() functions.
Instead of having a firstTime variable defaulting to 1, have a warnedAlready defaulting to 0. While this should make no difference in code speed at runtime, it allows to aggregate the four bytes of that variable with clip_table in .bss section, rather than issuing a .data section just for that. As it is, libswscale require no .data section but .data.rel.ro (that can be mitigated by prelinking), so the change might actually save one page of memory at runtime (per process). git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27734 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libswscale/swscale_template.c')
-rw-r--r--libswscale/swscale_template.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libswscale/swscale_template.c b/libswscale/swscale_template.c
index 4d8a4434ee..30075f6027 100644
--- a/libswscale/swscale_template.c
+++ b/libswscale/swscale_template.c
@@ -2964,12 +2964,12 @@ static int RENAME(swScale)(SwsContext *c, uint8_t* src[], int srcStride[], int s
if (dstStride[0]%8 !=0 || dstStride[1]%8 !=0 || dstStride[2]%8 !=0)
{
- static int firstTime=1; //FIXME move this into the context perhaps
- if (flags & SWS_PRINT_INFO && firstTime)
+ static int warnedAlready=0; //FIXME move this into the context perhaps
+ if (flags & SWS_PRINT_INFO && !warnedAlready)
{
av_log(c, AV_LOG_WARNING, "Warning: dstStride is not aligned!\n"
" ->cannot do aligned memory accesses anymore\n");
- firstTime=0;
+ warnedAlready=1;
}
}