digitalFAQ.com Forum

digitalFAQ.com Forum (https://www.digitalfaq.com/forum/)
-   Restore, Filter, Improve Quality (https://www.digitalfaq.com/forum/video-restore/)
-   -   Question regarding YUY2 to YV16 conversion in Avisynth+ (https://www.digitalfaq.com/forum/video-restore/12203-question-yuy2-yv16.html)

KubaVideo 09-28-2021 07:48 PM

Question regarding YUY2 to YV16 conversion in Avisynth+
 
I am in the process of learning how to use AviSynth+ to process my capture files. Source video is Video8 captured using ATI AIW 9600 uncompressed lossless AVI YUY2 at 720x480. Some of the plugins I have been experimenting with no longer directly support the YUY2 colorspace and require conversion to YV16. I have been attempting to learn more about colorspaces. According to the AviSynth wiki site "YV16 is the planar equivalent of YUY2". Based on this description it would seem that this is a very minor conversion. However, one thing that my reading has taught me, be very careful about each and every conversion as they often have unintended consequences. My question is thus a simple one, how consequential is converting from YUY2 to YV16 with regards to affecting the quality of my video? Once I'm in YV16 should I convert back to YUY2? The AviSynth files that I am working with are being prepared for streaming. I anticipate eventually converting to h.264 or h.265. I intend on keeping my original lossless AVI files which are YUY2 untouched.

lollo2 09-29-2021 03:51 AM

I never used AviSynth+, but a conversion YUY2 <-> YV16 is lossless (YV16 is its the planar equivalent of YUY2 interleaved).

In my scripts, once filtering requiring planar format is done I convert back to YUY2.

hodgey 09-29-2021 07:55 AM

To expand/clarify, the difference between YUY2 and YV16 is just how the data is laid out in memory, the actual image data is exactly the same, so converting between them will not cause any degradation or loss of data.

The only thing to note if working with avisynth is that there are some old plugins that can think the input is YV12 (which has half the horizontal color resolution) if the input is YV16 due to how they check the data format of the input (YV16 is a newer addition). This usually gives pretty obvious artifacts though.

Also the h.264/h.265 files intended playback will usually have to be encoded in the equivalent of YV12 (4:2:0 chroma subsampling) as most devices don't support 4:2:2. This may or may not be done automatically depending on what you use for encoding.

KubaVideo 09-29-2021 01:28 PM

Quote:

Originally Posted by lollo2 (Post 80098)
I never used AviSynth+, but a conversion YUY2 <-> YV16 is lossless (YV16 is its the planar equivalent of YUY2 interleaved).

In my scripts, once filtering requiring planar format is done I convert back to YUY2.

Quote:

Originally Posted by hodgey (Post 80104)
To expand/clarify, the difference between YUY2 and YV16 is just how the data is laid out in memory, the actual image data is exactly the same, so converting between them will not cause any degradation or loss of data.

The only thing to note if working with avisynth is that there are some old plugins that can think the input is YV12 (which has half the horizontal color resolution) if the input is YV16 due to how they check the data format of the input (YV16 is a newer addition). This usually gives pretty obvious artifacts though.

Also the h.264/h.265 files intended playback will usually have to be encoded in the equivalent of YV12 (4:2:0 chroma subsampling) as most devices don't support 4:2:2. This may or may not be done automatically depending on what you use for encoding.


Greatly appreciate your replies. The fact that most devices do not support 4:2:2 was useful information although these videos will likely be streamed directly from a laptop computer. That does bring up the question of just how much of a difference in video quality is there between 4:2:2 and 4:2:0 given that my original source was Video8? I am also looking for opinions about h.264 vs h.265 in this setting. I know the advantages for h.265 for high definition video but, am curious about the advantages/disadvantages for an SD source.


All times are GMT -5. The time now is 10:26 AM

Site design, images and content © 2002-2024 The Digital FAQ, www.digitalFAQ.com
Forum Software by vBulletin · Copyright © 2024 Jelsoft Enterprises Ltd.