View Single Post
Old 1st October 2005, 14: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