Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Video Encoding > MPEG-4 AVC / H.264

Reply
 
Thread Tools Search this Thread Display Modes
Old 1st October 2008, 11:34   #1  |  Link
aand
Learning fast
 
aand's Avatar
 
Join Date: May 2008
Location: Bucharest
Posts: 33
huffyuv --> x264 lossl. = broken?


This happens when I use a huffyuv avi and x264 lossless compression. If I use CRF there's no artefacts.
Job commandline:
Code:
"C:\Program Files (x86)\megui\tools\x264\x264.exe" --qp 0 --nf --subme 1 --partitions p8x8,b8x8,i4x4 --merange 12 --threads auto --thread-input --sar 1:1 --progress --no-psnr --no-ssim --output "E:\EM 3 Derain GradFunk.mkv" "E:\EM 3 Derain GradFunk.avs"
I'm using Skystrife's build 994.
The script:
Code:
setmemorymax(400)
aviSource("D:\temp2.avi", audio=false).converttoyv12()
Derainbow()
GradFunkMirror(strength=3)
aand is offline   Reply With Quote
Old 1st October 2008, 11:45   #2  |  Link
nm
Registered User
 
Join Date: Mar 2005
Location: Finland
Posts: 2,641
Are you using CoreAVC to decode?

http://git.videolan.org/?p=x264.git;...4100ca26a29d92:
Quote:
Replace High 4:4:4 profile lossless with High 4:4:4 Predictive.
This improves lossless compression by about 4-25% depending on source.
The benefit is generally higher for intra-only compression.
Also add support for 8x8dct and i8x8 blocks in lossless mode; this improves compression very slightly.
In some rare cases 8x8dct can hurt compression in lossless mode, but its usually helpful, albeit marginally.
Note that 8x8dct is only available with CABAC as it is never useful with CAVLC.
High 4:4:4 Predictive replaced the previous profile in a 2007 revision to the H.264 standard.
The only known compliant decoder for this profile is the latest version of CoreAVC.
As I write this, JM does not actually correctly decode this profile.
Hopefully this lack of support will soon change with this commit, as x264 will be (to my knowledge) the first compliant encoder.
nm is offline   Reply With Quote
Old 1st October 2008, 12:52   #3  |  Link
aand
Learning fast
 
aand's Avatar
 
