Page 1 of 2

Some info about xbv (how to make your video a bit clearer)

Posted: Tue Sep 09, 2003 8:33 pm
by ¡Mysto!
I have been meaning to post this, but don't really know where to post it?

When I first installed linux on my xbox I was majorly disappointed with the video. So I went of on a mission to find out what I could do about it.

xbv is a very nice program that can do some nifty things, but isn't well documented.

One of the niftiest things it can do is directly set the connexant(spelling?) registers that control the "Flicker Filter" that your video goes through before it is output.

Basically this is used because of the way interlaced video looks flickered.

Anyway here follows a list of the conexant registers and what they do:

DIS_FFILT Bit 6–C8
0 = Enables Standard Flicker Filter. (DEFAULT)
1 = Disables Standard Flicker Filter.

ADPT_FF Bit 7–34
0 = Disable adaptive flicker filter. (DEFAULT)
1 = Enable adaptive flicker filter.

DIS_YLPF Bit 7–C8
0 = Enable Luma Initial Horizontal Low Pass filter. (DEFAULT)
1 = Disable Luma Initial Horizontal Low Pass filter.

F_SELY[2:0] Bits [2:0]–C8
Luma Standard Flicker Filter:
000 = 5 Line (DEFAULT)
001 = 2 Line
010 = 3 Line
011 = 4 Line
100 = Alternate 5 Line
101 = Alternate 5 Line
110 = Alternate 5 Line

F_SELC[2:0] Bits [5:3]–C8
Chroma Standard Flicker Filter:
000 = 5 Line (DEFAULT)
001 = 2 Line
010 = 3 Line
011 = 4 Line
100 = Alternate 5 Line
101 = Alternate 5 Line
110 = Alternate 5 Line
111 = Alternate 5 Line
111 = Alternate 5 Line

Y_ALTFF[1:0] Bits [1:0]–34
Luma alternate flicker filter selection. This bit will only have an effect when ADPT_FF is
set. Y_ALTFF should always be programmed to a value greater than or equal to F_SELY.
00 = 5 line (DEFAULT)
01 = 2 line
10 = 3 line
11 = 4 line

C_ALTFF[1:0] Bits [4:3]–34
Chroma alternate flicker filter selection. This bit will only have an effect when ADPT_FF is
set. C_ALTFF should always be programmed to a value greater than or equal to F_SELC.
00 = 5 line (DEFAULT)
01 = 2 line
10 = 3 line
11 = 4 line

Y_THRESH[2:0] Bits [2:0]–36
Controls the sensitivity or limit of turning on the alternate flicker filter for luma in adaptive
flicker filter mode. ADPT_FF bit must be set to 1 for Y_THRESH[2:0] to have any effect
(DEFAULT = 000)

C_THRESH[2:0] Bits [5:3]–36
Controls the sensitivity or limit of turning on the alternate
adaptive mode. ADPT_FF bit must be set to 1 for C_THRESH[
(DEFAULT = 0).



YSELECT Bit 6–36
This bit will only have an effect when ADPT_FF is set.
0 = Use the C_THRESH value to determine the threshold for turning on the alternate
flicker filter setting for chrominance. (DEFAULT)
1 = Use the Y_THRESH value to determine the threshold for turning on the alternate
flicker filter setting for chrominance. Both chroma and luma digital data is automatically
processed with their alternate flicker filter settings when the Y_THRESH limit is
exceeded.

FFRTN Bit 7–36
Alternate flicker filter detect and select. This bit is effective only when ADPT_FF = 1.
0 = Once the adaptive algorithm selects the alternate filter, use that filter’s coefficients for
the rest of the samples for that line. For example, the sequence could be STD/STD/ALT/
ALT/ALT; (DEFAULT)
1 = Once the adaptive algorithm selects the alternate filter, use the filter’s coefficients for
that sample only. For example, the sequence with FFRTN=1 could be STD/STD/ALT/STD/
STD.

PKFIL_SEL[1:0] Bits [5:4]–D8
Text sharpening filter. Also referred to as the luma peaking filter selection 00 = Bypass (DEFAULT)
01 = Filter 1 (1 dB gain)
10 = Filter 2 (2 dB gain)
11 = Filter 3 (3.5 dB gain)



I basically ripped these from freely available datasheets for similar (but not the same) video chips made by connexant

To have totally unblurry video at 640x480 try:

1) log in as root
2) cd /etc/xbv
3) ./xbv DIS_FFILT 1

