PDA

View Full Version : AVC-Intra


Gannjunior
7th May 2008, 02:44
I'm doing a test between efficiency of camcorders codecs...

i'm trying to simulate by megui a profile that can be similar to an AVC-intra compression at 50 and 100mbit (like panasonic uses in some cameras -> ftp://ftp.panasonic.com/pub/Panasonic/Drivers/PBTS/papers/WP_AVC-Intra.pdf )

pls see the attached file that i created and tell me what you think. I would be sure that megui and x264 works fine in that condition.

thanks in advance.

ciao!

audyovydeo
7th May 2008, 09:57
i'm trying to simulate by megui a profile that can be similar to an AVC-intra compression

ciao!

ciao zeneise !

I've been trying to find a way for intra-only compression myself, admittedly without much effort.

I use a keyframe-only command line which subsumes several people's inputs:

x264 --crf %3 %sar% -I 1 -i 1 -A "i4x4,i8x8" -8 --subme 5 -t 1

of course in your case you I would use ABR with your two desired bitrates.

Trouble is, I haven't researched the lossless mode asmuch as I would like : can anyone clarify whether --QP 0 implies intra-only ?

Also, can you post your settings ?

ciao
audyovydeo

foxyshadis
7th May 2008, 10:43
lossless and intra are unrelated, it can be inter as well.

Gannjunior
7th May 2008, 13:02
hi audiovydeo!!
it is as foxyshadis told...

the loseless mode has the 0 qpel, because, since it is a loseless compression, it doesn't need of any accurate motion estimation, since there are not any macroblock of P and B...

my setting of only I-frame compression are attached in the first message. you can download the rar and extract in megui preset folder my "AVC-Intra@50mbit"...

ciao!

nm
7th May 2008, 15:29
hi audiovydeo!!
it is as foxyshadis told...

the loseless mode has the 0 qpel, because, since it is a loseless compression, it doesn't need of any accurate motion estimation, since there are not any macroblock of P and B...
That would be pretty much the opposite of what foxyshadis just said.

Gannjunior
7th May 2008, 20:42
maybe i've haven't understood...but i don't think that loseless compression could be also an intra frame compression...

however i would like to rest in topic. I would like some opinion about how to simulate avc-intra compression of pana as i said in first message...and if my attached preset is good.

thanks

Blue_MiSfit
7th May 2008, 21:39
I think lossless compression can be intra-frame based (in x264 anyway). It would be more complex, and more difficult to edit of course, but should be more compressible.

~MiSfit

Gannjunior
7th May 2008, 22:06
wait, wait... we need to clarify something.

a loseless compression (as the cq-loseless preset in megui) it is a REAL loseless that is:

- ONLY intra, only I-frame, that means to keep the whole frame without ANY lose of information. there is a compression similar to winzip, like it happens in huffyuv for example.

- a real loseless compression will be ALWAYS intra-frame compression. Since INTER-frame compression means a TEMPORAL and spatial compression, that means the existence of GOP of I, P and B frames, that means the necessity of macroblocks, that means complex motion estimation, that means the introduction of "errors"...so inter-frame compression is incompatible, by definition, with a loseless compression...

