Hi Claudio,
and thanks for your input!
Claudio Ciccani wrote:
[...]
>
> The 'ratio' argument refers to the video frame aspect ratio.
> Forcing it to be width/height in dfx_output_cb is equivalent to setting
> the aspect ratio to 'Square'; therefore simply press R + 1, without
> modifying the source code.
>
Well, that doesn't help for just any case, but only for 720x576
interlaced material like on most DVB broadcasts. But unfortunately, not
all stations broadcast that resolution, there is also 704x576, 544x768,
352x576 which should all be stretched correctly to 720 pixel width, but
without any jumping and juddering. So if I press "R+1" on a 544x576
channel, the judder goes away, scrolling text looks perfect, but all the
people are egg-heads and I get black vertical borders on the left and on
the right. Besides, maybe I haven't made myself clear enough, I want to
use df_xine as a VDR viewer, or "output device" if you like, and VDR is
a settop-box like application, and I guess you agree with me that nobody
would like to have to adjust the aspect ratio on his TV viewer every
time he switches channels. Don't take it as a criticism, I only want to
make clear that there are some problems which maybe only occur with
theese weird resolutions and on interlaced displays (plain standard PAL
TV set, so the DirectFB output resolution is hard-coded to 720x576 (5:4
in pixel count, but the pixels are not square and in the end it's
hardware-stretched to 4:3, so calculations are, if not too dificult, not
really trivial either).
While trying to get smooth video AND correct aspect ratio, I guess I
managed to achieve it, but only for aspect ratios up to 4:3,
unfortunately 16:9 material (encoded as 720x576) now gets displayed
vertically stretched and the "R + 0, 1, 2, 3, 4" keys no longer work, I
don't know why. I'm still working on it, and also want to generate some
test MPEG samples with different aspect ratios, horizontal movement of
vertical edges and a square grid and a circle, to also reveal wrong
aspect, based on TV-out test generator by Terry Barnaby
http://www.kingcot.eclipse.co.uk/unichrome/tvoutTest.html.
Attached is my hack for TV-out (I left out the DLCAPS_SCREEN_LOCATION
code patch, as my Matrox G400 DH reports this capability only on the
first head).
Maybe I'm not doing things right, but the fact is, with unmodified code
and even with manually changing aspect ratio (which I don't want), I
don't get smooth, judder-free playback on any resolution (remember,
always refering to interlaced TV-out set at 720x576). I'm sure you'll
understand what actually makes the code different even better than me,
and beware, I haven't tested it but on CTRC2 interlaced :-). So what do
you think, where do we go from here?
Regards,
Lucian
--- context.c 2005-04-11 12:37:27.000000000 +0200
+++ context.c.patched 2005-10-24 15:13:55.000000000 +0200
@@ -51,7 +51,8 @@
{
DFXCore *this = (DFXCore*) data;
DFXVideoContext *ctx = &this->ctx;
- bool update_area = (ctx->video.ratio != ratio);
+ double myratio = ctx->screen.ratio;
+ bool update_area = (ctx->video.ratio != myratio);
if (ctx->update ||
ctx->video.width != width ||
@@ -108,11 +109,11 @@
}
}
- if (ctx->screen.ratio <= ratio) {
+ if (ctx->screen.ratio <= myratio) {
ctx->drect.w = ctx->screen.width;
- ctx->drect.h = (double) ctx->screen.width / ratio;
+ ctx->drect.h = (double) ctx->screen.width / myratio;
} else {
- ctx->drect.w = (double) ctx->screen.height * ratio;
+ ctx->drect.w = (double) ctx->screen.height * myratio;
ctx->drect.h = ctx->screen.height;
}
@@ -131,7 +132,7 @@
ctx->video.width = width;
ctx->video.height = height;
- ctx->video.ratio = ratio;
+ ctx->video.ratio = myratio;
ctx->video.format = format;
ctx->update = false;
}
_______________________________________________
directfb-dev mailing list
[email protected]
http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-dev