look it's all clear, but damn it flickers!

I have found that the nicest display I can get on my bog standard pal TV is:

./xbv ADPT_FFILT 0 F_SELY 3

This looks sweet in kernel mode(Ok that probably isn't the right name, but you know what I mean), but is maybe a bit flickery when a window manager is running.


Basically for best results have a play with those registers. Also you can get xbv to give you there current values with ./xbv -d

Oh well good luck! 8) :lol:

Posted: Wed Sep 10, 2003 3:51 pm
by ShALLaX
That has just made it onto the tutorial section of the website! Congrats :)

Posted: Fri Sep 12, 2003 5:37 pm
by Anastrophe
thanks for this.

I tried using the PAL example and just got a series of errors regarding the parameters (sorry I haven't saved them).

Are you sure this line is correct:

./xbv ADPT_FFILT 0 F_SELY 3

the ADPT_FFITL part?

I can see ADPT_FF in your tutorial but the ILT part got me stumped.

Sorry if I'm missing the plot here!

Posted: Fri Sep 12, 2003 6:39 pm
by energyBB
Anastrophe wrote:thanks for this.

I tried using the PAL example and just got a series of errors regarding the parameters (sorry I haven't saved them).

Are you sure this line is correct:

./xbv ADPT_FFILT 0 F_SELY 3

the ADPT_FFITL part?

I can see ADPT_FF in your tutorial but the ILT part got me stumped.

Sorry if I'm missing the plot here!
That didn't work for me either. It's possible that Shallax is using an updated version of xbv, hence why these lines aren't working.

Anyway, I've figured out a very nice configuration using iMysto!'s guide.

Put this into your xbvinit script file (/etc/conf.d/xbvinit):
(after the last line)

/etc/xbv/xbv DIS_FFILT 0 ADPT_FF 1 DIS_YLPF 0 F_SELY 3 F_SELC 3 Y_ALTFF 2 C_ALTFF 0 Y_THRESH 2 YSELECT 1 FFRTN 1 PKFIL_SEL 3 > /dev/null

Or just type it into a terminal if you don't want it to be applied at startup.

Posted: Fri Sep 12, 2003 9:18 pm
by ShALLaX
WOW.. that last line really does help!

Posted: Sat Sep 13, 2003 8:19 am
by Anastrophe
Cheers - I'll try that when I get home this afternoon.

Any chance of updating the tutorial (well the examples anyway) as it might cause a few poeple to pull their hair out with the parameter errors it gives?

Posted: Sat Sep 13, 2003 10:45 am
by rolf
that does help, a little bit of flicker.

but atleast i dont have to use 130/140% magnification in browser windows.

Sorry

Posted: Sat Sep 13, 2003 4:13 pm
by ¡Mysto!
Sorry it should be ADPT_FF you are right :oops: :oops:

Re: Sorry

Posted: Sat Sep 13, 2003 5:19 pm
by Anastrophe
¡Mysto! wrote:Sorry it should be ADPT_FF you are right :oops: :oops:
there's a first :wink:

Posted: Sat Sep 13, 2003 9:52 pm
by ShALLaX
I thought there was something wrong, but i changed it to DIS_FFILT when i posted it to the tutorial section --- there, updated!

way to have xbv not change resolution?

Posted: Mon Sep 15, 2003 1:41 pm
by kernel_sanders
I know from watching the boot process carefully that Gentoox keeps the current video settings (in my case 480p from using EvoX) until it boots the Kernel. Is there any way to have xbv not change the current video settings upon booting?

Posted: Mon Sep 15, 2003 9:45 pm
by ShALLaX
XBV is only called riiiiight at the end (in fact, it runs when xfree is loaded). The kernel actually forces the resolution to change. If you want to try taking xbv out of the equation, hash out the xbv line in /etc/conf.d/local.start

That...

Posted: Mon Sep 15, 2003 11:28 pm
by kernel_sanders
That makes sense, because when I watch it boot the video output doesn't changed until after it says, "Loading Kernel" or something of the like. I guess that means I may have to patch-from-scratch my Xbox Kernel sources. :)

Posted: Tue Sep 16, 2003 8:27 am
by loki
so does that mean that the "home" kernel is different from the "pro" ????
also, has somone fixed up a kernal for gentoox at all?


L0k1

Posted: Tue Sep 16, 2003 12:57 pm
by ShALLaX
Yes, the home and pro kernels are different. Pro doesnt support rivafb by default, it has to be enabled (youre the pro.. you do it!)