Changeset 7c49ef4a285447a4bcc1941162c45882d8af1058
- 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
| rfea7f38 |
r7c49ef4 |
|
| 3 | 3 | ***************************************************************************** |
|---|
| 4 | 4 | * 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 $ |
|---|
| 6 | 6 | * |
|---|
| 7 | 7 | * Author: Rocky Bernstein <rocky@panix.com> |
|---|
| … | … | |
| 523 | 523 | |
|---|
| 524 | 524 | *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; |
|---|
| 525 | 527 | *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; |
|---|
| 528 | 528 | break; |
|---|
| 529 | 529 | } |
|---|
| … | … | |
| 890 | 890 | #define BYTES_PER_PIXEL 4 |
|---|
| 891 | 891 | |
|---|
| | 892 | static inline void |
|---|
| | 893 | put_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 | |
|---|
| 892 | 908 | /* |
|---|
| 893 | 909 | RV24 format??? Is this just for X11? Or just not for Win32? Is this |
|---|
| … | … | |
| 1034 | 1050 | |
|---|
| 1035 | 1051 | 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; |
|---|
| 1040 | 1054 | } |
|---|
| 1041 | 1055 | |
|---|
| … | … | |
| 1067 | 1081 | |
|---|
| 1068 | 1082 | 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; |
|---|
| 1073 | 1085 | } |
|---|
| 1074 | 1086 | break; |
|---|
| … | … | |
| 1139 | 1151 | |
|---|
| 1140 | 1152 | 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; |
|---|
| 1145 | 1155 | } |
|---|
| 1146 | 1156 | } |
|---|
| … | … | |
| 1176 | 1186 | rv32_pack_blend(p_dest, rgb, dest_alpha, |
|---|
| 1177 | 1187 | ALPHA_SCALEDOWN); |
|---|
| | 1188 | p_dest += BYTES_PER_PIXEL; |
|---|
| 1178 | 1189 | } |
|---|
| 1179 | 1190 | break; |
|---|