Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: MythTV: Dev

Patch to autodetect 4:3 Zoom aspect ratio

 

 

First page Previous page 1 2 3 Next page Last page  View All MythTV dev RSS feed   Index | Next | Previous | View Threaded


mabo at mochc

Feb 21, 2008, 11:34 PM

Post #1 of 55 (5719 views)
Permalink
Patch to autodetect 4:3 Zoom aspect ratio

Hi!

I have written a patch for the release-0-20-fixes branch (svn
revision: 16162) that detects black bars on the top and bottom of the
frames. When that is detected it toggles to "Letterbox 4:3 Zoom". And
if no bars is detected it toggles back to "Letterbox Off".

I have only used it for a couple of days, so I guess there will be
some more tweaking to get it perfect.

Comments are welcome.
--
Mårten
Attachments: detectLetterbox.patch (6.28 KB)


mtdean at thirdcontact

Feb 21, 2008, 11:50 PM

Post #2 of 55 (5663 views)
Permalink
Re: Patch to autodetect 4:3 Zoom aspect ratio [In reply to]

On 02/22/2008 02:34 AM, Mårten Bohlin wrote:
> I have written a patch for the release-0-20-fixes branch (svn
> revision: 16162) that detects black bars on the top and bottom of the
> frames. When that is detected it toggles to "Letterbox 4:3 Zoom". And
> if no bars is detected it toggles back to "Letterbox Off".
>
> I have only used it for a couple of days, so I guess there will be
> some more tweaking to get it perfect.
>
> Comments are welcome.

Upgrading to 0.21-fixes and updating the patch would be a good thing (as
the zoom/aspect code has changed pretty significantly since 0.20-fixes).

Mike
_______________________________________________
mythtv-dev mailing list
mythtv-dev[at]mythtv.org
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev


pstehlik at sophics

Feb 21, 2008, 11:52 PM

Post #3 of 55 (5654 views)
Permalink
Re: Patch to autodetect 4:3 Zoom aspect ratio [In reply to]

Mårten Bohlin wrote:
> Hi!
>
> I have written a patch for the release-0-20-fixes branch (svn
> revision: 16162) that detects black bars on the top and bottom of the
> frames. When that is detected it toggles to "Letterbox 4:3 Zoom". And
> if no bars is detected it toggles back to "Letterbox Off".
>
> I have only used it for a couple of days, so I guess there will be
> some more tweaking to get it perfect.
>
> Comments are welcome.

This is very cool. Though the zoom modes changed a bit in 0.21 but that
will make it even easier probably. Great would be to extend this to
detect also black bars on left and right sides for automatic half and
full zoom on 16:9 displays :-)

Petr

_______________________________________________
mythtv-dev mailing list
mythtv-dev[at]mythtv.org
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev


mabo at mochc

Feb 22, 2008, 12:07 AM

Post #4 of 55 (5661 views)
Permalink
Re: Patch to autodetect 4:3 Zoom aspect ratio [In reply to]

On Fri, Feb 22, 2008 at 8:50 AM, Michael T. Dean
<mtdean[at]thirdcontact.com> wrote:
>
> On 02/22/2008 02:34 AM, Mårten Bohlin wrote:
> > I have written a patch for the release-0-20-fixes branch (svn
> > revision: 16162) that detects black bars on the top and bottom of the
> > frames. When that is detected it toggles to "Letterbox 4:3 Zoom". And
> > if no bars is detected it toggles back to "Letterbox Off".
> >
> > I have only used it for a couple of days, so I guess there will be
> > some more tweaking to get it perfect.
> >
> > Comments are welcome.
>
> Upgrading to 0.21-fixes and updating the patch would be a good thing (as
> the zoom/aspect code has changed pretty significantly since 0.20-fixes).
>
> Mike

OK. I will take a look at it.

Mårten
_______________________________________________
mythtv-dev mailing list
mythtv-dev[at]mythtv.org
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev


mabo at mochc

Feb 22, 2008, 5:22 AM

Post #5 of 55 (5646 views)
Permalink
Re: Patch to autodetect 4:3 Zoom aspect ratio [In reply to]

On Fri, Feb 22, 2008 at 8:52 AM, Petr Stehlik <pstehlik[at]sophics.cz> wrote:
>
> Mårten Bohlin wrote:
> > Hi!
> >
> > I have written a patch for the release-0-20-fixes branch (svn
> > revision: 16162) that detects black bars on the top and bottom of the
> > frames. When that is detected it toggles to "Letterbox 4:3 Zoom". And
> > if no bars is detected it toggles back to "Letterbox Off".
> >
> > I have only used it for a couple of days, so I guess there will be
> > some more tweaking to get it perfect.
> >
> > Comments are welcome.
>
> This is very cool. Though the zoom modes changed a bit in 0.21 but that
> will make it even easier probably. Great would be to extend this to
> detect also black bars on left and right sides for automatic half and
> full zoom on 16:9 displays :-)
>
> Petr
>

