PDA

View Full Version : AVC idea


jfehr
25th May 2005, 20:51
Sorry if this has been brought up before.

I don't know the codecs well enough to verify, but would it be possible to transcode losslessly from MPEG-2 to AVC, and would we gain anything from it?

If AVC can use the same macroblock size, shouldn't it be possible to decode the MPEG-2 down to that level, and reencode them again? (Using the more efficient AVC lossless compression algorithms.) Perhaps we could do the same thing from ASP sources?

Or perhaps there isn't that much to be gained by it?

If anything else, knowledge of where each macroblock comes from should allow you to use those same macroblocks again. (Nothing worse then wasting bits trying to reproduce artifacts caused by another codec.) We could also make sure that our reference frames match up as much as possible with the original reference frames.

Manao
25th May 2005, 21:13
The block's size is the same, but the DCT transformation isn't ( 4x4 against 8x8 ), and the prediction mechanism isn't the same either : halfpel inteprolation is different ( bilinear in one case, roughly a lanczos in the other ), intra modes are totally different...

If possible, your idea would have allowed a 10% gain ( since it is admitted that cabac is 10% more efficient than cavlc )

Your final idea, using the motion vector of the mpeg2 for avc encoding, wouldn't take into account differences in the halfpel interpolation, wouldn't allow the use of quarterpel, and would rely on the fact that the mpeg2 was encoded by a good encoder. It would be possible, but it would harm the quality a lot ( though the encoding process would be really fast, I think its quality wouldn't be on par with XviD ).

Tommy Carrot
25th May 2005, 21:30
Also don't forget that maybe the biggest reason of the relative inefficiency of mpeg2 is the small GOP-sizes (it must use keyframes very frequently), so with direct transcoding you would get an AVC video with plenty of keyframes. So even if your idea would be possible, considering that most improvements of AVC lies in the improved temporal prediction, the gain would be very small compared to normal transcoding.

jfehr
25th May 2005, 21:54
Sorry, I should have put that last sentence by itself.

We wouldn't have to use _all_ of the MPEG-2's reference frames, but wouldn't it still be better (even if we re-encoded it) to attempt to use them where possible? Usually (in MPEG-2 at least) the reference frames are the 'best' quality frames, and the others B and P frames reference them, right? (Making them not-as-good quality.) If the AVC encoder used a B or P frame as a reference frame instead of an I frame, wouldn't the quality be lower from the start then if they used an I frame as a reference frame?

Well, they were just ideas anyway. I hate it when I get a bad AVC encode, and then look at the original source and realize it was pretty bad to begin with. Its all about quality source! :)