[FFmpeg-devel] [PATCH] Define endian variant for PIX_FMT_RGB/BGR_5X5
Stefano Sabatini
stefano.sabatini-lala
Sat Mar 21 00:11:26 CET 2009
On date Wednesday 2009-03-18 22:30:26 +0100, Michael Niedermayer encoded:
> On Tue, Mar 17, 2009 at 09:14:32PM +0100, Stefano Sabatini wrote:
[...]
> > Index: ffmpeg/libavcodec/pixdesc.c
> > ===================================================================
> > --- ffmpeg.orig/libavcodec/pixdesc.c 2009-03-17 20:16:28.000000000 +0100
> > +++ ffmpeg/libavcodec/pixdesc.c 2009-03-17 21:01:34.000000000 +0100
> > @@ -147,9 +147,9 @@
> > .log2_chroma_w= 0,
> > .log2_chroma_h= 0,
> > .comp = {
> > - {0,1,1,0,4},
> > - {0,1,1,5,5},
> > - {0,1,2,3,4},
> > + {0,1,2,3,4}, /* R */
> > + {0,1,1,5,5}, /* G */
> > + {0,1,1,0,4}, /* B */
> > },
> > },
> > [PIX_FMT_RGB565BE] = {
> > @@ -157,9 +157,9 @@
> > .log2_chroma_w= 0,
> > .log2_chroma_h= 0,
> > .comp = {
> > - {0,1,1, 0,4},
> > - {0,1,1, 5,5},
> > - {0,1,0, 3,4},
> > + {0,1,0,3,4}, /* R */
> > + {0,1,1,5,5}, /* G */
> > + {0,1,1,0,4}, /* B */
> > },
> > .flags = PIX_FMT_BE,
> > },
>
> ok if tested
>
>
> > Index: ffmpeg/libavcodec/pixdesc.c
> > ===================================================================
> > --- ffmpeg.orig/libavcodec/pixdesc.c 2009-03-17 20:16:33.000000000 +0100
> > +++ ffmpeg/libavcodec/pixdesc.c 2009-03-17 21:01:02.000000000 +0100
> > @@ -163,6 +163,27 @@
> > },
> > .flags = PIX_FMT_BE,
> > },
> > + [PIX_FMT_RGB555LE] = {
> > + .nb_channels = 3,
> > + .log2_chroma_w= 0,
> > + .log2_chroma_h= 0,
> > + .comp = {
> > + {0,1,2,2,4}, /* R */
> > + {0,1,1,5,4}, /* G */
> > + {0,1,1,0,4}, /* B */
> > + },
> > + },
> > + [PIX_FMT_RGB555BE] = {
> > + .nb_channels = 3,
> > + .log2_chroma_w= 0,
> > + .log2_chroma_h= 0,
> > + .comp = {
> > + {0,1,0,2,4}, /* R */
> > + {0,1,1,5,4}, /* G */
> > + {0,1,1,0,4}, /* B */
> > + },
> > + .flags = PIX_FMT_BE,
> > + },
> > [PIX_FMT_MONOBLACK] = {
> > .nb_channels = 1,
> > .log2_chroma_w= 0,
> > Index: ffmpeg/libavcodec/pixdesc.c
> > ===================================================================
> > --- ffmpeg.orig/libavcodec/pixdesc.c 2009-03-17 20:17:12.000000000 +0100
> > +++ ffmpeg/libavcodec/pixdesc.c 2009-03-17 20:18:54.000000000 +0100
> > @@ -184,6 +184,48 @@
> > },
> > .flags = PIX_FMT_BE,
> > },
> > + [PIX_FMT_BGR565LE] = {
> > + .nb_channels = 3,
> > + .log2_chroma_w= 0,
> > + .log2_chroma_h= 0,
> > + .comp = {
> > + {0,1,2,3,4}, /* B */
> > + {0,1,1,5,5}, /* G */
> > + {0,1,1,0,4}, /* R */
> > + },
> > + },
> > + [PIX_FMT_BGR565BE] = {
> > + .nb_channels = 3,
> > + .log2_chroma_w= 0,
> > + .log2_chroma_h= 0,
> > + .comp = {
> > + {0,1,0,3,4}, /* B */
> > + {0,1,1,5,5}, /* G */
> > + {0,1,1,0,4}, /* R */
> > + },
> > + .flags = PIX_FMT_BE,
> > + },
> > + [PIX_FMT_BGR555LE] = {
> > + .nb_channels = 3,
> > + .log2_chroma_w= 0,
> > + .log2_chroma_h= 0,
> > + .comp = {
> > + {0,1,2,2,4}, /* B */
> > + {0,1,1,5,4}, /* G */
> > + {0,1,1,0,4}, /* R */
> > + },
> > + },
> > + [PIX_FMT_BGR555BE] = {
> > + .nb_channels = 3,
> > + .log2_chroma_w= 0,
> > + .log2_chroma_h= 0,
> > + .comp = {
> > + {0,1,0,2,4}, /* B */
> > + {0,1,1,5,4}, /* G */
> > + {0,1,1,0,4}, /* R */
> > + },
> > + .flags = PIX_FMT_BE,
> > + },
> > [PIX_FMT_MONOBLACK] = {
> > .nb_channels = 1,
> > .log2_chroma_w= 0,
>
> again, ok if tested
Michael can you suggest how to test it? My ideas look too lame and
complicated (also attached patch may help).
Regards.
--
FFmpeg = Foolish & Furious Monstrous Problematic Elastic Ghost
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pixdesc-fix-read-line-sig.patch
Type: text/x-diff
Size: 669 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090321/b41f71ec/attachment.patch>
More information about the ffmpeg-devel
mailing list