I am not sure what you mean. My code solves the problem for people
that have 16:9 displays and watch movies that has the 16:9 aspect
ratio, but are broadcasted in 4:3. So I guess this is what you want to
do?

By the way, does anybody have any good pointers on how to run mythtv
0.21 without messing up my current 0.20 installation. Or does anybody
has a good VMware image for developing mythtv that I could copy?
_______________________________________________
mythtv-dev mailing list
mythtv-dev[at]mythtv.org
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev


pstehlik at sophics

Feb 22, 2008, 5:53 AM

Post #6 of 55 (5647 views)
Permalink
Re: Patch to autodetect 4:3 Zoom aspect ratio [In reply to]

Mårten Bohlin wrote:
>> This is very cool. Though the zoom modes changed a bit in 0.21 but that
>> will make it even easier probably. Great would be to extend this to
>> detect also black bars on left and right sides for automatic half and
>> full zoom on 16:9 displays :-)
>
> I am not sure what you mean. My code solves the problem for people
> that have 16:9 displays and watch movies that has the 16:9 aspect
> ratio, but are broadcasted in 4:3. So I guess this is what you want to
> do?

I have a 16:9 display but most movies are broadcasted in 4:3 (with
correct aspect ratio, I never seen a movie with incorrect aspect ratio)
so they are pillarboxed. A good compromise for pillarbox on 16:9 display
is "half zoom" AKA 14:9 zoom that maintains the aspect ratio and removes
part of the black bars. The 14:9 zoom could be enabled automagically if
the left&right side black bars were detected...

Actually it should be detected by checking the source aspect ratio, not
by checking the black bars, sorry (as the black bars are not really
there in the source material). I tried to add such code there but for
some reason it works for live TV only, not for recordings..

But sometimes 16:9 movie is broadcasted in 4:3 (still with correct
aspect ratio) by adding top&bottom black bars (letterbox) so on 16:9
display it is then windowboxed. The code for detecting black bars could
see this and enable full zoom to get rid of the black bars entirely.

Petr

_______________________________________________
mythtv-dev mailing list
mythtv-dev[at]mythtv.org
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev


stuart at tase

Feb 22, 2008, 5:57 AM

Post #7 of 55 (5648 views)
Permalink
Re: Patch to autodetect 4:3 Zoom aspect ratio [In reply to]

On Friday 22 February 2008 13:22:11 Mårten Bohlin wrote:
> By the way, does anybody have any good pointers on how to run mythtv
> 0.21 without messing up my current 0.20 installation. Or does anybody
> has a good VMware image for developing mythtv that I could copy?

Just upgrade your existing install to 0.21-fixes, it would probably save you a
lot of trouble.

0.21-fixes is probably more stable than 0.20-fixes for most people. I can't
guarantee that you will be one of those, but when you run 0.21 for the first
time it will automatically backup your database, so if you need to revert it
shouldn't be too difficult. 0.21 will be released in a short while anyway, so
it's not as though 0.21-fixes is a development or unstable branch.
--
Stuart Morgan
_______________________________________________
mythtv-dev mailing list
mythtv-dev[at]mythtv.org
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev


stuart at tase

Feb 22, 2008, 6:06 AM

Post #8 of 55 (5643 views)
Permalink
Re: Patch to autodetect 4:3 Zoom aspect ratio [In reply to]

On Friday 22 February 2008 13:53:17 Petr Stehlik wrote:
> I have a 16:9 display but most movies are broadcasted in 4:3 (with
> correct aspect ratio, I never seen a movie with incorrect aspect ratio)
> so they are pillarboxed. A good compromise for pillarbox on 16:9 display
> is "half zoom" AKA 14:9 zoom that maintains the aspect ratio and removes
> part of the black bars. The 14:9 zoom could be enabled automagically if
> the left&right side black bars were detected...

