[FFmpeg-devel] [PATCH] qtrleenc: Add RGB555 and ARGB pixel formats support

Michael Niedermayer michaelni
Wed Jul 8 03:40:09 CEST 2009


On Sat, Jul 04, 2009 at 07:54:26PM +0200, Alexis Ballier wrote:
> Hi,
> 
> See the subject.
> 
> I had to add a new function to write 16bits pixels as big endian; I
> would have prefered avoiding it but if I use PIX_FMT_RGB555BE, ffmpeg
> rants that it cannot allocate the picture. I suppose this is not a bug
> since I'm on a little endian machine, so here is the patch.

support for non native rgb555 should be added to swscale, even if that
is just by a bswaping pass over the output ...



> 
> Regards,
> 
> Alexis.

>  qtrleenc.c |   32 +++++++++++++++++++++++++++-----
>  1 file changed, 27 insertions(+), 5 deletions(-)
> 6ee4782540e2e39e44632ca4de708409f91b6379  qtrleenc_morepixfmt.patch
> Index: libavcodec/qtrleenc.c
> ===================================================================
> --- libavcodec/qtrleenc.c	(revision 19341)
> +++ libavcodec/qtrleenc.c	(working copy)
> @@ -68,12 +68,15 @@
>      s->avctx=avctx;
>  
>      switch (avctx->pix_fmt) {
> -/*    case PIX_FMT_RGB555:
> +    case PIX_FMT_RGB555:
>          s->pixel_size = 2;
> -        break;*/
> +        break;
>      case PIX_FMT_RGB24:

>          s->pixel_size = 3;
>          break;
> +    case PIX_FMT_ARGB:
> +        s->pixel_size = 4;
> +        break;
>      default:
>          av_log(avctx, AV_LOG_ERROR, "Unsupported colorspace.\n");
>          break;

unrelated?


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

it is not once nor twice but times without number that the same ideas make
their appearance in the world. -- Aristotle
-------------- 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/20090708/df442e60/attachment.pgp>



More information about the ffmpeg-devel mailing list