PDA

View Full Version : why is SelectEven so slow?


Zep
1st December 2004, 01:07
The tests (8 meg cache hard drive 7200rpm maxtor 160 gigs )
AVS 2.5.6 alpha (241104) and VirtualDub-1.5.10


1) 51 FPS in preview in VDub with fast recompress selected

#720p HDTV source
loadplugin("d:\program files\dgmpgdec1012\DGDecode.dll")
mpeg2source("C:\test.d2v")
#SelectEven()
simpleresize(624,352)
AssumeFPS(120)

2) 27 FPS in preview in VDub with fast recompress selected

#720p HDTV source
loadplugin("d:\program files\dgmpgdec1012\DGDecode.dll")
mpeg2source("C:\test.d2v")
SelectEven()
simpleresize(624,352)
AssumeFPS(120)


what is CRAZY is that the first test is that much faster
**AND** it is scaling almost twice as many frames a second


thoughts?

Zarxrax
1st December 2004, 05:37
Because it is decoding the frames out of order. Each time it reads a frame, it has to decode all the frames since the last keyframe. At least I think thats the reason.

Leak
1st December 2004, 08:12
Originally posted by Zarxrax
Because it is decoding the frames out of order. Each time it reads a frame, it has to decode all the frames since the last keyframe. At least I think thats the reason.

Nah, it's just that DGDecode still has to decode all frames but just returns half of them, so your FPS in VD gets halved. After all, the B- and P-frames of an MPEG2 video depend on surrounding frames so you can't just skip every other one. If DGDecode really started again at the previous I-frame (which IIRC it does if you skip more than 7 frames ahead) it'd be even slower.

Tough cookies - you can't do anything about this other than using CorePNG or MJPEG as a codec (since it's a "limitation" of MPEG2) where every frame can be decoded directly, but I guess that's out of the question here... :D

Zep
2nd December 2004, 00:30
Originally posted by Leak
Nah, it's just that DGDecode still has to decode all frames but just returns half of them, so your FPS in VD gets halved. After all, the B- and P-frames of an MPEG2 video depend on surrounding frames so you can't just skip every other one. If DGDecode really started again at the previous I-frame (which IIRC it does if you skip more than 7 frames ahead) it'd be even slower.

then a much faster decoder is needed. lol keep the rest but add
nic's decoder :D (or a much faster PC hehe)

Hmmm I wonder if there are b frames in 720p. (This stream is 80Mb unlike
1088i which is like 19Mb. ( It might not use b frames) i will look later

see now this is when hooks into hardware decoders would be nice.
My HDTV cap card has a mpeg2 decoder and it decodes at only 2%
of CPU needed since it is done on card and sent to screen with just a small
touch to the CPU)


QUOTE]Originally posted by Leak

Tough cookies - you can't do anything about this other than using CorePNG or MJPEG as a codec (since it's a "limitation" of MPEG2) where every frame can be decoded directly, but I guess that's out of the question here... :D [/QUOTE]

yup :)