|
From: SourceForge.net <no...@so...> - 2007-01-28 11:32:03
|
Patches item #1537920, was opened at 2006-08-10 19:12 Message generated for change (Comment added) made by fredm You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=596650&aid=1537920&group_id=91293 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Gergely Szasz (szaszg) Assigned to: Nobody/Anonymous (nobody) Summary: new scalers Initial Comment: Four new scaler: -TV3x, -PAL TV, -PAL TV2x, -PAL TV3x The TV3x is similar to Tv2x: every 3rd line darker. The PAL TV series emulate the 422 color subsampling effect of PAL( and NTSC :-) TV. Only one exception, the subsampling is interstricial instead of cosited, because at the cosited case, it has some problem with refreshing of display... But the effect is quite identical. The PAL TV2x and 3x include the TV2x/TV3x effect. There are three patch: -only TV3x -only PAL TVxxx -all in one ---------------------------------------------------------------------- >Comment By: Fredrick Meunier (fredm) Date: 2007-01-28 22:32 Message: Logged In: YES user_id=11017 Originator: NO Applied, could you please take a stab at describing the magic numbers used in the PAL scalers? I'd rather we used names that reflect their purpose and have a comment about their derivation? I guess the basic principle is to create an integer approximation of a floating point calculation? ---------------------------------------------------------------------- Comment By: Fredrick Meunier (fredm) Date: 2007-01-23 01:22 Message: Logged In: YES user_id=11017 Originator: NO The results look much better. I'd like to check this in soon as aside from the more "realistic" image, there are allegedly demos etc that take advantage of the lower colour resolution in PAL/NTSC to produce particular effects. Anyone fancy to offer an example of such a demo? :) ---------------------------------------------------------------------- Comment By: Gergely Szasz (szaszg) Date: 2007-01-17 05:01 Message: Logged In: YES user_id=57243 Originator: YES Now, everithing working (I hope) well. All PAL TV filter doing cosited color subsampling. The 'PAL TV' at 320x240, the 2x and 3x at 640x480, so the 3x do a 2->3 linear scaling. There is a general option 'PAL-TV use TV2x effect'. If it checked the 2x make every second line-, the 3x every third line darker, like TV2x. File Added: fuse.paltv_02.diff ---------------------------------------------------------------------- Comment By: Fredrick Meunier (fredm) Date: 2007-01-11 00:22 Message: Logged In: YES user_id=11017 Originator: NO I think the effect is worthwhile (I understand some demos were written with this type of effect in mind), so if you could make the change, I'd be keen to try and get it integrated into the next release. We should also be able to get the effect to work in the cosited case while we are at it, I can help with this if you like. ---------------------------------------------------------------------- Comment By: Gergely Szasz (szaszg) Date: 2007-01-10 04:39 Message: Logged In: YES user_id=57243 Originator: YES Yes. Now, the color "bluring" all the three cases done on the "base picture" (320x240), so the effect "increasing" with the resolution. And we may have to do the bluring at 640x480 (and not on full resolution :-) -- 960x720 ), because the PAL TV original resolution is about 702x574 (square) active pixel. (So, on the 320x240 the effect is always stronger). ---------------------------------------------------------------------- Comment By: Fredrick Meunier (fredm) Date: 2006-12-02 12:34 Message: Logged In: YES user_id=11017 Originator: NO OK, I have done the background reading and understand the principle, now in this case I would have thought that the colour would be drawn over the full resolution of the frame. As a result, I would expect that a PAL1x would do too much colour space blurring, and that the 2x scaler should average the colours after the image has been expanded to a 640 canvas rather than the 320 that seems to be the case at the moment? ---------------------------------------------------------------------- Comment By: Gergely Szasz (szaszg) Date: 2006-08-20 05:53 Message: Logged In: YES user_id=57243 Ok! If you remember, on a big color TV, the picture of a Spectrum never was perfect. Some color (e.g. magenta) with white or other colors make a washed or "ghost"-like effect. It, because the PAL (and NTSC, and all other) TV signal use the YUV color space /the Y is the Black and White component, the U and V carry the color information/. So the resolution of the U and V are poorer than the Y. It is not too bad, because the human eye has greater sensibility for the white light then the colors. The procedure to create reduced resolution U and V component called subsampling. The color components represented with less samples than "lightness". e.g.: Y U/V +-------+ +-------+ |* * * *| |* * | |* * * *| |* * | --------+ +-------+ In this picture, we have 8 Y and 4-4 U and V sample. This is the 4:2:2 cosited subsampling. We take the color samples from the same position than every even Y sample. This is the digital represetation of the analog PAL/NTSC color TV signal. The "color" points are 2x wider than the Y points, and centers of the Y and U/V points are in the same position. Y U/V +-------+ +-------+ |* * * *| | * * | |* * * *| | * * | --------+ +-------+ This is the 4:2:2 interstitial subsampling. We take the color samples from between the two Y position for "colors". This subsampling causes the "ghost"-like effect of the colors on the TV screen of Spectrum. While on a "real" TV film there is no so many sharp vertical line with big color contrast, on a computer screen there are... These scalers try to emulate this effect. First convert the RGB colors to YUV. Then do the color subsampling and last convert back to RGB. To do the subsampling, we just have to calculate avarages on points. It looks quite easy... but: the cosited subsampling use 3 point instead 2 to calculate the mean value. the weights: cosited: 121 interstitial: 11 With cosited subsampling there are "burned" pixels. It looks very good in H.E.R.O. The weaving water leaves a darker blue "shadow"... I think, the problem is: some cases e.g. changed the 3. column, but because the byte boundary crossing the subsampling area, and the first half is out of the refreshed rectangle, it leaves some point with wrong color... My solution is not so good, because some cases we have to grow the refreshed area (horizontal)... *For more clear and good and exact description of color subsampling, please have a look at first: http://doug.kerr.home.att.net/pumpkin/Subsampling.pdf, after some other. e.g.: http://en.wikipedia.org/wiki/4:2:2 , http://www.mir.com/DMG/chroma.html , http://www.poynton.com/PDFs/Merging_RGB_and_422.pdf ---------------------------------------------------------------------- Comment By: Fredrick Meunier (fredm) Date: 2006-08-19 01:09 Message: Logged In: YES user_id=11017 I tried the PAL TV scaler, and while I don't claim to understand much of what you wrote above, I like the look. What problem did you have with the display refresh in the cosited case? ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=596650&aid=1537920&group_id=91293 |