On Thu, Oct 05, 2017 at 10:43:04AM -0400, Bjorn Roche wrote: > On Tue, Oct 3, 2017 at 4:02 AM, Carl Eugen Hoyos <ceffm...@gmail.com> wrote: > > > 2017-10-03 1:52 GMT+02:00 Bjorn Roche <bj...@giphy.com>: > > > > > Attached is a patch for paletteuse only. > > > > I tested the following with and without your patch: > > $ ffmpeg -i fate-suite/lena.pnm -vf palettegen pal.png > > $ ffmpeg -i fate-suite/lena.pnm -i pal.png -lavfi paletteuse out.png > > > > out.png changes with your patch: Is that intended? > > > > Not intended, but not unexpected -- the ordering of colors in the palette > changed to make it easier to deal with transparency. However, there are > visual differences, so that's obviously a bug. I've supplied a new patch > (below) that fixes that bug, and maintains the order so it's easier to test > for that. > > > > The input frame contains no transparency. > > > > Your patch still contains printfs that should be removed > > (change them to av_log(DEBUG) if you think they are > > useful) and a new warning is shown at compilation: > > libavfilter/vf_paletteuse.c: In function ‘colormap_nearest_recursive’: > > libavfilter/vf_paletteuse.c:242:5: warning: ISO C90 forbids mixed > > declarations and code > > > > Please fix the style: Space after "if", no space after "if (" > > > > Thank you for your attention. This should also be resolved in the attached > patch. > > I have tested fate, all dithering (including none, which I added) and all > color search algorithms.
> vf_paletteuse.c | 163 > ++++++++++++++++++++++++++++++++++---------------------- > 1 file changed, 101 insertions(+), 62 deletions(-) > 3d215b0705c5352700ed11c6ab8fd8638c9fea48 palette-use-transparency2.diff > diff --git a/libavfilter/vf_paletteuse.c b/libavfilter/vf_paletteuse.c > index ffd37bf1da..7cb5a3db02 100644 > --- a/libavfilter/vf_paletteuse.c > +++ b/libavfilter/vf_paletteuse.c > @@ -56,7 +56,7 @@ enum diff_mode { This is not a git patch with commit message, all patches should contain a commit message [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Asymptotically faster algorithms should always be preferred if you have asymptotical amounts of data
signature.asc
Description: Digital signature
_______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel