AutoCropper plugin (3 Viewers)

jawbroken

Portal Pro
August 13, 2005
706
0
Home Country
Afghanistan Afghanistan
I don't think he was talking about actually transforming the colourspace of the video, just internally working in YUV by converting the pixels that are examined.

I could be wrong.
 

ziphnor

Retired Team Member
  • Premium Supporter
  • August 4, 2005
    755
    13
    Copenhagen
    Home Country
    Denmark Denmark
    I don't think he was talking about actually transforming the colourspace of the video, just internally working in YUV by converting the pixels that are examined.

    You got it exactly right :) I wouldnt dream of converting the video, im just planning to internally sample some lines, convert to YUV and base the analysis on that. Its just nice to analyze lines based on a single colorspace in order to avoid duplicating the analysis code. In the analysis a bit of lost detail is not that important.
     

    tourettes

    Retired Team Member
  • Premium Supporter
  • January 7, 2005
    17,301
    4,800
    I would fear the duplicate code (actually it's not duplicate code) for YUV & RGB analysis as it would reduce the used cpu time and increase the memory usage only by a little (assuming that the analysis code isn't tens of thousands lines of code :)

    DVB subtitle filter is also using "duplicate" code for handling different YUV modes (in similar way the MS example filter is using :).
     

    ziphnor

    Retired Team Member
  • Premium Supporter
  • August 4, 2005
    755
    13
    Copenhagen
    Home Country
    Denmark Denmark
    I see your point, the problem is just that the analysis code isnt exactly static, the code that decides whether a line is image, subtitles or black bars is something that will need some fine-tuning. If i seperate this for RGB and YUV i will have to fine-tune them seperatly which is time consuming. But i think i might structure the code so that i can easily switch to seperate line analysis modes later.

    Btw, is the DVB subtitle filter in SVN? I thought i might take a look, both to learn more about DirectShow filters in general, but also because im very eager to see DVB subs in MP ;)
     

    ziphnor

    Retired Team Member
  • Premium Supporter
  • August 4, 2005
    755
    13
    Copenhagen
    Home Country
    Denmark Denmark
    Managed to put in YV12 support finally, after being a bit confused about exactly how the color data was stored :)

    Apart from RGB support and cleaning up logging i will probably start to look to proper interfacing with MediaPortal soon, though i might wait a bit to see if the new TV/Server stuff brings important changes with it.

    Anyone know what the typical RGB mode(s) are? I took a look at the CoreAVC(MPEG4 codec) which as a prioritized list of outputs modes that looks like this:
    YV12, IYUV,I420,YUY2,RGB32,RGB24

    I think YV12 and YUY2 should cover the YUV color space well, it would be a strange filter that couldnt output one of these. Now im just wondering what kind of filters would only output RGB, and what RGB mode they would choose.

    In general im working a bit slowly because im busy at work but also because much of my 'MediaPortal quality time' is being spent on reporting a few bugs i find really annoying.
     

    tourettes

    Retired Team Member
  • Premium Supporter
  • January 7, 2005
    17,301
    4,800
    Btw, is the DVB subtitle filter in SVN? I thought i might take a look, both to learn more about DirectShow filters in general, but also because im very eager to see DVB subs in MP ;)

    Yes, the source code is in SVN ( \mediaportal\Filters\SubTrans ). But it's not included in the SVN builds yet.
     

    ziphnor

    Retired Team Member
  • Premium Supporter
  • August 4, 2005
    755
    13
    Copenhagen
    Home Country
    Denmark Denmark
    A new status update for those so inclined:

    The filter now supports YUY2, YV12, RGB24 and RGB32. I feel that all imaginable filters should be able to accept one of these and i wont be adding more unless someone points to specific examples.

    I also started creating a setup interface, im not sure whether to put it as a tab under post processing or a seperate subsection. For now ive chosen the later because i wasnt sure how the tabs worked ;) You can see my draft below, im thinking i should add some help/tooltips but otherwise the layout seems healthy enough(but then again, im not a UI designer ;)

    Im now going to look to the integration with MP, so that the filter is added based on configuration settings and is properly cleaned up afterwards.

    Following that will be general code cleanup, especially so that i can get some decent log info without dumping as much data to my log file as i am right now.
     

    jawbroken

    Portal Pro
    August 13, 2005
    706
    0
    Home Country
    Afghanistan Afghanistan
    Does this do left/right cropping as well? From the looks of your setup it seems it only crops at the top and bottom?
     

    Users who are viewing this thread

    Top Bottom