Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Capturing and Editing Video > DV

Reply
 
Thread Tools Search this Thread Display Modes
Old 17th August 2005, 23:52   #1  |  Link
Wilbert
Moderator
 
Join Date: Nov 2001
Location: Netherlands
Posts: 6,325
DV decoder differences - update

I started with a new comparison. I'm looking at the following DV codecs:

1) Cedocida 0.1.6
2) Canopus 1.00.001 (does anyone have a newer version?)
3) MainConcept 2.4.16
4) DV codec in ff_vfw.dll
5) MS DV codec (directshow codec) for W2K
6) Panasonic (version unknown)
7) VDub v1.6.10's internal DV decoder

The following stuff is under investigation:

* lumarange behaviour [the conclusions in the sticky still apply; rest not done yet]
* encoder differences [not started yet]
* decoder differences [i'm looking only at PAL]

Before looking at the decoder differences, i will post what i think is the correct way of subsampling (YUY2 -> DV-YV12 interlaced conversion) and subsampling (DV-YV12 interlaced conversion -> YUY2). Please, let me know if you think the sampling is wrong. This will enable us to compare the theoretic results with the different sampling results of the DV codecs.

Theory: subsampling

YUY2 -> DV-YV12 interlaced conversion:

The layout of the *frame* is as follows
Code:
YUV1 ...
YUV2 ...
YUV3 ...
YUV4 ...
YUV5 ...
YUV6 ...
YUV7 ...
YUV8 ...
The new chroma samples are interpolated as follows:
Code:
YV1 ... V1 = ( 2*V1 + V3 )/3
YV2 ... V2 = ( 2*V2 + V4 )/3
YU3 ... U3 = ( U1 + 2*U3 + U5 )/4
YU4 ... U4 = ( U2 + 2*U4 + U6 )/4
YV5 ... V5 = ( V3 + 2*V5 + V7 )/4
YV6 ... V6 = ( V4 + 2*V6 + V8 )/4
YU7 ...
YU8 ...
Theory: upsampling

DV-YV12 interlaced conversion -> YUY2:

The layout of the *frame* is as follows
Code:
YV1 ...
YV2 ...
YU3 ...
YU4 ...
YV5 ...
YV6 ...
YU7 ...
YU8 ...
The missing chroma samples are interpolated as follows (note that the samples are taken from the same field, and the existing chroma is left untouched):
Code:
YV1 ... U1 = U3
YV2 ... U2 = U3
YU3 ... V3 = 0.5*( V1 + V5 )
YU4 ... V4 = 0.5*( V2 + V6 )
YV5 ... U5 = 0.5*( U3 + U7 )
YV6 ... U6 = 0.5*( U4 + U8 )
YU7 ...
YU8 ...
Decoder differences

To my surprise, if the sampling above is correct, all DV decoder produce incorrect output (ok, i didn't test all six of them yet). The sampling of the OS codec Cedocida 0.1.6 is the most accurate, but it is also incorrect.

I made a test clip with Cedocida 0.1.6 (selected YV12 - DV sampling). The resulting U values of each line are the following:
Code:
U3 = 16
U4 = 16
U7 = 16
U8 = 16
U11 = 16
U12 = 16
U15 = 16
U16 = 16
U19 = 16
U20 = 16
U23 = 16
U24 = 16
U27 = 16
U28 = 16
U31 = 30
U32 = 30
U35 = 34
U36 = 35
U39 = 38
U40 = 39
If the sampling (DV-YV12 interlaced conversion -> YUY2) above is correct, the decoders should produce the following output:
Code:
U1 = 16
U2 = 16
...
U27 = 16
U28 = 16
U29 = 23
U30 = 23
U31 = 30
U32 = 30
U33 = 32
U34 = 32.5 = 33
U35 = 34
U36 = 35
U37 = 36
U38 = 37
U39 = 38
U40 = 39
results for Cedocida:

Code:
U1 = 16
U2 = 16
...
U27 = 16
U28 = 16
U29 = 23
U30 = 23
U31 = 30
U32 = 30
U33 = 32
U34 = 33
U35 = 34
U36 = 35
U37 = 36
U38 = 37
U39 = 38
U40 = 39
results for Canopus:

Code:
U1 = 16
U2 = 16
...
U27 = 16
U28 = 16
U29 = 30
U30 = 30
U31 = 30
U32 = 30
U33 = 34
U34 = 34
U35 = 35
U36 = 35
U37 = 38
U38 = 38
U39 = 39
U40 = 39
It looks like the chroma is being duplicated instead of interpolated. The bad thing is that it is duplicated from the other field. This can be "corrected" by using FixBrokenChromaUpsampling. I will post screenshots which will prove this. Note that ScrollLock is correct in the other sticky.

results for MainConcept:

Code:
U1 = 16
U2 = 16
...
U23 = 16
U24 = 16
U25 = 15
U26 = 15
U27 = 15
U28 = 15
U29 = 31
U30 = 31
U31 = 31
U32 = 31
U33 = 33
U34 = 34
U35 = 33
U36 = 34
U37 = 39
U38 = 39
U39 = 39
U40 = 39
Uhm, what should i comment on this. This doesn't make any sense at all.

results for DV codec in ff_vfw.dll:

This codec outputs YV12.

results for MS DV codec:

Code:
U1 = 16
U2 = 16
...
U16 = 16
U17 = 15
U18 = 16
U19 = 15
U20 = 16
U21 = 15
U22 = 16
U23 = 15
U24 = 16
U25 = 15
U26 = 16
U27 = 15
U28 = 16
U29 = 30
U30 = 30
U31 = 30
U32 = 30
U33 = 33
U34 = 34
U35 = 33
U36 = 34
U37 = 38
U38 = 39
U39 = 38
U40 = 39
Uhm, what should i comment on this. This doesn't make any sense at all.

results for Panasonic codec:

Since Panasonic outputs RGB [0,255] I converted it back to YUY2:
Code:
U1 = 49
U2 = 49
...
U27 = 49
U28 = 49
U29 = 56
U30 = 56
U31 = 56
U32 = 56
U33 = 55
U34 = 56
U35 = 55
U36 = 56
U37 = 59
U38 = 58
U39 = 59
U40 = 58
This doesn't make any sense. More research is needed to find out what happens here.

results for VirtualDub v1.6.10 (internal dv decoder):

Exactly the same as for Cedocida.


edit: corrected U values of source.

To be continued ...

Last edited by Wilbert; 30th August 2005 at 19:23.
Wilbert is offline   Reply With Quote
Old 18th August 2005, 01:20   #2  |  Link
Video Dude
Senior Member
 
Join Date: Apr 2004
Posts: 1,043
Quote:
Originally Posted by Wilbert
2) Canopus 1.00.001 (does anyone have a newer version?)
VideoHelp has the free version 1.02
http://www.videohelp.com/tools?tool=Canopus_DV_Codec

There are Canopus 2.x versions, but I believe they are only distributed with Canopus hardware products.
Video Dude is offline   Reply With Quote
Old 18th August 2005, 23:39   #3  |  Link
Wilbert
Moderator
 
Join Date: Nov 2001
Location: Netherlands
Posts: 6,325
@Video Dude,

If i install that version and look at the properties in VDub, it still says 1.00.001?
Wilbert is offline   Reply With Quote
Old 19th August 2005, 06:02   #4  |  Link
Video Dude
Senior Member
 
Join Date: Apr 2004
Posts: 1,043
It must be a mistake on the VideoHelp page. I guess 1.00.001 is the most up to date free version.
Video Dude is offline   Reply With Quote
Old 19th August 2005, 09:08   #5  |  Link
madman_xxx
Helps wasting time...
 
madman_xxx's Avatar
 
Join Date: Jul 2005
Location: Central Europe
Posts: 10
BTW: Will VirtualDub's DV codec under testing too?
__________________
Athlon64 PC w. BT878, Sony DigiCam, Philips TV, VGA-SCART... This hardware set is one hell of adventure... Don't even ask about software :/
madman_xxx is offline   Reply With Quote
Old 19th August 2005, 18:03   #6  |  Link
bb
Moderator
 
bb's Avatar
 
Join Date: Oct 2001
Location: Germany
Posts: 2,665
Quote:
Originally Posted by madman_xxx
BTW: Will VirtualDub's DV codec under testing too?
VirtualDub contains a DV decoder only, not a full codec.

bb
bb is offline   Reply With Quote
Old 7th September 2005, 18:28   #7  |  Link
henryho_hk
Registered User
 
Join Date: Mar 2004
Posts: 889
I move the following from the "Reinterpolate420" thread because it seems a bit off-topic there.

To compare the PAL-DV decoding of some common DV codecs, I have made some image output thru' AVISynth's ImageWriter. The config is as follows:
  • Interlaced PAL DV clip created by a Sony DSR-PD150P
  • AviSynth 2.5.5
  • System YUY2 Codec = Huffyuv 2.1.1.1 w/ CE Patch
  • System YV12 codec = Helix YV12 1.2

The codecs tried are:
  • Canopus Playback-only 1.1.0.0
  • Cedocida 0.1.6 (hex-edited to use the FourCC "CDVE")
  • FFDShow 20050822
  • Panasonic 2.64.1119.1600 (hex-edited to use FourCC CDVP)
  • Sony 2.23 (hex-edited to use FourCC CDVS)

Observations:
  1. Canopus seems to suffer from the chroma upsampling error (motion scene) but FixBrokenChromaUpsampling() introduces another chroma problem (static scene).
  2. Cedocida YUY2 has no observable flaws; however, its YV12 output has the chroma heavily blurred (motion scene).
  3. FFDShow's YUY2 and YV12 are both okay to me although YUY2 seems softer than others.
  4. Panasonic's chroma does not look right (static scene)....
  5. Sony's chroma does not look right either, though not as bad (static scene)....

I think FFDShow 20050822 is the YV12 winner for this PAL-DV clip. For YUY2, I vote for Cedocida.

The image files are available for reference:

<<deleted... refer to latter post>>

--------------------------------------------------------------
Cedocida's blurry YV12 is due to my wrong settings in the codec output.
Please refer to the following posts.
--------------------------------------------------------------


I have revised my previous codes. Any comment is welcomed:

Code:
t="motion"
#t="static"

sx = ( t == "motion" ) ? 240 : 560
sy = ( t == "motion" ) ? 360 : 410
lx = ( t == "motion" ) ? 160 : 160
ly = lx
dx = lx*3
dy = ly*3
cw = 720
ch = 576

# canopus
m_cdvc_yuy2=avisource("p3.avi",pixel_type="YUY2",fourcc="cdvc")
m_cdvc_yuyf=m_cdvc_yuy2.FixBrokenChromaUpsampling()

# cedocida
m_cdve_yuy2=avisource("p3.avi",pixel_type="YUY2",fourcc="cdve")
m_cdve_yv12=avisource("p3.avi",pixel_type="YV12",fourcc="cdve")

# ffdshow
m_dvsd_yuy2=avisource("p3.avi",pixel_type="YUY2",fourcc="dvsd")
m_dvsd_yv12=avisource("p3.avi",pixel_type="YV12",fourcc="dvsd")

# Panasonic
m_cdvp_rgb4=avisource("p3.avi",pixel_type="RGB24",fourcc="cdvp").ConvertTORGB32()

# Sony
m_cdvs_rgb4=avisource("p3.avi",pixel_type="RGB24",fourcc="cdvs").ConvertTORGB32()

#####################################################################
# Uncomment one by one for writing images...  Are there better ways?
#####################################################################

#m_cdvs_rgb4.crop(sx,sy,lx,ly).imagewriter(file="pal_"+t+"_sony_rgb_",start=1,end=1,type="ebmp")
#m_cdvs_rgb4.crop(sx,sy,lx,ly).PointResize(dx,dy).ConvertToRGB24(interlaced=false).imagewriter(file="pal_"+t+"_sony_rgb_f_a_",start=1,end=1,type="png")
#m_cdvs_rgb4.ConvertBackToYUY2().tweak(sat=0).PointResize(cw,ch).crop(sx,sy,lx,ly).PointResize(dx,dy).ConvertToRGB24(interlaced=false).imagewriter(file="pal_"+t+"_sony_rgb_f_y_",start=1,end=1,type="png")
#m_cdvs_rgb4.ConvertBackToYUY2().utoy().PointResize(cw,ch).crop(sx,sy,lx,ly).PointResize(dx,dy).ConvertToRGB24(interlaced=false).imagewriter(file="pal_"+t+"_sony_rgb_f_u_",start=1,end=1,type="png")
#m_cdvs_rgb4.ConvertBackToYUY2().vtoy().PointResize(cw,ch).crop(sx,sy,lx,ly).PointResize(dx,dy).ConvertToRGB24(interlaced=false).imagewriter(file="pal_"+t+"_sony_rgb_f_v_",start=1,end=1,type="png")

#m_cdvp_rgb4.crop(sx,sy,lx,ly).imagewriter(file="pal_"+t+"_panasonic_rgb_",start=1,end=1,type="ebmp")
#m_cdvp_rgb4.crop(sx,sy,lx,ly).PointResize(dx,dy).ConvertToRGB24(interlaced=false).imagewriter(file="pal_"+t+"_panasonic_rgb_f_a_",start=1,end=1,type="png")
#m_cdvp_rgb4.ConvertBackToYUY2().tweak(sat=0).PointResize(cw,ch).crop(sx,sy,lx,ly).PointResize(dx,dy).ConvertToRGB24(interlaced=false).imagewriter(file="pal_"+t+"_panasonic_rgb_f_y_",start=1,end=1,type="png")
#m_cdvp_rgb4.ConvertBackToYUY2().utoy().PointResize(cw,ch).crop(sx,sy,lx,ly).PointResize(dx,dy).ConvertToRGB24(interlaced=false).imagewriter(file="pal_"+t+"_panasonic_rgb_f_u_",start=1,end=1,type="png")
#m_cdvp_rgb4.ConvertBackToYUY2().vtoy().PointResize(cw,ch).crop(sx,sy,lx,ly).PointResize(dx,dy).ConvertToRGB24(interlaced=false).imagewriter(file="pal_"+t+"_panasonic_rgb_f_v_",start=1,end=1,type="png")

#m_cdvc_yuy2.crop(sx,sy,lx,ly).imagewriter(file="pal_"+t+"_canopus_yuy2_",start=1,end=1,type="ebmp")
#m_cdvc_yuy2.crop(sx,sy,lx,ly).PointResize(dx,dy).ConvertToRGB24(interlaced=false).imagewriter(file="pal_"+t+"_canopus_yuy2_f_a_",start=1,end=1,type="png")
#m_cdvc_yuy2.tweak(sat=0).PointResize(cw,ch).crop(sx,sy,lx,ly).PointResize(dx,dy).ConvertToRGB24(interlaced=false).imagewriter(file="pal_"+t+"_canopus_yuy2_f_y_",start=1,end=1,type="png")
#m_cdvc_yuy2.utoy().PointResize(cw,ch).crop(sx,sy,lx,ly).PointResize(dx,dy).ConvertToRGB24(interlaced=false).imagewriter(file="pal_"+t+"_canopus_yuy2_f_u_",start=1,end=1,type="png")
#m_cdvc_yuy2.vtoy().PointResize(cw,ch).crop(sx,sy,lx,ly).PointResize(dx,dy).ConvertToRGB24(interlaced=false).imagewriter(file="pal_"+t+"_canopus_yuy2_f_v_",start=1,end=1,type="png")

#m_cdvc_yuyf.crop(sx,sy,lx,ly).imagewriter(file="pal_"+t+"_canopusf_yuy2_",start=1,end=1,type="ebmp")
#m_cdvc_yuyf.crop(sx,sy,lx,ly).PointResize(dx,dy).ConvertToRGB24(interlaced=false).imagewriter(file="pal_"+t+"_canopusf_yuy2_f_a_",start=1,end=1,type="png")
#m_cdvc_yuyf.tweak(sat=0).PointResize(cw,ch).crop(sx,sy,lx,ly).PointResize(dx,dy).ConvertToRGB24(interlaced=false).imagewriter(file="pal_"+t+"_canopusf_yuy2_f_y_",start=1,end=1,type="png")
#m_cdvc_yuyf.utoy().PointResize(cw,ch).crop(sx,sy,lx,ly).PointResize(dx,dy).ConvertToRGB24(interlaced=false).imagewriter(file="pal_"+t+"_canopusf_yuy2_f_u_",start=1,end=1,type="png")
#m_cdvc_yuyf.vtoy().PointResize(cw,ch).crop(sx,sy,lx,ly).PointResize(dx,dy).ConvertToRGB24(interlaced=false).imagewriter(file="pal_"+t+"_canopusf_yuy2_f_v_",start=1,end=1,type="png")

#m_cdve_yuy2.crop(sx,sy,lx,ly).imagewriter(file="pal_"+t+"_cedocida_yuy2_",start=1,end=1,type="ebmp")
#m_cdve_yuy2.crop(sx,sy,lx,ly).PointResize(dx,dy).ConvertToRGB24(interlaced=false).imagewriter(file="pal_"+t+"_cedocida_yuy2_f_a_",start=1,end=1,type="png")
#m_cdve_yuy2.tweak(sat=0).PointResize(cw,ch).crop(sx,sy,lx,ly).PointResize(dx,dy).ConvertToRGB24(interlaced=false).imagewriter(file="pal_"+t+"_cedocida_yuy2_f_y_",start=1,end=1,type="png")
#m_cdve_yuy2.utoy().PointResize(cw,ch).crop(sx,sy,lx,ly).PointResize(dx,dy).ConvertToRGB24(interlaced=false).imagewriter(file="pal_"+t+"_cedocida_yuy2_f_u_",start=1,end=1,type="png")
#m_cdve_yuy2.vtoy().PointResize(cw,ch).crop(sx,sy,lx,ly).PointResize(dx,dy).ConvertToRGB24(interlaced=false).imagewriter(file="pal_"+t+"_cedocida_yuy2_f_v_",start=1,end=1,type="png")

#m_cdve_yv12.crop(sx,sy,lx,ly).imagewriter(file="pal_"+t+"_cedocida_yv12_",start=1,end=1,type="ebmp")
#m_cdve_yv12.ConvertToRGB24(interlaced=true).crop(sx,sy,lx,ly).PointResize(dx,dy).imagewriter(file="pal_"+t+"_cedocida_yv12_i_a_",start=1,end=1,type="png")
#m_cdve_yv12.ConvertToRGB24(interlaced=false).crop(sx,sy,lx,ly).PointResize(dx,dy).imagewriter(file="pal_"+t+"_cedocida_yv12_f_a_",start=1,end=1,type="png")
#m_cdve_yv12.tweak(sat=0).PointResize(cw,ch).crop(sx,sy,lx,ly).PointResize(dx,dy).ConvertToRGB24(interlaced=false).imagewriter(file="pal_"+t+"_cedocida_yv12_f_y_",start=1,end=1,type="png")
#m_cdve_yv12.utoy().PointResize(cw,ch).crop(sx,sy,lx,ly).PointResize(dx,dy).ConvertToRGB24(interlaced=false).imagewriter(file="pal_"+t+"_cedocida_yv12_f_u_",start=1,end=1,type="png")
#m_cdve_yv12.vtoy().PointResize(cw,ch).crop(sx,sy,lx,ly).PointResize(dx,dy).ConvertToRGB24(interlaced=false).imagewriter(file="pal_"+t+"_cedocida_yv12_f_v_",start=1,end=1,type="png")

#m_dvsd_yuy2.crop(sx,sy,lx,ly).imagewriter(file="pal_"+t+"_ffdshow_yuy2_",start=1,end=1,type="ebmp")
#m_dvsd_yuy2.crop(sx,sy,lx,ly).PointResize(dx,dy).ConvertToRGB24(interlaced=false).imagewriter(file="pal_"+t+"_ffdshow_yuy2_f_a_",start=1,end=1,type="png")
#m_dvsd_yuy2.tweak(sat=0).PointResize(cw,ch).crop(sx,sy,lx,ly).PointResize(dx,dy).ConvertToRGB24(interlaced=false).imagewriter(file="pal_"+t+"_ffdshow_yuy2_f_y_",start=1,end=1,type="png")
#m_dvsd_yuy2.utoy().PointResize(cw,ch).crop(sx,sy,lx,ly).PointResize(dx,dy).ConvertToRGB24(interlaced=false).imagewriter(file="pal_"+t+"_ffdshow_yuy2_f_u_",start=1,end=1,type="png")
#m_dvsd_yuy2.vtoy().PointResize(cw,ch).crop(sx,sy,lx,ly).PointResize(dx,dy).ConvertToRGB24(interlaced=false).imagewriter(file="pal_"+t+"_ffdshow_yuy2_f_v_",start=1,end=1,type="png")

#m_dvsd_yv12.crop(sx,sy,lx,ly).imagewriter(file="pal_"+t+"_ffdshow_yv12_",start=1,end=1,type="ebmp")
#m_dvsd_yv12.ConvertToRGB24(interlaced=true).crop(sx,sy,lx,ly).PointResize(dx,dy).imagewriter(file="pal_"+t+"_ffdshow_yv12_i_a_",start=1,end=1,type="png")
#m_dvsd_yv12.ConvertToRGB24(interlaced=false).crop(sx,sy,lx,ly).PointResize(dx,dy).imagewriter(file="pal_"+t+"_ffdshow_yv12_f_a_",start=1,end=1,type="png")
#m_dvsd_yv12.tweak(sat=0).PointResize(cw,ch).crop(sx,sy,lx,ly).PointResize(dx,dy).ConvertToRGB24(interlaced=false).imagewriter(file="pal_"+t+"_ffdshow_yv12_f_y_",start=1,end=1,type="png")
#m_dvsd_yv12.utoy().PointResize(cw,ch).crop(sx,sy,lx,ly).PointResize(dx,dy).ConvertToRGB24(interlaced=false).imagewriter(file="pal_"+t+"_ffdshow_yv12_f_u_",start=1,end=1,type="png")
#m_dvsd_yv12.vtoy().PointResize(cw,ch).crop(sx,sy,lx,ly).PointResize(dx,dy).ConvertToRGB24(interlaced=false).imagewriter(file="pal_"+t+"_ffdshow_yv12_f_v_",start=1,end=1,type="png")

Last edited by henryho_hk; 27th October 2005 at 15:17.
henryho_hk is offline   Reply With Quote
Old 10th September 2005, 19:43   #8  |  Link
tulikanuj
Registered User
 
Join Date: Aug 2005
Posts: 3
@henryho_hk,
a) what do you think about Arithyuv Codec? It's comparison to other codec will assist other to decide which one to get.
b) your video format was PAL. Will it be true for NTSC. Do you know if anyone has done such comparison for NSTC (or if you have plan to do one in NTSC format).
tulikanuj is offline   Reply With Quote
Old 11th September 2005, 04:47   #9  |  Link
henryho_hk
Registered User
 
Join Date: Mar 2004
Posts: 889
Quote:
Originally Posted by tulikanuj
@henryho_hk,
what do you think about Arithyuv Codec?
Actually, I don't know if Huffyuv is having any significance in my test as I perform all operation within AVISynth. I shall test Arithyuv if it matters.
henryho_hk is offline   Reply With Quote
Old 11th September 2005, 08:24   #10  |  Link
henryho_hk
Registered User
 
Join Date: Mar 2004
Posts: 889
I test the codecs again with a NTSC clip, which was posted in the XVID forum some time ago (the clip is called dvsample.avi but I can't find the thread now).

The snapshots are as follow. Please note that the YV12 png outputs should not be compared directly with the PAL files because i have added "ConvertToYUY2(interlaced=true)" this time. Don't worry, the ebmp files are intact.

<<deleted... refer to latter post>>

Observations:
  • Canopus does not have the chroma upsampling problem as in PAL.
  • Cedocida's YV12 is again blurry, and its YUY2 has strange horizontal lines in the very right side of its chroma output.
  • FFDShow's YV12 has a serious chroma shift of over 8 pixels horizontally (look at the blue object at the lower left).
  • Panasonic's chroma output is simply different from others.....
  • I find it very interesting to discover that their chroma output forms 2 groups concerning horizontal placement, Canopus and FFDShow's YUY2 as one, Sony, Panasonic & Cedocida as another.

This time, I don't know who's right and who's wrong.

----------------------------------------------------------

update - i have forgotten to set the proper cedocida yv12 output mode, causing the blurry chroma. the snaphots have been corrected now.

Last edited by henryho_hk; 26th October 2005 at 18:12.
henryho_hk is offline   Reply With Quote
Old 28th September 2005, 01:20   #11  |  Link
KR
Tester
 
Join Date: Jul 2004
Posts: 39
Sony DV Codec output shows blocks in high-motion video

Hi all,

I've experienced the following problem for about 3~4 months: I would capture the video from my DV camcorder and use VDub filter "Deinterlace - smooth" to make the video slow motion. During high-motion scenes in the video, some blocks in ex: frame t seemed to belong to frame t+1, and the same groups of pixels in frame t+1 seemed to come from frame t. As if parts of two frames (meaning two fields in the original video) were interchanged. This appeared only on the edges, during high-motion.

I first tough it was because of the filter, so I used other filters and the problem was still there. The problem was not Vdub(Mod) either. I even reformated and reinstalled Windows. I worried that it could be the camcorder, etc.

It turned out that the problem was Sony DV Codec. The problem shows up whenever it has to decode really high-motion video (ex: martial arts movements, or quick panning). If I remember correctly, VirtualDub1.6.10's internal decoder has the same problem, but Sony Dv Codec is worse. I now use MainConcept Codec.
__________________
May your future be filled with happiness.

Last edited by KR; 28th September 2005 at 01:22.
KR is offline   Reply With Quote
Old 1st October 2005, 15:04   #12  |  Link
henryho_hk
Registered User
 
Join Date: Mar 2004
Posts: 889
I added Adaptec and Mainconcept to my codec comparsion. Also, I generated all the output files again using stackvertical and horizontal for better comparsions.

Note: I have uploaded the images to imageshack. See posts below.

http://www.geocities.com/henryho_hk/ntsc_motion_1.zip
http://www.geocities.com/henryho_hk/ntsc_motion_2.zip
http://www.geocities.com/henryho_hk/ntsc_motion_3.zip
http://www.geocities.com/henryho_hk/pal_motion.zip
http://www.geocities.com/henryho_hk/pal_static.zip

Code:
Code:
function makeRow(clip c, string cc4, string csp, int cw, int ch, int sx, int sy, int lx, int ly, int dx, int dy)
{
	c_f=c.PointResize(cw,ch).crop(sx,sy,lx,ly).PointResize(dx,dy).Subtitle(csp+"/f").ConvertToRGB24(interlaced=true)
	c_y=c.tweak(sat=0).PointResize(cw,ch).crop(sx,sy,lx,ly).PointResize(dx,dy).Subtitle(csp+"/y").ConvertToRGB24(interlaced=false)
	c_u=c.utoy().PointResize(cw,ch).crop(sx,sy,lx,ly).PointResize(dx,dy).Subtitle(csp+"/u").ConvertToRGB24(interlaced=false)
	c_v=c.vtoy().PointResize(cw,ch).crop(sx,sy,lx,ly).PointResize(dx,dy).Subtitle(csp+"/v").ConvertToRGB24(interlaced=false)

	stackhorizontal(c_f,c_y,c_u,c_v)
}

function makeFrame(string clipname, string cc4, string codecname, int framenum)
{
	m=directshowsource(clipname,audio=false)
	cw=width(m)
	ch=height(m)

	# PAL Motion
	#sx = 240
	#sy = 360

	# PAL Static
	#sx = 560
	#sy = 410

	# NTSC Motion 1
	#sx = 96
	#sy = 108

	# NTSC Motion 2
	#sx = 316
	#sy = 104

	# NTSC Motion 3
	sx = 540
	sy = 272

	lx = 160
	ly = 160
	dx = lx*1
	dy = ly*1

	Try {
		m_rgb4=avisource(clipname,pixel_type="RGB24",fourcc=cc4,audio=false).ConvertBackToYUY2()
	} Catch(err_msg_1) {
		m_rgb4=BlankClip(m,pixel_type="yuy2")
	}
	m_rgb4=m_rgb4.trim(framenum,-1)

	Try {
		m_yuy2=avisource(clipname,pixel_type="YUY2",fourcc=cc4,audio=false)
	} Catch(err_msg_2) {
		m_yuy2=BlankClip(m,pixel_type="yuy2")
	}
	m_yuy2=m_yuy2.trim(framenum,-1)

	Try {
		m_yv12=avisource(clipname,pixel_type="YV12",fourcc=cc4,audio=false).ConvertToYUY2(Interlaced=true)
	} Catch(err_msg_3) {
		m_yv12=BlankClip(m,pixel_type="yuy2")
	}
	m_yv12=m_yv12.trim(framenum,-1)


	r1=makeRow(m_yv12, cc4, "yv12", cw, ch, sx, sy, lx, ly, dx, dy)
	r2=makeRow(m_yuy2, cc4, "yuy2", cw, ch, sx, sy, lx, ly, dx, dy)
	r3=makeRow(m_rgb4, cc4, "rgb", cw, ch, sx, sy, lx, ly, dx, dy)

	stackvertical(r1, r2, r3).subtitle(codecname,align=5,x=-1,y=-1)
}


f="dvsample.avi"
framenum=249

#f="p3.avi"
#framenum=2

cc4="cdvc"

p0=makeFrame(f, "cdva", "Adaptec 1.11", framenum)
p1=makeFrame(f, "cdvc", "Canopus (Playback) 1.1.0.0", framenum)
p2=makeFrame(f, "cdve", "Cedocida 0.1.6", framenum)
p3=makeFrame(f, "cdvm", "Mainconcept 2.4.16.0", framenum)
p4=makeFrame(f, "cdvp", "Panasonic 2.64.1119.1600", framenum)
p5=makeFrame(f, "cdvs", "Sony 2.23.0.0", framenum)
p6=makeFrame(f, "dvsd", "FFDShow 2005/08/22", framenum)

interleave(p0,p1,p2,p3,p4,p5,p6)
converttorgb24().imagewriter(type="png")

Last edited by henryho_hk; 5th November 2005 at 13:39.
henryho_hk is offline   Reply With Quote
Old 26th October 2005, 11:43   #13  |  Link
henryho_hk
Registered User
 
Join Date: Mar 2004
Posts: 889
Sorry to all.... I fail to set the "YV12" output setting of Cedocida properly as "YV12 MPEG2 Interlaced" when generating the snapshots. It may explain for "blurry" chroma observed in the previous Cedocida YV12 shapshots. I will update the snapshot files as soon as possible.

------------------------------------------------------

To all developers of Cedocida, please accept my apology. The blurried chroma of Cedocida in YV12 is simply due to my failure to select the correct YV12 output mode. I have updated all the snapshot zip files already. I have included the MS DV decoder output as well. Please enjoy.

Last edited by henryho_hk; 26th October 2005 at 18:10.
henryho_hk is offline   Reply With Quote
Old 29th October 2005, 15:00   #14  |  Link
henryho_hk
Registered User
 
Join Date: Mar 2004
Posts: 889
Code:
Disclaimer: (1) These are my own impression only.  ^_^  
            (2) These tables do not take into other quality factors like color, tone, details, contrast, etc.

Note:  I have removed the confusing YV12 rows as advised by Wilbert.

====================================================================================================
YUY2                        | FixBrokenChromaUpsampling() | Reinterpolate411() | Reinterpolate420() 
            Functions       +-----------------------------+--------------------+--------------------
            Needed ?        | NTSC         | PAL          | NTSC               | PAL                
----------------------------+--------------+--------------+--------------------+--------------------
Canopus     1.1.0.0 Free    | N            | Y            | Y                  | Y                  
Cedocida    0.1.6           | N            | N            | N                  | N                  
FFDShow     2005/10/13      | N            | N            | Y                  | N                  
Mainconcept 2.4.16.0 Demo   | N            | N            | Y                  | Y                  
MS DV Show  DX 9.0c         | N            | N            | N                  | Y                  
====================================================================================================


====================================================================================================
RGB                         | FixBrokenChromaUpsampling() | Reinterpolate411() | Reinterpolate420() 
            Functions       +-----------------------------+--------------------+--------------------
            Needed ?        | NTSC         | PAL          | NTSC               | PAL                
----------------------------+--------------+--------------+--------------------+--------------------
Adaptec     1.11            | N            | N            | Y                  | Y                  
Canopus     1.1.0.0 Free    | N            | Y & strange  | Y                  | Y                  
Cedocida    0.1.6           | N            | N            | N                  | N                  
FFDShow     2005/10/13      | N            | Y & strange  | Y                  | N                  
Mainconcept 2.4.16.0 Demo   | N            | N            | Y                  | Y                  
MS DV Show  DX 9.0c         | N            | N            | N                  | Y                  
Panasonic   2.64.1119.1600  | N            | N            | N                  | Y                  
Sony        2.23.0.0        | N            | N            | N                  | N                  
====================================================================================================


====================================================================================================
YV12                        | FixBrokenChromaUpsampling() | Reinterpolate411() | Reinterpolate420() 
            Functions       +-----------------------------+--------------------+--------------------
            Needed ?        | NTSC         | PAL          | NTSC               | PAL                
----------------------------+--------------+--------------+--------------------+--------------------
Cedocida    0.1.6           | N            | N            | N                  | N                  
FFDShow     2005/10/13      | N            | N            | Y & Incorrect      | N                  
====================================================================================================

Last edited by henryho_hk; 6th November 2005 at 17:06.
henryho_hk is offline   Reply With Quote
Old 29th October 2005, 16:23   #15  |  Link
Wilbert
Moderator
 
Join Date: Nov 2001
Location: Netherlands
Posts: 6,325
I don't get your YV12 column. Most of the DV decoders don't output YV12 (except cedocida and ffdshow).
Wilbert is offline   Reply With Quote
Old 2nd November 2005, 02:38   #16  |  Link
henryho_hk
Registered User
 
Join Date: Mar 2004
Posts: 889
I forgot to mention that the MS DV decodes the NTSC DV video at exactly one frame ahead of others but there is no such problem for PAL DV. I am sorry that I dun have the golden ear to verify if it applies to the audio too.
henryho_hk is offline   Reply With Quote
Old 4th November 2005, 17:37   #17  |  Link
henryho_hk
Registered User
 
Join Date: Mar 2004
Posts: 889
NTSC Motion 1

http://img394.imageshack.us/img394/6350/adaptec8rp.png
http://img394.imageshack.us/img394/8238/canopus7mw.png
http://img394.imageshack.us/img394/8413/cedocida6ez.png
http://img138.imageshack.us/img138/6922/ffdshow1ph.png
http://img55.imageshack.us/img55/181...concept4ko.png
http://img495.imageshack.us/img495/2682/msdv3yr.png
http://img495.imageshack.us/img495/9...nasonic1sl.png
http://img495.imageshack.us/img495/1443/sony5dl.png

========================================================

NTSC Motion 2

http://img69.imageshack.us/img69/1182/adaptec5yv.png
http://img488.imageshack.us/img488/5819/canopus9ts.png
http://img488.imageshack.us/img488/669/cedocida8or.png
http://img488.imageshack.us/img488/5600/ffdshow7wt.png
http://img488.imageshack.us/img488/7...concept4kp.png
http://img488.imageshack.us/img488/4422/msdv7km.png
http://img488.imageshack.us/img488/351/panasonic3ha.png
http://img488.imageshack.us/img488/3623/sony4hv.png

========================================================

PAL Motion

http://img142.imageshack.us/img142/7687/adaptec0dl.png
http://img142.imageshack.us/img142/8742/canopus5gz.png
http://img142.imageshack.us/img142/1906/cedocida5yy.png
http://img142.imageshack.us/img142/76/ffdshow6rp.png
http://img142.imageshack.us/img142/7...concept6tw.png
http://img147.imageshack.us/img147/8118/msdv7uk.png
http://img147.imageshack.us/img147/6...nasonic1lr.png
http://img147.imageshack.us/img147/5872/sony5pv.png

========================================================

PAL Static

http://img147.imageshack.us/img147/5219/adaptec2zv.png
http://img147.imageshack.us/img147/551/canopus6pk.png
http://img147.imageshack.us/img147/3006/cedocida8gq.png
http://img147.imageshack.us/img147/1025/ffdshow5la.png
http://img147.imageshack.us/img147/3...concept1ij.png
http://img147.imageshack.us/img147/7184/msdv6hl.png
http://img147.imageshack.us/img147/7...nasonic8ul.png
http://img147.imageshack.us/img147/777/sony6rv.png

Last edited by henryho_hk; 5th November 2005 at 13:37.
henryho_hk is offline   Reply With Quote
Old 19th March 2006, 14:50   #18  |  Link
WorBry
Registered User
 
Join Date: Jan 2004
Location: Here, there and everywhere
Posts: 1,103
On previously testing the Canopus DV codec v1.02 with my Pal DV sources, I encountered the famed ‘broken chroma upsampling’ effect, at least on my desktop PC (AMD 2800 XP processor, XP Pro/ SP2). ‘Fixbrokenchromaupsampling’ fixed it, but at the expense of a significant drop in quality as judged by some quality metric measures (PSNR etc).

Intrigued by reports that more recent versions do not exhibit the ‘bug’, I installed the demo version of Procoder 2, this time on my laptop (IBM ThinkPad R50e, Pentium Centrino M 1.60 GHz, XPPro/SP2). First off, I was surprised to find that the demo (from the Canopus website) is actually v 1.25.15.0. On checking the installed DV codec with VCSwap, I was also surprised to find that it (cdvccodc.dll) was version 1.02. More surprising was that when I tested the codec for DV decompression in VirtualDub, this time there was no evidence of ‘broken chroma upsampling’. In fact, applying the AVS fix filter actually manifested the effect.

Out of interest, I uninstalled the Procoder demo and re-installed my old copy of v1.02, with the same result. Strange I thought. So I installed v1.02 again on my desktop, and sure enough, there was the broken chroma bug again. I double checked that I was using the same versions of AVISynth (2.56) and VDubMod (1.5.10.2 Build 2452) on both PC’s, which I was.

Can anyone suggest why I would be seeing the bug on one PC but not the other? I’m wondering if maybe the Procoder installation left some ‘helper’ files on my laptop that ensure proper chroma upsampling. Of course this could be answered by installing the demo on my desk-top also, but I am reluctant to do so because I read somewhere that Procoder and TMPGenc don’t like each other.

After this I also found a copy of Canopus DV codec v4.04. Thinking this to be a more recent version, I installed it, only to find that the cdvccodc.dll was v1.01.003, seemingly an older version. However, after removing this codec (with VCSwap) and re-installing 1.02 or the Procoder demo, VCSwap still shows the codec to be 1.01.003. Very strange ??

I am otherwise using the Cedocida DV codec as my working codec, but might consider changing to Canopus for YUY2 output because of the better compression I am seeing in comparative tests (on my laptop). If only I could achieve the same on my AMD.

Last edited by WorBry; 19th March 2006 at 14:57.
WorBry is online now   Reply With Quote
Old 21st March 2006, 21:17   #19  |  Link
WorBry
Registered User
 
Join Date: Jan 2004
Location: Here, there and everywhere
Posts: 1,103
Well, if anybody is interested , I did the same on my desktop; installed and uninstalled the Procoder2 demo, noting not too delete the "these files are no longer needed ...etc" files when prompted in the deinstallation. Lo and behold, no chroma sampling error . I didnt note at the time what the residial dll's were but on running a registry check with RegCleaner, one appears to a remnant of the DV Booster Pack, in addition to the cdvccodc.dll decoder itself. This leaves me convinced that the so called "broken chroma upsampling bug" arises because the Canopus DV decoder was not intended to work in isolation from other files in the codec pack that assist in correct chroma upsampling.

However, my above claim that "Canopus-decoded" DV is more compressible than Cedocida (YUY2) was a little premature . On further testing with a variety of clips, they appear to be very much the same.

Last edited by WorBry; 21st March 2006 at 21:21.
WorBry is online now   Reply With Quote
Old 31st March 2006, 02:50   #20  |  Link
henryho_hk
Registered User
 
Join Date: Mar 2004
Posts: 889
You need to take a look at the registry to verify which DLL is picking up the vfw DV decoding job.
henryho_hk is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 16:45.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2019, vBulletin Solutions Inc.