[XviD-devel] PATCH: Per slices rendering
Alban Bedel
xvid-devel@xvid.org
Sun, 7 Jul 2002 19:18:34 +0200
Hi Christoph Lampert,
on Sun, 7 Jul 2002 18:48:41 +0200 (CEST) you wrote:
> On Sun, 7 Jul 2002, Alban Bedel wrote:
>
> >
> > Hi all,
> >
> > I'm working on MPlayer and recently found that your decoder was now as fast as
> > libavcodec (even faster in some case). So I wanted to add somekind of direct
> > rendering in xvid. I implemented what we call "slices" rendering wich alredy give
> > a little speedup. Comments are welcome.
>
> Are you sure there is a real difference to XVID_CSP_USER format which was
> inspired by Mplayer, too? Both seem to simply return the pointers to
> internal buffer instead of copying mem.
With XVID_CSP_USER you can access the internal buffer of xvid. Then you need to
copy it to video memory. In this version xvid only copy the modified MB to a
buffer provided by the host app (ussally in video memory) thus avoiding a few
unneded copy. And as the copy append during the decoding the data might be
copied from the L2 cache wich give more speedup. A few benchmaks :
VIDEO: [DIVX] 640x272 16bpp 29.97 fps 537.4 kbps (65.6 kbyte/s)
./mplayer ~/download/duality.divx -vc xvid -frames 2500 -benchmark -nosound
-dr -noslices : (XVID_CSP_USER)
BENCHMARKs: VC: 22.591s VO: 28.408s A: 0.000s Sys: 1.237s = 52.236s
BENCHMARK%: VC: 43.2472% VO: 54.3840% A: 0.0000% Sys: 2.3688% = 100.0000%
./mplayer ~/download/duality.divx -vc xvid -frames 2500 -benchmark -nosound -dr
(XVID_CSP_EXTERN)
BENCHMARKs: VC: 26.455s VO: 18.898s A: 0.000s Sys: 1.394s = 46.747s
BENCHMARK%: VC: 56.5920% VO: 40.4263% A: 0.0000% Sys: 2.9817% = 100.0000%
./mplayer ~/download/duality.divx -vc ffodivx -frames 2500 -benchmark -nosound -dr
(ffmpeg decder)
BENCHMARKs: VC: 39.825s VO: 18.670s A: 0.000s Sys: 1.293s = 59.788s
BENCHMARK%: VC: 66.6104% VO: 31.2268% A: 0.0000% Sys: 2.1628% = 100.0000%
VIDEO: [DIVX] 352x240 24bpp 33.00 fps 841.4 kbps (102.7 kbyte/s)
./mplayer test.avi -vc xvid -benchmark -nosound -dr -noslices
(XVID_CSP_USER)
BENCHMARKs: VC: 4.923s VO: 3.901s A: 0.000s Sys: 0.476s = 9.299s
BENCHMARK%: VC: 52.9376% VO: 41.9488% A: 0.0000% Sys: 5.1136% = 100.0000%
./mplayer test.avi -vc xvid -benchmark -nosound -dr
(XVID_CSP_EXTERN)
BENCHMARKs: VC: 5.849s VO: 2.694s A: 0.000s Sys: 0.307s = 8.850s
BENCHMARK%: VC: 66.0886% VO: 30.4439% A: 0.0000% Sys: 3.4675% = 100.0000%
./mplayer test.avi -vc ffodivx -benchmark -nosound -dr
(ffmpeg decder)
BENCHMARKs: VC: 5.459s VO: 2.641s A: 0.000s Sys: 0.330s = 8.429s
BENCHMARK%: VC: 64.7617% VO: 31.3265% A: 0.0000% Sys: 3.9117% = 100.0000%
PS: Note that the ffmeg decoder use a smthg simillar to my XVID_CSP_EXTERN
Albeu