WSS reloaded

View: New views
6 Messages — Rating Filter:   Alert me  

WSS reloaded

by Nicolas Boullis :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

I've tried to implement some support for WSS in my "em8300-scale-n-crop"
repository.
I tried it with no success, but I guess my good old 4:3 CRT TV set does
not support WSS...

Could anyone with the corresponding hardware give it a try?

To give it a try, clone my
http://freehg.org/u/nboullis/em8300-scale-n-crop/ repository, build the
modules and load them. (Ensure that the good adv717x module gets
loaded.)

Then echo the desired WSS value (14-bit, 7 for 16:9, 8 for full 4:3) to
/sys/class/em8300/em8300-0/device/encoder/wss . Any negative value will
disable WSS.

Note that it will trigger the flickering Ville mentionned. I have some
idea how to fix it, but I'd rather first be sure that it works as is.


Cheers,

Nicolas

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Dxr3-devel mailing list
Dxr3-devel@...
https://lists.sourceforge.net/lists/listinfo/dxr3-devel

Re: WSS reloaded

by Jan Willies :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Nicolas Boullis schrieb:
> I've tried to implement some support for WSS in my "em8300-scale-n-crop"
> repository.
> I tried it with no success, but I guess my good old 4:3 CRT TV set does
> not support WSS...
>
> Could anyone with the corresponding hardware give it a try?
My TV is 20+ years old but hey, who knows... :)
> To give it a try, clone my
> http://freehg.org/u/nboullis/em8300-scale-n-crop/ repository, build the
> modules and load them. (Ensure that the good adv717x module gets
> loaded.)
They are, modinfo shows hg-e75e100313b8.
>
> Then echo the desired WSS value (14-bit, 7 for 16:9, 8 for full 4:3) to
> /sys/class/em8300/em8300-0/device/encoder/wss . Any negative value will
> disable WSS.
[root@server ~]# ll /sys/class/em8300/em8300-0/device/encoder
lrwxrwxrwx 1 root root 0 24. Apr 14:43
/sys/class/em8300/em8300-0/device/encoder ->
../../../../class/i2c-adapter/i2c-1/1-006a
[root@server ~]# ll /sys/class/em8300/em8300-0/device/encoder/
insgesamt 0
lrwxrwxrwx 1 root root    0 24. Apr 14:44 bus -> ../../../../bus/i2c
lrwxrwxrwx 1 root root    0 24. Apr 14:44 driver ->
../../../../bus/i2c/drivers/adv717x
-r--r--r-- 1 root root 4,0K 24. Apr 14:44 modalias
-r--r--r-- 1 root root 4,0K 24. Apr 14:44 name
drwxr-xr-x 2 root root    0 24. Apr 14:44 power
lrwxrwxrwx 1 root root    0 24. Apr 14:44 subsystem -> ../../../../bus/i2c
-rw-r--r-- 1 root root 4,0K 24. Apr 14:44 uevent

There's no /sys/class/em8300/em8300-0/device/encoder/wss on my system.

- Jan

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Dxr3-devel mailing list
Dxr3-devel@...
https://lists.sourceforge.net/lists/listinfo/dxr3-devel

Re: WSS reloaded

by Jan Willies :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Am Donnerstag, den 24.04.2008, 14:49 +0200 schrieb Jan Willies:
> Nicolas Boullis schrieb:
> > I've tried to implement some support for WSS in my "em8300-scale-n-crop"
> > repository.
> > I tried it with no success, but I guess my good old 4:3 CRT TV set does
> > not support WSS...
> >
> > Could anyone with the corresponding hardware give it a try?
> My TV is 20+ years old but hey, who knows... :)

[...]

> There's no /sys/class/em8300/em8300-0/device/encoder/wss on my system.

It seems to work though. Quite cool, although the VDR-OSD looks a bit
weird on 16:9 TV stations. Hopefully the next dxr3-plugin resolves that
issue.

Sometimes I get crashes though:

vdr: [10131] dxr3: cSPUEncoder::Flush: OSD data size: 5483
vdr: [10131] dxr3: cSPUEncoder::Flush: OSD data size: 5483
em8300_video.c: Video Fifo timeout
vdr: [10142] dxr3: resuscitation: device failure or user initiated reset
em8300.o: FIFO sync timeout during sync
em8300_video.o: Video sync rdptr is stuck at 0x000327be, wrptr
0x000320f2, left -1740
em8300_video.o: Video sync timeout
em8300.o: FIFO sync timeout during sync


