[FFmpeg-devel] [RFC] What should pixdesc.h:write_line() do with PAL formats?
Michael Niedermayer
michaelni
Wed Apr 1 23:15:32 CEST 2009
On Wed, Apr 01, 2009 at 08:29:31PM +0200, Stefano Sabatini wrote:
> On date Wednesday 2009-04-01 02:32:34 +0200, Michael Niedermayer encoded:
> > On Wed, Apr 01, 2009 at 02:09:35AM +0200, Stefano Sabatini wrote:
> > > On date Wednesday 2009-04-01 01:47:10 +0200, Michael Niedermayer encoded:
> > > > On Wed, Apr 01, 2009 at 01:03:49AM +0200, Stefano Sabatini wrote:
> > > > > On date Tuesday 2009-03-31 23:26:00 +0200, Michael Niedermayer encoded:
> > > > > > On Tue, Mar 31, 2009 at 10:56:06PM +0200, Stefano Sabatini wrote:
> > > > > > > Hi,
> > > > > > >
> > > > > > > read_line() currently reads from the image the components
> > > > > > > corresponding to c and puts them in dst:
> > > > > > >
> > > > > > > (index, c) -> comp(index, c)
> > > > > > >
> > > > > > > The inverse operations cannot be done, so maybe write_line() should
> > > > > > > simply take in input a list of indexes and write them down to the
> > > > > > > destination image, but this will not be simmetric with read_line().
> > > > > > >
> > > > > > > To remove the asymmetry we could treat PAL formats like non-PAL ones,
> > > > > > > so having read_line() read the indexes and writing them to dst, while
> > > > > > > write_line() would write the indexes back to the image.
> > > > > >
> > > > > > possible
> > > > >
> > > > > After rethinking a bit about it I came out with this other idea, I'm
> > > > > simply extending read_line(), this should avoid bad code duplication,
> > > > > please check it.
> > > >
> > > > PIX_FMT_PAL or at least the check could then be droped
> > >
> > > Yes.
> > >
> >
> > ok
>
> BTW, can someone suggest a way to test it?
>
> Swscale complains with:
> swScaler: Palette is not supported as output pixel format
>
> and I don't know where to find a sample already in format pal8.
mike can probably provide you with a few billion such samples.
>
> BTW there is some specific reason for which sws doesn't support PAL8?
missing patch
>
> How hard would be to implement it?
there are at least a few variants
1. use a user provided palette
2. generate the best palette per frame
3. generate the best platte per file (for cases where it cant be changed
per frame
3. can be a special case of 1.
and the palette generation code that might use ELBG (not ideal but easy)
and dithering to non simple systematic palettes
i think someone might alraedy have done some of this? but then maybe not i
dunno
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Into a blind darkness they enter who follow after the Ignorance,
they as if into a greater darkness enter who devote themselves
to the Knowledge alone. -- Isha Upanishad
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090401/6f0f7548/attachment.pgp>
More information about the ffmpeg-devel
mailing list