[Ffmpeg-devel] [RFC] [PATCH] FLC/FLX/DTA encoder
Alex Beregszaszi
alex
Sun Feb 18 04:32:16 CET 2007
Hi,
> theres trailing whitespace and tabs in the patch ...
Yep and hard tabs. Will be removed of course.
> > +static int palette_sort(const void *a, const void *b) {
> > + int ia = *(int*)a, ib = *(int*)b;
> > +
> > + if (ia < ib) return -1;
> > + else if (ia == ib) return 0;
> > + return 1;
>
> doesnt
> return *(int*)a - *(int*)b;
> work? (yes it can overflow so i dunno ...)
As you pointed later, this code wont be used anymore.
> palettes in AVFrame..data[1] are stored in native endian, i would definitly
> be in favor of unifying the format with mplayer but thats a seperate issue
Ah, yes. Since I sold my iBook I could test it on BE, so possibly it has
some endianess issues.
> something like:
>
> j=0;
> for (i = 0; i < 256; i++)
> if (pal[i] != oldpal[i])
> changetable[j++] = i+1; // slot 0 may change too
>
> looks nicer ...
lol, of course
> iam protesting against this missuse of extradata
> its the muxers job to write the header from width/height/... not to missuse
> extradata, and yes the demuxer must be fixed too, if there are no volunteers
> ill fix the demuxer and decoder
> from a quick look i dont see why fl* would need to touch extradata at all
> width/height/codec_tag/bits_per_sample seem enough
Just have a look at the decoder part. The decoder determines some hacks
based on the extradata (some chunks in the header). Anyway, it would be
handy fixing this issue.
--
Alex Beregszaszi
More information about the ffmpeg-devel
mailing list