[mythtv] Patch for 4:3 zoom on 16:9 broadcasts of 4:3
Christian Hack
christianh at pdd.edmi.com.au
Thu Oct 9 12:22:33 EDT 2003
From: Christian Hack
> From: Isaac Richards
> > > One problem is that the zoom causes part of the OSD to fall
> > off the screen.
> > > Is there some way to scale the OSD back such that it
> > remains independent of
> > > the zoom? I had a look at the OSD code but couldn't see
> an easy way.
> >
> > Probably will need to re-init the OSD class with the new
> numbers. In
> > NuppelVideoPlayer.cpp, the ToggleLetterbox function, you
> > should probably need
> > to do something very similar to
> > NuppelVideoPlayer::ReinitVideo(), but without
> > the call to videoOutput->InputChanged() and ClearAfterSeek().
> >
>
> I had a look at this and essentially called osd->Reinit with
> appropriately calculated values for dispx, dispy, dispw and
> disph. When
> I tried it though, all the osd got completely corrupted. I think I'm
> doing it right. I followed the Reinit into OSD::Reinit and then
> OSDSet::Reinit but they don't really seem to use the offset stuff -
> possibly explaining the problems. Should it be this simple? I had:
>
> void NuppelVideoPlayer::ToggleLetterbox(void)
> {
> if (videoOutput)
> videoOutput->ToggleLetterbox();
>
> if (osd)
> {
> int dispx = 0, dispy = 0, dispw = video_width, disph =
> video_height;
>
> videoOutput->GetDrawSize(dispx, dispy, dispw, disph);
>
> if (videoOutput->GetLetterbox() == 2) {
> dispw = video_width * 9.0 / 16;
> dispx = (video_width - dispw) / 2;
> }
>
> osd->Reinit(video_width, video_height, frame_interval,
> dispx, dispy, dispw, disph);
> }
> }
>
> The final call was then for a 720x576 image:
> osd->Reinit(720, 576, frame_interval, 157, 0, 405, 576);
>
Isaac - am I doing something stupid here? As far as I can tell, this
should be enough.
CH
More information about the mythtv-dev
mailing list