AutoCropper plugin (2 Viewers)

ziphnor

Retired Team Member
  • Premium Supporter
  • August 4, 2005
    755
    13
    Copenhagen
    Home Country
    Denmark Denmark
    Damn, there are lots of small issues to deal with ....

    I had to compile to release so it wouldnt be dependent on debug runtimes.
    I still need to do the following:

    1. Make it work when viewing without timeshifting. At first I had a hell of a time being confused about why my filter wasnt added at all, but it was because it was added to the SBE playback graph, and MP is apparently already using the transport stream for timeshifting now :) Now i have to figure out which graph is used for 'live' playback and add it there as well.
    2. Move log file location ( right now its C:\autocrop.txt :)
    3. Move the filter into the MediaPortal Visual Studio project (otherwise its going to be hard to add it to SVN ;)
    4. Add the necessary stuff to allow the configuration to register the filter, giving a choice between a log enabled one, and one without logs.

    Still i managed to try it out on my HTPC, and it works nicely.
     

    ziphnor

    Retired Team Member
  • Premium Supporter
  • August 4, 2005
    755
    13
    Copenhagen
    Home Country
    Denmark Denmark
    That might become relevant soon, but i suffered a little setback yesterday as Medieval Total War 2 (strategy computer game) was delivered by mail ;)

    Still, it shouldnt be long now before it can at least be tested.
     

    tourettes

    Retired Team Member
  • Premium Supporter
  • January 7, 2005
    17,301
    4,800
    Ziphnor, I think there is one issue with the filter. It will disable the DXVA as the filter must be placed after the decoder. With the DVB subtitle filter I was having similar issue and now the current version of it is connecting to the mpeg2 decoder subtitle input pin (normally it's used for DVD subtitles).
     

    ziphnor

    Retired Team Member
  • Premium Supporter
  • August 4, 2005
    755
    13
    Copenhagen
    Home Country
    Denmark Denmark
    Tourettes, are you sure about that? I thought DXVA assisted in the decoding/deinterlacing face, which takes place IN the decoder filter. Why would it DXVA be disabled if i modify the 'finished' image afterwards? Sure, the image might have to be copied from video card memory to system memory but thats the case with all postprocessing filters.

    As you probably have noticed i do not have a lot of experience with this, but im a bit confused as to where else i should place my filter? It cant really be placed before the decoder, because then my filter will have to decode the video in order to crop it.
     

    tourettes

    Retired Team Member
  • Premium Supporter
  • January 7, 2005
    17,301
    4,800
    I think using ffdshow (or any other postprocessing filter) will disable the DXVA. One exeption might be Nvidia's post processing as it's done on HW.

    Also that's true that it's not possible to use that filter before the decoder as there isn't anything that could be modified :) Copying data from video card memory to RAM is usually a slow operation, much slower than writing to into it.
     

    ziphnor

    Retired Team Member
  • Premium Supporter
  • August 4, 2005
    755
    13
    Copenhagen
    Home Country
    Denmark Denmark
    But still, why would one design DXVA in this way? You think it is because its *so* expensive to copy the frame from the video card, that it would negate the advantage of offloading the decoding?

    I dont recall that significant an increase in CPU usage when using my filter even on HD MPEG-4 material, but i will have to test to be sure.
     

    ziphnor

    Retired Team Member
  • Premium Supporter
  • August 4, 2005
    755
    13
    Copenhagen
    Home Country
    Denmark Denmark
    Just a little status update:
    Ive added a 'register filter' button to the configure screen, giving a choice of a log enabled and a log disabled version.

    The log file is now also correctly placed in the MP log directory.

    More importantly i updated MP on my HTPC to the latest SVN and applied my custom build, and over the next few days i will be doing a little private test at home. Put another way, im now using it on my own HTPC :)

    Remaining issues:
    1. Only works when timeshift enabled
    2. Is actually also used in My Videos graph (for ease of testing), should have seperate config.
    3. I still need to move my code into the mediaportal project, and make sure the filter is copied to the correct location.
     

    ziphnor

    Retired Team Member
  • Premium Supporter
  • August 4, 2005
    755
    13
    Copenhagen
    Home Country
    Denmark Denmark
    Argh, made another test, and it does seem tourettes is correct. When using graphedit apparently DXVA is not enabled so therefore i couldnt tell the difference.

    When i use MP to playback a HD recording it is pretty obvious that DXVA is being disabled ( 22% cpu on my HTPC with no postprocessing vs. 60-70% with it). With SD material you cant really tell the difference .

    I suppose the CPU usage could be okay for some users, but it also seems that some of the image enhancements are disabled. This certainly doesnt bode well...

    Do anyone have some more information on this? All post-processing filters have this issue apparently. However, im confused as to why the image quality is worse just because its done in software mode?

    I suppose i should consider finding a way to only add the filter to the graph for selected channels, or maybe add it dynamically on request.

    For now though, i will try to wrap it up as is.
     

    Users who are viewing this thread

    Top Bottom