Log in

View Full Version : h.264 yv24


juGGaKNot
20th May 2009, 18:41
Avisynth :

Changelog
v2.60 ConvertToYV24

YV24 planar full chroma - 4:4:4

x264 suports only yv12 right ?

Is there any h.264 encoder out there that can encode 4:4:4 via avysinth converttoyv24 ?

THNX.

juGGaKNot
20th May 2009, 18:52
I've been smoking crack, sorry Future plans

Close.

tph
20th May 2009, 18:57
AFAIK some GSoC student is currently working on 4:4:4 for x264.

juGGaKNot
20th May 2009, 19:05
AFAIK some GSoC student is currently working on 4:4:4 for x264.

Good to hear, i hate that i always have to use brighter colors to get where i want.

JohannesL
21st May 2009, 14:56
tph, that's interesting. YV12 looks horrible for 256x224 video games.

burfadel
21st May 2009, 15:31
What would the expected file size be of yv24 vs yv12?

roozhou
21st May 2009, 16:27
tph, that's interesting. YV12 looks horrible for 256x224 video games.

The best way is to preserve RGB instead of converting it to YUV.

juGGaKNot
21st May 2009, 18:06
tph, that's interesting. YV12 looks horrible for 256x224 video games.

256x224 ? way too low.

What would the expected file size be of yv24 vs yv12?

Uncompressed 1920x1080p24 8 bit 4:2:2- 95 MB/sec
Uncompressed 1920x1080p30/i60 8 bit 4:2:2- 118.6 MB/sec
Uncompressed 1920x1080p24 10 bit 4:2:2- 118.6 MB/sec
Uncompressed 1920x1080p30/i60 10 bit 4:2:2- 148.3 MB/sec
Uncompressed 1920x1080p24 8 bit 4:4:4- 142.3 MB/sec
Uncompressed 1920x1080p30/i60 8 bit 4:4:4- 177.9 MB/sec
Uncompressed 1920x1080p24 10 bit 4:4:4- 177.9 MB/sec
Uncompressed 1920x1080p30/i60 10 bit 4:4:4- 222.4 MB/sec
True 4K film scan - 4096x3072 10 bit log 4:4:4: 1080 MB/sec

Uncompressed ...

The best way is to preserve RGB instead of converting it to YUV.

How, x264 uses yv12 only ...

JohannesL
21st May 2009, 19:04
Is there even any useful lossy codec that uses RGB?

256x224 ? way too low.
Well, there isn't much to do about it except for upscaling.

juGGaKNot
21st May 2009, 19:10
Is there even any useful lossy codec that uses RGB?


Well, there isn't much to do about it except for upscaling.

What games ? i can use off screen rendering for cs 1.6 with HLAE for quad hd ...

JohannesL
21st May 2009, 19:22
NES and SNES

Dark Shikari
22nd May 2009, 02:06
The new 4:4:4 in H.264 (introduced in ~2007) seems almost tailor-made for RGB given how it is designed, so I will probably add RGB support in x264 for it.

Maybe we can create a custom profile or such to indicate "this is RGB" so the players will know, and then force everyone to support it.

MasterNobody
22nd May 2009, 05:26
Maybe we can create a custom profile or such to indicate "this is RGB" so the players will know, and then force everyone to support it.
There is GBR option for Color Matrix in VUI. I think this was intended to use for RGB indication.

juGGaKNot
22nd May 2009, 18:05
The new 4:4:4 in H.264 (introduced in ~2007) seems almost tailor-made for RGB given how it is designed, so I will probably add RGB support in x264 for it.

Maybe we can create a custom profile or such to indicate "this is RGB" so the players will know, and then force everyone to support it.

Don't really see it for rgb since 4:4:4 cams do not record in rgb, only pc footage is rgb and 4:4:4

But hey if you will add support for it than great :D

Dark Shikari
23rd May 2009, 12:10
Don't really see it for rgb since 4:4:4 cams do not record in rgb, only pc footage is rgb and 4:4:4

But hey if you will add support for it than great :DEncoding camera footage in 4:4:4 is pointless, there's no actual detail in the chroma, it's just noise.

Video game captures, on the other hand...

Leeloo Minaļ
23rd May 2009, 19:03
What are the pros/cons about RGB or YV24 support in x264 in comparison with YV12 ?

LoRd_MuldeR
23rd May 2009, 19:31
What are the pros/cons about RGB or YV24 support in x264 in comparison with YV12 ?

No chroma sub-sampling. For encoding movies this won't help at all, but for screen captures or video games it may be helpful.

http://en.wikipedia.org/wiki/Chroma_subsampling#Sampling_systems_and_ratios

JohannesL
24th May 2009, 00:19
Very helpful, actually.

a = AVISource("RGB.avi")
b = a.ConvertToYV12().ConvertToRGB24()
StackHorizontal(a,b)

http://sm64.org/johannes/RGBandYV12.png

juGGaKNot
24th May 2009, 13:11
What are the pros/cons about RGB or YV24 support in x264 in comparison with YV12 ?

No chroma sub-sampling. For encoding movies this won't help at all, but for screen captures or video games it may be helpful.

http://en.wikipedia.org/wiki/Chroma_subsampling#Sampling_systems_and_ratios

Very helpful, actually.

a = AVISource("RGB.avi")
b = a.ConvertToYV12().ConvertToRGB24()
StackHorizontal(a,b)

http://sm64.org/johannes/RGBandYV12.png

Well the main thing is that the uncompressed will look the same as the x264.

Now you have to use brighter colors in vegas/ae/premier etc to make sure it will look the same the final render.

Also

ConvertToYV12(matrix="pc.601")

x264.exe" --fullrange on

Helps a lot ( from what i have tested so far ), the black is now actually black not white'ish.

Leeloo Minaļ
24th May 2009, 16:23
I don't see where uncompressed look the same as x264, colors are a little washed in comparison...


Matrix=pc.601 + fullrange ON seems to give even more contrasted images, at least with game videos, colors are more brighter or darker than original.
Here is the result of my test :

http://moe.mabul.org/up/moe/2009/05/24/img-171059u0kgc.pnghttp://moe.mabul.org/up/moe/2009/05/24/img-171220lje4a.pnghttp://moe.mabul.org/up/moe/2009/05/24/img-1713196naln.png

in this order :
- original RGB24
- MP4 will matrix=pc.601 + fullrange ON
- MP4 without matrix/fullrange

I would be really interested to see what x264 can do with full RGB support.

Keiyakusha
24th May 2009, 16:32
Matrix=pc.601 + fullrange ON seems to give even more contrasted images, at least with game videos, colors are more brighter or darker than original.
Here is the result of my test :


To me it looks like your decoder do not support "fullrange" flag and TV->PC scale conversion is applied...

LoRd_MuldeR
24th May 2009, 16:39
Leeloo Minaļ, you should have a look at this thread:
http://forum.doom9.org/showthread.php?t=143689

JohannesL
24th May 2009, 18:21
Let's not forget how blurred the red star icon is in my sample picture. RGB support will help a lot.

Dark Shikari
24th May 2009, 18:29
You can encode RGB video currently by doubling the resolution and converting to YV12. The proper way to do this is to pass the chroma planes unmodified, to avoid the issue of resizing the planes twice (upscale, then downscale). This will create video without any chroma bleeding like YV12 creates.

JohannesL
24th May 2009, 19:11
Which resizer do you recommend?

Dark Shikari
24th May 2009, 19:16
Which resizer do you recommend?You'd have to resize manually, probably. I can't think of an easy way to do it given that Avisynth doesn't support YV24 currently; an Avisynth script guru might know.

Leeloo Minaļ
24th May 2009, 19:32
:thanks: LoRd_MuldeR !

kemuri-_9
24th May 2009, 19:37
You'd have to resize manually, probably. I can't think of an easy way to do it given that Avisynth doesn't support YV24 currently; an Avisynth script guru might know.

if you can get a cvs compile of avs 2.6, you can get YV24 support.... as that alongside Y8, YV411, and YV16 colorspaces were added in for 2.6....

juGGaKNot
24th May 2009, 20:30
if you can get a cvs compile of avs 2.6, you can get YV24 support.... as that alongside Y8, YV411, and YV16 colorspaces were added in for 2.6....

Beta tester here ? :D

kemuri-_9
24th May 2009, 23:09
Beta tester here ? :D

knock yourself out? (http://kemuri9.net/dev/avs/2.6.x/)

juGGaKNot
25th May 2009, 06:28
knock yourself out? (http://kemuri9.net/dev/avs/2.6.x/)

Thers no devil.dll to install into system32, only avisynth.dll ? (http://kemuri9.net/dev/avs/notes.txt)

LE :

Found it, thnx, testing.