[mythtv] Ticket #4872: Detect if video is letterboxed and switch to corect fill mode

Mårten Bohlin mabo at mochc.net
Tue Mar 18 10:45:13 UTC 2008


On Tue, Mar 18, 2008 at 3:20 AM, Kevin Kuphal <kkuphal at gmail.com> wrote:
>
>
> On Mon, Mar 17, 2008 at 7:21 AM, Mårten Bohlin <mabo at mochc.net> wrote:
>
> >
> > On Wed, Mar 5, 2008 at 8:42 PM, MythTV <mythtv at cvs.mythtv.org> wrote:
> > > #4872: Detect if video is letterboxed and switch to corect fill mode
> > >
> -------------------------------------+--------------------------------------
> > >   Reporter:  Mårten <mabo at mochc.net>  |       Owner:  ijr
> > >      Type:  enhancement              |      Status:  new
> > >   Priority:  minor                    |   Milestone:  unknown
> > >  Component:  mythtv                   |     Version:  0.21-fixes
> > >   Severity:  medium                   |     Mlocked:  0
> > >
> -------------------------------------+--------------------------------------
> >
> > Some comments about the new version of the patch (version 6).
> >
> > I now do the detection on the pre-buffered frames. And this give me
> > two advantages:
> >  * Switches that are very shorter than the amount of pre-buffered
> > frames are removed. This makes it smoother to watch. On my setup there
> > seems to be about one second of pre-buffered frames.
> >
> >  * The switch can be done almost at the exact frame where the switch
> > is detected. This also makes it look much better.
> >
> > The cons is that I have to write multi-threaded code. Something that I
> > have not done i C before. I do not know how expensive locking a QMutex
> > is considered to be. So I have tried to keep that to a minimum.
> >
> > So please try it out and let me know if it works.
>
>
> Marten,
>
> I tried this out on my SVN release (patches applied OK) but all I get in the
> logs is "Detect letterbox failed, source is not YUV12" or something similar
> to that and it doesn't detect anything.  My recordings are HD recordings
> from an AverMedia A180 played back with XvMC decoding using Nvidia drivers
> on an FX5200
>
> Kevin

Silly of me to not log what it was instead of YV12. Could you try to
update the line 2669 of libs/libmythtv/NuppelVideoPlayer.cpp to:

        VERBOSE(VB_PLAYBACK, QString("Detect Letterbox: The source is
not in YV12 (was %1)").arg(frame->codec));

And tell me which codec that is actually used?

Mårten


More information about the mythtv-dev mailing list