Petr, but the pillarboxing is done by mythtv? (OSD isn't full screen?) So it's
the letterboxing which needs to be detected since that's the bit which occurs
in the stream.

16:9 content broadcast at 4:3 looks like this in mythtv:
http://miffteevee.co.uk/imagebin/letterbox.jpg

The bars above/below the image are part of the original stream. The bars at
the left/right are added by mythtv to preserve the aspect ratio. To correctly
decide that this needs the 'half' or 'full' fill modes we need to detect the
bars top and bottom.

--
Stuart Morgan
_______________________________________________
mythtv-dev mailing list
mythtv-dev[at]mythtv.org
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev


stuart at tase

Feb 22, 2008, 6:13 AM

Post #9 of 55 (5650 views)
Permalink
Re: Patch to autodetect 4:3 Zoom aspect ratio [In reply to]

On Friday 22 February 2008 14:06:17 Stuart Morgan wrote:
> 16:9 content broadcast at 4:3 looks like this in mythtv:
> http://miffteevee.co.uk/imagebin/letterbox.jpg

Just to complete the mix -
Non-widescreen (4:3) content:
http://miffteevee.co.uk/imagebin/fourthree.jpg

Proper widescreen:
http://miffteevee.co.uk/imagebin/widescreen.jpg
--
Stuart Morgan
_______________________________________________
mythtv-dev mailing list
mythtv-dev[at]mythtv.org
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev


mabo at mochc

Feb 22, 2008, 6:24 AM

Post #10 of 55 (5637 views)
Permalink
Re: Patch to autodetect 4:3 Zoom aspect ratio [In reply to]

On Fri, Feb 22, 2008 at 2:53 PM, Petr Stehlik <pstehlik[at]sophics.cz> wrote:
> Mårten Bohlin wrote:
> >> This is very cool. Though the zoom modes changed a bit in 0.21 but that
> >> will make it even easier probably. Great would be to extend this to
> >> detect also black bars on left and right sides for automatic half and
> >> full zoom on 16:9 displays :-)
> >
>
> > I am not sure what you mean. My code solves the problem for people
> > that have 16:9 displays and watch movies that has the 16:9 aspect
> > ratio, but are broadcasted in 4:3. So I guess this is what you want to
> > do?
>
> I have a 16:9 display but most movies are broadcasted in 4:3 (with
> correct aspect ratio, I never seen a movie with incorrect aspect ratio)
> so they are pillarboxed. A good compromise for pillarbox on 16:9 display
> is "half zoom" AKA 14:9 zoom that maintains the aspect ratio and removes
> part of the black bars. The 14:9 zoom could be enabled automagically if
> the left&right side black bars were detected...

Do you always want to switch to "half zoom" when you have a 16:9
screen? I usually want to look at content that was produced in 4:3
with the pillarbox. But I use "half zoom" sometimes but I think I want
to switch to that mode manually.

>
> Actually it should be detected by checking the source aspect ratio, not
> by checking the black bars, sorry (as the black bars are not really
> there in the source material). I tried to add such code there but for
> some reason it works for live TV only, not for recordings..

My patch works both for recordings and live TV.

>
> But sometimes 16:9 movie is broadcasted in 4:3 (still with correct
> aspect ratio) by adding top&bottom black bars (letterbox) so on 16:9
> display it is then windowboxed. The code for detecting black bars could
> see this and enable full zoom to get rid of the black bars entirely.
>

This is what my patch is doing today.
_______________________________________________
mythtv-dev mailing list
mythtv-dev[at]mythtv.org
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev


pstehlik at sophics

Feb 22, 2008, 6:28 AM

Post #11 of 55 (5642 views)
Permalink
Re: Patch to autodetect 4:3 Zoom aspect ratio [In reply to]

Stuart Morgan wrote:
> On Friday 22 February 2008 13:53:17 Petr Stehlik wrote:
>> I have a 16:9 display but most movies are broadcasted in 4:3 (with
>> correct aspect ratio, I never seen a movie with incorrect aspect ratio)
>> so they are pillarboxed. A good compromise for pillarbox on 16:9 display
>> is "half zoom" AKA 14:9 zoom that maintains the aspect ratio and removes
>> part of the black bars. The 14:9 zoom could be enabled automagically if
>> the left&right side black bars were detected...
>
> Petr, but the pillarboxing is done by mythtv

I realized that while writing that paragraph so I added second paragraph
where I explained it to myself and others :-) You probably couldn't
continue reading after the 1st one (and I am not surprised :-)

> 16:9 content broadcast at 4:3 looks like this in mythtv:
> http://miffteevee.co.uk/imagebin/letterbox.jpg

Right, wikipedia calls this "windowboxed" but that's only how it looks
on 16:9 display, the stream itself is just pillarboxed.

> The bars above/below the image are part of the original stream. The bars at
> the left/right are added by mythtv to preserve the aspect ratio. To correctly
> decide that this needs the 'half' or 'full' fill modes we need to detect the
> bars top and bottom.

You're right, so Mårten please ignore the left&right black bars
detection idea :-)

Petr

_______________________________________________
mythtv-dev mailing list
mythtv-dev[at]mythtv.org
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev


pstehlik at sophics

Feb 22, 2008, 6:34 AM

Post #12 of 55 (5637 views)
Permalink
Re: Patch to autodetect 4:3 Zoom aspect ratio [In reply to]

