[mythtv] automatic 14:9 or 4:3 zoom based on black bars detection?

Petr Stehlik pstehlik at sophics.cz
Sun Jun 25 21:40:33 UTC 2006

Daniel Kristjansson píše v Ne 25. 06. 2006 v 16:51 -0400:
> > 2/ would be
> > - no zoom
> > - partial zoom (currently named 14:9)
> > - max zoom (currently named "4:3 Zoom" or "16:9 Zoom")
> Yep, you wouldn't need separate "4:3 Zoom" and "16:9 Zoom" anymore.
> There is also "Fill" which keeps the proper aspect ratio but cuts
> off some of the vertical or horizontal part of the image, would
> probably put that here as well.
> > 3/ would be
> > - keep original
> > - fill the screen ignoring the original aspect ratio
> > - I could think of "fill the screen vertically while keeping the aspect
> > ratio" and "fill the screen horizontally" but that's basically what the
> > "4:3 zoom is trying to achieve", I think, so it could be part of the
> > proper zooming.
> I guess I should have read this first. There are really two fill modes,
> one which cuts off a portion of the image and one which screws with the
> aspect ratio but keeps the whole image, I would put the first in the
> proper zoom list, and the latter in the aspect ratio list.

the former is basically the 'max zoom' - when the width of 4:3 source
fills the width of widescreen display.

Regarding the GUI part of this separation: I think the 'proper' and
'improper' zoom modes actually belong together into one menu - the only
difference is that the improper zoom (the one that screws the AR) is not
likely going to be part of my proposed "automatic zoom mode setting
based on AR and black bar detection".

So we have three items for new Aspect Ratio Override menu:
- keep original
- set 4:3
- set 16:9

...and four items for Zoom mode menu: 
- keep original
- half zoom (7/6 factor zoom, called "14:9 Zoom" by TV mfgs)
- full zoom (currently 4/3 factor zoom, called "4:3" resp. "16:9")
- and full fill zoom (screwed AR)

If we had the black bars detection working then this could be extended
with "full height fill zoom" when top&bottom bars would be gone, and the
hardcoded "full (4/3) zoom" could be replaced with "all black bars gone
zoom" :-)

> > BTW: a note to current 'change aspect ratio' setting in MythTV: Myth
> > detects all changes in aspect ratio both when changing channels and
> > in-channel changes perfectly but as soon as I select say "4:3 Zoom" then
> > this zoom is preset even when I switch to another channel that is 16:9,
> > for example. I think it shouldn't be this way - when I go to channel
> > with different AR the zoom should go back to default, I think.
> Yes, this is because "4:3 Zoom" is both forcing the aspect ratio
> to 4:3 and performing the full zoom function. If you separate
> these out then you can apply just the zoom

Well I doubt the zoom should be applied across all channels. Or maybe
it's matter of taste. My only concern now is to get rid of black bars -
and that's needed only on channels that broadcast in a different AR than
my TV has. IOW, I don't need Zoom on 16:9 movie when I have 16:9 TV but
maybe someone feels it differently.

> Or you could have the zoom only apply when the video is using a particular aspect ratio.

that's exactly what I want - to apply (automatically pre-set) the 14:9
zoom on all 4:3 video.

> > so it would have to be preprocessed like the commercial detection. Hmm.
> > Maybe in the almost-real-time mode it would be fine. But since I don't
> > use the commflagging yet I am not going to work on this.
> Well it could be done on playback, but you would need to sample the
> frames every once in a while (i.e. starting a separate decoding
> thread when using something like X11 XvMC of Macintosh CoreAVC)
> and you would need to keep running averages, throw out outliers,
> etc. It would be much more complicated. With real-time commercial
> flagging working almost perfectly it doesn't make much sense to
> go that route. Especially since it could be made to work in LiveTV
> mode with just a few minor changes.

I understood and agreed. My only problem is that I don't use the
commflagging at all (yet). I somehow didn't setup my IR so that I was
able to actually skip the flagged commercials so I didn't start the
commflagging yet. I might find it great when I set up my IR properly.


More information about the mythtv-dev mailing list