changeset 23724:72cff1657307

Remove unnecessary flip for RGB in v4l1. Patch was provided and tested by Trent Piepho xyzzy at speakeasy dot org.
author voroshil
date Sun, 08 Jul 2007 13:30:33 +0000
parents 148b85340a65
children a0432f65040e
files stream/tvi_v4l.c
diffstat 1 files changed, 1 insertions(+), 22 deletions(-) [+]
line wrap: on
line diff
--- a/stream/tvi_v4l.c	Sun Jul 08 10:11:36 2007 +0000
+++ b/stream/tvi_v4l.c	Sun Jul 08 13:30:33 2007 +0000
@@ -1397,13 +1397,9 @@
 }
 
 // copies a video frame
-// for RGB (i.e. BGR in mplayer) flips the image upside down
 // for YV12 swaps the 2nd and 3rd plane
 static inline void copy_frame(priv_t *priv, unsigned char *dest, unsigned char *source)
 {
-    int i;
-    unsigned char *sptr;
-
     if(tv_param_automute>0){
         if (ioctl(priv->video_fd, VIDIOCGTUNER, &priv->tuner) >= 0) {
             if(tv_param_automute<<8>priv->tuner.signal){
@@ -1422,24 +1418,7 @@
         return;
     }
 
-    switch (priv->picture.palette) {
-    case VIDEO_PALETTE_RGB24:
-    case VIDEO_PALETTE_RGB32:
-    case VIDEO_PALETTE_RGB555:
-    case VIDEO_PALETTE_RGB565:
-        sptr = source + (priv->height-1)*priv->bytesperline;
-        for (i = 0; i < priv->height; i++) {
-            fast_memcpy(dest, sptr, priv->bytesperline);
-            dest += priv->bytesperline;
-            sptr -= priv->bytesperline;
-        }
-        break;
-    case VIDEO_PALETTE_UYVY:
-    case VIDEO_PALETTE_YUV420P:
-    default:
-        fast_memcpy(dest, source, priv->bytesperline * priv->height);
-    }
-
+    fast_memcpy(dest, source, priv->bytesperline * priv->height);
 }
 
 // maximum skew change, in frames