[mythtv] [RFC][PATCH] Avoiding scaling

Robert Clark mythtv at ratty.org.uk
Sun Dec 12 02:59:17 UTC 2004


The problem:

  Here in the UK, DVB-T broadcasts of Channel 4 are in 704x576 16:9. The
other channels use 720x576 16:9 which matches my TV-out. As a result,
Channel 4 is scaled horizontally slightly and this degrades the picture
quality.

The patch:

  This patch adjusts the scaling calculation as follows: if, after the
scaling is calculated, the final output size is close to the source
size, the output size is "snapped" to the source size. This means the
704x576 stream from Channel 4 ends up displayed at 704x576 (with 8 pixel
side bars).

The downside:

  This can introduce slight aspect ratio distortion and some over or
under scanning.

  I've written the patch to solve my problem, but if it's useful to
others, then I'd be happy to see it go into Myth. Hence the RFC: Is this
the right way to solve this problem?

  Some things I haven't done but might be a good idea:

1) Make it an option,

2) Make the threshold configurable (it's hard-coded at 5% at the
moment),

3) Make sure that any vertical offset is even (to avoid breaking
interlacing).

I'm happy to add any of these.

	Robert
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mythtv-scaling-snap.patch
Type: text/x-patch
Size: 1275 bytes
Desc: not available
Url : http://mythtv.org/pipermail/mythtv-dev/attachments/20041212/9cbd25bf/mythtv-scaling-snap.bin


More information about the mythtv-dev mailing list