Support better deblocking algorithm in MPEG2 decoder

Support forum for DGMPGDec
Post Reply

Support better deblocking algorithm in MPEG2 decoder

Post by LigH » Sat Dec 03, 2011 9:10 am

It is already a while ago that I asked in another forum, and because if was probably forgotten since, I'll ask here again:

Do you have time and interest in enhancing your software-only MPEG2 decoder by implementing more modern and effective deblocking algorithms than the existing one?

I will not copy and paste »Didée's explanation why Nic's deblocking is not recommendable anymore, despite its advantage of knowing the quantization factors« – so please read it in detail again in ???'s forum, using this link.

Just in brief:
  • An MPEG2Source() internal deblocker has the advantage of knowing the source video's quantization to tune its strength and threshold on its own.
  • The currently used deblocker related to CPU and CPU2 parameters (Nic's algorithm) fails taking this advantage by being less efficient than other more modern algorithms.
  • The additionally available Deblock() filter, based on a H.264 implementation by Manao, has the advantage of being more efficient, but the disadvantages of not knowing the source quantization and requiring a manual strength parameter, and operating on MPEG4-AVC/H.264 quantization parameters instead of MPEG2/H.262
  • For some cases with rather fine quantization and little blocking, the pure Deblock() result can be too strong, an attenuation as implemented in deblock_qed() would be recommendable.
So the request would be to implement the additional use of Deblock() as alternative to the parameters CPU and CPU2 in MPEG2Source(), and optionally even the QED attenuation. Possibly via parameters like:

MPEG2Source(..., bool useDeblock, float qed)

(just a suggestion; practical reasons may prove it wrong or not...)

Please don't miss that it would have to work with interlaced sources too. Find Deblock_QED with a modification by Bi11 in »this thread on ???'s forum«.

User avatar
Distinguished Aussie Member
Distinguished Aussie Member
Posts: 150
Joined: Wed Oct 06, 2010 3:34 am

Re: Support better deblocking algorithm in MPEG2 decoder

Post by hydra3333 » Sat Aug 11, 2012 3:44 am

+1 for interlaced...

Post Reply