[Ffmpeg-devel] help on forcing rgb555 with 16bpp

Reynaldo H. Verdejo Pinochet reynaldo
Thu Oct 26 12:47:07 CEST 2006


Hi Michael, thanks for your time

On Thu, Oct 26, 2006 at 11:44:43AM +0200, Michael Niedermayer wrote:
> Hi
> 
> On Tue, Oct 24, 2006 at 09:00:11PM -0300, Reynaldo H. Verdejo Pinochet wrote:
> > On Tue, Oct 24, 2006 at 01:57:59PM +0200, Michael Niedermayer wrote:
> > Sure.
> > 
> > Every single solution I make up is more hackier than the one before it,
> > so Im wondering: Why do we have to hack a way around the bad asumption
> > that raw.c makes by thinking it can guess correct pix_fmt by mere
> > bit counting?, that's plain wrong! 
> 
> yes, it is just think of BGR vs. RGB, packed vs planae and such, the point
> is that every RGB format should have its own codec_tag ...
> 

Sounds polutive.

> 
> > why dont just bypass the detection
> > attempt _if_ the demuxer knows (and sets) the pixel format?
> 
> 1. avidec doesnt set pix_fmt neither before nor after your patch

Michael, I'm not talking about avidec (I noticed this in your previous
mail but forgot to mention), I started this thread because
rgb555 frames demuxed by mtv.c are getting threated as rgb565 by raw.c
. I dont need nor want to make avidec set pix_fmt but if you accept
this patch I will make damn sure my demuxer do.

> 2. will that work with stream copy of raw from avi->mov? avi->nut? or will
>    it need changes to every muxer? mapping codec_tag->codec_tag is one
>    thing, mapping pix_fmt/sound_fmt/codec_tag -> pix_fmt/sound_fmt/codec_tag
>    is another

I dont see why not, I'm not going to touch avidec.. this is a more
general issue. the patch doesn't modify current behavior, just adds
a new posibility.

> 
> so i cant really comment on your suggestion as its not complete but what it
> seems to be pointing at doesnt look clean and simple

What im suggesting is to leave a door open on raw.c for smart
demuxers of broken formats who know the fuzynes of raw *autodetection* 
to hint the decoder on how the data is supposed to be interpreted.

btw, I think something similar has to be done about *flip*
autodetection (I seriously wonder how is this even possible).

Just hope I got this right :/

	Reynaldo
-------------- 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/20061026/90e351b9/attachment.pgp>



More information about the ffmpeg-devel mailing list