AutoCropper plugin (1 Viewer)

knutinh

Portal Pro
September 4, 2005
558
2
Does it ever happen that N or M is odd? I thought that they usually was even dividable by 16...

-k
 

ziphnor

Retired Team Member
  • Premium Supporter
  • August 4, 2005
    755
    13
    Copenhagen
    Home Country
    Denmark Denmark
    Sure it does when im cropping. Say i have a 576 line high input. My cropper might easily decide to drop just the bottom line, causing me to request a 575 high buffer which the VMR9 renderer accepts. Its true that the render might in hardware operate on buffers that must be divisable by 16 or similar but in this case it instructs me to use only part of the buffer it hands me. The problem is that i dont know how to lay out data in this buffer, not because of the size, but because there are different ways to intepret YV12 for M or N being odd.
     

    ziphnor

    Retired Team Member
  • Premium Supporter
  • August 4, 2005
    755
    13
    Copenhagen
    Home Country
    Denmark Denmark
    Someone on Google Groups said that YV12 is NOT valid for odd heights, so im just going to avoid that :)

    And a status update:
    I now have the filter nicely integrated into MP. I have a key for toggling the mode Manual/Off(auto will be the third option) and one for requesting a crop in manual mode. The final task before i start testing it on my own HTPC is to clean up logging as it right now outputs 5-10 MB log data per minute :)
     

    Inker

    Retired Team Member
  • Premium Supporter
  • December 6, 2004
    2,055
    318
    Just quick question, will this run on the server in the future and only send the cropped stream to the client or do you intend for it to run clientside?
     

    ziphnor

    Retired Team Member
  • Premium Supporter
  • August 4, 2005
    755
    13
    Copenhagen
    Home Country
    Denmark Denmark
    Client side for sure. If it was to crop before that i suspect it would have to be in the recording graph, and thats not the place for it.

    There is of course a slight advantage to cropping on the server in regards to bandwidth, but the black bars doesnt take up that much space in a compressed state.

    You sound like you feel it belongs serverside?
     

    Inker

    Retired Team Member
  • Premium Supporter
  • December 6, 2004
    2,055
    318
    TBH its just something that crossed my mind. Havent really thought about it too much.

    Come to think of it....I guess your right, its just a decoding filter anyways, so its client side. How should it work server side anyways without actually impacting and reencoding the stream it gets from the card? Guess you could do it in the stream part, but I have no idea if thats true even. Client side sounds best....disregard my stupid question :)
     

    ziphnor

    Retired Team Member
  • Premium Supporter
  • August 4, 2005
    755
    13
    Copenhagen
    Home Country
    Denmark Denmark
    It wasnt a stupid question :) I only just thought about this issue today, and decided that it should be client side since its really a playback filter working on the decoded stream(as you mentioned).

    I was however thinking it might in the future be handy a better compress option, ie you use it to find the correct bounding box for a recording and then only compress that part of each frame to say DivX or Xvid, but thats definetly in the future, when i get this working im going after teletext subs.

    Nice signature btw, hadnt noticed it before, but it had me laughing quite a bit ;)
     

    ziphnor

    Retired Team Member
  • Premium Supporter
  • August 4, 2005
    755
    13
    Copenhagen
    Home Country
    Denmark Denmark
    Status:

    Didnt manage to get quite as far as i had hoped, but at least now the code has been refactored into files with only a few related methods (like analyze, copying, media negotiation etc).

    I also found out how to make C macros that takes a variable amount of arguments. This is nice since that way i can make some debug log functions that can actually be compiled completely out of the code later on, so that they have ZERO perfomance impact.

    Right now im trying to decide on some log levels that will allow the filter to be used in practice but still allow me to trace problems when they occur( because they are going to, i am a horribly absent minded programmer ;)

    I also just ordered myself an upgrade for my current PC, so this weekend is probably going to be spent on that. The bottom line is that i wont start testing on my own HTPC before the middle of next week, and therefore its probably approx. 14 days before there is a chance of this appearing in SVN (assuming it will be accepted into SVN :)
     

    ziphnor

    Retired Team Member
  • Premium Supporter
  • August 4, 2005
    755
    13
    Copenhagen
    Home Country
    Denmark Denmark
    Managed to spend an hour on the filter, now the log system is almost entirely in place, so i should be able to start testing on my own HTPC very soon. Looking forward to it, ALOT of channels are still broadcasting letterboxed material, turning my 50" rear-pro TV into around a 37" TV :)
     

    Users who are viewing this thread

    Top Bottom