Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion. Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules. Domains: forum.doom9.org / forum.doom9.net / forum.doom9.se |
|
|
#1 | Link |
|
unsigned int
Join Date: Oct 2012
Location: 🇪🇺
Posts: 760
|
Possible bug in the vmetric calculation code in telecide()
This possible bug is in the vmetric calculation code, in decomb524src.zip/Telecide.cpp, in Telecide::CalculateMetrics(), line 938:
Code:
for (y = 0; y < hover2 - 4; y+=4)
{
/* Exclusion band. Good for ignoring subtitles. */
if (y0 == y1 || y < y0/2 || y > y1/2)
{
for (x = 0; x < wover2;)
{
index = (y/BLKSIZE)*xblocks + x/BLKSIZE; // <--- line 938
// Test combination with current frame.
tmp1 = ((long)currbot0[x] + (long)currbot2[x]);
diff = abs((((long)currtop0[x] + (long)currtop2[x] + (long)currtop4[x])) - (tmp1 >> 1) - tmp1);
if (diff > nt)
{
c += diff;
I think adjusting the block size to take subsampling into account should fix this.
__________________
Buy me a "coffee" and/or hire me to write code! |
|
|
|
|
|
#3 | Link |
|
unsigned int
Join Date: Oct 2012
Location: 🇪🇺
Posts: 760
|
Code:
--- Telecide.cpp 2012-11-24 10:09:04.000000000 +0200
+++ Telecide.cpp 2014-04-12 11:05:51.433706672 +0300
@@ -935,7 +935,7 @@
{
for (x = 0; x < wover2;)
{
- index = (y/BLKSIZE)*xblocks + x/BLKSIZE;
+ index = (y/(BLKSIZE/2))*xblocks + x/(BLKSIZE/2);
// Test combination with current frame.
tmp1 = ((long)currbot0[x] + (long)currbot2[x]);
diff = abs((((long)currtop0[x] + (long)currtop2[x] + (long)currtop4[x])) - (tmp1 >> 1) - tmp1);
__________________
Buy me a "coffee" and/or hire me to write code! |
|
|
|
![]() |
|
|