mirror of
https://github.com/mpv-player/mpv
synced 2025-01-09 01:36:25 +01:00
fix i420 handling, bug found by rgselk at IRC <rgselknospam@yahoo.com>
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@9881 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
b48febac40
commit
dee8597fcf
@ -792,10 +792,6 @@ for(i=0; i<32; i++){
|
||||
config->offset.u= (pitch*src_h + 15)&~15;
|
||||
config->offset.v= (config->offset.u + (pitch*src_h>>2) + 15)&~15;
|
||||
|
||||
src_offset_y= config->offset.y + top*pitch + left;
|
||||
src_offset_u= config->offset.u + (top*pitch>>2) + (left>>1);
|
||||
src_offset_v= config->offset.v + (top*pitch>>2) + (left>>1);
|
||||
|
||||
if(besr.fourcc == IMGFMT_I420 || besr.fourcc == IMGFMT_IYUV)
|
||||
{
|
||||
uint32_t tmp;
|
||||
@ -803,6 +799,10 @@ for(i=0; i<32; i++){
|
||||
config->offset.u = config->offset.v;
|
||||
config->offset.v = tmp;
|
||||
}
|
||||
|
||||
src_offset_y= config->offset.y + top*pitch + left;
|
||||
src_offset_u= config->offset.u + (top*pitch>>2) + (left>>1);
|
||||
src_offset_v= config->offset.v + (top*pitch>>2) + (left>>1);
|
||||
}
|
||||
else if(besr.fourcc == IMGFMT_YVU9)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user