Re: [vdr] xineliboutput vdpau crop

2010-01-24 Thread Rolf Ahrenberg

On Fri, 15 Jan 2010, Seppo Ingalsuo wrote:


Actually I'd prefer the unscaled 576i/p subtitles size on 1080p scaled
video but on the center bottom position. The current scaled subtitles
are too big and coarse at 46. Has anyone hacked the DVB subtitles like
that?


The current CVS version should now do this when using unscaled HD OSD 
resolution.


BR,
--
rofa

___
vdr mailing list
vdr@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr


Re: [vdr] xineliboutput vdpau crop

2010-01-15 Thread Seppo Ingalsuo
On Sun, 2010-01-10 at 01:47 +0200, Mika Laitio wrote:

 Hopefully this can be merged to xineliboutput repo.

I wonder if it is there now in CVS? The subtitles are now scaled and in
proper position but sometimes in the bottom of each row there is one
pixel wide line with black and white spots. I'm using VDPAU and some HW
mode for the OSD overlay on GS8400 but not HUD OSD due to tearing
problems.

Actually I'd prefer the unscaled 576i/p subtitles size on 1080p scaled
video but on the center bottom position. The current scaled subtitles
are too big and coarse at 46. Has anyone hacked the DVB subtitles like
that?

BR,
Seppo



___
vdr mailing list
vdr@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr


Re: [vdr] xineliboutput vdpau crop

2010-01-09 Thread Mika Laitio

 If I watch vdr-sxfe just from a small window, the subtitle and text are
 positioned correctly with a good looking font size to bottom of the
 screen. But if I watch finish yle 1 channel which uses dvb subtitles
 from fullscreen vdr-sxfe, the subtitle font is small and text is
 positioned about to middle of the screen. (Left position is correct)


Have you tried to change the subtitles decoder from VDR to xine?

Anyway, the problem is that the resolution and position information of 
subtitles is 720x576. If your output resolution differs from that, the 
subtitles are misplaced. The attached patch might help you as it should scale 
the subtitles osd always to 720x576 (found it on my hd and it comes with 
per?valotakuu :) when using VDR's subtitles decoders.


Thanks, it seems that you do not even need to drive fast away with car's 
lights blinking, as the patch worked nicely and fonts seemed to scale 
nicely between fullscreen and small screen.


Hopefully this can be merged to xineliboutput repo.

Mika___
vdr mailing list
vdr@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr


Re: [vdr] xineliboutput vdpau crop

2010-01-04 Thread Rolf Ahrenberg

On Sun, 3 Jan 2010, Mika Laitio wrote:

If I watch vdr-sxfe just from a small window, the subtitle and text are 
positioned correctly with a good looking font size to bottom of the screen. 
But if I watch finish yle 1 channel which uses dvb subtitles from 
fullscreen vdr-sxfe, the subtitle font is small and text is positioned about 
to middle of the screen. (Left position is correct)


Have you tried to change the subtitles decoder from VDR to xine?

Anyway, the problem is that the resolution and position information of 
subtitles is 720x576. If your output resolution differs from that, the 
subtitles are misplaced. The attached patch might help you as it should 
scale the subtitles osd always to 720x576 (found it on my hd and it 
comes with perävalotakuu :) when using VDR's subtitles decoders.


BR,
--
rofaIndex: osd.c
===
RCS file: /cvsroot/xineliboutput/vdr-xineliboutput/osd.c,v
retrieving revision 1.38
diff -u -r1.38 osd.c
--- osd.c	19 Aug 2009 17:15:37 -	1.38
+++ osd.c	1 Dec 2009 11:58:38 -
@@ -20,6 +20,10 @@
 
 #include osd.h
 
+#ifndef OSD_LEVEL_TTXTSUBS
+#define OSD_LEVEL_TTXTSUBS 20 // from ttxtsubs plugin
+#endif
+
 //#define LIMIT_OSD_REFRESH_RATE
 
 #define LOGOSD(x...)
@@ -366,11 +370,16 @@
 
 #if VDRVERSNUM = 10708
 
-  double Aspect;
-  intW, H;
-  m_Device-GetOsdSize(W, H, Aspect);
-  m_ExtentWidth  = W;
-  m_ExtentHeight = H;
+  if(xc.osd_scaling  ((m_Layer==OSD_LEVEL_SUBTITLES) || (m_Layer==OSD_LEVEL_TTXTSUBS))) {
+m_ExtentWidth  = 720;
+m_ExtentHeight = 576;
+  } else {
+double Aspect;
+intW, H;
+m_Device-GetOsdSize(W, H, Aspect);
+m_ExtentWidth  = W;
+m_ExtentHeight = H;
+  }
 
 #else
 
@@ -439,9 +448,16 @@
   if(!m_IsVisible)
 return;
 
