View Full Version : H.264 and Hadamard Transform
Appu
30th January 2007, 07:41
Can some one tell me the use and benefits of hadamard transform in H.264 encoding. I know that in H.264 encoding DC coefficients are gathered together and a hadamard is performed on that. Just wondering how Hadamard is better than integer transform and for what kind of contents Hadamard will be useful. How the encoder chooses to use Hadamard?. Also Is it supported by x264?
akupenguin
30th January 2007, 18:05
Hadamard is used in Intra_16x16 macroblocks, as a second level transform on the DC coefficients from the HCT. It is required by the standard; you can't make a H.264 encoder that doesn't support it.
The reason for using Hadamard instead of HCT is speed and simpilicity. Due to the way HCT depends on renormalization in the dequant process, if you were to apply two levels of HCT it would need a whole new quant matrix. Whereas Hadamard doesn't need to be renormalized. The other alternative would be using a single 16x16 HCT instead of two levels of 4x4, but that would need not only a new quant matrix but also a new HCT function and new modes in the CABAC/CAVLC residual coders.
Note: the JM reference encoder has an option "Use Hadamard". This does not refer to what I described above, instead it refers to the other unrelated use for Hadamard in encoding: motion estimation, where it is better known as "SATD" rather than "Hadamard". This part is not specific to h264, but rather could be used in any video encoder implementation, and is available in libavcodec's mpeg1/mpeg2/mpeg4/h261/h263/snow/wmv1/wmv2/rv1/rv2 etc.
jult
2nd August 2008, 11:53
OK, that looks fascinating.
Could you tell us which x264 commandline options/parameters are directly involved with --hadamard, and which should best be left out when making use of --hadamard?
Tnx in advance
akupenguin
2nd August 2008, 13:47
I don't understand what kind of mind could come up with such a confused question.
jult
2nd August 2008, 13:55
I don't understand what kind of mind could come up with such a confused question.Hmm.. let me explain it then; I bumped into the commandline option --hadamard somewhere on this forum. It may have been a joke, I'm not sure, but I searched the forum for this particular word in combination with x264 and got this thread.
Nothing strange about my question, considering what you wrote about it. I don't even understand what kind of mind could not grasp my question. ;-)
LoRd_MuldeR
2nd August 2008, 14:03
You can use "Hadamard Exhaustive Search" with the --me tesa option. It's even slower than the "Exhaustive Search" (--me tesa).
Since the benefit over --me umh is pretty small, you must carefully decide whether it's worth the extra encoding time. For me it is not.
I'm not aware of any options that conflict with --me tesa though...
By the way:x264: unknown option -- hadamard
jult
2nd August 2008, 14:13
You can use "Hadamard Exhaustive Search" with the --me tesa option. It's even slower than the "Exhaustive Search" (--me esa).
OK, cool. ;-)
Nice for encoding short movies for online release that never suffer from a timed deadline or something. It's no problem if it takes a day to encode 2 minutes of film in some cases..
This reminds me, which reference do you have or use for x264 commands? I never seem to look at the correct one, relating to recent releases.
And yes, I assume --hadamard once was a patched option.
LoRd_MuldeR
2nd August 2008, 14:23
This reminds me, which reference do you have or use for x264 commands? I never seem to look at the correct one, relating to recent releases.
x264.exe --longhelp
http://mulder.dummwiedeutsch.de/pub/x264/
http://forum.doom9.org/search.php?do=finduser&u=83421
Sharktooth
2nd August 2008, 14:50
the search for --hadamard is equivalent to the search for hadamard
jult
2nd August 2008, 17:28
x264.exe --longhelp
http://mulder.dummwiedeutsch.de/pub/x264/
Someone (maybe even me) should rewrite those and combine the actual commands with the avidemux text.
crouserali
15th March 2011, 02:01
Dear x.264 experts
I have a question regarding the use of the code of x.264 in MATLAB in order to code the output of the X.264 coder using one of channel coding techniques and then decode.
my question :is this possible? and how difficult this may be?
one more thing
how to convert the output of the X264 into a bit stream to have the ability of manipulating them?
Thanks in advanced
Blue_MiSfit
15th March 2011, 07:19
Please do not bring old threads back to life. Start a new thread.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.