Autocropper strange code issue (1 Viewer)

andreavb

Portal Pro
December 26, 2006
140
4
50
Home Country
Italy Italy
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
Code:
private void AvgDynamicCrop(int topCrop, int bottomCrop)
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:

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

:oops: :oops: :oops:
 

andreavb

Portal Pro
December 26, 2006
140
4
50
Home Country
Italy Italy
I've made the changes to my ProcessPlugins.dll and tested it: automatic cropping works like a charm now for top border and bottom border too...please some coder add it to SVN
 

ziphnor

Retired Team Member
  • Premium Supporter
  • August 4, 2005
    755
    13
    Copenhagen
    Home Country
    Denmark Denmark
    I will take care of it when i can find the time. Maybe this weekend.

    Thanks for tracking the problem down :)
     

    andreavb

    Portal Pro
    December 26, 2006
    140
    4
    50
    Home Country
    Italy Italy
    Hello everybody,

    it's been a while since my last post here at mediaportal. I am currently using old stable release 2.3.0
    I'll soon be moving to Mediaportal 1.0 as soon as it will be out of beta...I'd like to know if this bug has been fixed in new releases as it wasn't in 2.3.0...I've had to edit the code myself to make it work...please you people who are responsible for bug fixes and SVN releases take a look at this little piece of code and replace it as I suggested to make it work correctly...

    please let me know...

    help me, because I strongly use autocropper and I'd like to install new mediaportal 1.0 without having to download the entire code, modify it again and recompile...or let me know if someone already made the changes to the code

    Thanks to you all!!

    :D:D:D
     

    Seidelin

    Retired Team Member
  • Premium Supporter
  • August 14, 2006
    1,755
    652
    Kgs. Lyngby
    Home Country
    Denmark Denmark
    The changes are long since implemented in the code. You could look it up yourself, but welcome back and let the bugfixes keep flowing :)
    Soon there will be fixed another issue with the autocropper when used in normal mode, as described in this link
     

    andreavb

    Portal Pro
    December 26, 2006
    140
    4
    50
    Home Country
    Italy Italy
    Good to hear this from you!

    thanks for the information...
    I'll be glad to install 1.0 stable as soon as it will be released!

    this software rocks!
     

    Users who are viewing this thread

    Top Bottom