[Mplayer-users] a question about ICDecompress
Arpi
arpi at thot.banki.hu
Sun Apr 22 16:20:50 CEST 2001
Hi,
> 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?
There are _two_ BITMAPINFOHEADER structs. One for input and one for output
frame. Input frame is compressed, so it's size isn't fixed. It's size
is equal to packet size read from the file. Output's biSizeImage is
really constant, see dll_init.c
> 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..
No it doesn't matter. Once I patched it to be correct but there was no
difference. But this way we can play files with mising/broken index chunks.
> 3) whats the deal with drawslice (for IMGFMT_YV12, IMGFMT_IYUV
> and IMGFMT_I420)? what is it used for?
mpeg codecs. mpeg 1, 2 and opendivx.
> 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.
it's done this way. but 3 memcpy, because input planes aren't appended.
they are allocated separately.
> 4) (just an idea): Its possible to completely get rid of the memcpy in
> drawframe (and drawframe itself, too):
>
> buffer = video_out->get_buffer();
> video_out->lock_buffer();
> ret = ICDecompress(sh_video->hic, ICDECOMPRESS_NOTKEYFRAME,
> sh_video->bih, start,
> &sh_video->o_bih, buffer);
> video_out->release_buffer();
>
> 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.
yes, it's possible, and it's planned for the next release, when we
leave libvo and move to libxmm. It has this feature, and get_surface
interface.
> Well just an idea, but it might be worthwhile to look into it.
There are problems with stride. bytes per lines not always equal to
image_width*bytesperpixel.
A'rpi / Astral & ESP-team
--
mailto:arpi at thot.banki.hu
http://esp-team.scene.hu
_______________________________________________
Mplayer-users mailing list
Mplayer-users at lists.sourceforge.net
http://lists.sourceforge.net/lists/listinfo/mplayer-users
More information about the MPlayer-users
mailing list