Atlas - yuv_rgb_sse.h
Home / ext / SDL / src / video / yuv2rgb Lines: 1 | Size: 9471 bytes [Download] [Show on GitHub] [Search similar files] [Raw] [Raw (proxy)][FILE BEGIN]1#ifdef SDL_SSE2_INTRINSICS 2 3#include "yuv_rgb_common.h" 4 5// yuv to rgb, sse implementation 6// pointers must be 16 byte aligned, and strides must be divisable by 16 7void yuv420_rgb565_sse( 8 uint32_t width, uint32_t height, 9 const uint8_t *y, const uint8_t *u, const uint8_t *v, uint32_t y_stride, uint32_t uv_stride, 10 uint8_t *rgb, uint32_t rgb_stride, 11 YCbCrType yuv_type); 12 13void yuv420_rgb24_sse( 14 uint32_t width, uint32_t height, 15 const uint8_t *y, const uint8_t *u, const uint8_t *v, uint32_t y_stride, uint32_t uv_stride, 16 uint8_t *rgb, uint32_t rgb_stride, 17 YCbCrType yuv_type); 18 19void yuv420_rgba_sse( 20 uint32_t width, uint32_t height, 21 const uint8_t *y, const uint8_t *u, const uint8_t *v, uint32_t y_stride, uint32_t uv_stride, 22 uint8_t *rgb, uint32_t rgb_stride, 23 YCbCrType yuv_type); 24 25void yuv420_bgra_sse( 26 uint32_t width, uint32_t height, 27 const uint8_t *y, const uint8_t *u, const uint8_t *v, uint32_t y_stride, uint32_t uv_stride, 28 uint8_t *rgb, uint32_t rgb_stride, 29 YCbCrType yuv_type); 30 31void yuv420_argb_sse( 32 uint32_t width, uint32_t height, 33 const uint8_t *y, const uint8_t *u, const uint8_t *v, uint32_t y_stride, uint32_t uv_stride, 34 uint8_t *rgb, uint32_t rgb_stride, 35 YCbCrType yuv_type); 36 37void yuv420_abgr_sse( 38 uint32_t width, uint32_t height, 39 const uint8_t *y, const uint8_t *u, const uint8_t *v, uint32_t y_stride, uint32_t uv_stride, 40 uint8_t *rgb, uint32_t rgb_stride, 41 YCbCrType yuv_type); 42 43void yuv422_rgb565_sse( 44 uint32_t width, uint32_t height, 45 const uint8_t *y, const uint8_t *u, const uint8_t *v, uint32_t y_stride, uint32_t uv_stride, 46 uint8_t *rgb, uint32_t rgb_stride, 47 YCbCrType yuv_type); 48 49void yuv422_rgb24_sse( 50 uint32_t width, uint32_t height, 51 const uint8_t *y, const uint8_t *u, const uint8_t *v, uint32_t y_stride, uint32_t uv_stride, 52 uint8_t *rgb, uint32_t rgb_stride, 53 YCbCrType yuv_type); 54 55void yuv422_rgba_sse( 56 uint32_t width, uint32_t height, 57 const uint8_t *y, const uint8_t *u, const uint8_t *v, uint32_t y_stride, uint32_t uv_stride, 58 uint8_t *rgb, uint32_t rgb_stride, 59 YCbCrType yuv_type); 60 61void yuv422_bgra_sse( 62 uint32_t width, uint32_t height, 63 const uint8_t *y, const uint8_t *u, const uint8_t *v, uint32_t y_stride, uint32_t uv_stride, 64 uint8_t *rgb, uint32_t rgb_stride, 65 YCbCrType yuv_type); 66 67void yuv422_argb_sse( 68 uint32_t width, uint32_t height, 69 const uint8_t *y, const uint8_t *u, const uint8_t *v, uint32_t y_stride, uint32_t uv_stride, 70 uint8_t *rgb, uint32_t rgb_stride, 71 YCbCrType yuv_type); 72 73void yuv422_abgr_sse( 74 uint32_t width, uint32_t height, 75 const uint8_t *y, const uint8_t *u, const uint8_t *v, uint32_t y_stride, uint32_t uv_stride, 76 uint8_t *rgb, uint32_t rgb_stride, 77 YCbCrType yuv_type); 78 79void yuvnv12_rgb565_sse( 80 uint32_t width, uint32_t height, 81 const uint8_t *y, const uint8_t *u, const uint8_t *v, uint32_t y_stride, uint32_t uv_stride, 82 uint8_t *rgb, uint32_t rgb_stride, 83 YCbCrType yuv_type); 84 85void yuvnv12_rgb24_sse( 86 uint32_t width, uint32_t height, 87 const uint8_t *y, const uint8_t *u, const uint8_t *v, uint32_t y_stride, uint32_t uv_stride, 88 uint8_t *rgb, uint32_t rgb_stride, 89 YCbCrType yuv_type); 90 91void yuvnv12_rgba_sse( 92 uint32_t width, uint32_t height, 93 const uint8_t *y, const uint8_t *u, const uint8_t *v, uint32_t y_stride, uint32_t uv_stride, 94 uint8_t *rgb, uint32_t rgb_stride, 95 YCbCrType yuv_type); 96 97void yuvnv12_bgra_sse( 98 uint32_t width, uint32_t height, 99 const uint8_t *y, const uint8_t *u, const uint8_t *v, uint32_t y_stride, uint32_t uv_stride, 100 uint8_t *rgb, uint32_t rgb_stride, 101 YCbCrType yuv_type); 102 103void yuvnv12_argb_sse( 104 uint32_t width, uint32_t height, 105 const uint8_t *y, const uint8_t *u, const uint8_t *v, uint32_t y_stride, uint32_t uv_stride, 106 uint8_t *rgb, uint32_t rgb_stride, 107 YCbCrType yuv_type); 108 109void yuvnv12_abgr_sse( 110 uint32_t width, uint32_t height, 111 const uint8_t *y, const uint8_t *u, const uint8_t *v, uint32_t y_stride, uint32_t uv_stride, 112 uint8_t *rgb, uint32_t rgb_stride, 113 YCbCrType yuv_type); 114 115// yuv to rgb, sse implementation 116// pointers do not need to be 16 byte aligned 117void yuv420_rgb565_sseu( 118 uint32_t width, uint32_t height, 119 const uint8_t *y, const uint8_t *u, const uint8_t *v, uint32_t y_stride, uint32_t uv_stride, 120 uint8_t *rgb, uint32_t rgb_stride, 121 YCbCrType yuv_type); 122 123void yuv420_rgb24_sseu( 124 uint32_t width, uint32_t height, 125 const uint8_t *y, const uint8_t *u, const uint8_t *v, uint32_t y_stride, uint32_t uv_stride, 126 uint8_t *rgb, uint32_t rgb_stride, 127 YCbCrType yuv_type); 128 129void yuv420_rgba_sseu( 130 uint32_t width, uint32_t height, 131 const uint8_t *y, const uint8_t *u, const uint8_t *v, uint32_t y_stride, uint32_t uv_stride, 132 uint8_t *rgb, uint32_t rgb_stride, 133 YCbCrType yuv_type); 134 135void yuv420_bgra_sseu( 136 uint32_t width, uint32_t height, 137 const uint8_t *y, const uint8_t *u, const uint8_t *v, uint32_t y_stride, uint32_t uv_stride, 138 uint8_t *rgb, uint32_t rgb_stride, 139 YCbCrType yuv_type); 140 141void yuv420_argb_sseu( 142 uint32_t width, uint32_t height, 143 const uint8_t *y, const uint8_t *u, const uint8_t *v, uint32_t y_stride, uint32_t uv_stride, 144 uint8_t *rgb, uint32_t rgb_stride, 145 YCbCrType yuv_type); 146 147void yuv420_abgr_sseu( 148 uint32_t width, uint32_t height, 149 const uint8_t *y, const uint8_t *u, const uint8_t *v, uint32_t y_stride, uint32_t uv_stride, 150 uint8_t *rgb, uint32_t rgb_stride, 151 YCbCrType yuv_type); 152 153void yuv422_rgb565_sseu( 154 uint32_t width, uint32_t height, 155 const uint8_t *y, const uint8_t *u, const uint8_t *v, uint32_t y_stride, uint32_t uv_stride, 156 uint8_t *rgb, uint32_t rgb_stride, 157 YCbCrType yuv_type); 158 159void yuv422_rgb24_sseu( 160 uint32_t width, uint32_t height, 161 const uint8_t *y, const uint8_t *u, const uint8_t *v, uint32_t y_stride, uint32_t uv_stride, 162 uint8_t *rgb, uint32_t rgb_stride, 163 YCbCrType yuv_type); 164 165void yuv422_rgba_sseu( 166 uint32_t width, uint32_t height, 167 const uint8_t *y, const uint8_t *u, const uint8_t *v, uint32_t y_stride, uint32_t uv_stride, 168 uint8_t *rgb, uint32_t rgb_stride, 169 YCbCrType yuv_type); 170 171void yuv422_bgra_sseu( 172 uint32_t width, uint32_t height, 173 const uint8_t *y, const uint8_t *u, const uint8_t *v, uint32_t y_stride, uint32_t uv_stride, 174 uint8_t *rgb, uint32_t rgb_stride, 175 YCbCrType yuv_type); 176 177void yuv422_argb_sseu( 178 uint32_t width, uint32_t height, 179 const uint8_t *y, const uint8_t *u, const uint8_t *v, uint32_t y_stride, uint32_t uv_stride, 180 uint8_t *rgb, uint32_t rgb_stride, 181 YCbCrType yuv_type); 182 183void yuv422_abgr_sseu( 184 uint32_t width, uint32_t height, 185 const uint8_t *y, const uint8_t *u, const uint8_t *v, uint32_t y_stride, uint32_t uv_stride, 186 uint8_t *rgb, uint32_t rgb_stride, 187 YCbCrType yuv_type); 188 189void yuvnv12_rgb565_sseu( 190 uint32_t width, uint32_t height, 191 const uint8_t *y, const uint8_t *u, const uint8_t *v, uint32_t y_stride, uint32_t uv_stride, 192 uint8_t *rgb, uint32_t rgb_stride, 193 YCbCrType yuv_type); 194 195void yuvnv12_rgb24_sseu( 196 uint32_t width, uint32_t height, 197 const uint8_t *y, const uint8_t *u, const uint8_t *v, uint32_t y_stride, uint32_t uv_stride, 198 uint8_t *rgb, uint32_t rgb_stride, 199 YCbCrType yuv_type); 200 201void yuvnv12_rgba_sseu( 202 uint32_t width, uint32_t height, 203 const uint8_t *y, const uint8_t *u, const uint8_t *v, uint32_t y_stride, uint32_t uv_stride, 204 uint8_t *rgb, uint32_t rgb_stride, 205 YCbCrType yuv_type); 206 207void yuvnv12_bgra_sseu( 208 uint32_t width, uint32_t height, 209 const uint8_t *y, const uint8_t *u, const uint8_t *v, uint32_t y_stride, uint32_t uv_stride, 210 uint8_t *rgb, uint32_t rgb_stride, 211 YCbCrType yuv_type); 212 213void yuvnv12_argb_sseu( 214 uint32_t width, uint32_t height, 215 const uint8_t *y, const uint8_t *u, const uint8_t *v, uint32_t y_stride, uint32_t uv_stride, 216 uint8_t *rgb, uint32_t rgb_stride, 217 YCbCrType yuv_type); 218 219void yuvnv12_abgr_sseu( 220 uint32_t width, uint32_t height, 221 const uint8_t *y, const uint8_t *u, const uint8_t *v, uint32_t y_stride, uint32_t uv_stride, 222 uint8_t *rgb, uint32_t rgb_stride, 223 YCbCrType yuv_type); 224 225 226// rgb to yuv, sse implementation 227// pointers must be 16 byte aligned, and strides must be divisible by 16 228void rgb24_yuv420_sse( 229 uint32_t width, uint32_t height, 230 const uint8_t *rgb, uint32_t rgb_stride, 231 uint8_t *y, uint8_t *u, uint8_t *v, uint32_t y_stride, uint32_t uv_stride, 232 YCbCrType yuv_type); 233 234// rgb to yuv, sse implementation 235// pointers do not need to be 16 byte aligned 236void rgb24_yuv420_sseu( 237 uint32_t width, uint32_t height, 238 const uint8_t *rgb, uint32_t rgb_stride, 239 uint8_t *y, uint8_t *u, uint8_t *v, uint32_t y_stride, uint32_t uv_stride, 240 YCbCrType yuv_type); 241#endif 242[FILE END](C) 2025 0x4248 (C) 2025 4248 Media and 4248 Systems, All part of 0x4248 See LICENCE files for more information. Not all files are by 0x4248 always check Licencing.