Commit a6e863c7 authored by michael's avatar michael

fixing yuy2 upscaling (use -sws 0 for the faster but uglier variant)


git-svn-id: file:///var/local/repositories/mplayer/trunk/postproc@7726 b3059339-0415-0410-9bf9-f77b7e298cf2
parent ffd279b7
...@@ -2047,16 +2047,6 @@ SwsContext *getSwsContext(int srcW, int srcH, int srcFormat, int dstW, int dstH, ...@@ -2047,16 +2047,6 @@ SwsContext *getSwsContext(int srcW, int srcH, int srcFormat, int dstW, int dstH,
vo_format_name(srcFormat), vo_format_name(dstFormat)); vo_format_name(srcFormat), vo_format_name(dstFormat));
return c; return c;
} }
/* yv12_to_yuy2 */
if((srcFormat == IMGFMT_YV12||srcFormat==IMGFMT_I420)&&dstFormat == IMGFMT_YUY2)
{
c->swScale= PlanarToYuy2Wrapper;
if(flags&SWS_PRINT_INFO)
MSG_INFO("SwScaler: using unscaled %s -> %s special converter\n",
vo_format_name(srcFormat), vo_format_name(dstFormat));
return c;
}
/* yuv2bgr */ /* yuv2bgr */
if((srcFormat==IMGFMT_YV12 || srcFormat==IMGFMT_I420) && isBGR(dstFormat)) if((srcFormat==IMGFMT_YV12 || srcFormat==IMGFMT_I420) && isBGR(dstFormat))
{ {
...@@ -2121,6 +2111,17 @@ SwsContext *getSwsContext(int srcW, int srcH, int srcFormat, int dstW, int dstH, ...@@ -2121,6 +2111,17 @@ SwsContext *getSwsContext(int srcW, int srcH, int srcFormat, int dstW, int dstH,
&& (isBGR(dstFormat) || isRGB(dstFormat)) && (isBGR(dstFormat) || isRGB(dstFormat))
&& needsDither) && needsDither)
c->swScale= rgb2rgbWrapper; c->swScale= rgb2rgbWrapper;
/* yv12_to_yuy2 */
if((srcFormat == IMGFMT_YV12||srcFormat==IMGFMT_I420)&&dstFormat == IMGFMT_YUY2)
{
c->swScale= PlanarToYuy2Wrapper;
if(flags&SWS_PRINT_INFO)
MSG_INFO("SwScaler: using unscaled %s -> %s special converter\n",
vo_format_name(srcFormat), vo_format_name(dstFormat));
return c;
}
} }
if(c->swScale){ if(c->swScale){
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment