[MPlayer-cvslog] r23498 - trunk/libmpcodecs/vf_scale.c
reimar
subversion at mplayerhq.hu
Thu Jun 7 21:11:25 CEST 2007
Author: reimar
Date: Thu Jun 7 21:11:25 2007
New Revision: 23498
Log:
RGB8/BGR8 IMGFMTs are paletted in case of swscale input.
Actually they are also for output, but swscale does not support PIX_FMT_PAL8 output.
Modified:
trunk/libmpcodecs/vf_scale.c
Modified: trunk/libmpcodecs/vf_scale.c
==============================================================================
--- trunk/libmpcodecs/vf_scale.c (original)
+++ trunk/libmpcodecs/vf_scale.c Thu Jun 7 21:11:25 2007
@@ -124,6 +124,7 @@ static int config(struct vf_instance_s*
return 0;
}
sfmt = imgfmt2pixfmt(outfmt);
+ if (outfmt == IMGFMT_RGB8 || outfmt == IMGFMT_BGR8) sfmt = PIX_FMT_PAL8;
dfmt = imgfmt2pixfmt(best);
vo_flags=vf->next->query_format(vf->next,best);
@@ -605,6 +606,7 @@ struct SwsContext *sws_getContextFromCmd
dfmt = imgfmt2pixfmt(dstFormat);
sfmt = imgfmt2pixfmt(srcFormat);
+ if (outfmt == IMGFMT_RGB8 || outfmt == IMGFMT_BGR8) sfmt = PIX_FMT_PAL8;
sws_getFlagsAndFilterFromCmdLine(&flags, &srcFilterParam, &dstFilterParam);
return sws_getContext(srcW, srcH, sfmt, dstW, dstH, dfmt, flags | get_sws_cpuflags(), srcFilterParam, dstFilterParam, NULL);
More information about the MPlayer-cvslog
mailing list