apply missing bits from cd4e8dc1fa

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31314 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
siretart 2010-06-03 21:50:08 +00:00
parent 637edc7a27
commit 9e2e3a1cb8
1 changed files with 6 additions and 0 deletions

View File

@ -149,6 +149,7 @@ static int config(uint32_t width, uint32_t height, uint32_t d_width,
return -1;
}
#ifdef CONFIG_LIBSWSCALE_A
if(using_format != IMGFMT_YV12)
{
sws_rgb2rgb_init(get_sws_cpuflags());
@ -160,6 +161,7 @@ static int config(uint32_t width, uint32_t height, uint32_t d_width,
return -1;
}
}
#endif
write_bytes = image_width * image_height * 3 / 2;
image = malloc(write_bytes);
@ -464,9 +466,11 @@ static int query_format(uint32_t format)
{
case IMGFMT_YV12:
return VFCAP_CSP_SUPPORTED|VFCAP_OSD|VFCAP_ACCEPT_STRIDE;
#ifdef CONFIG_LIBSWSCALE_A
case IMGFMT_BGR|24:
case IMGFMT_RGB|24:
return VFCAP_CSP_SUPPORTED|VFCAP_CSP_SUPPORTED_BY_HW|VFCAP_OSD|VFCAP_ACCEPT_STRIDE;
#endif
}
}
else
@ -476,9 +480,11 @@ static int query_format(uint32_t format)
{
case IMGFMT_YV12:
return VFCAP_CSP_SUPPORTED|VFCAP_CSP_SUPPORTED_BY_HW|VFCAP_OSD|VFCAP_ACCEPT_STRIDE;
#ifdef CONFIG_LIBSWSCALE_A
case IMGFMT_BGR|24:
case IMGFMT_RGB|24:
return VFCAP_CSP_SUPPORTED|VFCAP_OSD|VFCAP_ACCEPT_STRIDE;
#endif
}
}
return 0;