While an intra-frame compression, like panasonic AVC-intra frame at 50 and 100mbit, does not necessary mean a real loseless compression.
But it means only spatial compression (like jpeg compression...). That is that EACH frame is compressed as whole. You encode 1000 frame clip? you will have 1000 I-frames. That means no macroblock, no P or B frames.
That means more easy to edit in post-editing (since you don't need NLE to rebuild DELTA frames - as you need in a long gop mpeg2 or avc compression...).

So, if this is clear, is there anybody that could answer to my initial question pls?

thanks!

ciao!

Dark Shikari
7th May 2008, 22:12
- ONLY intra, only I-frame, that means to keep the whole frame without ANY lose of information. there is a compression similar to winzip, like it happens in huffyuv for example.

- a real loseless compression will be ALWAYS intra-frame compression. Since INTER-frame compression means a TEMPORAL and spatial compression, that means the existence of GOP of I, P and B frames, that means the necessity of macroblocks, that means complex motion estimation, that means the introduction of "errors"...so inter-frame compression is incompatible, by definition, with a loseless compression...Completely wrong. Inter compression can be lossless simply by storing those errors as residual data. That's how Lossless H.264 works. In fact, in H.264, all blocks, I, P, and B, all use prediction and storing of error; there is no such thing as an unpredicted block. The only thing that varies is the method of prediction. Some of your statements are really bizarre, like the "necessity of macroblocks?" Intra frames use macroblocks too.
While an intra-frame compression, like panasonic AVC-intra frame at 50 and 100mbit, does not necessary mean a real loseless compression.
But it means only spatial compression (like jpeg compression...). That is that EACH frame is compressed as whole. You encode 1000 frame clip? you will have 1000 I-frames. That means no macroblock, no P or B frames.
That means more easy to edit in post-editing (since you don't need NLE to rebuild DELTA frames - as you need in a long gop mpeg2 or avc compression...).Correct.

Blue_MiSfit
7th May 2008, 22:25
There we have it! Listen to this guy. He knows his potatoes!

Now - what exactly was your initial question? You were asking about a profile to do intra-only?

If you want to post a sample, don't attach it. Use a free file hosting service like megaupload, sendspace or whatever.

Please, NO rapidshare :)

~MiSfit

Gannjunior
7th May 2008, 22:27
Hi Dark Shikari,

Some of your statements are really bizarre, like the "necessity of macroblocks?" Intra frames use macroblocks too.

yes of course, i read again my statement and i explained myself as an animal, i told some bestiality...

but pls explain me better how a temporal and spatial compression can be a real loseless compression...of course i'm losing something that make me not understand...

thanks!

PS pls can you help me to find a correct preset to simulate AVC-intra compression as i asked in my first message?
thanks again!!

ciao!

Dark Shikari
7th May 2008, 22:30
but pls explain me better how a temporal and spatial compression can be a real loseless compression...of course i'm losing something that make me not understand...

The process of encoding any macroblock goes as follows:

1. Predict.
2. Calculate the residual.
3. Transform and quantize the residual.
4. Losslessly encode the residual.

For intra blocks, "predict" means one of the many available intra prediction modes based on edge pixels. For inter blocks, it means motion compensation.

In lossy compression with H.264, step 3 means means "perform a DCT on the residual and quantize the resulting frequencies." This is inherently lossy because even without quantization, the DCT has rounding error.

In lossless compression with H.264, step 3 is completely removed; the residual is coded directly into the bitstream as raw pixel differences.

PS pls can you help me to find a correct preset to simulate AVC-intra compression as i asked in my first message?Just add --keyint 1 to any x264 commandline, and you're done.

MfA
7th May 2008, 22:33
You seem to be thinking of the marketing term "visually lossless" ... in other words, not lossless.

Dark Shikari
7th May 2008, 22:34
You seem to be thinking of the marketing term "visually lossless" ... in other words, not lossless.I hope you're not talking to me, because H.264 lossless is exactly that, lossless.

Gannjunior
7th May 2008, 22:34
Blue_misfit,

in my first message i attached a rar with a preset that you can load in megui to see it...

as you can see in first message there is a pdf about avc-intra compression used by panasonic in its professional camera (it costs only 27000 us dollars... :p ).

So my goal is to compare 50mbit mpeg-2 long GOP compression used by sony in its best camcorder with AVC-intra 50/100mbit of Pana.

So to test them, i'm doing some test from an uncompressed clip and i'm going to simulate the two differents way of sony and pana that ;)i told you above...

more clear? ;)

thanks!

Gannjunior
7th May 2008, 22:51
1.2.3.4 about lossy compression, that can brings, to use Mfa words, to a "visual loseless". ok.

1.2.4 for loseless h264 preset in megui. ok. But i expected there was a compression of each whole frame...indeed i verified that h264 loseless give me about half size of huffyuv.

...Just add --keyint 1 to any x264 commandline, and you're done...
ok, it is exactly what i did. ;)

i'm just checking h264 loseless preset commandline and i don't see keyint 1...but 25...i'm getting confusing... sorry about my silly doubts...

ciao!

Dark Shikari
7th May 2008, 22:54
i'm just checking h264 loseless preset commandline and i don't see keyint 1...but 25...i'm getting confusing... sorry about my silly doubts...Intra-only and lossless are not the same thing, and neither requires the other.

Gannjunior
7th May 2008, 23:01
ok, my mistake was that i thought that loseless compression was like intra-only compression but without any spatial compression...

Blue_MiSfit
8th May 2008, 00:07
Makes sense :) Aren't we all happy now!

Unfortuately, your attachment hasn't been approved yet - and may never be :(

I suggest uploading it to a hosting service, as I previously suggested.

Otherwise, we can't see it!

~MiSfit

Gannjunior
8th May 2008, 00:49
mmm...is it normal that i can download my attached file?
...however here it is a speedyshare copy:

http://www.speedyshare.com/543804389.html

i've just obtained better psnr and ssim setting the decision quality to rdo and and lowering intra luma quantization deadzone from 11 to 8 (trellis off).

ciao!

Blue_MiSfit
8th May 2008, 02:17
Yep, that's normal :)

I downloaded your preset, and will run it through in awhile. I've got some stuff running ATM.

~MiSfit

yaous
27th December 2008, 17:27
The process of encoding any macroblock goes as follows:

1. Predict.
2. Calculate the residual.
3. Transform and quantize the residual.
4. Losslessly encode the residual.

For intra blocks, "predict" means one of the many available intra prediction modes based on edge pixels. For inter blocks, it means motion compensation.

how the first intra block of the first intra frame is encoded?

transform without intra prediction?

Dark Shikari
27th December 2008, 17:38
how the first intra block of the first intra frame is encoded?

transform without intra prediction?DC prediction is defined based on which neighbors are available. If none are available, all pixels are predicted to be "128."

alexcyn
20th February 2009, 11:06
BTW, AVC-Intra spec defines max frame size, so CBR or VBR are not used here.
Also, note that AVC-Intra always uses 10bit sampling for YUV components. Presumably Sony MPEG2 uses 8bit only.
=Alexey