- Jan


-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Dxr3-devel mailing list
Dxr3-devel@...
https://lists.sourceforge.net/lists/listinfo/dxr3-devel

Re: WSS reloaded

by Nicolas Boullis :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

On Thu, Apr 24, 2008 at 02:49:32PM +0200, Jan Willies wrote:
>
> There's no /sys/class/em8300/em8300-0/device/encoder/wss on my system.

Sorry, I forgot to mention the hardware restrictions.
Only cards with an ADV7170 encoder are supported. Cards with an ADV7175A
encoder (like yours) can't be supported because the encoder chip does
not support WSS. As for cards with a BT865 encoder, that chip was
supposed to support WSS, but I think I read it was broken.


Cheers,

Nicolas

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Dxr3-devel mailing list
Dxr3-devel@...
https://lists.sourceforge.net/lists/listinfo/dxr3-devel

Re: WSS reloaded

by Nicolas Boullis :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

On Thu, Apr 24, 2008 at 05:43:29PM +0200, Jan Willies wrote:
>
> It seems to work though. Quite cool, although the VDR-OSD looks a bit
> weird on 16:9 TV stations. Hopefully the next dxr3-plugin resolves that
> issue.

It does not work, this is only the result of my "scale-n-crop" work...
Natively, the EM8300 chip is able to compress the image vertically to
display a 16:9 stream on a 4:3 TV set.

I think this is very restrictive, so I decided to do that work to add
the ability to compress the image horizontally (to display a 4:3 stream
on a 16:9 TV set), and also the ability to crop the image
(especially useful when black borders are added around a 16:9 video to
form a 4:3 stream, or around a 4:3 video to make a 16:9 stream).

While the "native" compression only compresses the video and leaves the
SPU untouched (VDR's OSD uses SPU), my code also affects the SPU. Hence,
you got the SPU compressed, which makes it quite ugly.

I don't think it is possible for vdr's dxr3 plugin to work aroud this.
It's even worse when the image is cropped, since OSD gets cropped as
well. But there, I think it should be possible to work around that issue
in the plugin.

I think the point behind WSS is to avoid performing any scaling or
croping on the em8300 chip, which would mean a better image quality.
Note that WSS is not the only way to switch a TV set between 4:3 and
16:9 modes. Pin 8 of the SCART connector can be used for the same
purpose, and I'm willing to build some home-brew hardware to achieve
such automatic switching.

It might be possible to do much better by hacking the firmware, but as
far as I know, no-one could reverse-engineer it yet...


Cheers,

Nicolas

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Dxr3-devel mailing list
Dxr3-devel@...
https://lists.sourceforge.net/lists/listinfo/dxr3-devel

Re: WSS reloaded

by Nicolas Boullis :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

On Thu, Apr 24, 2008 at 12:10:59AM +0200, Nicolas Boullis wrote:

> Hi,
>
> I've tried to implement some support for WSS in my "em8300-scale-n-crop"
> repository.
> I tried it with no success, but I guess my good old 4:3 CRT TV set does
> not support WSS...
>
> Could anyone with the corresponding hardware give it a try?
>
> To give it a try, clone my
> http://freehg.org/u/nboullis/em8300-scale-n-crop/ repository, build the
> modules and load them. (Ensure that the good adv717x module gets
> loaded.)
>
> Then echo the desired WSS value (14-bit, 7 for 16:9, 8 for full 4:3) to
> /sys/class/em8300/em8300-0/device/encoder/wss . Any negative value will
> disable WSS.
>
> Note that it will trigger the flickering Ville mentionned. I have some
> idea how to fix it, but I'd rather first be sure that it works as is.

Here is some news.

Ville Salmela kindly reported that it works fine for him, but that, as
expected, the flickering is still present.

Hence, I just applied the planned patch that avoids needlessly resetting
the ADV717x chip.

As far as I am concerned (my TV set does not understand WSS), the
flickering is gone with this patch. But I need someone to confirm that
the WSS still works.

As usual, all comments are welcome.


If everything works fine, I'm willing to implement some callback so the
kernel tells a userspace application when the aspect ratio changes, and
the userspace application decides to change the TV aspect ration, do
some cropping and/or sets up WSS.


Cheers,

Nicolas

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Dxr3-devel mailing list
Dxr3-devel@...
https://lists.sourceforge.net/lists/listinfo/dxr3-devel