~ubuntu-branches/debian/sid/v4l-utils/sid

« back to all changes in this revision

Viewing changes to lib/libv4lconvert/libv4lconvert.c

  • Committer: Package Import Robot
  • Author(s): Gregor Jasny
  • Date: 2012-04-14 19:42:06 UTC
  • mfrom: (1.1.10)
  • Revision ID: package-import@ubuntu.com-20120414194206-nmgagyd9wc5dz0br
Tags: 0.8.8-1
* Imported Upstream version 0.8.8
  - Revert Lenovo X201 upside down table entry (Closes: #667958)
  - libv4lconvert: Use bytesperline instead of width
  - libv4lconver: Add 06f8:301b pac7302 based cam to the quirk table
  - tinyjpeg: Better luminance quantization table for Pixart JPEG
  - tinyjpeg: Fix out of bounds array usage
* Add DVB tools package

Show diffs side-by-side

added added

removed removed

Lines of Context:
633
633
        unsigned int src_pix_fmt = fmt->fmt.pix.pixelformat;
634
634
        unsigned int width  = fmt->fmt.pix.width;
635
635
        unsigned int height = fmt->fmt.pix.height;
 
636
        unsigned int bytesperline = fmt->fmt.pix.bytesperline;
636
637
 
637
638
        switch (src_pix_fmt) {
638
639
        /* JPG and variants */
870
871
        case V4L2_PIX_FMT_SRGGB8:
871
872
                switch (dest_pix_fmt) {
872
873
                case V4L2_PIX_FMT_RGB24:
873
 
                        v4lconvert_bayer_to_rgb24(src, dest, width, height, src_pix_fmt);
 
874
                        v4lconvert_bayer_to_rgb24(src, dest, width, height, bytesperline, src_pix_fmt);
874
875
                        break;
875
876
                case V4L2_PIX_FMT_BGR24:
876
 
                        v4lconvert_bayer_to_bgr24(src, dest, width, height, src_pix_fmt);
 
877
                        v4lconvert_bayer_to_bgr24(src, dest, width, height, bytesperline, src_pix_fmt);
877
878
                        break;
878
879
                case V4L2_PIX_FMT_YUV420:
879
 
                        v4lconvert_bayer_to_yuv420(src, dest, width, height, src_pix_fmt, 0);
 
880
                        v4lconvert_bayer_to_yuv420(src, dest, width, height, bytesperline, src_pix_fmt, 0);
880
881
                        break;
881
882
                case V4L2_PIX_FMT_YVU420:
882
 
                        v4lconvert_bayer_to_yuv420(src, dest, width, height, src_pix_fmt, 1);
 
883
                        v4lconvert_bayer_to_yuv420(src, dest, width, height, bytesperline, src_pix_fmt, 1);
883
884
                        break;
884
885
                }
885
886
                if (src_size < (width * height)) {