RE: [mythtv-users] nonlinear 16:9 stretch?
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED] Sent: Monday, November 21, 2005 12:35 PM To: mythtv-users@mythtv.org Subject: [mythtv-users] nonlinear 16:9 stretch? Before I burn an evening mucking with a working X config, i'd like to know if MythTV do this also, or does it stretch the entire picture evenly? I was asking for this feature a while ago. I have already written most of the code but it is in Intel assembly, not AT&T so it doesn't fit inside Myth very well at all. It also currently doesn't support YUV420 but that would not be difficult to add. After digging around in Myth though, I've thought it would probably be easier to integrate into ffmpeg instead of directly into Myth - at least for me. And its not too software-intensive but it may not work on a PIII. ___ mythtv-users mailing list mythtv-users@mythtv.org http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
Re: [mythtv-users] nonlinear 16:9 stretch?
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 ___ mythtv-users mailing list mythtv-users@mythtv.org http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
Re: [mythtv-users] nonlinear 16:9 stretch?
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. He's talking about stretching true 4:3 content, not letterboxed 4:3 content. Therefore, you don't want to stretch the vertical (otherwise, you're just doing a zoom--which is more appropriate for letterboxed 4:3 content, anyway). See the link that David posted: http://www.cnet.com/4520-7874_1-5140690-3.html solution 3 : Panoramic mode (the man with the fat hands...) Mike ___ mythtv-users mailing list mythtv-users@mythtv.org http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
RE: [mythtv-users] nonlinear 16:9 stretch?
> 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. ___ mythtv-users mailing list mythtv-users@mythtv.org http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
Re: [mythtv-users] nonlinear 16:9 stretch?
Robert Denier wrote: I spent a few minutes and tried to figure out a quick way to do this non linear stretch. I could maybe come up with something nicer later as for as a function to do the stretch, but the problem is this needs to be real time, and if it gets too fancy it takes significant resources. Assume input video is X horizontal pixels. The exact number doesn't matter, but for simplicity 480 will be assumed here. Assume further that you can 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] Depending on the true original horizontal pixel size one might have to adjust the video scaling parameters to make sure the center section has the right overall ratio. The advantages to such an approach are 1) Very fast 2) Somestimes just repeating pixels makes things less blurry, but thats usualy not an issue. The disadvantages 1) It is a non smooth way to stretch an image. Something bicubic or similar would be cleaner, at the expense of cpu time. 2) This may look poor in practice, although I suppose one would have to try it. It is just the simplest approach I could think of quickly to do this. And, since you're the one interested in this stretch mode, I vote that you do the tests. ;) You could easily make some test images with an image editor. Post the shots showing the original (4:3), the linear strech (16:9), and your new non-linear stretch (16:9). Mike ___ mythtv-users mailing list mythtv-users@mythtv.org http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
Re: [mythtv-users] nonlinear 16:9 stretch?
On 11/21/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: ... > > Currently I use the built in stretch mode on my TV to stretch 4:3 to 16:9. > It does a nonlinear stretch so the edges of the picture are stretched more > than the middle. Windows MCE has this feature too. > ... Yeah.. don't bother trying to get X to do this. X is a linear beast.. I have this mode on my 16:9 Sony and I love it as well. You loose just a tad of the top and bottom of the image (5 or 10 scan lines) and the non-linear stretch fills the screen with the rest. I have a similar setup as you do (myth, 9A60, 16:9 TV) and accomplished the same thing for my TV by using an alternate standard NTSC mode to send Live TV to the set. The TV is configured to automatically show standard 4:3 signals with the non-linear stretch, so my tv and cable look almost identical. I can see how this would be hard to do in software because you'd have to be scaling every frame in a way that's more computationally intense than just stretching or zooming linearly. I'm pretty sure it could be done on faster processors, though, or maybe with some non-linear OpenGL scaling or something. -- Eric Ladner ___ mythtv-users mailing list mythtv-users@mythtv.org http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
Re: [mythtv-users] nonlinear 16:9 stretch?
On 11/21/05, Robert Denier <[EMAIL PROTECTED]> wrote: On Monday 21 November 2005 02:14 pm, Cory Papenfuss wrote:> > Currently I use the built in stretch mode on my TV to stretch 4:3 to> > 16:9. It does a nonlinear stretch so the edges of the picture are > > stretched more than the middle. Windows MCE has this feature too.> >> > Before I burn an evening mucking with a working X config, i'd like to> > know if MythTV do this also, or does it stretch the entire picture > > evenly?>> I think I remember this thread coming up before. I really doubt> that you will find anything from within the X config that will allow you> to do that. Modelines are linear. Unless the specific video card driver > has a special mode for it (non that I'm aware of do), you're screwed.>> That should probably be done at the application (i.e. mythtv)> level. I don't think anyone has done it yet.> > -CoryWhy would you want this? Is there a screen shot somewhere showing whythis is useful? I'm just curious... I'm one of the people who started a thread on this about a year and a half ago. I have this feature on my Panasonic plasma display and *love* it. Basically, for 4:3 content, the picture is stretched to fill the 16:9 display but the middle 50% or so of the image is not stretched (much). Since many (most) programs have most of the action in the middle 50% of the image, this means that the main part of the image appears largely unadulterated, and yet the full 16:9 panorama effect is produced. Note that for sports, like hockey and football and especially auto racing, I turn this feature off because those programs often do make use of the entire image. Now the reason I would like MythTV or Linux/nVidia to support this is that my plasma monitor only supports this special mode in svideo or component inputs. The vga input only supports 16:9 linear stretch. At one time I wanted to use the vga input, and hence my question about whether mythtv or linux might support this. When this was discussed last year, I think people were generally saying that this would be computationally too expensive to implement in software, and so the matter was dropped. But I still think it is a great feature, and that there would be value in having it somehow. On the other hand, I've since gone with a vga-to-component adapter, so the issue no longer applies in my case. But if I ever buy a new 16:9 display that doesn't support this mode, then I would of course be interested in this again. Peter ___ mythtv-users mailing list mythtv-users@mythtv.org http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
Re: [mythtv-users] nonlinear 16:9 stretch?
On Monday 21 November 2005 03:20 pm, David wrote: > Robert Denier wrote: > >On Monday 21 November 2005 02:14 pm, Cory Papenfuss wrote: [snip] I spent a few minutes and tried to figure out a quick way to do this non linear stretch. I could maybe come up with something nicer later as for as a function to do the stretch, but the problem is this needs to be real time, and if it gets too fancy it takes significant resources. Assume input video is X horizontal pixels. The exact number doesn't matter, but for simplicity 480 will be assumed here. Assume further that you can 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] Depending on the true original horizontal pixel size one might have to adjust the video scaling parameters to make sure the center section has the right overall ratio. The advantages to such an approach are 1) Very fast 2) Somestimes just repeating pixels makes things less blurry, but thats usualy not an issue. The disadvantages 1) It is a non smooth way to stretch an image. Something bicubic or similar would be cleaner, at the expense of cpu time. 2) This may look poor in practice, although I suppose one would have to try it. It is just the simplest approach I could think of quickly to do this. -Robert ___ mythtv-users mailing list mythtv-users@mythtv.org http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
Re: [mythtv-users] nonlinear 16:9 stretch?
Robert Denier wrote: >On Monday 21 November 2005 02:14 pm, Cory Papenfuss wrote: > > >>>Currently I use the built in stretch mode on my TV to stretch 4:3 to >>>16:9. It does a nonlinear stretch so the edges of the picture are >>>stretched more than the middle. Windows MCE has this feature too. >>> >>>Before I burn an evening mucking with a working X config, i'd like to >>>know if MythTV do this also, or does it stretch the entire picture >>>evenly? >>> >>> >> I think I remember this thread coming up before. I really doubt >>that you will find anything from within the X config that will allow you >>to do that. Modelines are linear. Unless the specific video card driver >>has a special mode for it (non that I'm aware of do), you're screwed. >> >> That should probably be done at the application (i.e. mythtv) >>level. I don't think anyone has done it yet. >> >>-Cory >> >> > >Why would you want this? Is there a screen shot somewhere showing why >this is useful? I'm just curious... > > http://www.cnet.com/4520-7874_1-5140690-3.html solution 3 : Panoramic mode (the man with the fat hands...) >Now what I'd like to see is an easy minor zoon that compromises showing 4:3 >material on 16:9 sets. Perhaps you could split the difference between what >you would cut off to keep the aspect ratio correct, but reduce the size of >the black bars by half. Then again, I'm not sure if I'd use the feature that >much, until I had it. For some odd reason if I zoom much beyond the normal >fit of 4:3 on the screen now, it tends to corrupt things. Sometimes you >might want to do that do that to fit 16:9 source material that is showing on >a 4:3 channel on a 16:9 screen. I've never looked into the issue, but I >suspect it might be video card (ati) related. > > That's what it's good for :) David ___ mythtv-users mailing list mythtv-users@mythtv.org http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
Re: [mythtv-users] nonlinear 16:9 stretch?
On Monday 21 November 2005 02:14 pm, Cory Papenfuss wrote: > > Currently I use the built in stretch mode on my TV to stretch 4:3 to > > 16:9. It does a nonlinear stretch so the edges of the picture are > > stretched more than the middle. Windows MCE has this feature too. > > > > Before I burn an evening mucking with a working X config, i'd like to > > know if MythTV do this also, or does it stretch the entire picture > > evenly? > > I think I remember this thread coming up before. I really doubt > that you will find anything from within the X config that will allow you > to do that. Modelines are linear. Unless the specific video card driver > has a special mode for it (non that I'm aware of do), you're screwed. > > That should probably be done at the application (i.e. mythtv) > level. I don't think anyone has done it yet. > > -Cory Why would you want this? Is there a screen shot somewhere showing why this is useful? I'm just curious... Now what I'd like to see is an easy minor zoon that compromises showing 4:3 material on 16:9 sets. Perhaps you could split the difference between what you would cut off to keep the aspect ratio correct, but reduce the size of the black bars by half. Then again, I'm not sure if I'd use the feature that much, until I had it. For some odd reason if I zoom much beyond the normal fit of 4:3 on the screen now, it tends to corrupt things. Sometimes you might want to do that do that to fit 16:9 source material that is showing on a 4:3 channel on a 16:9 screen. I've never looked into the issue, but I suspect it might be video card (ati) related. -Robert ___ mythtv-users mailing list mythtv-users@mythtv.org http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
Re: [mythtv-users] nonlinear 16:9 stretch?
Currently I use the built in stretch mode on my TV to stretch 4:3 to 16:9. It does a nonlinear stretch so the edges of the picture are stretched more than the middle. Windows MCE has this feature too. Before I burn an evening mucking with a working X config, i'd like to know if MythTV do this also, or does it stretch the entire picture evenly? I think I remember this thread coming up before. I really doubt that you will find anything from within the X config that will allow you to do that. Modelines are linear. Unless the specific video card driver has a special mode for it (non that I'm aware of do), you're screwed. That should probably be done at the application (i.e. mythtv) level. I don't think anyone has done it yet. -Cory -- * * Cory Papenfuss* * Electrical Engineering candidate Ph.D. graduate student * * Virginia Polytechnic Institute and State University * * ___ mythtv-users mailing list mythtv-users@mythtv.org http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
[mythtv-users] nonlinear 16:9 stretch?
I currently have my mythfrontend connected to a 30" 16:9 HDTV via s-video. I'd like to use the compontent inputs on the TV using a a VGA->component transcoder (Audio Authority 9A60) to get a higer resolultion GUI and better picture quality. The only concern I have is the 16:9 stretch mode that MythTV has. Currently I use the built in stretch mode on my TV to stretch 4:3 to 16:9. It does a nonlinear stretch so the edges of the picture are stretched more than the middle. Windows MCE has this feature too. Before I burn an evening mucking with a working X config, i'd like to know if MythTV do this also, or does it stretch the entire picture evenly? ___ mythtv-users mailing list mythtv-users@mythtv.org http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users