mirror of
https://github.com/mpv-player/mpv
synced 2024-09-05 02:48:21 +02:00
Fix BGR32 big-endian output
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@18168 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
26b3c3f9ca
commit
9b5b4feac8
@ -190,9 +190,15 @@ static mp_image_t* decode(sh_video_t *sh,void* data,int len,int flags){
|
||||
// rgb24 -> bgr32
|
||||
case IMGFMT_BGR32:
|
||||
for(x=0;x<width;x++){
|
||||
#ifdef WORDS_BIGENDIAN
|
||||
drow[4*x+1]=row[3*x+0];
|
||||
drow[4*x+2]=row[3*x+1];
|
||||
drow[4*x+3]=row[3*x+2];
|
||||
#else
|
||||
drow[4*x+0]=row[3*x+2];
|
||||
drow[4*x+1]=row[3*x+1];
|
||||
drow[4*x+2]=row[3*x+0];
|
||||
#endif
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user