Mårten Bohlin wrote:
>> I have a 16:9 display but most movies are broadcasted in 4:3 (with
>> correct aspect ratio, I never seen a movie with incorrect aspect ratio)
>> so they are pillarboxed. A good compromise for pillarbox on 16:9 display
>> is "half zoom" AKA 14:9 zoom that maintains the aspect ratio and removes
>> part of the black bars. The 14:9 zoom could be enabled automagically if
>> the left&right side black bars were detected...
>
> Do you always want to switch to "half zoom" when you have a 16:9
> screen? I usually want to look at content that was produced in 4:3
> with the pillarbox. But I use "half zoom" sometimes but I think I want
> to switch to that mode manually.

it's matter of personal preference. I got used to 14:9 zoom because I
hate the wide black bars so I switch everything to 14:9 unless there are
subtitles that could get below the bottom of screen.

In other words the automatic zoom for pillarbox would have to be
configurable in myth...

>> But sometimes 16:9 movie is broadcasted in 4:3 (still with correct
>> aspect ratio) by adding top&bottom black bars (letterbox) so on 16:9
>> display it is then windowboxed. The code for detecting black bars could
>> see this and enable full zoom to get rid of the black bars entirely.
>
> This is what my patch is doing today.

Great, then the only missing thing is to adapt it to 0.21 zoom modes :-)

Petr

_______________________________________________
mythtv-dev mailing list
mythtv-dev[at]mythtv.org
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev


mark.kendall at gmail

Feb 22, 2008, 7:06 AM

Post #13 of 55 (5637 views)
Permalink
Re: Patch to autodetect 4:3 Zoom aspect ratio [In reply to]

On 22/02/2008, Mårten Bohlin <mabo[at]mochc.net> wrote:
> Hi!
>
> I have written a patch for the release-0-20-fixes branch (svn
> revision: 16162) that detects black bars on the top and bottom of the
> frames. When that is detected it toggles to "Letterbox 4:3 Zoom". And
> if no bars is detected it toggles back to "Letterbox Off".

> Comments are welcome.

Mårten

What about material that is (for example) 2.35:1 displayed on a
widescreen (16:9) display? (i.e. 'super' widescreen dvds) If you
updated your patch for trunk, you would apply the correct 'zoom'
(either half or full) but the scan lines you're using may not work
(i.e. they might still fall within the actual content - though I
haven't checked).

Also, is the letterbox detection robust enough? As far as I can tell,
it's taking a very limited sample set and doesn't check for
consistency within the 'actual' frame content. So how would it react
to a dark sequence for example? Would it be better to check for 'dark'
letterboxing and 'non-dark' content?

My apologies if my quick scan of your code has missed something.

Regards

Mark
_______________________________________________
mythtv-dev mailing list
mythtv-dev[at]mythtv.org
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev


mabo at mochc

Feb 25, 2008, 4:44 AM

Post #14 of 55 (5585 views)
Permalink
Re: Patch to autodetect 4:3 Zoom aspect ratio [In reply to]

On Fri, Feb 22, 2008 at 8:50 AM, Michael T. Dean
<mtdean[at]thirdcontact.com> wrote:
>
> On 02/22/2008 02:34 AM, Mårten Bohlin wrote:
> > I have written a patch for the release-0-20-fixes branch (svn
> > revision: 16162) that detects black bars on the top and bottom of the
> > frames. When that is detected it toggles to "Letterbox 4:3 Zoom". And
> > if no bars is detected it toggles back to "Letterbox Off".
> >
> > I have only used it for a couple of days, so I guess there will be
> > some more tweaking to get it perfect.
> >
> > Comments are welcome.
>
> Upgrading to 0.21-fixes and updating the patch would be a good thing (as
> the zoom/aspect code has changed pretty significantly since 0.20-fixes).
>
> Mike

Hi!

I have now updated my patch to the release-0-21-fixes branch (svn
revision: 16236). It now switches between automatically between the
fill modes "Full" and "Off".

If this patch is a candidate to go into a future release I could make
it possible to turn the auto detection on and off from the playback
settings.

Mårten
Attachments: detectLetterbox-21fixes.patch (6.79 KB)


mabo at mochc

Feb 25, 2008, 5:17 AM

Post #15 of 55 (5579 views)
Permalink
Re: Patch to autodetect 4:3 Zoom aspect ratio [In reply to]

On Fri, Feb 22, 2008 at 4:06 PM, Mark Kendall <mark.kendall[at]gmail.com> wrote:
> On 22/02/2008, Mårten Bohlin <mabo[at]mochc.net> wrote:
> > Hi!
> >
> > I have written a patch for the release-0-20-fixes branch (svn
> > revision: 16162) that detects black bars on the top and bottom of the
> > frames. When that is detected it toggles to "Letterbox 4:3 Zoom". And
> > if no bars is detected it toggles back to "Letterbox Off".
>
> > Comments are welcome.
>
> Mårten
>
> What about material that is (for example) 2.35:1 displayed on a
> widescreen (16:9) display? (i.e. 'super' widescreen dvds) If you
> updated your patch for trunk, you would apply the correct 'zoom'
> (either half or full) but the scan lines you're using may not work
> (i.e. they might still fall within the actual content - though I
> haven't checked).

I have not tested with content 2.35:1 content, but if it does not work
as it is there is just som minor adjustments of the limits to get it
to fill to full zoom.

>
> Also, is the letterbox detection robust enough? As far as I can tell,
> it's taking a very limited sample set and doesn't check for
> consistency within the 'actual' frame content. So how would it react
> to a dark sequence for example? Would it be better to check for 'dark'
> letterboxing and 'non-dark' content?
>
> My apologies if my quick scan of your code has missed something.
>
> Regards
>
> Mark
>
>
> _______________________________________________

Yes it only looks at two lines on the screen for performance reasons,
but it also checks that it seems to be vertical lines on the top and
bottom of the screen before it makes a switch to the detected zoom mode. So yes
I find it very robust, I have used it daily for over a week now and
are happy with it.

It only switches if it finds out that it should switch in 3 frames in
a row. So it should not switch because of noise in the picture.
Sometimes the switch is delayed if the 'actual' content is dark, since
it can not detect where the content starts, but I have never seen that
it has switched to full zoom because of dark content. And that is
because it searches for a very straight lines in the picture.

A situation that it does not handle today is if there is 16:9 content
and then subtitles in the black bar on the bottom. The text will
probably not be visible. But I do not think that it is very common to
do that any more. And you can always turn off the full zoom manually.

Mårten
_______________________________________________
mythtv-dev mailing list
mythtv-dev[at]mythtv.org
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev


mabo at mochc

Feb 26, 2008, 4:13 AM

Post #16 of 55 (5574 views)
Permalink
Re: Patch to autodetect 4:3 Zoom aspect ratio [In reply to]

On Mon, Feb 25, 2008 at 2:17 PM, Mårten Bohlin <mabo[at]mochc.net> wrote:
> On Fri, Feb 22, 2008 at 4:06 PM, Mark Kendall <mark.kendall[at]gmail.com> wrote:
>
> > On 22/02/2008, Mårten Bohlin <mabo[at]mochc.net> wrote:
> > > Hi!
> > >
> > > I have written a patch for the release-0-20-fixes branch (svn
> > > revision: 16162) that detects black bars on the top and bottom of the
> > > frames. When that is detected it toggles to "Letterbox 4:3 Zoom". And
> > > if no bars is detected it toggles back to "Letterbox Off".
> >
> > > Comments are welcome.
> >
> > Mårten
> >
> > What about material that is (for example) 2.35:1 displayed on a
> > widescreen (16:9) display? (i.e. 'super' widescreen dvds) If you
> > updated your patch for trunk, you would apply the correct 'zoom'
> > (either half or full) but the scan lines you're using may not work
> > (i.e. they might still fall within the actual content - though I
> > haven't checked).
>
> I have not tested with content 2.35:1 content, but if it does not work
> as it is there is just som minor adjustments of the limits to get it
> to fill to full zoom.
>
>
> >
> > Also, is the letterbox detection robust enough? As far as I can tell,
> > it's taking a very limited sample set and doesn't check for
> > consistency within the 'actual' frame content. So how would it react
> > to a dark sequence for example? Would it be better to check for 'dark'
> > letterboxing and 'non-dark' content?
> >
> > My apologies if my quick scan of your code has missed something.
> >
> > Regards
> >
> > Mark
> >
> >
> > _______________________________________________
>
>
> Yes it only looks at two lines on the screen for performance reasons,
> but it also checks that it seems to be vertical lines on the top and
> bottom of the screen before it makes a switch to the detected zoom mode. So yes
> I find it very robust, I have used it daily for over a week now and are happy with it.

I meant horizontal lines. Not vertical.

>
> It only switches if it finds out that it should switch in 3 frames in
> a row.

And here I meant three consecutive frames. ("in a row" is a Swedish expression)

/Mårten
_______________________________________________
mythtv-dev mailing list
mythtv-dev[at]mythtv.org
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev


memoryguy at gmail

Feb 26, 2008, 6:09 AM

Post #17 of 55 (5567 views)
Permalink
Re: Patch to autodetect 4:3 Zoom aspect ratio [In reply to]

On 2/25/08, Mårten Bohlin <mabo[at]mochc.net> wrote:
>
> Hi!
>
> I have now updated my patch to the release-0-21-fixes branch (svn
> revision: 16236). It now switches between automatically between the
> fill modes "Full" and "Off".
>
> If this patch is a candidate to go into a future release I could make
> it possible to turn the auto detection on and off from the playback
> settings.
>

Hi,

I gave this a whirl last night on SVN trunk (which I think would be
close enough to 0-21-fixes) and I think it said it applied cleanly,
but when I watch a recording it doesn't do anything. Have I forgotten
to do some extra step? I was under the impression it should be enabled
by default?

I did see that there is a new, selected, option in the Adjust Fill
menu, "Autodetect", so I assume at least part of the patch worked ;-)

I didn't get to play with it much last night because it was late and I
needed to get to bed. I'll try to play again tonight.

My source is only analog cable, which I believe is always broadcast in
4:3. Thus, I get pillarboxing all the time (bars on the sides) on my
widescreen TV. Sometimes shows are letterboxed, which is embedded in
the broadcast. That's where the Fill mode is useful. As I understand,
your patch should detect these shows and adjust the Fill Mode setting
automatically. Am I right?

I saw that the patch has some "playback" verbose logging, so I'll try
turning that on and see what it says.

I also noticed that at least some shows have the station logo
overlapping the black bars. I wonder if that could be what's throwing
off the detector?

In any case, this patch looks promising, and is certainly a nifty
little feature I'd love to have :)

--
aaron

"Oh oh oh. I'm incoherent with excitement. Please tell me what fascinating
bit of badger-sputumly inconsequential trivia you will assail me with next."
-- Arthur Dent
_______________________________________________
mythtv-dev mailing list
mythtv-dev[at]mythtv.org
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev


mabo at mochc

Feb 26, 2008, 7:12 AM

Post #18 of 55 (5562 views)
Permalink
Re: Patch to autodetect 4:3 Zoom aspect ratio [In reply to]

On Tue, Feb 26, 2008 at 3:09 PM, aaron <memoryguy[at]gmail.com> wrote:
> On 2/25/08, Mårten Bohlin <mabo[at]mochc.net> wrote:
> >
> > Hi!
> >
> > I have now updated my patch to the release-0-21-fixes branch (svn
> > revision: 16236). It now switches between automatically between the
> > fill modes "Full" and "Off".
> >
> > If this patch is a candidate to go into a future release I could make
> > it possible to turn the auto detection on and off from the playback
> > settings.
> >
>
> Hi,
>
> I gave this a whirl last night on SVN trunk (which I think would be
> close enough to 0-21-fixes) and I think it said it applied cleanly,
> but when I watch a recording it doesn't do anything. Have I forgotten
> to do some extra step? I was under the impression it should be enabled
> by default?
>
> I did see that there is a new, selected, option in the Adjust Fill
> menu, "Autodetect", so I assume at least part of the patch worked ;-)
>
> I didn't get to play with it much last night because it was late and I
> needed to get to bed. I'll try to play again tonight.
>
> My source is only analog cable, which I believe is always broadcast in
> 4:3. Thus, I get pillarboxing all the time (bars on the sides) on my
> widescreen TV. Sometimes shows are letterboxed, which is embedded in
> the broadcast. That's where the Fill mode is useful. As I understand,
> your patch should detect these shows and adjust the Fill Mode setting
> automatically. Am I right?
>
> I saw that the patch has some "playback" verbose logging, so I'll try
> turning that on and see what it says.
>
> I also noticed that at least some shows have the station logo
> overlapping the black bars. I wonder if that could be what's throwing
> off the detector?
>
> In any case, this patch looks promising, and is certainly a nifty
> little feature I'd love to have :)
>
> --
> aaron
>
> "Oh oh oh. I'm incoherent with excitement. Please tell me what fascinating
> bit of badger-sputumly inconsequential trivia you will assail me with next."
> -- Arthur Dent
>
>

Yes it should be enabled by default and the logos should in most cases
be outside of the detection area. But I had to adjust the detection
limits a couple of times to get it to work with all of my channels. So
my guess that it is some more adjustments to e done. For instance your
black bars might not be black enough.

If you could make a sort recording that I could download, I could have
a look at it. (If you dont make the adjustments yourself).

If you do not get any output with the verboseflag you could try to
switch to half zoom and then activate the autodetection again from the
menu. That should make it to switch to either Off or Full and then log
why it did that.

I am also thinking about adding a debug mode where you get visual feed
back on where it has detected the letterbox edge, and where the limit
to switch to a diferent mode are.

/Mårten
_______________________________________________
mythtv-dev mailing list
mythtv-dev[at]mythtv.org
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev


memoryguy at gmail

Feb 26, 2008, 7:54 AM

Post #19 of 55 (5562 views)
Permalink
Re: Patch to autodetect 4:3 Zoom aspect ratio [In reply to]

On 2/26/08, Mårten Bohlin <mabo[at]mochc.net> wrote:
>
> Yes it should be enabled by default and the logos should in most cases
> be outside of the detection area. But I had to adjust the detection
> limits a couple of times to get it to work with all of my channels. So
> my guess that it is some more adjustments to e done. For instance your
> black bars might not be black enough.

Okay, if other stuff doesn't work, I'll try taking a closer look at
the code and see if I can figure out how to tweak stuff. I can code,
for sure, but video/image processing algorithms often goes over my
head.... :)

