Log in

View Full Version : Decoding errors (examples included)


chilledinsanity
27th December 2007, 08:18
I'm running into a bug with the Xvid envoder I've never seen before. I'll detail everything that's happened and include samples of the problem so I can hopefully get some advice on how to fix this. I'm trying to encode a clip from some source footage encoded in HuffyUV. In every single xvid encoding I've tried, I get pixel bleeding (streaking?) in one scene that's a fade-in from black. The problem appears to be with the decoder and not the encoding itself. Here's what I've observed:

Pixel bleeding:
-Playback on most recent xvid codec (1.1.3)
-Playback on older versions I had on hand (as far back as XviD-1.0.1-05062004)

No pixel bleeding:
-Playback using DivX decoder
-Playback after uninstalling Xvid codec (I have no idea why this works, I even checked the WINDOWS\SYSTEM32 directory for leftover files and also confirmed DivX wasn't using it)

My settings for the encoding are as follows:
-Fast Recompress Mode
-quantization level of 2 (I and P frames)
-no B frames
-no Trellis encoding
-chroma encoding
-problem occurs on either single or multi-pass
-VHQ mode off
-Motion Search Precision 6


To help illustrate the problem, I’m including both the problematic Xvid sample and the HuffyUV source clip. Feel free to try doing an Xvid encoding on the HuffyUV version yourself. Using the normal Xvid decoder, look in the lower right area of the corrupted clip to see the pixel bleeding:

Corrupted Xvid Example (1.6MB) (http://www.radford.edu/~rscott31/encoding/Xvidtest.avi)
Uncorrupted HuffyUV source example (30.8MB) (http://www.radford.edu/~rscott31/encoding/HuffyUVtest.avi)

Please don’t tell me just to install ffdshow or use DivX instead. I distribute videos and I don’t want to have to tell my friends to install additional software. Also, it’s ludicrous if the Xvid codec can’t properly decode its own encoded files. The way I see it, there’s either something wrong with my source clip, how I am encoding it, or else with the decoder itself. Any feedback on this problem would be appreciated, thanks.

sysKin
27th December 2007, 16:21
Confirmed. Indeed it's a strange bug in decoder. I even get different results every time I decode it.

I'll see if I can find any time to fix it :/ If anyone else wants to have a go, please do.

squid_80
27th December 2007, 19:03
Possibly something to do with non-mod-16 height?

Something weird: If the file is opened in virtualdub the artifacts are there. However if I add a null transform filter, open the cropping dialog and use the buttons at the bottom to move forward frame by frame from the start, the artifacts aren't there.

Edit: Hmmm, only seems to happen if the stream is encoded with vhqmode 0.

chilledinsanity
27th December 2007, 20:36
syskin: Thanks for looking into it.

squid_80: Wow I feel like an idiot, it is a non-16 height, I hadn't thought of that. I'll take 8 pixels off, which will probably solve this. Thanks for pointing this out.

sysKin
28th December 2007, 11:39
Ow great, and here I was thinking "800x600 is obviously mod16".....

Still, it should work.