Mercurial > libpostproc.hg
comparison postprocess_template.c @ 96:404a656698ff libpostproc
cosmetics: Fix typo in variable name, numSkiped --> numSkipped.
author | diego |
---|---|
date | Sat, 22 Mar 2008 16:43:07 +0000 |
parents | c24dab9bca80 |
children | 2653d9f33b8a |
comparison
equal
deleted
inserted
replaced
95:c24dab9bca80 | 96:404a656698ff |
---|---|
1437 if(x!=1 && x!=8 && y!=1 && y!=8) numPixels++; | 1437 if(x!=1 && x!=8 && y!=1 && y!=8) numPixels++; |
1438 // if((max-min)<20 || (max-min)*QP<200) | 1438 // if((max-min)<20 || (max-min)*QP<200) |
1439 // if((max-min)*QP < 500) | 1439 // if((max-min)*QP < 500) |
1440 // if(max-min<QP/2) | 1440 // if(max-min<QP/2) |
1441 if(max-min < 20){ | 1441 if(max-min < 20){ |
1442 static int numSkiped=0; | 1442 static int numSkipped=0; |
1443 static int errorSum=0; | 1443 static int errorSum=0; |
1444 static int worstQP=0; | 1444 static int worstQP=0; |
1445 static int worstRange=0; | 1445 static int worstRange=0; |
1446 static int worstDiff=0; | 1446 static int worstDiff=0; |
1447 int diff= (f - *p); | 1447 int diff= (f - *p); |
1448 int absDiff= FFABS(diff); | 1448 int absDiff= FFABS(diff); |
1449 int error= diff*diff; | 1449 int error= diff*diff; |
1450 | 1450 |
1451 if(x==1 || x==8 || y==1 || y==8) continue; | 1451 if(x==1 || x==8 || y==1 || y==8) continue; |
1452 | 1452 |
1453 numSkiped++; | 1453 numSkipped++; |
1454 if(absDiff > worstDiff){ | 1454 if(absDiff > worstDiff){ |
1455 worstDiff= absDiff; | 1455 worstDiff= absDiff; |
1456 worstQP= QP; | 1456 worstQP= QP; |
1457 worstRange= max-min; | 1457 worstRange= max-min; |
1458 } | 1458 } |
1459 errorSum+= error; | 1459 errorSum+= error; |
1460 | 1460 |
1461 if(1024LL*1024LL*1024LL % numSkiped == 0){ | 1461 if(1024LL*1024LL*1024LL % numSkipped == 0){ |
1462 av_log(c, AV_LOG_INFO, "sum:%1.3f, skip:%d, wQP:%d, " | 1462 av_log(c, AV_LOG_INFO, "sum:%1.3f, skip:%d, wQP:%d, " |
1463 "wRange:%d, wDiff:%d, relSkip:%1.3f\n", | 1463 "wRange:%d, wDiff:%d, relSkip:%1.3f\n", |
1464 (float)errorSum/numSkiped, numSkiped, worstQP, worstRange, | 1464 (float)errorSum/numSkipped, numSkipped, worstQP, worstRange, |
1465 worstDiff, (float)numSkiped/numPixels); | 1465 worstDiff, (float)numSkipped/numPixels); |
1466 } | 1466 } |
1467 } | 1467 } |
1468 } | 1468 } |
1469 #endif | 1469 #endif |
1470 if (*p + QP2 < f) *p= *p + QP2; | 1470 if (*p + QP2 < f) *p= *p + QP2; |