Blip.tv movie player called Pokkari?



  •  Just viewed source of a video from blip.tv so that I could download the video directly when I noticed this little snippet:

    		// By setting the size rediculously large, we'll trick PokkariPlayer in resizing with aspect.
    player.setWidth(320000);
    player.setHeight(240000);

     Now isn't that just a whole lot of WTF there?



  • Sounds like an external piece of software that has a bug. This is a workaround.

    I don't really see a WTF here.



  • I do.

    Learn how to spell the word RIDICULOUS.


  •  Read the comment again and tell me if you find any obvious spelling mistakes.



  • @dtech said:

    Sounds like an external piece of software that has a bug. This is a workaround.

    I don't really see a WTF here.

    Blink. TRWTF is I seem to be the first to look and go "GAH!"

    Actually, TRWTF is everyone thinks TRWTF is the spelling error in the comment...

    The code sets the side really, really large to force an aspect change in rescaling. This would imply, quite strongly, that the image is going to be decoded at the given size. Scale up, scale down. That's wasteful in and of itself, but ... Let's actually be nice and assume the unit is decapixels instead of pixels. (Decapixel = 10 pixels.) Let's be nicer still and assume this is 8-bit color. 32,000 pixels times 24,000 pixels equals a frame that, fully packed at 8-bit indexed color, consumes over 700 megabytes. Even if the units are 100 pixels instead of 10, that's 3,200 by 2,400, or 7 megabytes per frame: and a lot of excess math on scaling back down.

    I can't believe this post went this long without someone pointing out the real WTF...



  • @Wolftaur said:

    32,000 pixels times 24,000 pixels equals a frame that, fully packed at 8-bit indexed color, consumes over 700 megabytes. Even if the units are 100 pixels instead of 10, that's 3,200 by 2,400, or 7 megabytes per frame: and a lot of excess math on scaling back down.
     

    Why assume that that happens? The comment states that it's a fix/hack/workaround for a scaling problem. It could just as well trigger a  scaling mechanism.

    Also, your "just me nice" doesn't really make sense, you only use it because you know it couldn't be true since it would use[url=http://www.google.nl/search?q=320000*240000*32%2F8%2F1024^3]286 GiB[/url] of memory, thus making your theory impossible.

    [slightly offtopic]

    As to not spotting that rediculiculious WTF, I excuse myself to the text below my avatar:

    Utrecht, Netherlands

    It could have happenend to me. But if you prefer to see code which less spelling mistakes, you should propose that everyone writes comments and variable names in his own language.

    [/slightly offtopic]



  • @BlackMan890 said:

     Read the comment again and tell me if you find any obvious spelling mistakes.
     

    // By setting the size rediculously large, we'll trick PokkariPlayer in resizing with aspect.

     



  • @dtech said:

    @Wolftaur said:

    32,000 pixels times 24,000 pixels equals a frame that, fully packed at 8-bit indexed color, consumes over 700 megabytes. Even if the units are 100 pixels instead of 10, that's 3,200 by 2,400, or 7 megabytes per frame: and a lot of excess math on scaling back down.
     

    Why assume that that happens? The comment states that it's a fix/hack/workaround for a scaling problem. It could just as well trigger a  scaling mechanism.

    Also, your "just me nice" doesn't really make sense, you only use it because you know it couldn't be true since it would use286 GiB of memory, thus making your theory impossible.

    [slightly offtopic]

    As to not spotting that rediculiculious WTF, I excuse myself to the text below my avatar:

    Utrecht, Netherlands

    It could have happenend to me. But if you prefer to see code which less spelling mistakes, you should propose that everyone writes comments and variable names in his own language.

    [/slightly offtopic]

    I didn't actually calculate 320,000 by 240,000. My housemate is a graphics artist and I do most of his image processing in my spare time-- I know from experience how big 3,200x2,400 gets because almost a third of his work gets rendered at that size-- and I've seen enough "int representing fraction" stuff (such as integers as pennies to avoid floating point issues in financial math) that to me, assuming 1=1px is automatically suspect... So I started with 32,000x24,000 because that seemed the most logical unit interpretation to me. :)

    As to the fix/hack/workaround part: The use of numbers that are clearly related to a specific image size, honestly, is a serious obfuscater of the intent, if all it's really doing is confusing buggy software by sheer impossibility of the request. It seems to be "tied" to 320x240 video at first glance. MAXINT/2 and MAXINT/3 might have been less confusing.

    <rant>As to spelling mistakes in comments and the like? Pet peeve time: I think every native English speaking programmer who takes issue with the spelling, grammar, and so on of a non-native speaker is just being a jerk, and a rather stupid one at that. I'm a native English speaker, but I have to admit: there are plenty of places where English can get a bit... odd. Our pronunciation and spelling rules are inconsistent and bizarre, we have far too many exceptions to things like alteration of words for past and present tense... Want an IT example of English being confusing? I've quoted one at the end of this post.

    Programmers should do comments, variable names, table names, and so on, in the language that is common to members of the team. If that happens to be their second language? Every OTHER programmer who laughs at the spelling is, simply put? A racist. An English-speaking-born programmer has no right to laugh at the English comments of a Frenchman unless MAYBE he can comment in French himself, without making any mistakes. And even then, it's really a stretch. Just because the English programmer might have 20 years of experience speaking French wouldn't mean the French programmer has that much experience with English.</rant>

    Simply put, I don't consider the spelling error in a comment to be a WTF at all. Eyeballing the code, the only WTF I could spot was huge image size. The spelling error isn't a WTF at all. "Ridiculously" isn't a hard word to spell wrong especially when you consider how many people pronounce it in a way other than the spelling: such as half of the Southern United States. Trust me, I know. I lived there.

    I have a spelling checker.

    It came with my pea sea.

    It plane lee marks four my revue

    Miss steaks aye can knot sea.



    Eye ran this poem threw it,

    Your sure reel glad two no.

    Its vary polished in it's weigh.

    My checker tolled me sew.



  •  Yep, I see "rediculous", "definately", "ocurance" (with varying numbers of 'c' and 'r') far too often to consider it a WTF, actually more often by native speakers than by foreigners.



  • @Wolftaur said:

    <nicerant/>
     

     Since when is hating the French racist?  Everybody should hate the French.  As a matter of fact, I declare Jihad on the French!  Death to all smelly Frenchmen (which is 90% of them)!  



  • @Wolftaur said:

    I think every native English speaking programmer who takes issue with the spelling, grammar, and so on of a non-native speaker is just being a jerk, and a rather stupid one at that.

    Good thing this doesn't apply to me, then: I'm a non-native English speaking programmer who takes issue with the spelling, grammar, and so on of... well, everybody. I guess that makes me a hero instead, eh?


Log in to reply