Hm, just had a thought... I'm in NTSC-land (Canada). Could the
difference in resolution from PAL be a factor here?

>
> If you could make a sort recording that I could download, I could have
> a look at it. (If you dont make the adjustments yourself).

I'll look into doing this if I can't make progress on my own.

>
> If you do not get any output with the verboseflag you could try to
> switch to half zoom and then activate the autodetection again from the
> menu. That should make it to switch to either Off or Full and then log
> why it did that.

Ah, excellent idea. I'll give that a try. I must have been tired last
night; it didn't occur to me to try that.



--
aaron

"Oh oh oh. I'm incoherent with excitement. Please tell me what fascinating
bit of badger-sputumly inconsequential trivia you will assail me with next."
-- Arthur Dent
_______________________________________________
mythtv-dev mailing list
mythtv-dev[at]mythtv.org
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev


mark.buechler at gmail

Feb 26, 2008, 9:21 AM

Post #20 of 55 (5571 views)
Permalink
Re: Patch to autodetect 4:3 Zoom aspect ratio [In reply to]

Hi

On Tue, Feb 26, 2008 at 10:54 AM, aaron <memoryguy[at]gmail.com> wrote:

> On 2/26/08, Mårten Bohlin <mabo[at]mochc.net> wrote:
> >
> > Yes it should be enabled by default and the logos should in most cases
> > be outside of the detection area. But I had to adjust the detection
> > limits a couple of times to get it to work with all of my channels. So
> > my guess that it is some more adjustments to e done. For instance your
> > black bars might not be black enough.
>
> Okay, if other stuff doesn't work, I'll try taking a closer look at
> the code and see if I can figure out how to tweak stuff. I can code,
> for sure, but video/image processing algorithms often goes over my
> head.... :)
>
> Hm, just had a thought... I'm in NTSC-land (Canada). Could the
> difference in resolution from PAL be a factor here?
>

