Log in

View Full Version : Is there a way to enable CABAC without re-encoding?!!!


Ody1
11th December 2012, 16:30
OK, I just had this idea...

After the encoder has done it's work there are a lot of staff left that need to be compressed losslessly, right? So, if you have a video that was encoded with the less efficient CAVLC, can it be processed somehow to use CABAC without re-encoding? Thus saving space without altering the quality.

Can at least be done if theory? I've searched and searched but couldn't find an answer.

sneaker_ger
11th December 2012, 17:05
Yes, it would be possible in theory, but I am not aware of any actual implementations.

benwaggoner
11th December 2012, 18:11
It would be very cool to have a utility that could losslessly convert between CAVLC and CABAC entropy coding.

I imagine this would be relatively easy to hack with x264. It's basically just doing a H.264 to H.264 reencode, but ripping out everything between entropy decode and entropy encode.

sneaker_ger
11th December 2012, 18:27
But why would x264 have an entropy decoder in the first place? It's an encoder.

nhakobian
11th December 2012, 20:42
I think this would be an interesting tool to have. I remember reading a while back that there was talk about making one, but I don't think anything came of that discussion.

I tried to find these posts, but unfortunately search failed me.

Ody1
11th December 2012, 21:29
I was hoping that a tool for this job exists. It'd be very useful. Thanks.

benwaggoner
11th December 2012, 21:56
But why would x264 have an entropy decoder in the first place? It's an encoder.

Every encoder has decoder functionality in it so it can figure out what it encoded for future prediction.

That said, I suppose one could omit entropy decoding, and just measure the bitrate of the coded frame...

J_Darnley
11th December 2012, 21:59
If you're looking for a place to implement it, a bitstream filter in ffmpeg sounds like the most appropriate place.

kieranrk
12th December 2012, 00:49
Every encoder has decoder functionality in it so it can figure out what it encoded for future prediction.

That said, I suppose one could omit entropy decoding, and just measure the bitrate of the coded frame...

Exactly.

ggf31416
15th May 2013, 03:42
I'm afraid this patent may be relevant http://www.google.com/patents/US20050147172

drmpeg
15th May 2013, 05:22
I'm afraid this patent may be relevant http://www.google.com/patents/US20050147172

That's a patent for a hardware CAVLC->CABAC and CABAC->CAVLC converter contained in the LSI Logic (now Magnum Semiconductor) SoC's. It doesn't preclude a software implementation.

It's a pretty cool architecture. The firmware doesn't have to worry about CABAC at all. Everything is done in CAVLC and automagically converted to/from CABAC with just a simple DMA operation.

Ron