[mythtv-users] nonlinear 16:9 stretch?

Robert Denier rdenier at finiteinfinity.org
Mon Nov 21 18:50:59 EST 2005


On Monday 21 November 2005 05:00 pm, William wrote:
> > divide it into 10 equally, or nearly equally wide vertical stripes.
> >
> > 1) For the stripe on the far left you could repeat each pixel 3 times.
> > 2) For the next two stripe repeat each 2 times.
> > 3) Then stripes four through seven are just a normal one:one mapping.
> > 4) The next two stripes would be the same as (2).
> > 5) The final stripe would be the same as (1)
> >
> > In other words the pattern for repeating pixels would be...
> > [3,2,2,1,1,1,1,2,2,3]
>
> Dont forget that the vertical also needs to be scaled so your routine gets
> to be quite a bit more complicated. Not sure if some kind of a lookup table
> might do the trick. Divide the screen into zones and assign each zone a
> pair of strech values. You would need to limit the number of pixels per
> zone to keep it from becoming visible as a pattern.

Actual no it doesn't, or at the very least video cards have been doing linear 
scaling for a really long time.  All this idea was doing was approximately 
doing the horizontal strentching.  It would be up to XV or whatever to do the 
final linear expansion however that works.

For instance suppose the input image was 480x480 and the output image of the 
filter was 864x480 with the center 192 columns being left unaltered. (40%)  
Again, I'm not saying this would look all that good necessarily but maybe 
some similiar variation or such will be ok.

At any rate you now have a 864x480 image you want to fit say 1366x768.  I 
don't know the details of how XV does it, but it would just be a linear 
expansion for the graphics card, like expanding 480x480 to the whole screen 
would be.  There might be some details I'm missing.  Some of which may remain 
hidden until the idea is actually tried, but I think it should work, at least 
in principle.

Other than that I'd tend to consider looking at how games do things.  Don't 
they sometimes map pictures onto polygons and such?  Perhaps there is 
someting that can be abused for this purpose there.

-Robert




More information about the mythtv-users mailing list