I would imagine what would have more of an effect is black in PAL vs. black
in NTSC.


>
> >
> > If you could make a sort recording that I could download, I could have
> > a look at it. (If you dont make the adjustments yourself).
>
> I'll look into doing this if I can't make progress on my own.
>
> >
> > If you do not get any output with the verboseflag you could try to
> > switch to half zoom and then activate the autodetection again from the
> > menu. That should make it to switch to either Off or Full and then log
> > why it did that.
>
> Ah, excellent idea. I'll give that a try. I must have been tired last
> night; it didn't occur to me to try that.
>
>
>
> --
> aaron
>
> "Oh oh oh. I'm incoherent with excitement. Please tell me what fascinating
> bit of badger-sputumly inconsequential trivia you will assail me with
> next."
> -- Arthur Dent
> _______________________________________________
> mythtv-dev mailing list
> mythtv-dev[at]mythtv.org
> http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev
>


mabo at mochc

Feb 26, 2008, 10:12 AM

Post #21 of 55 (5567 views)
Permalink
Re: Patch to autodetect 4:3 Zoom aspect ratio [In reply to]

> Hm, just had a thought... I'm in NTSC-land (Canada). Could the
> difference in resolution from PAL be a factor here?

I have tried to write the code so it should not matter. But you never know :)

/Mårten
_______________________________________________
mythtv-dev mailing list
mythtv-dev[at]mythtv.org
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev


mark.buechler at gmail

Feb 26, 2008, 4:48 PM

Post #22 of 55 (5543 views)
Permalink
Re: Patch to autodetect 4:3 Zoom aspect ratio [In reply to]

Hi

On Tue, Feb 26, 2008 at 1:12 PM, Mårten Bohlin <mabo[at]mochc.net> wrote:

> > Hm, just had a thought... I'm in NTSC-land (Canada). Could the
> > difference in resolution from PAL be a factor here?
>
> I have tried to write the code so it should not matter. But you never know
> :)
>

On the two sources I have, sourceAspect is 11 and 15, though the second I
still haven't been able to get working. It's a DVB recording. I'll play with
it a bit more tomorrow.


> /Mårten
> _______________________________________________
> mythtv-dev mailing list
> mythtv-dev[at]mythtv.org
> http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev
>


