View Single Post
Old 23rd April 2012, 10:16   #12  |  Link
Gavino
Avisynth language lover
 
Join Date: Dec 2007
Location: Spain
Posts: 3,431
Quote:
Originally Posted by lansing View Post
So this way is the closest to a lossless conversion I can get from a YV12->RGB32->YV12 ?
Since YV12<->RGB32 goes via YV24, this also gives rise to an effective chroma shift as I described above. To avoid this, do the conversion explicitly to YV24 and shift the chroma back before the conversion to RGB32.
Code:
ConvertToYV24(chromaresample="point")
MergeChroma(PointResize(width, height, 0, 1))
ConvertToRGB32()
... # filtering in RGB32
ConvertToYV12(chromaresample="point")
Then the only losses come from the YUV/RGB conversion (rounding, etc, as described by poisondeathray).
__________________
GScript and GRunT - complex Avisynth scripting made easier
Gavino is offline   Reply With Quote