Well, I don't know if it's me that I'm watching an old piece of code (it should be a 0.2.3 RC2 version) but I've found a point in code
that seems a little strange:
I was watching the code cause I've seen a problem in cropping lower border when a little commercial or subtitle is shown on a faked 16:9 show in a 4:3 broadcast, when the little commercial or subtitle appears the crop suddenly expands to show the new part of the screen, then when the lower part of the screen is back to black it never shriks back and leaves this little piece of black in the bottom...following code I've found a strange piece of code:
shouldn't the second if based on the bottomCropAvg instead of topCropAvg????
it should be something like this in my opinion:
plese let me know if it possible to fix this in next SVN...it seems that this is causing the issue I'm experiencing...in fact the bottom crop updates only when top crop changes too
please coders let me know
Code:
private void AvgDynamicCrop(int topCrop, int bottomCrop)
I was watching the code cause I've seen a problem in cropping lower border when a little commercial or subtitle is shown on a faked 16:9 show in a 4:3 broadcast, when the little commercial or subtitle appears the crop suddenly expands to show the new part of the screen, then when the lower part of the screen is back to black it never shriks back and leaves this little piece of black in the bottom...following code I've found a strange piece of code:
Code:
if (topCropAvg.Average - lastSettings.Top > 4 && Math.Abs(topCropAvg.Average - topCrop) < 2)
{
newSettings.Top = (int)topCropAvg.Average;
update = true;
}
if (topCropAvg.Average - lastSettings.Top > 4 && Math.Abs(topCropAvg.Average - topCrop) < 2)
{
newSettings.Bottom = (int)bottomCropAvg.Average;
update = true;
}
shouldn't the second if based on the bottomCropAvg instead of topCropAvg????
it should be something like this in my opinion:
Code:
if (topCropAvg.Average - lastSettings.Top > 4 && Math.Abs(topCropAvg.Average - topCrop) < 2)
{
newSettings.Top = (int)topCropAvg.Average;
update = true;
}
if (bottomCropAvg.Average - lastSettings.Bottom > 4 && Math.Abs(bottomCropAvg.Average - bottomCrop) < 2)
{
newSettings.Bottom = (int)bottomCropAvg.Average;
update = true;
}
plese let me know if it possible to fix this in next SVN...it seems that this is causing the issue I'm experiencing...in fact the bottom crop updates only when top crop changes too
please coders let me know