- Mark.


mark.buechler at gmail

Feb 26, 2008, 4:58 PM

Post #23 of 55 (5613 views)
Permalink
Re: Patch to autodetect 4:3 Zoom aspect ratio [In reply to]

Hi.

On Tue, Feb 26, 2008 at 7:48 PM, Mark Buechler <mark.buechler[at]gmail.com>
wrote:

> Hi
>
> On Tue, Feb 26, 2008 at 1:12 PM, Mårten Bohlin <mabo[at]mochc.net> wrote:
>
> > > Hm, just had a thought... I'm in NTSC-land (Canada). Could the
> > > difference in resolution from PAL be a factor here?
> >
> > I have tried to write the code so it should not matter. But you never
> > know :)
> >
>
> On the two sources I have, sourceAspect is 11 and 15, though the second I
> still haven't been able to get working. It's a DVB recording. I'll play with
> it a bit more tomorrow.
>

After playing a bit more with the threshold, it seems a value of 15 and my
widescreen content is seen as 4x3 and a value of 16 it never seems to find
the edges at all (neither 4x3 nor 16x9 content found).


>
> > /Mårten
> > _______________________________________________
> > mythtv-dev mailing list
> > mythtv-dev[at]mythtv.org
> > http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev
> >
>
>
> - Mark.
>

- Mark.


memoryguy at gmail

Feb 26, 2008, 8:20 PM

Post #24 of 55 (5540 views)
Permalink
Re: Patch to autodetect 4:3 Zoom aspect ratio [In reply to]

On Tue, Feb 26, 2008 at 7:58 PM, Mark Buechler <mark.buechler[at]gmail.com> wrote:
> > On the two sources I have, sourceAspect is 11 and 15, though the second I
> still haven't been able to get working. It's a DVB recording. I'll play with
> it a bit more tomorrow.
> >
>
> After playing a bit more with the threshold, it seems a value of 15 and my
> widescreen content is seen as 4x3 and a value of 16 it never seems to find
> the edges at all (neither 4x3 nor 16x9 content found).

Doh, you beat me to it :)

I added some extra logging and found that it was always exiting
because the sourceAspect was out of range. I did the calculation
(width*10 / height) and got 15.... 720*10 / 480 = 15

I updated the if() condition from 14 to 15 and then it magically
started working. It's pretty neat! :)

Although it's not perfect. It *seems* (haven't played enough, and it's
time for bed...) that the case where the channel logo partially covers
the black bar it fails to detect that it's letterboxed.

I'll still try to play with it some more, but so far I like it :)

It is kinda funny to see it jump back and forth in the middle of commercials =)


--
aaron

"Oh oh oh. I'm incoherent with excitement. Please tell me what fascinating
bit of badger-sputumly inconsequential trivia you will assail me with next."
-- Arthur Dent
_______________________________________________
mythtv-dev mailing list
mythtv-dev[at]mythtv.org
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev


memoryguy at gmail

Feb 27, 2008, 5:15 AM

Post #25 of 55 (5525 views)
Permalink
Re: Patch to autodetect 4:3 Zoom aspect ratio [In reply to]

On 2/26/08, aaron <memoryguy[at]gmail.com> wrote:
>
> Although it's not perfect. It *seems* (haven't played enough, and it's
> time for bed...) that the case where the channel logo partially covers
> the black bar it fails to detect that it's letterboxed.
>

Okay, I tried a couple more videos and you were right, Marten (please
forgive my spelling, I don't know how to enter the correct "a")

The detection does not get fooled by the channel logo, nor the rating
logo (that is, the giant "PG", "G", etc) up the top left corner.
Excellent!

But it's still not detecting properly for some recordings. In my case,
an episode of Stargate Atlantis stays in "Off" mode, but then switches
during the commercial break when the commercials are letterboxed. And
on an episode of The Office it keeps jumping back and forth during the
episode.

The bars on The Office look (to me) about as dark as other shows that
don't have a problem. Stargate's boxes are a little lighter, but I
didn't think they were *that* much lighter ... they're still darker
than the "black0" pillarbox colour.

When I get a chance I'll try digging into the code a bit more. Alas,
my free time is often very limited. I *may* get a chance this
weekend....

But, on a positive note, when it does work correctly it's a great feature :)

--
aaron

"Oh oh oh. I'm incoherent with excitement. Please tell me what fascinating
bit of badger-sputumly inconsequential trivia you will assail me with next."
-- Arthur Dent
_______________________________________________
mythtv-dev mailing list
mythtv-dev[at]mythtv.org
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev

First page Previous page 1 2 3 Next page Last page  View All MythTV dev RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact lists@gossamer-threads.com
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.