PDA

View Full Version : HR10-250 aspect correction on 4:3 TV



Red_Dog
03-24-2008, 01:00 PM
I watch only over the air TV now on my HR10-250’s. 95% on that is on 4:3 TVs
The only problem is the double letterboxing (top/bottom & both sides) when 4:3 show is on a 16:9 digital station.

Using the TiVo’s settings and remote I can only get two aspect corrections.
“Panel”, adds vertical or horizontal bar to match the selected TV
“Full”, never adds bars, it provides no correction.
Of those choices “panel” is the one that consistently provides a distortion free image.

My research found a program called “si9190test”. That looked promising.
I played with the program and found that aspect correction “3” provides a zoom mode.
“zoom” stretches horizontally and vertically to eliminate the double letterboxing.

I have three ideas to implement aspect correction modes “panel” and “zoom”
In order of most desirable to least:

Idea #1: Automatically read show info for the “program on the screen right now” then picks proper aspect correction.

Idea #2: Manually select “panel” or “zoom” correction using remote button using tivoapp patch(es). Also change trait of first press just showing current aspect correction to trait of changing to other correction on first press. (I don’t want to press the button twice)

Idea #3: Repeatedly poll /proc/brcm/display and call si9190test when useless “full” correction is chosen.

I already have a crude implementation of method 3.

#!/bin/bash
while [ "1" = "1" ]; do
/bin/grep eDISPLAY_FULL /proc/brcm/display
if [ "0" = "$?" ]; then
/bin/grep 480 /proc/brcm/display
if [ "0" = "$?" ]; then
/tvbin/si9190test -format 4801 -aspect 3
fi
fi
sleep 10
doneWould this code run with less CPU power if it was written in TCL or C?

Any suggestions about best way to get “program on the screen right now” info that could be live TV or a previously recorded show for method #1.

tivo4mevo
03-24-2008, 10:29 PM
Neat find. The Series 3 boxes will cycle through full, panel, and zoom when you repeatedly press the Window/Aspect button. For whatever reason, it looks like tivo didn't fully implement this on the HR10-250.

Tuik Resources contains an image, Pan_and_Scan.png (an older term for zoom?), and tivoapp contains strings like "AspectRatio changed to 4:3 zoom", so looks like parts of it are there. I noticed that when I played around with it, the zoom seemed to improperly center if I had the video paused, but re-center correctly shortly after I hit play. Might be other quirks too that led them not to include it.

I'm not sure about reading the format of the currently playing stream, but for Idea #2, you could rework your bash script and use trickeyplus (http://dealdatabase.com/forum/showthread.php?t=57959) to invoke it using your remote (a key combination as short as Clear, Window). Pressing Window would then allow you to cycle back to full or panel.

If you want to try for a tivoapp patch, the UI menus for aspect correction or the following string sections of tivoapp might be a good place to start.


"TvMomDisplayController.C"
"AspectRatio changed to 4:3 letterbox"
"TvMomDisplayController.C"
"AspectRatio changed to 4:3 zoom"
"TvMomDisplayController.C"
"AspectRatio changed to FULLSCREEN"
"TvMomDisplayController.C"
"AspectRatio changed to 4:3"
"TvMomDisplayController.C"
"AspectRatio changed to 16:9"


"DisplayController:HPK_PICTURE_720_480i"
"TvMomDisplayController.C"
"DisplayController:HPK_PICTURE_720_480p"
"TvMomDisplayController.C"
"TvMomDisplayController.C"
"Aspect Ratio is Fullscreen"
"TvMomDisplayController.C"
"Aspect Ratio is 4:3 Letterbox"
"TvMomDisplayController.C"
"Aspect Ratio is 16:9"
"TvMomDisplayController.C"
"Aspect Ratio is 4:3"
"TvMomDisplayController.C"
"Aspect Ratio is 4:3 Zoom"
"TvMomDisplayController.C"

tivo4mevo
03-25-2008, 11:28 PM
Here are patches that will replace 4:3 fullscreen (squeeze) with 4:3 zoom aspect correction. If you have a 4:3 TV hooked to an HR10-250, you can use this to zoom on SD content broadcast on an HD channel (and thus avoid double letterboxing). Though the screen will still report "Full" when you press the Window/Aspect remote button to toggle between modes, the mode will be Zoom (Pan and Scan). The Panel mode remains unchanged with this patch.


All Values are Hex

Sw Version Offset (VMA) Original Value New Value
6.3e 0x0063d2ec 3c060001 38c60003
6.3f 0x0063d4bc 3c060001 38c60003

I've only tested on a HR10-250 hooked to a 4:3 TV, so I don't know the behavior on an 16:9 TV. Report back results if you try it.

Red_Dog
03-26-2008, 08:52 PM
tivo4mevo,

The patch works great. That was fast work.
A good thing about 6.3 software is the TV type is smart.

If you tell it you have a 4:3 TV, it will only honor that choice for the 480i and 480p output formats. At 720p and 1080i it acts like 16:9 and will ignore your TV type 4:3 setting. (A very good thing)

Your patch in 480i and 480p will switch between panel and zoom (changed)
Your patch in 720p and 1080i will switch between panel and panel (just like before)


The biggest reason that I'm going pursue method #1 is that when I'm in zoom mode and a 16:9 program is playing, it often takes a while before I realize that I need to turn zoom off. In the opposite case, the double letter box is a dead give away.

Red Dog

Red_Dog
03-30-2008, 06:37 PM
I found a way to track the events that would require changing the aspect correction. They are in the tvlog file

I can get the code to read livetv information from the "info" module of tivoweb.
I still don't know where I can get show info of recorded program that is playing.

The code below will change the display to panel mode when the format is 480i or 480p and one of the following events occur.
Play from "Now Playing List"
Jump to Live TV
Change channels on live TV
Change tuners on live TV

This program tries to prevent me from watching a wide program in zoom mode.
If the show is double letter boxed then I'll know to hit Ratio button twice.

Red Dog


#!/tvbin/tivosh

set tvlog [open /var/log/tvlog w]
close $tvlog
set tvlog [open /var/log/tvlog r]

set playing "PlayRecording Proxy"
set livetv "PlayLive Output"

while { 1 } {
gets $tvlog line
set why ""
if {[regexp $playing $line]} {set why "playing" }
if {[regexp $livetv $line]} {set why "livetv" }
if { $why == "" } { continue }
puts "Why = $why"
set proc [open /proc/brcm/display r]
set display [read $proc]
close $proc
if { ![ regexp 480 $display ] } { continue }
if { ![ regexp ZOOM $display] } { continue }

exec /tvbin/si9190test -format 4801 -aspect 1 -c 1 -d 0
puts "unzoom"
set db [dbopen]
catch { transaction {
set o [db $db open /State/AvConfig]
dbobj $o set AspectCorrection 2
} }
dbclose $db
}
close $tvlog

woracan
11-08-2009, 10:28 AM
Here are patches that will replace 4:3 fullscreen (squeeze) with 4:3 zoom aspect correction. If you have a 4:3 TV hooked to an HR10-250, you can use this to zoom on SD content broadcast on an HD channel (and thus avoid double letterboxing). Though the screen will still report "Full" when you press the Window/Aspect remote button to toggle between modes, the mode will be Zoom (Pan and Scan). The Panel mode remains unchanged with this patch.


All Values are Hex

Sw Version Offset (VMA) Original Value New Value
6.3e 0x0063d2ec 3c060001 38c60003
6.3f 0x0063d4bc 3c060001 38c60003

I've only tested on a HR10-250 hooked to a 4:3 TV, so I don't know the behavior on an 16:9 TV. Report back results if you try it.

I found the location for 6.4a and have added it to the list below:


All Values are Hex

Sw Version Offset (VMA) Original Value New Value
6.3e 0x0063d2ec 3c060001 38c60003
6.3f 0x0063d4bc 3c060001 38c60003
6.4a 0x0063b72c 3c060001 38c60003

It didn't work on one show I recorded, but I don't have an HD TV so I'm not sure if the show was in HD or not. In both Full and Panel modes, there was a black border on the sides only.

Red_Dog
12-12-2009, 02:42 PM
I do not like pressing the button twice even if my pronto remote can handle that detail. The tivoapp patches below will cause the "ratio" button to change the aspect ratio on every press (including the first).


All Values are Hex

Sw Version Offset (VMA) Original Value New Value
6.3e 0x00a6a030 50530001 50930001
6.3e 0x00a69fdc 10600008 10000013

6.3e 0x00a6a134 24072710 240709c4


The 1st patch changes 'v0' to 'a0' on a beql statement, since both registers will have the same value it does nothing, but it is needed for the new branch that will not have the correct 'v0' loaded..
The 2nd patch bypasses three branches that would cause only the current aspect to be displayed.
The 3rd patch is optional and independent. It changes the time that the changed aspect ratio will be displayed on screen. The last two bytes set the time in milliseconds. (as coded: 2.5 seconds)

To patch for other SW versions. Look for brf references 4c72b5 & 6 "Full" & "Panel". That sub is called two times. Near the first call will be an "li s3,1 : beql v0,s3,1 : li s3,2". This is the aspect swap. The the beql is the first patch, the second patch is 21 instructions back. Near the second call is the time change patch location, "li a3,10000" instruction

Red_Dog
03-19-2010, 11:29 PM
The last and most optional step is to change the on screen display message from "Full" to "Zoom".

This was tested on 6.3e, but should work on any 6.3 or 6.4 system.

You will need TuikHelper.tcl found in this thread. http://www.dealdatabase.com/forum/showthread.php?t=44828

Pull the brf file using this command: (this can take a minute)
TuikHelper.tcl export lib/resources/AtscString.brf Full_brf

Change the text 'Full' to 'Zoom' using attached full2zoom.tcl or a hex editor

Now the dangerous part, replacing the brf file using this command:
TuikHelper.tcl import lib/resources/AtscString.brf Zoom_brf
(This can also take a minute)

If all went well, reboot for changes to take effect.

Make a backup of "Full_brf" because upgrading the TiVo software will delete AtscString.brf from the MFS database.
After upgrading just upload the file.

tivo4mevo
03-20-2010, 08:41 AM
Nice polish!

Red_Dog
12-08-2010, 10:35 PM
I finally decided to upgrade to 6.4a; Here are the three aspect ratio changes for 6.4a software. I included other popular patches in "tvapppatch" format.


if { [regexp {^6\.4a-} $sw] } {set patcha "patch_6.4a"}
array set patch_6.4a {
0x0063b72c "3c060001 38c60003 Replace Full with Zoom in 4:3 TV type"
0x00a92838 "50530001 50930001 Single Press Aspect Ratio Change (1of2)"
0x00a927e4 "10600008 10000013 Single Press Aspect Ratio Change (2of2)"
0x00a9293c "24072710 240709c4 Aspect ratio display time (2.5 sec)"
0x00a936d8 "0c3289f7 24020000 Please Insert Your Access Card Fix"
0x005865b8 "0c16a402 3C020000 Disable encryption"
0x00a907f0 "1440002b 1040002b 30sec skip"
0x006ad180 "00008021 24100001 Backdoors"
0x004dd458 "00408821 34110000 HMO/HME 1of3"
0x005116dc "00408021 24100001 HMO/HME 2of3"
0x0099a1b8 "14400014 10000014 HMO/HME 3of3"
0x004e0bc8 "0c1445a9 24020000 Removes Trial ends Today"
}


Red Dog

crashHD
06-14-2012, 09:37 AM
Nice fix! Zoom is much more useful than full.

Any ideas if it's possible to change how much it zooms by?

tivo4mevo
06-14-2012, 10:38 AM
Red_Dog might be able to provide a better answer than I, as the last time I rummaged around the disassembly was in 2008. You might want to look at si9190test first, as I think that utility offered (IIRC) a smaller executable to tinker with the output display. That might indicate whether the zoom factor is controlled in software or hardware.