[Mplayer-users] a question about ICDecompress
hoffmajs at gmx.de
Sun Apr 22 14:00:04 CEST 2001
I´ve some questions about the video decoding (VFW):
1) right before the ICDecompress (mplayer.c:1500), the
bih->biSizeImage gets set to an value in_size. why?
I thought that, biSizeImage is the lenght of the videooutput buffer,
which has a fixed size depending on res of video and videoformat
and dont change for individual frames. Am I wrong?
2) ICDecompress gets always called with ICDECOMPRESS_NOTKEYFRAME.
i guess thats wrong. (should be more like
"is_keyframe ? 0 : ICDECOMPRESS_NOTKEYFRAME". i would think that it
makes some quality difference, but im not sure..
3) whats the deal with drawslice (for IMGFMT_YV12, IMGFMT_IYUV
and IMGFMT_I420)? what is it used for?
the video driver should take care of that.
and at least for xv and sdl just one memcpy would be enough:
the codec gives some format (e.g. IMGFMT_YV12) and the video overlay displays
it. no need to special case.
4) (just an idea): Its possible to completely get rid of the memcpy in
drawframe (and drawframe itself, too):
buffer = video_out->get_buffer();
ret = ICDecompress(sh_video->hic, ICDECOMPRESS_NOTKEYFRAME,
get_buffer() returns the internal buffer from the vo_* driver.
(lock/release is a wrapper around SDL_Lock/_unlock)
I tried it with Xv and SDL and it worked fine, for me.
My first concern was, that it would probably show some image errors,
as the codec is decoding. but i didnt saw any errors. i think the sdl
lock/unlock take care of displaying the buffer at the right time.
(i.e. when the frame is decoded)
dont know about xv locking, though.
the fb and svga drivers might improve from that, too:
using a double buffer. the get_buffer() would return the invisible buffer,
and the release_buffer() would swap the buffers.
Well just an idea, but it might be worthwhile to look into it.
No electrons were harmed during the creation of this message
Mplayer-users mailing list
Mplayer-users at lists.sourceforge.net
More information about the MPlayer-users