Changeset 7c49ef4a285447a4bcc1941162c45882d8af1058

Show
Ignore:
Timestamp:
27/01/04 04:45:17 (5 years ago)
Author:
Rocky Bernstein <rocky@videolan.org>
git-committer:
Rocky Bernstein <rocky@videolan.org> 1075175117 +0000
git-parent:

[9ab737d74a7e958f0c1d46b65e456cfa45c93e24]

git-author:
Rocky Bernstein <rocky@videolan.org> 1075175117 +0000
Message:

First of the bigendian fixes. Bug in YUY had U and V values in blending
swapped.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • modules/codec/ogt/render.c

    rfea7f38 r7c49ef4  
    33 ***************************************************************************** 
    44 * Copyright (C) 2003, 2004 VideoLAN 
    5  * $Id: render.c,v 1.23 2004/01/25 18:20:12 bigben Exp $ 
     5 * $Id: render.c,v 1.24 2004/01/27 03:45:17 rocky Exp $ 
    66 * 
    77 * Author: Rocky Bernstein <rocky@panix.com> 
     
    523523 
    524524        *p_pixel++ = ( i_sub_color_Y1 + i_pixel_color_Y1 )>>ALPHA_BITS; 
     525        *p_pixel++ = ( i_sub_color_U + i_pixel_color_U )  >>ALPHA_BITS; 
     526        *p_pixel++ = ( i_sub_color_Y2 + i_pixel_color_Y2 )>>ALPHA_BITS; 
    525527        *p_pixel++ = ( i_sub_color_V + i_pixel_color_V )  >>ALPHA_BITS; 
    526         *p_pixel++ = ( i_sub_color_Y2 + i_pixel_color_Y2 )>>ALPHA_BITS; 
    527         *p_pixel++ = ( i_sub_color_U + i_pixel_color_U )  >>ALPHA_BITS; 
    528528        break; 
    529529          } 
     
    890890#define BYTES_PER_PIXEL 4 
    891891 
     892static inline void 
     893put_rgb24_pixel(uint8_t *rgb, uint8_t *p_pixel) 
     894{ 
     895#ifdef WORDS_BIGENDIAN 
     896  *p_pixel++; 
     897  *p_pixel++ = rgb[RED_PIXEL]; 
     898  *p_pixel++ = rgb[GREEN_PIXEL]; 
     899  *p_pixel++ = rgb[BLUE_PIXEL]; 
     900#else  
     901  *p_pixel++ = rgb[BLUE_PIXEL]; 
     902  *p_pixel++ = rgb[GREEN_PIXEL]; 
     903  *p_pixel++ = rgb[RED_PIXEL]; 
     904#endif 
     905} 
     906 
     907 
    892908/*  
    893909  RV24 format??? Is this just for X11? Or just not for Win32? Is this 
     
    10341050 
    10351051                    for ( len = i_xlast - i_xdest; len ; len--) { 
    1036                       *p_dest++ = rgb[BLUE_PIXEL]; 
    1037                       *p_dest++ = rgb[GREEN_PIXEL]; 
    1038                       *p_dest++ = rgb[RED_PIXEL]; 
    1039                       *p_dest++; 
     1052                      put_rgb24_pixel(rgb, p_dest); 
     1053                      p_dest += BYTES_PER_PIXEL; 
    10401054                    } 
    10411055 
     
    10671081 
    10681082                      for ( len = i_xlast - i_xdest; len ; len--) { 
    1069                         *p_dest++ = rgb[BLUE_PIXEL]; 
    1070                         *p_dest++ = rgb[GREEN_PIXEL]; 
    1071                         *p_dest++ = rgb[RED_PIXEL]; 
    1072                         *p_dest++; 
     1083                        put_rgb24_pixel(rgb, p_dest); 
     1084                        p_dest += BYTES_PER_PIXEL; 
    10731085                      } 
    10741086                      break; 
     
    11391151                       
    11401152                      for ( len = i_xlast - i_xdest; len ; len--) { 
    1141                         *p_dest++ = rgb[BLUE_PIXEL]; 
    1142                         *p_dest++ = rgb[GREEN_PIXEL]; 
    1143                         *p_dest++ = rgb[RED_PIXEL]; 
    1144                         *p_dest++; 
     1153                        put_rgb24_pixel(rgb, p_dest); 
     1154                        p_dest += BYTES_PER_PIXEL; 
    11451155                      } 
    11461156                    } 
     
    11761186                      rv32_pack_blend(p_dest, rgb, dest_alpha, 
    11771187                                      ALPHA_SCALEDOWN); 
     1188                      p_dest += BYTES_PER_PIXEL; 
    11781189                    } 
    11791190                    break;