[Mp4-tech] Doubt about scaling and transformation in H.264, Plz Help....

atul tomar tomar_atul2000 yahoo.com
Thu Sep 8 07:32:37 ESTEDT 2005


Dear Experts,
Could anyone please clarify my doubt about scaling and transformation? 
I would appreciate your help. 
There is a document "H.264 / MPEG-4 Part 10: Transform & Quantization" on www.vcodex.com by Iain E G Richardson. Can I use this document for implementing all transformations and scaling techniques at encoder and decoder side in my h264CODEC?
Well I have implemented complete document but its giving correct result for Input block X: {5,11,8,10,9,8,4,12,1,10,11,4,19,6,15,7} only. If I give some other sample block and perform whole operation I do not get reconstructed block close to input block.
1. Please let me know, if some information is missing at any point in the document. Does this document follow different process for transformation/scaling?
2. I read process of scaling and transformation in H.264 ITU standard it seems to be very different.
For 4x4luma DC, scaling is done by given equations:
After the inverse transform, scaling is performed as follows.
– If QP'Y is greater than or equal to 36, the scaled result shall be derived as
dcYi,j = (fi,j * LevelScale(QP'Y %6,0,0) ) << (QP'Y / 6 - 6 ), with i, j 0..3          (8-320)
– Otherwise (QP'Y is less than 36), the scaled result shall be derived as
dcYi,j = (f i,j * LevelScale(QP'Y % 6,0,0) + 2 5-QP'Y/6) >> ( 6 - QP'Y / 6 ), with i, j 0..3 
                                                                                                                           (8-321)
While in Richardson document same scaling is performed by given equations.
If QP is greater than or equal to 12, rescaling is performed by:
W’D(i,j) = WQD(i,j).V(0,0).2floor(QP/6)-2
If QP is less than 12, rescaling is performed by:
W’D(i,j) = [WQD(i,j).V(0,0) + 21-floor(QP/6)]>>(2-floor(QP/6)
I am using two tables based on QP (Table 6.6 [MF] for scaling and Table 6.7 [V] for rescaling) given in Richardson doc or book.
3. In 4x4luma DC or 2x2chroma DC, Do I need to divide by 64 during rescaling as we do in 4x4residual rescaling given in Richardson doc.
Please give your comments where I am doing mistake.
Looking for response.
Thanks in advance.
With Warm Regards,
Atul
__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: /pipermail/mp4-tech/attachments/20050908/e7c87ad5/attachment.html


More information about the Mp4-tech mailing list