On 4/15/17, Carl Eugen Hoyos <ceffm...@gmail.com> wrote: > 2017-04-15 13:49 GMT+02:00 Paul B Mahol <one...@gmail.com>: > >> + case 32: avctx->pix_fmt = AV_PIX_FMT_BGRA; break; > > (I am thankful for this patch and, yes, I believe we had this > discussion before.) > If this is a screen capture codec, I believe BGR0 is the correct > colorspace. I understand that you tested that the encoder can > really encode transparency but the issue - imo - is, that if the > codec is (or actually was) used to record 32bit Windows screens > then some parts of the screen will contain "0xff" as alpha value > and others (sprites?) will contain "0x00" producing funny output > if you just transcode to png. > > In the past, I also put BGRA there (for some other codec) and > it was fixed after another developer tested the same sample I > had tested but (correctly!) explained that the output (that I > considered useful originally) makes no sense and the > colorspace (or actually the transparency in the output file) is > wrong. > > (If this is not a screen capture codec, BGRA is of course > most likely correct.) > > Please don't let this stop you!
Using bgr0 when there is already valid transparency is bad as that will kill it, on other side if its bgra like it is now one can just ignore alpha component if its not interesting. _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel