FORUM

FORUM



SearchSearch   Users   Registration   Entrance
Today: 16.05.2026 - 20:27:26
Pages:  1  

half pixel chroma shift problem

MessageAuthor

hi, can somebody can explain me that conversion of chroma from RGB source to the YV12 destination is done with interpolation (average) of two chroma samples or simple by discarding one of them?? example script: ImageSource("1080.bmp", end = 1799 , fps = 30000/1001) ConvertToYV12(interlaced=False, matrix="Rec709") AssumeFPS(30000,1001) I try to look in the avisynth source but i giveup on MMX mambo jumbo... thank you!


--------------------
What would Crockett and Tubbs do? 1994 E36 Hellrot/Black 325is 2007 E92 Jet Black/Saddle Brown 335i

Jed

Active participant


Statistics:
Messages: 12,955
Registration: 05.17.2001
02.10.22 - 20:05:59
Message # 1
RE: half pixel chroma shift problem

RGB (4:4:4) to YV12 (4:2:0) is in AviSynth 2.5 done through an intermediate YUY2 (4:2:2) conversion. The RGB to YUY2 is done by a 1:2:1 weighed horisontal interpolation, so chroma is left aligned for a pixel pair. YUY2 to YV12 is done by a averaging chroma vertically. See more at




Yuen

Active participant


Statistics:
Messages: 2,426
Registration: 10.24.2003
02.10.22 - 20:12:57
Message # 2
RE: half pixel chroma shift problem

@Pandy: To get proper MPEG 2 chroma placement you have to interpolate. If you want to convert RGB to YUY without interpolation, use ConvertBackToYUY2(), which calculates chroma based only on the leftmost pixel. This will avoid chroma drift on YUY2 -> RGB -> YUY2. ImageSource("1080.bmp", end = 1799 , fps = 30000/1001) ConvertBackToYUY2(matrix="Rec709") ConvertToYV12() AssumeFPS(30000,1001)




Rumham

Active participant


Statistics:
Messages: 305
Registration: 01.07.2003
02.10.22 - 20:18:47
Message # 3
RE: half pixel chroma shift problem

Hmm... thank You sh0dan - but this is weird... accordingly to the MPEG-2 sampling scheme... anyway THANK YOU sh0dan!


--------------------
https://photos.google.com/album/AF1Q...JN_c1kb6gJVs9U

Prairieman

Active participant


Statistics:
Messages: 402
Registration: 06.07.2001
02.10.22 - 20:24:40
Message # 4
RE: half pixel chroma shift problem

Note:- ImageSource(... , fps = 30000/1001) Will use integer division and result in fps=29! Add a decimal point to either number to get floating point division, i.e 30000.0/1001.0




retrogrouch

Active participant


Statistics:
Messages: 323
Registration: 09.11.2003
02.10.22 - 20:28:12
Message # 5
RE: half pixel chroma shift problem

@IanB a yes, i know this - but thanks IanB!


--------------------
Stan C.

Buddah323i

Active participant


Statistics:
Messages: 201
Registration: 05.29.2002
02.10.22 - 20:35:29
Message # 6
RE: half pixel chroma shift problem
Slide technique on MIDI : Previous topic
Pages:  1  

The administrator has prohibited guests from replying to messages! To register, follow the link: register


Participants

inside: Tuxxedo FlatForum 1.13.0