PDA

View Full Version : Near lossless bitstream conversion MPEG4-ASP to MPEG4-AVC


Ewi
20th December 2011, 14:29
Hi,

I would like to ask for some help regarding the possibility to do a near lossless bitstream conversion from MPEG4-ASP to MPEG4-AVC.

Goal
------
Convert a valid MPEG4-ASP (Xvid, DivX) bitstream into a valid MPEG4-AVC bitstream with almost no visual differences

Application
-------------
1.) AVC streams have the possibility to use CABAC for entropy coding, which is significantly more efficient than the ASP entropy coders. This might allow for a 5-10% compression gain depending on the source.
2.) As ASP was more or less skipped during the transition from MPEG2 to MPEG4-AVC, many devices are unable to play MPEG4-ASP videos. However, a real recompression is computationally expensive and lossy. Therefore, a more direct conversion might be beneficial.

Idea
----------
MPEG4-ASP is not too different from MPEG4-AVC main profiles. Therefore it might be possible to reinterpret the ASP stream as an AVC stream and concert the stream directly without bigger visual degradations.

Open Problems
----------------
- Not doing a full recompression, one cannot make use of all the power found in AVC encoders such as x264. However, if the idea stated above is actually possible, then the conversion would be at least lossless.
- There are some features in ASP which are not available in AVC, for example GMC. Here, a straightforward way would be reject such files (which should be OK, since luckily almost noone uses GMC). Another possibility might to join the GMC transform with the motion estimation. As for the case of one-warp point GMC, one could put the GMC transform into the ME mean vector.

Need for help
---------------
I'm in the middle to my PhD, so I don't know if or when I could tackle this little project. However, before I start, I would need some directions. For example, I don't know enough about the actual bitstream encoding.
- Are the DCT coefficients compatible between ASP and AVC or are there different mechanisms involved?
- Where might be pitfalls in such a bitstream conversion?
- Are there some aspects that will prevent such a more or less direct conversion?
- Which ASP parser is the easiest to understand and hack on? Same for AVC bitstream encoders.


I hope someone finds some time to answer.

Best regards...

imcold
20th December 2011, 19:22
There are big differences between the two actually. For example you can't reuse motion vectors in P-frames, since subpel interpolation algorithms are different -> you'd get different compensated image and adding the original residual data would cause distortions. Not to say that dct&quantization are totally different, so you couldn't reuse the residual data anyway.

Dark Shikari
20th December 2011, 22:15
They have completely different interpolation filters and completely different transforms. It's not feasible.

drmpeg
21st December 2011, 09:02
A Silicon Valley company (Xilient, now called Zenverge after Xilinx threatened a lawsuit) actually tried this approach. AFAIK, they abandoned the approach and their current line of trancoders do a full decode and encode.

http://ewh.ieee.org/r6/scv/sps/200711Abstract.htm

Ron

Ewi
21st December 2011, 09:23
Thank you for your fast responses. Too bad that this won't work but this way it will definitely save me some time. Nevertheless, the talk you mentioned, Ron, sounds actually very promising and as it seems they actually implemented that transcoding idea. However, if they actually threw that design away there will be a reason.

Thank you again...