mirror of
https://github.com/mpv-player/mpv
synced 2024-12-26 17:12:36 +00:00
fix for i420 format, initial patch by Aurelien Jacobs <aurel at gnuage.org> from the Geexbox mplayer patchset, some modification by me
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@13228 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
3c4c49363f
commit
0953591a53
@ -775,8 +775,15 @@ int vixConfigPlayback(vidix_playback_t *config)
|
||||
config->offsets[i] = i*config->frame_size;
|
||||
|
||||
config->offset.y=0;
|
||||
config->offset.v=((sw + 31) & ~31) * sh;
|
||||
config->offset.u=config->offset.v+((sw + 31) & ~31) * sh /4;
|
||||
if(config->fourcc == IMGFMT_I420 || config->fourcc == IMGFMT_IYUV)
|
||||
{
|
||||
config->offset.u=((sw + 31) & ~31) * sh;
|
||||
config->offset.v=config->offset.u+((sw + 31) & ~31) * sh /4;
|
||||
}
|
||||
else {
|
||||
config->offset.v=((sw + 31) & ~31) * sh;
|
||||
config->offset.u=config->offset.v+((sw + 31) & ~31) * sh /4;
|
||||
}
|
||||
|
||||
//FIXME figure out a better way to allocate memory on card
|
||||
//allocate 2 megs
|
||||
|
Loading…
Reference in New Issue
Block a user