-  int SendDone = 0;
+  int SendDone = 0, XOffset = 0, YOffset = 0;
+  if(!xc.osd_scaling  ((m_Layer==OSD_LEVEL_SUBTITLES) || (m_Layer==OSD_LEVEL_TTXTSUBS))) {
+double Aspect;
+intW, H;
+m_Device-GetOsdSize(W, H, Aspect);
+XOffset = (H - 576)  0 ? (H - 576) : 0;
+YOffset = ((W - 720) / 2) ? ((W - 720) / 2) : 0;
+  }
   for (int i = 0; (Bitmap = GetBitmap(i)) != NULL; i++) {
-int x1 = 0, y1 = 0, x2 = Bitmap-Width()-1, y2 = Bitmap-Height()-1;
+int x1 = XOffset, y1 = YOffset, x2 = x1+Bitmap-Width()-1, y2 = y1+Bitmap-Height()-1;
 if (m_Refresh || Bitmap-Dirty(x1, y1, x2, y2)) {
 
   /* XXX what if only palette has been changed ? */
___
vdr mailing list
vdr@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr


Re: [vdr] xineliboutput vdpau crop

2010-01-04 Thread Kimmo Taskinen
Hi,

Yes, I'm using VDPAU.

And YES the patch seemed to fix issue 2, at least subtitles are much better 
positioned during cropping. Thanks.

Issue 1 still remains. The problem is easy to notice at Welho network 
(Helsinki) when switching channel between TV5MONDE (often 4:3 letterbox) and 
Deutsche Welle (16:9). DW remains cropped when switched from TV5MONDE and the 
cropping was turned on for it.

- Kimmo

On 03 Jan 2010, at 22:30, Petri Hintukainen wrote:

 Kimmo Taskinen wrote:
 Hi,
 
 Couple of issues I reported earlier (see below) have now merged to 
 xineliboutput-plugin.
 [...]
 1. Cropping is not reseted if I switch to 16:9 channel that has the same 
 resolution as 4:3 channel that has turned on the cropping.
 2. DVB subtitles are not positioned correctly during cropping if vdr-sxfe 
 is used to show subtitles. Vertical alignment is about at half of the 
 screen.
 
 Are you using vdpau ?
 
 Does the attached patch fix issue 2 ?
 
 
 - Petri
 autocrop_spu_overlay.diff___
 vdr mailing list
 vdr@linuxtv.org
 http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr


___
vdr mailing list
vdr@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr


Re: [vdr] xineliboutput vdpau crop

2010-01-03 Thread Petri Hintukainen
Kimmo Taskinen wrote:
 Hi,
 
 Couple of issues I reported earlier (see below) have now merged to 
 xineliboutput-plugin.
[...]
  1. Cropping is not reseted if I switch to 16:9 channel that has the same 
  resolution as 4:3 channel that has turned on the cropping.
  2. DVB subtitles are not positioned correctly during cropping if vdr-sxfe 
  is used to show subtitles. Vertical alignment is about at half of the 
  screen.

Are you using vdpau ?

Does the attached patch fix issue 2 ?


- Petri
Index: xine_post_autocrop.c
===
RCS file: /cvsroot/xineliboutput/vdr-xineliboutput/xine_post_autocrop.c,v
retrieving revision 1.36
diff -u -r1.36 xine_post_autocrop.c
--- xine_post_autocrop.c	3 Jan 2010 19:29:50 -	1.36
+++ xine_post_autocrop.c	3 Jan 2010 20:25:26 -
@@ -1459,6 +1512,12 @@
   case 0:
 	/* regular subtitle */
 	/* Subtitle overlays must be coming somewhere inside xine engine */
+#ifdef VO_CAP_CUSTOM_EXTENT_OVERLAY
+/* Do not move overlay if video_out has independent video and OSD resolutions */
+if (event-object.overlay-extent_width   0 
+event-object.overlay-extent_height  0)
+  break;
+#endif
 if (use_driver_crop) {
   if(this-has_driver_crop) {
 if(!event-object.overlay-unscaled || !this-has_unscaled_overlay) {
___
vdr mailing list
vdr@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr


Re: [vdr] xineliboutput vdpau crop

2010-01-03 Thread Mika Laitio

Couple of issues I reported earlier (see below) have now merged to 
xineliboutput-plugin.

[...]

1. Cropping is not reseted if I switch to 16:9 channel that has the same 
resolution as 4:3 channel that has turned on the cropping.
2. DVB subtitles are not positioned correctly during cropping if vdr-sxfe is 
used to show subtitles. Vertical alignment is about at half of the screen.


Are you using vdpau ?

Does the attached patch fix issue 2 ?


I am also having problems with the subtitle text size and position with 
vdr-1.7.10 and latest xineliboutputs. (and your patch did not help.)


With vdr-1.6.0, subtitles plugin and xineliboutput 1.0.4 things works ok.

If I watch vdr-sxfe just from a small window, the subtitle and text are 
positioned correctly with a good looking font size to bottom of the 
screen. But if I watch finish yle 1 channel which uses dvb subtitles 
from fullscreen vdr-sxfe, the subtitle font is small and text is 
positioned about to middle of the screen. (Left position is correct)


Usually if I change from small window to fullsize, the first subtitle text 
is showed with good looking font size and position in the bottom-left 
position but next subtitle texts after that are positioned in the 
middle-left.


Mika

___
vdr mailing list
vdr@linuxtv.org
http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr