[PATCH] Interlaced RGB/PAL Output with FRC for Intel i9xx Chipsets
Thomas Hilber
xorg at toh.cx
Fri Feb 20 23:44:38 PST 2009
Hi list,
with the attached patch and xorg.conf you can use Intel i9xx chipsets to
directly drive RGB/PAL SCART devices like a TV set.
As with my former Radeon vga-sync-fields patch even/odd fields are routed
straightly from softdecoder to the VGA port. No software deinterlacing
takes place anymore thus saving CPU power and resulting in an artifact free
picture.
Full synchronicity between video stream and VGA video output timing is
provided by tiny real-time tweaks to the VGA video timing registers.
This is what FRC stands for: (f)rame (r)ate (c)ontrol
Please see attached explanation file how synchronization locks in after
starting video replay.
All you additionally need is a special VGA2SCART adapter cable like this:
http://www.vdr-portal.de/board/thread.php?postid=742945#post742945
At least Intel i910 i915 i945 chipsets are known to be compatible with
the patch. These chips are found in recent hardware like Intel D945GCLF
or Asus Pundit P5945GC including many netbooks.
You can build a cheap but high quality video replay device with that.
For further reference about frame rate control please see also:
http://linuxtv.org/pipermail/vdr/2008-July/017347.html
http://lists.freedesktop.org/archives/xorg/2008-September/038296.html
Cheers,
Thomas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: intel-FRC.patch
Type: application/x-patch
Size: 20256 bytes
Desc: not available
URL: <http://lists.x.org/archives/xorg/attachments/20090221/be5805c0/attachment.bin>
-------------- next part --------------
Section "ServerLayout"
Identifier "X.org Configured"
Screen 0 "Screen0" 0 0
InputDevice "Mouse0" "CorePointer"
InputDevice "Keyboard0" "CoreKeyboard"
Option "BlankTime" "0"
Option "StandbyTime" "0"
Option "SuspendTime" "0"
Option "OffTime" "0"
EndSection
Section "Files"
RgbPath "/etc/X11/rgb"
ModulePath "/usr/lib/xorg/modules"
FontPath "/usr/share/fonts/X11/misc"
EndSection
Section "Module"
Load "extmod"
Load "xtrap"
Load "GLcore"
Load "dbe"
Load "record"
Load "dri"
Load "glx"
EndSection
Section "InputDevice"
Identifier "Keyboard0"
Driver "kbd"
EndSection
Section "InputDevice"
Identifier "Mouse0"
Driver "mouse"
Option "Protocol" "auto"
Option "Device" "/dev/input/mice"
Option "ZAxisMapping" "4 5 6 7"
EndSection
Section "Monitor"
Identifier "Monitor0"
VendorName "Monitor Vendor"
ModelName "Monitor Model"
HorizSync 15-16
VertRefresh 50-51
Modeline "720x576_50i" 13.875 720 744 808 888 576 580 585 625 -hsync -vsync interlace
Modeline "800x520_50i" 17.00 800 856 936 1088 520 548 553 625 -hsync -vsync interlace
ModeLine "1440x576_50i" 27.75 1440 1488 1609 1769 576 580 585 625 -hsync -vsync interlace
EndSection
Section "Device"
### Available Driver options are:-
### Values: <i>: integer, <f>: float, <bool>: "True"/"False",
### <string>: "String", <freq>: "<f> Hz/kHz/MHz"
### [arg]: arg optional
#Option "NoAccel" # [<bool>]
#Option "SWcursor" # [<bool>]
#Option "ColorKey" # <i>
#Option "CacheLines" # <i>
#Option "Dac6Bit" # [<bool>]
#Option "DRI" # [<bool>]
#Option "NoDDC" # [<bool>]
#Option "ShowCache" # [<bool>]
#Option "XvMCSurfaces" # <i>
#Option "PageFlip" # [<bool>]
Option "SyncFields" "True"
Option "YScaleFineTune" "1"
Option "YRGB_VPhase" "0x77777777"
Option "UV_VPhase" "0"
Option "monitor-VGA" "Monitor0"
Identifier "Card0"
Driver "intel"
VendorName "Intel Corporation"
BoardName "82945G/GZ Integrated Graphics Controller"
# Option "ModeDebug" "True"
EndSection
Section "Screen"
Identifier "Screen0"
Device "Card0"
Monitor "Monitor0"
DefaultDepth 24
SubSection "Display"
Viewport 0 0
Depth 24
# Modes "720x576_50i"
# Modes "800x520_50i"
Modes "1440x576_50i"
EndSubSection
EndSection
-------------- next part --------------
Interpretation of Xserver Xorg.0.log output when frame rate control is active
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The following log output typically is seen after starting video replay.
|<- -20ms 0 +20ms ->| R 958351
-------|--------------------------------*--------------------------------------- -265 -16590 [ -3-168] 999986
-------|--------------------------------+-*------------------------------------- 1009 -16687 [-28-156] 1000916
--------|-------------------------------*--------------------------------------- -243 -16284 [-37-165] 999081
---------|------------------------------+*-------------------------------------- 564 -15511 [-37-149] 999834
----------|-----------------------------+*-------------------------------------- 736 -15076 [-37-143] 1000008
------------|---------------------------+*-------------------------------------- 718 -14349 [-37-136] 999990
-------------|--------------------------+*-------------------------------------- 732 -13619 [-37-128] 1000003
---------------|------------------------+*-------------------------------------- 744 -12891 [-37-121] 1000016
----------------|-----------------------+*-------------------------------------- 671 -12163 [-37-114] 999943
------------------|---------------------+--*------------------------------------ 1678 -11397 [-37 -97] 1000949
-------------------|--------------------*--------------------------------------- -175 -10703 [-37-108] 999097
---------------------|------------------+*-------------------------------------- 719 -9973 [-37 -92] 999992
----------------------|-----------------+*-------------------------------------- 737 -9246 [-37 -85] 1000009
-----------------------|----------------+*-------------------------------------- 727 -8517 [-37 -77] 999995
-------------------------|--------------+*-------------------------------------- 742 -7787 [-37 -70] 1000014
--------------------------|-------------+*-------------------------------------- 744 -7058 [-37 -63] 1000015
----------------------------|-----------+*-------------------------------------- 696 -6330 [-37 -56] 999968
-----------------------------|----------+*-------------------------------------- 769 -5599 [-37 -48] 1000041
-------------------------------|--------+*-------------------------------------- 709 -4860 [-37 -41] 999958
--------------------------------|-------+*-------------------------------------- 725 -4122 [-37 -33] 999998
----------------------------------|-----+*-------------------------------------- 719 -3129 [-37 -24] 999992
-----------------------------------|----+*-------------------------------------- 747 -2665 [-37 -19] 1000016
-------------------------------------|--+*-------------------------------------- 742 -1938 [-37 -11] 1000016
--------------------------------------|-+*-------------------------------------- 722 -1207 [-37 -4] 999996
----------------------------------------|*-------------------------------------- 943 -471 [-37 +4] 1000215
----------------------------------------*--------------------------------------- 433 341 [-33 +7] 999806
----------------------------------------*|-------------------------------------- 403 729 [-26 +11] 999962
----------------------------------------*-|------------------------------------- 168 1048 [-15 +12] 999997
----------------------------------------*-|------------------------------------- -164 1044 [ -3 +8] 999994
----------------------------------------*|-------------------------------------- -392 727 [ 5 +3] 1000050
----------------------------------------*--------------------------------------- -339 392 [ 8 +0] 1000224
---------------------------------------*|--------------------------------------- -816 -352 [ 8 -11] 999753
---------------------------------------|*--------------------------------------- -334 -825 [ -3 -11] 999997
---------------------------------------|*--------------------------------------- 0 -989 [-14 -9] 1000010
---------------------------------------|*--------------------------------------- 257 -845 [-23 -5] 999983
----------------------------------------*--------------------------------------- 446 -467 [-28 +0] 999994
----------------------------------------|*-------------------------------------- 731 110 [-28 +8] 1000261
----------------------------------------*|-------------------------------------- 19 509 [-20 +5] 999741
----------------------------------------*|-------------------------------------- 118 564 [-15 +6] 1000007
----------------------------------------*|-------------------------------------- -55 592 [ -9 +5] 999998
^ ^ ^ ^ ^
/ | | | |
25 frame average of drift speed VGA-video timing against xine-lib calls | | | |
to XvPutimage(). it's represented by asterisks '*' in debug output | | | |
| | | |
/ | | |
sync point displacement indicated by bars '|' in debug output. it's a | | |
25 frame average of where frame updates hit the 40ms update interval | | |
| | |
/ | |
frame rate adjustement active for the last 25 frames | |
| |
/ |
yet unclipped relative frame rate adjustement |
calculated for upcoming 25 frames |
|
/
time elapsed since last 25 frames sent by xine-lib
legend:
| syncpoint: frame update position within 40ms interval averaged over 25 frames
* driftspeed: skew between video stream frame (input rate) and VGA video timing (output rate) averaged over 25 frames
algorithm:
by altering the drift speed accordingly we let the sync point drift towards the center region of 40ms update interval
More information about the xorg
mailing list