[FFmpeg-devel] [PATCH v9] lavc/rawdec: Remove monowhite switching code for 1 bpp AVI without a palette

Michael Niedermayer michael at niedermayer.cc
Sat Feb 13 11:22:36 CET 2016


On Sat, Feb 13, 2016 at 06:01:21AM +0100, Mats Peterson wrote:
> On 02/13/2016 05:39 AM, Mats Peterson wrote:
> >On 02/13/2016 12:51 AM, Michael Niedermayer wrote:
> >
> >>>+        if (context->has_pkt_pal) {
> >>>+            memcpy(context->palette->data,
> >>>+                   avpkt->data + avpkt->size - AVPALETTE_SIZE,
> >>>AVPALETTE_SIZE);
> >>
> >>This is incorrect, the 8bit palette in nut can have any number of
> >>entries up to 256, this assumes its fixed 256
> >>
> >
> >I had absolutely no idea, Michael. I'm doing my best ;) It would be much
> >easier and more consequent if it used AVPALETTE_SIZE, though.
> >
> 
> Once again, how are we supposed to know how many colors the palette
> consists of at the end of avpkt->data?

palette size = packet size - width*height

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

The real ebay dictionary, page 1
"Used only once"    - "Some unspecified defect prevented a second use"
"In good condition" - "Can be repaird by experienced expert"
"As is" - "You wouldnt want it even if you were payed for it, if you knew ..."
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20160213/682a9f3f/attachment.sig>


More information about the ffmpeg-devel mailing list