Gross red blocking with some H264 decoders

This forum is for questions and discussion of all the aspects of handling and cleaning up your footage with Avisynth.
Locked
User avatar
jasper-isis
P. Y. T.
Joined: Tue Aug 13, 2002 11:02 am
Status: catching all the lights
Org Profile

Gross red blocking with some H264 decoders

Post by jasper-isis » Sun Dec 27, 2009 5:49 pm

Some x264-compressed footage (particularly scenes with strong reds) renders horribly within Windows Media Player. I've noticed this both under Vista with CCCP installed and in Windows 7 with its out-of-the-box Media Foundation decoders. Opening the files in Media Player Classic HC (which uses what? ffdshow?) results in a much better picture.

For example, a frame from this latest AMV I'm working on:

Image
(in Windows Media Player 12, Windows 7)

Image
(in Media Player Classic Home Cinema, standalone zip version)

As you can see, the blocking resulting from WMP's decoder is rather hideous. The file was encoded using Zarx264gui at quant 18. I have tried increasing the deblocking option to 3, but that hardly made any difference.

This is kind of frustrating, as obviously I have no control over which decode my viewers use. My question is, is there anything I can do to make this footage less susceptible to blocking? Some kind of filtering, or a color change? Should I go back to XviD? Or should I just say "screw it," and not care about people who will be using WMP?
Image

User avatar
mirkosp
The Absolute Mudman
Joined: Mon Apr 24, 2006 6:24 am
Status: (」・ワ・)」(⊃・ワ・)⊃
Location: Gallarate (VA), Italy
Contact:
Org Profile

Re: Disgusting red blocking with some H264 decoders

Post by mirkosp » Sun Dec 27, 2009 5:55 pm

My bet is on the decoder having issues with mbtree or weightp 2. Even coreavc had issues that had to be addressed in version 2.0. So yeah, basically it's people that should update, and not you to downgrade for them.
Image

User avatar
Zarxrax
Joined: Sun Apr 01, 2001 6:37 pm
Contact:
Org Profile

Re: Disgusting red blocking with some H264 decoders

Post by Zarxrax » Sun Dec 27, 2009 7:27 pm

mirkosp wrote:My bet is on the decoder having issues with mbtree or weightp 2. Even coreavc had issues that had to be addressed in version 2.0. So yeah, basically it's people that should update, and not you to downgrade for them.
I would doubt that the decoder has issues with those, because coreavc was the only decoder that was known to have major bugs with them.
Could you post a small sample of the clip?

User avatar
jasper-isis
P. Y. T.
Joined: Tue Aug 13, 2002 11:02 am
Status: catching all the lights
Org Profile

Re: Disgusting red blocking with some H264 decoders

Post by jasper-isis » Sun Dec 27, 2009 7:53 pm

Sure, here are the first 10 seconds of the AMV. (But the problem does show up in other red areas.)

x264 version
Lagarith version
Image

User avatar
Zarxrax
Joined: Sun Apr 01, 2001 6:37 pm
Contact:
Org Profile

Re: Disgusting red blocking with some H264 decoders

Post by Zarxrax » Sun Dec 27, 2009 9:50 pm

Well I tried various combos of decoders and renderers in mpc, and I couldn't get the blocky result, so I guess its something specific just to WMP12. It looks like some sort of yv12 upscaling error.
I personally wouldn't worry about it, but if you could change the colors, maybe to a blue, or decrease the saturation, it would probably go away.

User avatar
NeoQuixotic
Master Procrastinator
Joined: Tue May 01, 2001 7:30 pm
Status: Lurking in the Ether
Location: Minnesota
Contact:
Org Profile

Re: Disgusting red blocking with some H264 decoders

Post by NeoQuixotic » Sun Dec 27, 2009 11:19 pm

I played back the x264 in WMP12 and didn't notice much blocking compared to MPC-HC with CCCP. The built-in decoder for H.264 doesn't look great, but it does seem to use DXVA. WMP12 can play back 1080p H.264 directly from a Blu-ray rip with like 0-2% CPU usage, so it has to be using DXVA. So maybe it is the decoding of the video card/drivers that is causing the blocking. I'm using a ATI Radeon HD4870 on 9.12 hotfix drivers. It does look to be a YV12 issue since red isn't sampled as much in a 4:2:0 color space, so saturated reds tend to block.
Insert clever text/image here.

User avatar
jasper-isis
P. Y. T.
Joined: Tue Aug 13, 2002 11:02 am
Status: catching all the lights
Org Profile

Re: Disgusting red blocking with some H264 decoders

Post by jasper-isis » Mon Dec 28, 2009 8:05 pm

Thanks for the help. I'm gonna use Premiere's color changer to shift the hue and saturation a little. Hopefully that takes care of the issue.
Image

User avatar
jasper-isis
P. Y. T.
Joined: Tue Aug 13, 2002 11:02 am
Status: catching all the lights
Org Profile

Re: Disgusting red blocking with some H264 decoders

Post by jasper-isis » Mon Dec 28, 2009 10:21 pm

I've figured out a solution. I think you guys are right in that it's a YV12 issue. Previously, I was flagging the 720x480 video to play in 16:9 anamorphic, which meant that it was up to the decoder (or the player?) to resize it. If instead I scale my video to 848x480 before using convertoyv12() and before encoding to x264, then no resizing is done during playback, and the blocking does not appear.

Obviously this results in a slight waste of filesize, but I consider it a fair trade-off for good quality playback.
Image

User avatar
Bakadeshi
Abuses Spellcheck
Joined: Mon Sep 29, 2003 9:49 am
Location: Atlanta, GA
Contact:
Org Profile

Re: Disgusting red blocking with some H264 decoders

Post by Bakadeshi » Wed Dec 30, 2009 9:52 pm

jasper-isis wrote:I've figured out a solution. I think you guys are right in that it's a YV12 issue. Previously, I was flagging the 720x480 video to play in 16:9 anamorphic, which meant that it was up to the decoder (or the player?) to resize it. If instead I scale my video to 848x480 before using convertoyv12() and before encoding to x264, then no resizing is done during playback, and the blocking does not appear.

Obviously this results in a slight waste of filesize, but I consider it a fair trade-off for good quality playback.

Not to mention not all players support the aspect flag in mp4s.

Locked

Return to “AviSynth Help”