Welcome Guest ( Log In | Register )


Important

The forums will be closing permanently the weekend of March 15th. Please see the notice in the announcements forum for details.

 
Compression To 16bit Format
« Next Oldest | Next Newest » Track this topic | Email this topic | Print this topic
pjarkan
Posted: Apr 28 2003, 10:02 AM


Unregistered









Hi!
This is my first post, so I hope you can help me!
Prob:
I have made a capture in Virtual Dub and have used the format RGB16 Bit, but when I later want to compress the capture clip with any codec and choose color depth 16 bit the output becomes 24 bit? Anyone know how to fix this, I want the output to be 16bit !

(I have tried the format YUY2 with the same result)
 
  Top
endorphin
Posted: Apr 30 2003, 02:58 AM


Advanced Member


Group: Members
Posts: 112
Member No.: 3488
Joined: 4-April 03



I don't know for sure, but I think it's because the bit depth is a feature of the codec. I would guess that all of the codecs you have tried are only 24-bit codecs. Have you looked for a 16-bit codec to use?
 
     Top
phaeron
Posted: Apr 30 2003, 03:38 AM


Virtualdub Developer


Group: Administrator
Posts: 7773
Member No.: 61
Joined: 30-July 02



Nearly all modern codecs convert video to YCbCr space first and don't natively work with it as 16- or 24-bit RGB. As a result, the video is reported as 24-bit because that is the "equivalent" RGB depth for the compression method.
 
    Top
endorphin
Posted: Apr 30 2003, 03:41 AM


Advanced Member


Group: Members
Posts: 112
Member No.: 3488
Joined: 4-April 03



Ah! Good to learn that. Thanks. Any idea why programs like After Effects and Premiere only work in RGB when that's not the native format of either DV or most codecs?

 
     Top
phaeron
Posted: Apr 30 2003, 03:59 AM


Virtualdub Developer


Group: Administrator
Posts: 7773
Member No.: 61
Joined: 30-July 02



Some do -- DV-oriented programs in particular are likely to work directly in DV's 4:1:1 or 4:2:0 format. There are a number of reasons to prefer RGB, however. The YCbCr formats used in various codecs vary significantly in chroma subsampling (4:4:4, 4:2:0, 4:1:1, 4:1:0), in range (CCIR701 or full range), in chroma positioning (MPEG-1 vs. MPEG-2), and in byte ordering (YUY2, UYVY, Y41P, etc). Many codecs have bugs in their YUV format handling, the most common of which is a flipped image, and some may not export a YUV format even if they use one internally, whereas RGB for the most part works with all codecs. The biggest reason, though, is that non-independant pixels are a pain to deal with; try writing a texture mapper to draw a triangle from or to YUY2 sometime. Premiere exports a simple texture mapper to plugins to do warp effects -- affine DDA with bilinear filtering, which IIRC was the reason its resizing isn't too great.
 
    Top
endorphin
Posted: May 2 2003, 07:05 AM


Advanced Member


Group: Members
Posts: 112
Member No.: 3488
Joined: 4-April 03



Sage, sage. Thank you. Incidentally I have begun to use your program for ALL resizing tasks, the quality difference is so clear. In fact I recently discovered that 95 percent of what I formerly believed were real encoding deficiencies in Windows Media Encoder (v9), were actually just a result of what happens when low quality resizing is followed by conversion to mpeg-4 type video. Since then I've started resizing 720x480 -> 360x240 using VDub then running it through WMEnc9 (or just the WMV9 VCM output from VDub) and the results are competitive with DivX 5.

Phaeron, I'm the first to go and do my own Google search when I want to find an answer to a technical question. But in this particular domain I have run across such a vast field of articles on pixel formats and chroma and luma subsampling that I am compelled to ask you for reading recommendations. Can you tell me where to begin reading more about the differences between 4:2:2, 4:2:1, etc? I have read miles of web pages about video processing and codec technology in the past year and a half with an analytical mind and my eyes open, yet for some reason this particular subtopic still remains cryptic to me. And I think it's because you get so many results when searching on these terms that I still have not found the definitive layman's text(s). Thanks a bunch in advance. - e
 
     Top
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:
5 replies since Apr 28 2003, 10:02 AM Track this topic | Email this topic | Print this topic

<< Back to Codec Discussion