# HG changeset patch # User reimar # Date 1181243485 0 # Node ID 8fae00da20597417f780eec5611891cd986e8c6c # Parent 15710094cb156a7f2f37da7a25f26c248f15662e 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. diff -r 15710094cb15 -r 8fae00da2059 libmpcodecs/vf_scale.c --- a/libmpcodecs/vf_scale.c Thu Jun 07 18:06:53 2007 +0000 +++ b/libmpcodecs/vf_scale.c Thu Jun 07 19:11:25 2007 +0000 @@ -124,6 +124,7 @@ 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 @@ 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);