Join Date: May 2008
Location: Bucharest
Posts: 33
Are you saying I should? (I didn't understand almost anything from the list)
I was using ffdshow.

OK, I've tried CoreAVC and it looks ok (the weird artefacts are gone) but I don't like the colours, everything is too dark.

I don't understand why ffdshow's libavcodec wouldn't work now. What's different? AVC lossless--->AVC lossless works OK.

Last edited by aand; 1st October 2008 at 13:03.
aand is offline   Reply With Quote
Old 1st October 2008, 13:19   #4  |  Link
Keiyakusha
契約者
 
Keiyakusha's Avatar
 
Join Date: Jun 2008
Posts: 1,576
aand
One lossless has been replaced with another. For now, only last version of CoreAVC supports it.
what is not clear?

Last edited by Keiyakusha; 1st October 2008 at 13:22.
Keiyakusha is offline   Reply With Quote
Old 1st October 2008, 14:01   #5  |  Link
nm
Registered User
 
Join Date: Mar 2005
Location: Finland
Posts: 2,641
Quote:
Originally Posted by aand View Post
OK, I've tried CoreAVC and it looks ok (the weird artefacts are gone) but I don't like the colours, everything is too dark.
CoreAVC allows you to manually set PC/TV level conversions if necessary.
nm is offline   Reply With Quote
Old 1st October 2008, 14:46   #6  |  Link
Gabriel_Bouvigne
L.A.M.E. developer
 
Gabriel_Bouvigne's Avatar
 
Join Date: Dec 2001
Location: Paris - France
Posts: 276
FFMpeg is not yet compliant with this revision of the h.264 standard (the previous H4:4:4 has been deprecated, ie it doesn't exist anymore in the standard)
Gabriel_Bouvigne is offline   Reply With Quote
Old 1st October 2008, 16:19   #7  |  Link
Dark Shikari
x264 developer
 
Dark Shikari's Avatar
 
Join Date: Sep 2005
Posts: 8,666
And the first complaints appear!

/waits eagerly for ffmpeg to support Predictive Lossless
Dark Shikari is offline   Reply With Quote
Old 1st October 2008, 19:03   #8  |  Link
Inventive Software
Turkey Machine
 
Join Date: Jan 2005
Location: Lowestoft, UK (but visit lots of places with bribes [beer])
Posts: 1,953
So is Lossless 4:2:0 still around then? (i.e x264 -q0)
__________________
On Discworld it is clearly recognized that million-to-one chances happen 9 times out of 10. If the hero did not overcome huge odds, what would be the point? Terry Pratchett - The Science Of Discworld
Inventive Software is offline   Reply With Quote
Old 1st October 2008, 20:37   #9  |  Link
Dark Shikari
x264 developer
 
Dark Shikari's Avatar
 
Join Date: Sep 2005
Posts: 8,666
Quote:
Originally Posted by Inventive Software View Post
So is Lossless 4:2:0 still around then? (i.e x264 -q0)
x264 has never supported any colorspace other than 4:2:0, and probably won't for a long time.
Dark Shikari is offline   Reply With Quote
Old 1st October 2008, 23:05   #10  |  Link
Inventive Software
Turkey Machine
 
Join Date: Jan 2005
Location: Lowestoft, UK (but visit lots of places with bribes [beer])
Posts: 1,953
So, forgive the ignorance, but what's the difference between 4:2:0 and Predictive 4:4:4?
__________________
On Discworld it is clearly recognized that million-to-one chances happen 9 times out of 10. If the hero did not overcome huge odds, what would be the point? Terry Pratchett - The Science Of Discworld
Inventive Software is offline   Reply With Quote
Old 1st October 2008, 23:08   #11  |  Link
Sagekilla
x264aholic
 
Join Date: Jul 2007
Location: New York
Posts: 1,752
x264 doesn't actually have lossless predictive 4:4:4 I believe, just 4:2:0. Only difference is we use 12 bits instead of 24. (YV12 vs YV24, in other words)
__________________
You can't call your encoding speed slow until you start measuring in seconds per frame.
Sagekilla is offline   Reply With Quote
Old 1st October 2008, 23:10   #12  |  Link
Inventive Software
Turkey Machine
 
Join Date: Jan 2005
Location: Lowestoft, UK (but visit lots of places with bribes [beer])
Posts: 1,953
Quote:
Originally Posted by Sagekilla View Post
x264 doesn't actually have lossless predictive 4:4:4 I believe, just 4:2:0. Only difference is we use 12 bits instead of 24. (YV12 vs YV24, in other words)
Um, then what's this?

Quote:
Originally Posted by x264 GIT changelog
Replace High 4:4:4 profile lossless with High 4:4:4 Predictive.

This improves lossless compression by about 4-25% depending on source.

The benefit is generally higher for intra-only compression.

Also add support for 8x8dct and i8x8 blocks in lossless mode; this improves compression very slightly.

In some rare cases 8x8dct can hurt compression in lossless mode, but its usually helpful, albeit marginally.

Note that 8x8dct is only available with CABAC as it is never useful with CAVLC.

High 4:4:4 Predictive replaced the previous profile in a 2007 revision to the H.264 standard.

The only known compliant decoder for this profile is the latest version of CoreAVC.

As I write this, JM does not actually correctly decode this profile.

Hopefully this lack of support will soon change with this commit, as x264 will be (to my knowledge) the first compliant encoder.
__________________
On Discworld it is clearly recognized that million-to-one chances happen 9 times out of 10. If the hero did not overcome huge odds, what would be the point? Terry Pratchett - The Science Of Discworld
Inventive Software is offline   Reply With Quote
Old 1st October 2008, 23:15   #13  |  Link
Sagekilla
x264aholic
 
Join Date: Jul 2007
Location: New York
Posts: 1,752
Dark Shikari's post:

Quote:
Originally Posted by Dark Shikari View Post
x264 has never supported any colorspace other than 4:2:0, and probably won't for a long time.
I -believe- we don't actually use 4:4:4 precision but we do use predictive lossless.
__________________
You can't call your encoding speed slow until you start measuring in seconds per frame.
Sagekilla is offline   Reply With Quote
Old 1st October 2008, 23:18   #14  |  Link
LoRd_MuldeR
Software Developer
 
LoRd_MuldeR's Avatar
 
Join Date: Jun 2005
Location: Last House on Slunk Street
Posts: 13,248
Quote:
Originally Posted by Sagekilla View Post
I -believe- we don't actually use 4:4:4 precision but we do use predictive lossless.
That's my interpretation as well...
__________________
Go to https://standforukraine.com/ to find legitimate Ukrainian Charities 🇺🇦✊
LoRd_MuldeR is offline   Reply With Quote
Old 2nd October 2008, 00:17   #15  |  Link
Dark Shikari
x264 developer
 
Dark Shikari's Avatar
 
Join Date: Sep 2005
Posts: 8,666
High 4:4:4 is the name of the profile. It allows any colorspace from 4:0:0 to 4:4:4. x264 uses 4:2:0.
Dark Shikari is offline   Reply With Quote
Old 2nd October 2008, 02:14   #16  |  Link
CruNcher
Registered User
 
CruNcher's Avatar
 
Join Date: Apr 2002
Location: Germany
Posts: 4,926
lol funny marketing gag you can advertise with High 4:4:4 but only support 4:2:0 hehe i guess it isn't really allowed in the commercial world though as it would be highly misleading, or is it ?
__________________
all my compares are riddles so please try to decipher them yourselves :)

It is about Time

Join the Revolution NOW before it is to Late !

http://forum.doom9.org/showthread.php?t=168004
CruNcher is offline   Reply With Quote
Old 2nd October 2008, 02:19   #17  |  Link
Dark Shikari
x264 developer
 
Dark Shikari's Avatar
 
Join Date: Sep 2005
Posts: 8,666
Quote:
Originally Posted by CruNcher View Post
lol funny marketing gag you can advertise with High 4:4:4 but only support 4:2:0 hehe i guess it isn't really allowed in the commercial world though as it would be highly misleading, or is it ?
What, am I supposed to name profiles that don't exist?

"High 4:4:4" was the old profile that allowed lossless.

No other profile allowed lossless.

"High 4:4:4 Predictive" is the new profile that allows lossless.

No other profile allows lossless.

Do you want me to lie or something, will that make you happy? "x264 supports High 4:2:0 Predictive Profile." There, I just lied, is that fine with you now?
Dark Shikari is offline   Reply With Quote
Old 2nd October 2008, 02:29   #18  |  Link
Inventive Software
Turkey Machine
 
Join Date: Jan 2005
Location: Lowestoft, UK (but visit lots of places with bribes [beer])
Posts: 1,953
Clarity would be helpful, since specifically applying that change, with that commit comment, assumes complete 4:4:4 Lossless encoding support in x264, which is incorrect, since x264 only supports 4:2:0. An average joe who wants to encode losslessly with x264 would assume, with that change, he gets 4:4:4 support, which is incorrect; this is without knowing what the spec profile allows.

What chances are there of x264 supporting other different YUV colourspaces?
__________________
On Discworld it is clearly recognized that million-to-one chances happen 9 times out of 10. If the hero did not overcome huge odds, what would be the point? Terry Pratchett - The Science Of Discworld
Inventive Software is offline   Reply With Quote
Old 2nd October 2008, 02:31   #19  |  Link
Dark Shikari
x264 developer
 
Dark Shikari's Avatar
 
Join Date: Sep 2005
Posts: 8,666
Quote:
Originally Posted by Inventive Software View Post
Clarity would be helpful, since specifically applying that change, with that commit comment, assumes complete 4:4:4 Lossless encoding support in x264, which is incorrect, since x264 only supports 4:2:0. What chances are there of x264 supporting other different YUV colourspaces?
Maybe clarity would help, but just given the size of the commit its rather obvious it doesn't add 4:4:4 support

Alternate colorspace support would be nice, but would require all sorts of modifications across the code, mainly changing constant shifts to non-constant ones. It would be really really really annoying to do. I'd like it, though. Another problem, also, is that libavcodec doesn't support anything other than 4:2:0 either.
Dark Shikari is offline   Reply With Quote
Old 2nd October 2008, 02:36   #20  |  Link
Inventive Software
Turkey Machine
 
Join Date: Jan 2005
Location: Lowestoft, UK (but visit lots of places with bribes [beer])
Posts: 1,953
Quote:
Originally Posted by Dark Shikari View Post
Maybe clarity would help, but just given the size of the commit its rather obvious it doesn't add 4:4:4 support
I take things at face value (yeah, dumb, but it shows some shortcomings by other people). That commit made me think x264 had lossless 4:4:4 encoding, which from previous experience and reading would mean a very major rewrite of x264's internal workings.

Quote:
Originally Posted by Dark Shikari View Post
Alternate colorspace support would be nice, but would require all sorts of modifications across the code, mainly changing constant shifts to non-constant ones. It would be really really really annoying to do. I'd like it, though. Another problem, also, is that libavcodec doesn't support anything other than 4:2:0 either.
When one has new support, the other is usually quick to follow. I'd love to say "hey, why don't I work on that", but it would require about 2 or 3 years more understanding of not just x264 but also colourspaces in general, and efficient programming. All 3 take time.
__________________
On Discworld it is clearly recognized that million-to-one chances happen 9 times out of 10. If the hero did not overcome huge odds, what would be the point? Terry Pratchett - The Science Of Discworld
Inventive Software is offline   Reply With Quote
Reply

Tags
huffyuv x264 lossless

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 07:29.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.