[Ffmpeg-devel] [PATCH] video grab support VIDEO_PALETTE_RGB565

yi li liyi.dev
Mon Apr 30 13:30:24 CEST 2007


I made some changes accordingly.  Hope it is better.

Regards,
-Yi

On 4/29/07, Michael Niedermayer <michaelni at gmx.at> wrote:
>
> Hi
>
> On Sun, Apr 29, 2007 at 03:20:03PM +0800, yi li wrote:
> > Hi,
> >
> > A small patch for libavformat/grab.c to make it support v4l device with
> > "VIDEO_PALETTE_RGB565" format.
> > Any comments?
> >
> > Regards,
> >
> > -Yi
>
> > --- grab.c.orig       2007-04-29 15:14:43.000000000 +0800
> > +++ grab.c    2007-04-29 15:13:36.000000000 +0800
> > @@ -174,8 +174,13 @@
> >                      pict.palette=VIDEO_PALETTE_GREY;
> >                      pict.depth=8;
> >                      ret = ioctl(video_fd, VIDIOCSPICT, &pict);
> > -                    if (ret < 0)
> > -                        goto fail1;
> > +                    if (ret < 0) {
> > +                     pict.palette=VIDEO_PALETTE_RGB565;
> > +                     pict.depth=16;
> > +                     ret = ioctl(video_fd, VIDIOCSPICT, &pict);
> > +                     if (ret < 0)
> > +                             goto fail1;
> > +                 }
> >                  }
>
> tabs are forbidden in svn
> rgb565 should be checked before gray
> and ideally the whole should be simplified, a simple table with
> VIDEO_PALETTE_*, depth, pix_fmt and frame_size factor could be used
>
> [...]
> --
> Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
>
> Republics decline into democracies and democracies degenerate into
> despotisms. -- Aristotle
>
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at mplayerhq.hu
> http://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-devel
>
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: grab.c.rgb565.patch
Type: text/x-patch
Size: 3691 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20070430/eb52b4c1/attachment.bin>



More information about the ffmpeg-devel mailing list