View Full Version : c3d before or after resize
lark
22nd October 2002, 06:39
hi,
do you use convolution3d before or after resize?
and why?
i've been using it after resize for awhile (for DVD rips),
but saw quite many examples, where it has been used before resize.
so i made a test and as i expected the encoding took about 50% longer when putting it before resize and the compressibility was a bit worse:
flick: LOTR bonus: Quest for the Ring (21:27)
DivX: 2-pass with 1200kbps
script:
LoadPlugin("C:\PROGRA~1\GORDIA~1\mpeg2dec.dll")
LoadPlugin("C:\PROGRA~1\GORDIA~1\decomb.dll")
LoadPlugin("C:\PROGRA~1\GORDIA~1\convolution3d.dll")
mpeg2source("C:\FELLOWSHIP_BONUS\VIDEO_TS\1_2.d2v")
Telecide()
crop(8,0,706,480)
BicubicResize(544,416,0,0.5)
Convolution3d(0,4,4,8,8,3,0)
this gave me av quant 4.407760
and filesize 192849920
when i moved convolution3d before bicubicersize,
i got av quant 4.448165
and filesize was 192993280
i know that the filesize means nothing, because i was
using 1200 kbps and the diff in quant is quite small,
but the diff in encoding time was huge, because c3d
had to process so much more pixels.
regards
t :)
JohnMK
22nd October 2002, 06:59
Of course. Just do it anyway. It's puts hair on your chest.
HarryM
22nd October 2002, 12:32
I using filters after resize.
Why?
1. It is faster
2. Strenght of noise is smaller (because resize- mainly bilinear, but bicubic too, eliminate lot of noise.
vlad59
22nd October 2002, 12:59
I don't really see the use of this poll as my answer is : it depends.
- I want a really sharp and clean result :
Convolution3D before a Lanczos or Sharp BicubicResize
Advantages : Sharper
Drawback : slower, less compressible
- I want a to fit a movie in 1 CD and have roughly no blocks
BilinearResize
Convolution3D (soft settings)
Advantages : faster, good compressibility
Drawback : softer movie
It's a matter of taste and it really depend of your source. I just encode movie to test the filter, I mainly encode anime.
my choice will depend of the quality I want to give to my encode.
Just my 2 cents
@lark : be sure it's not a rush, it's just my opinion ;) ;)
Acaila
22nd October 2002, 13:01
Use smoothing filters before resize if you want the highest quality. It's always been like that.
Yes it goes faster after resize, but you are also smoothing out the little bit of detail you have left. When done before resizing you work on the original picture which has more detail and greater dimensions to begin with so losing a bit won't be noticable.
Or using extremely low thresholds for your filter might work when done after resizing.
e.g.
Suppose you have a picture that is 100x100 and you average every first and second pixel with eachother.
Now take the original 100x100 picture, resize it to 32x32 and again average every first and second pixel with eachother.
Which do you think looks better?
SILICON
22nd October 2002, 13:59
I using filters after resize.
Because it is a faster and the quality is very similar.
I like speed process time in another things, that give me more quality (i.e. the MPEG2DEC3 CPU=6)
iago
22nd October 2002, 14:08
@SILICON
Sorry but I just couldn't exactly understand it from your post, and just to correct a possible misunderstanding (for those who might be not much familiar with MPEG2Dec3):
A setting of cpu=6 with MPEG2Dec3 would also slow down the encoding considerably compared with a setting of cpu=0 (which means no pre-processing to the source); and quality-wise, harder pre-processing to the source absolutely doesn't guarantee more quality ;).
best regards,
iago
HarryM
22nd October 2002, 14:42
Originally posted by iago
@SILICON
Sorry but I just couldn't exactly understand it from your post, and just to correct a possible misunderstanding (for those who might be not much familiar with MPEG2Dec3):
A setting of cpu=6 with MPEG2Dec3 would also slow down the encoding considerably compared with a setting of cpu=0 (which means no pre-processing to the source); and quality-wise, harder pre-processing to the source absolutely doesn't guarantee more quality ;).
best regards,
iago
The Best, but damm slow, is this:
Convolution3D(...)
BilinearResize(...)
Convolution3D(...) :)
vlad59
22nd October 2002, 15:10
Originally posted by HarryM
The Best, but damm slow, is this:
Convolution3D(...)
BilinearResize(...)
Convolution3D(...) :)
It's the best if you don't like sharp movie ...... again it's a matter of taste
iago
22nd October 2002, 15:49
------------------------------------
The Best, but damm slow, is this:
Convolution3D(...)
BilinearResize(...)
Convolution3D(...) :) (HarryM)
------------------------------------
Would be softer than air for my eyes! ;)
I agree with vlad. "Best" is a very subjective and individually-biased notion, as a result of which there is no single, general "best" :).
regards,
iago
Wilbert
22nd October 2002, 17:28
@Vlad59,
- I want a really sharp and clean result :
Convolution3D before a Lanczos or Sharp BicubicResize
Advantages : Sharper
Drawback : slower, less compressible
- I want a to fit a movie in 1 CD and have roughly no blocks
BilinearResize
Convolution3D (soft settings)
Advantages : faster, good compressibility
Drawback : softer movie
Maybe I'm wrong, but I thought it was the other way around.
cleaning before resizing: more compressibility
cleaning after resizing: less compressibility
So when encoding to svcd/cvd one should clean before resizing and when encoding to DivX/Xvid (with a not too low bitrate) it doesn't matter much.
Acaila
22nd October 2002, 18:06
No, Vlad56 had it correct.
vlad59
22nd October 2002, 18:39
Originally posted by Acaila
No, Vlad56 had it correct.
Vlad56, Huuummmm I think I lost something .... ;) ;) ;)
@Wilbert
As soon as you resize you'll add some things harder to compress even if you use a simple bilinearResize.
The aim of C3D is to have when possible the same pixel values in previous, current and next frame so that ME has an easiest job and can save bits. As soon as you resize you add some _virtual_ resize noise so making the movie less compressible.
Wilbert
22nd October 2002, 18:51
I understand that if you resize you make the movie less compressible. But isn't resizing also amplifying the noise. Of course for dvd rips that doesn't matter since there's no noise in the source, but in analog caps there is already a lot of noise.
Let me give you an example. Suppose I'm capturing from tv (analog), contains a lot of noise. The goal is to make a svcd. The problems is always that on high motions scenes you will find little blocks, garbage, etc ... IOW the maximum bitrate of 2520 is too low.
What should you do to minimize this, and keeping as much detail as possible? Smoothing before resizing, or smoothing after resizing and why?
vlad59
22nd October 2002, 19:23
It depends on the algo you would like to use :
If you choose bilinear : I would say it doesn't matter if you use c3d (or any denoiser) it before or after resize :
Bilinear will remove a small part of the noise itself
As soon a you use NeutralBicubic or higher (Lanczos for example), the resize algo will interpret noise as detail so _amplifly_ it.
So my point (as always it's my opinion on a subject I don't fully know as I never made analog or dv capture) is :
if you want to use a sharp resizer : always use your _big_ denoiser before resize, and if you want you can use a lighter one (TemporalSoften (2,1) for example) after resize to gain a little more compressibility.
If you use a soft resizer (typically Bilinear) : you will be able to denoise after resize but you'll have to seriously test it to be sure to have a viewable result.
Sorry, I don't have a real answer. but in theory I should be right (So in practice I may be wrong) ;)
SILICON
22nd October 2002, 22:24
Originally posted by iago
A setting of cpu=6 with MPEG2Dec3 would also slow down the encoding considerably compared with a setting of cpu=0 (which means no pre-processing to the source); and quality-wise, harder pre-processing to the source absolutely doesn't guarantee more quality ;).
Ok, CPU=6 is more slower than CPU=0, but:
CPU=6 and C3D after resize is more faster than CPU=2 and convolution before filter.
The original size for PAL are 704x576 and I resize to 336x318 (standar CVD resolution) YMCV
About quality. The CPU=6 increment the compressibility a lot (see test in this thread (http://forum.doom9.org/showthread.php?s=&threadid=35636) . I think that better compressibility , more qualite in the same size (I ever full the CD)
Regars...
theReal
23rd October 2002, 01:18
the way I handle it is this:
- for DVD sources, use C3D before resize with low values.
- for TV captures, use C3D after resize with higher values plus some temporalsmoother plus maybe Divx5 pre-processing.
That means I try to use C3D before resize on tv captures as well (because it looks better), but usually the effect isn't strong enough.
Encoding time? I don't care as long as it's below 24 hours :D
vBulletin® v3.8.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.