View Full Version : XviD makes artifacts (always) when resizing
Nathan-S
25th June 2003, 02:29
I encode a movie. :)
I chose a resolution of say... 640x480
I look at the image.
It looks great with a bit rate of 700. :)
I make the movie full screen.
Now I can see artefacts. :(
I lower my resolution to 640x480.
Make the movie full screen.
Those artefacts are now gone... :)?
Why do they show up only when I resize the movie in a file player?
I took some crappy x-men (time shifted via internet--gone now) episodes which were at a resolution of 320x480 and when they are at full screen I will not even look, but If I lower my resolution... Poof clean image. Zero artefacts, 320x240, looks good, and 64 megs/half hour.
What is going on here, and could this be used to really make good use of MPEG4?
Sirber
25th June 2003, 02:32
Let's say:
1) What's your hardware
2) What player do you use?
3) Is your graphic card updated?
4) :logfile:
Nathan-S
26th June 2003, 07:02
this seems to happen with any xvid file that I make or even download. I've noticed it even in MPEG. I don't think it has to do with the encoding, but I think it is in the decoding and resizing. Maybe the image is resized before decoding, making the encoded movie look really bad. I don't even have the slightest clue on how XviD works (except for the I, P, and B frames) so maybe I am wrong?
My Hardware:
Windows XP
AMD Athlon 2100+ (not overclocked)
768 megs ram DDR
7200 RPM hard drive
550 watt psu
ATI Radeon 8500DV (Up to date)
I use The Core Media Player
But I have noticed this thing happening in all players
Which log file do you mean?
symonjfox
26th June 2003, 15:32
What decoder are you using? FFdshow? nic's Xvid Dshow decoder?
Check if you selected post processing on/off.
DDie
26th June 2003, 19:32
Are you sure that those artifacts (btw. could you describe them) only appear in full screen?
I used to encode DVDs without bicubic resizing... All those films look crappy with strange "cuts" where some details were missing.
Nathan-S
26th June 2003, 20:03
The artifacts are the kind you would see if you lowered the bitrate a lot. Like blocking. If you encode a movie at something like 320x240 and use a bitrate small enought to just make the movie block free (mostly), and you maximized it to full screen to watch it in a file player, you will see all of the blocks. But if you lower your resolution to 320x240 and then maximize (no resizing done) the movie looks almost perfect - like it did before changing your resolution, and maximizing it. My resolution is 1152x864, and a 320x240 movie looks like crap, but if I lower my res to say 650x480, the movie is a million times better looking. It is kinda hard to tell if they appear in non-full screen, but if you mes around with the resolutions, it seems to help.
Assault
26th June 2003, 20:30
I don't think that is a bug. I even think that this behaviour isn't surprising at all. ;)
I'll try to explain (please correct me if I'm wrong):
1)You watch a movie (640x480) at a sreen resolution of 640x480. There won't be any resizing in full screen mode. The file will be played in its original resolution of 640x480.
2)You switch your monitor to a resolution of 1280x960 and watch the same movie. Now it is resized to 1280x960 in full screen mode. That means that the size of the clip gets doubled. It isn't surprising that you'll notice some artefacts now which you didn't see in 1) because the size of those artifacts gets also doubled. The same would happen if you zoomed into the video at 1).
Assault
Koepi
26th June 2003, 21:17
Depending on the video card and their drivers the resizing method chosen has a great influence on quality, as well.
I.e. if no filtering is done, you'll have a "lego version" of your content. With bilinear filtering the image will probably get blurred a little, with lanczos everything's just fine.
As you noticed yourself, this problem isn't xvid-related. It's general. It's hardware/software of your VGA / your OS,....
You can use ffdshow for resizing, I think you can choose the resizing method within. Try it and you'll see. Another thing is a opengl resizer. There was something like that popular a few years ago, back when 3dfx was still market leader. It "abused" a texture (=movie) on a big area (=screen) to abuse the powerfull opengl filtering which resulted in smooth upsampling.
Regards
Koepi
Nibor
26th June 2003, 21:55
Ok, I have a little question about that...
When I use Nic's DirectShow Filter, which resizing method gets used?
If the resizing isn't done in the Video Decoder in this case which element DOES the resizing actually, is it the Player, the graphics card or what?
If this question was asked before, I'm sorry but search didn't help...
Prettz
27th June 2003, 00:21
Originally posted by Koepi
I.e. if no filtering is done, you'll have a "lego version" of your content. With bilinear filtering the image will probably get blurred a little
This is more or less the problem I have with most media players (the only exception is bsplayer). Some sources you can't notice any difference, others have the "lego" blocking effect as well as horrible color bleeding.
From what I gathered from previous threads on this topic, the fault lies with your video card drivers, since most media players use the drivers to do resizing for them (correct?)
Koepi
27th June 2003, 01:38
Uff, that's not easy to explain I fear:
there are many possible ways to resize the video during playback.
My _impression_ is, that there is a chain from best to worst which get's checked in terms of resizing methods, and the first "working" one gets used:
1) vga hardware overlay
2) dshow software resizing in hardware overlay
3) dshow software resizing in GDI
4) neirest neighbour resize in GDI
I.e. a matrox productiva G100 can only do 8bit hardware overlays. That causes the chain to end in 3) or 4). And that looks horrible (next to the fact that this needs more processor power. If you now take into consideration that all modern VGA cards can do proper hardware overlay and thus the specific system is most likely an old and slow one, guess how jerky the playback is.)
Some drivers (I know of plenty ATI drivers) report "wrong" values or simply don't properly support hardware overlays. Which leads to 3) or 4) which look bad (as in the initial post of this thread).
Here upgrading the drivers to some working version will help.
Other cases are problems with the drivers/hardware - i.e. if your desktop colour depth is 16bit, some GPUs don't properly support overlay. Or the other way around, having 24/32 bpp leads to that behaviour.
There is no general rule how to solve that, you have to check every variant of desktop colour depth, close your mediaplayer and restart the media file until you find something working.
I hope this finally is a well-enough explanation for everybody having trouble to properly display a movie.
regards
Koepi
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.