- Timestamp:
- Jul 28, 2017 2:51:44 AM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/third_party/yuv/include/libyuv/planar_functions.h
r5358 r5633 9 9 */ 10 10 11 #ifndef INCLUDE_LIBYUV_PLANAR_FUNCTIONS_H_ // NOLINT11 #ifndef INCLUDE_LIBYUV_PLANAR_FUNCTIONS_H_ 12 12 #define INCLUDE_LIBYUV_PLANAR_FUNCTIONS_H_ 13 13 … … 25 25 // Copy a plane of data. 26 26 LIBYUV_API 27 void CopyPlane(const uint8* src_y, int src_stride_y, 28 uint8* dst_y, int dst_stride_y, 29 int width, int height); 30 31 LIBYUV_API 32 void CopyPlane_16(const uint16* src_y, int src_stride_y, 33 uint16* dst_y, int dst_stride_y, 34 int width, int height); 27 void CopyPlane(const uint8* src_y, 28 int src_stride_y, 29 uint8* dst_y, 30 int dst_stride_y, 31 int width, 32 int height); 33 34 LIBYUV_API 35 void CopyPlane_16(const uint16* src_y, 36 int src_stride_y, 37 uint16* dst_y, 38 int dst_stride_y, 39 int width, 40 int height); 35 41 36 42 // Set a plane of data to a 32 bit value. 37 43 LIBYUV_API 38 void SetPlane(uint8* dst_y, int dst_stride_y, 39 int width, int height, 44 void SetPlane(uint8* dst_y, 45 int dst_stride_y, 46 int width, 47 int height, 40 48 uint32 value); 41 49 50 // Split interleaved UV plane into separate U and V planes. 51 LIBYUV_API 52 void SplitUVPlane(const uint8* src_uv, 53 int src_stride_uv, 54 uint8* dst_u, 55 int dst_stride_u, 56 uint8* dst_v, 57 int dst_stride_v, 58 int width, 59 int height); 60 61 // Merge separate U and V planes into one interleaved UV plane. 62 LIBYUV_API 63 void MergeUVPlane(const uint8* src_u, 64 int src_stride_u, 65 const uint8* src_v, 66 int src_stride_v, 67 uint8* dst_uv, 68 int dst_stride_uv, 69 int width, 70 int height); 71 42 72 // Copy I400. Supports inverting. 43 73 LIBYUV_API 44 int I400ToI400(const uint8* src_y, int src_stride_y, 45 uint8* dst_y, int dst_stride_y, 46 int width, int height); 74 int I400ToI400(const uint8* src_y, 75 int src_stride_y, 76 uint8* dst_y, 77 int dst_stride_y, 78 int width, 79 int height); 47 80 48 81 #define J400ToJ400 I400ToI400 … … 51 84 #define I422ToI422 I422Copy 52 85 LIBYUV_API 53 int I422Copy(const uint8* src_y, int src_stride_y, 54 const uint8* src_u, int src_stride_u, 55 const uint8* src_v, int src_stride_v, 56 uint8* dst_y, int dst_stride_y, 57 uint8* dst_u, int dst_stride_u, 58 uint8* dst_v, int dst_stride_v, 59 int width, int height); 86 int I422Copy(const uint8* src_y, 87 int src_stride_y, 88 const uint8* src_u, 89 int src_stride_u, 90 const uint8* src_v, 91 int src_stride_v, 92 uint8* dst_y, 93 int dst_stride_y, 94 uint8* dst_u, 95 int dst_stride_u, 96 uint8* dst_v, 97 int dst_stride_v, 98 int width, 99 int height); 60 100 61 101 // Copy I444 to I444. 62 102 #define I444ToI444 I444Copy 63 103 LIBYUV_API 64 int I444Copy(const uint8* src_y, int src_stride_y, 65 const uint8* src_u, int src_stride_u, 66 const uint8* src_v, int src_stride_v, 67 uint8* dst_y, int dst_stride_y, 68 uint8* dst_u, int dst_stride_u, 69 uint8* dst_v, int dst_stride_v, 70 int width, int height); 104 int I444Copy(const uint8* src_y, 105 int src_stride_y, 106 const uint8* src_u, 107 int src_stride_u, 108 const uint8* src_v, 109 int src_stride_v, 110 uint8* dst_y, 111 int dst_stride_y, 112 uint8* dst_u, 113 int dst_stride_u, 114 uint8* dst_v, 115 int dst_stride_v, 116 int width, 117 int height); 71 118 72 119 // Convert YUY2 to I422. 73 120 LIBYUV_API 74 int YUY2ToI422(const uint8* src_yuy2, int src_stride_yuy2, 75 uint8* dst_y, int dst_stride_y, 76 uint8* dst_u, int dst_stride_u, 77 uint8* dst_v, int dst_stride_v, 78 int width, int height); 121 int YUY2ToI422(const uint8* src_yuy2, 122 int src_stride_yuy2, 123 uint8* dst_y, 124 int dst_stride_y, 125 uint8* dst_u, 126 int dst_stride_u, 127 uint8* dst_v, 128 int dst_stride_v, 129 int width, 130 int height); 79 131 80 132 // Convert UYVY to I422. 81 133 LIBYUV_API 82 int UYVYToI422(const uint8* src_uyvy, int src_stride_uyvy, 83 uint8* dst_y, int dst_stride_y, 84 uint8* dst_u, int dst_stride_u, 85 uint8* dst_v, int dst_stride_v, 86 int width, int height); 87 88 LIBYUV_API 89 int YUY2ToNV12(const uint8* src_yuy2, int src_stride_yuy2, 90 uint8* dst_y, int dst_stride_y, 91 uint8* dst_uv, int dst_stride_uv, 92 int width, int height); 93 94 LIBYUV_API 95 int UYVYToNV12(const uint8* src_uyvy, int src_stride_uyvy, 96 uint8* dst_y, int dst_stride_y, 97 uint8* dst_uv, int dst_stride_uv, 98 int width, int height); 134 int UYVYToI422(const uint8* src_uyvy, 135 int src_stride_uyvy, 136 uint8* dst_y, 137 int dst_stride_y, 138 uint8* dst_u, 139 int dst_stride_u, 140 uint8* dst_v, 141 int dst_stride_v, 142 int width, 143 int height); 144 145 LIBYUV_API 146 int YUY2ToNV12(const uint8* src_yuy2, 147 int src_stride_yuy2, 148 uint8* dst_y, 149 int dst_stride_y, 150 uint8* dst_uv, 151 int dst_stride_uv, 152 int width, 153 int height); 154 155 LIBYUV_API 156 int UYVYToNV12(const uint8* src_uyvy, 157 int src_stride_uyvy, 158 uint8* dst_y, 159 int dst_stride_y, 160 uint8* dst_uv, 161 int dst_stride_uv, 162 int width, 163 int height); 164 165 LIBYUV_API 166 int YUY2ToY(const uint8* src_yuy2, 167 int src_stride_yuy2, 168 uint8* dst_y, 169 int dst_stride_y, 170 int width, 171 int height); 99 172 100 173 // Convert I420 to I400. (calls CopyPlane ignoring u/v). 101 174 LIBYUV_API 102 int I420ToI400(const uint8* src_y, int src_stride_y, 103 const uint8* src_u, int src_stride_u, 104 const uint8* src_v, int src_stride_v, 105 uint8* dst_y, int dst_stride_y, 106 int width, int height); 175 int I420ToI400(const uint8* src_y, 176 int src_stride_y, 177 const uint8* src_u, 178 int src_stride_u, 179 const uint8* src_v, 180 int src_stride_v, 181 uint8* dst_y, 182 int dst_stride_y, 183 int width, 184 int height); 107 185 108 186 // Alias … … 112 190 // I420 mirror. 113 191 LIBYUV_API 114 int I420Mirror(const uint8* src_y, int src_stride_y, 115 const uint8* src_u, int src_stride_u, 116 const uint8* src_v, int src_stride_v, 117 uint8* dst_y, int dst_stride_y, 118 uint8* dst_u, int dst_stride_u, 119 uint8* dst_v, int dst_stride_v, 120 int width, int height); 192 int I420Mirror(const uint8* src_y, 193 int src_stride_y, 194 const uint8* src_u, 195 int src_stride_u, 196 const uint8* src_v, 197 int src_stride_v, 198 uint8* dst_y, 199 int dst_stride_y, 200 uint8* dst_u, 201 int dst_stride_u, 202 uint8* dst_v, 203 int dst_stride_v, 204 int width, 205 int height); 121 206 122 207 // Alias … … 126 211 // Pass negative height to achieve 180 degree rotation. 127 212 LIBYUV_API 128 int I400Mirror(const uint8* src_y, int src_stride_y, 129 uint8* dst_y, int dst_stride_y, 130 int width, int height); 213 int I400Mirror(const uint8* src_y, 214 int src_stride_y, 215 uint8* dst_y, 216 int dst_stride_y, 217 int width, 218 int height); 131 219 132 220 // Alias … … 135 223 // ARGB mirror. 136 224 LIBYUV_API 137 int ARGBMirror(const uint8* src_argb, int src_stride_argb, 138 uint8* dst_argb, int dst_stride_argb, 139 int width, int height); 225 int ARGBMirror(const uint8* src_argb, 226 int src_stride_argb, 227 uint8* dst_argb, 228 int dst_stride_argb, 229 int width, 230 int height); 140 231 141 232 // Convert NV12 to RGB565. 142 233 LIBYUV_API 143 int NV12ToRGB565(const uint8* src_y, int src_stride_y, 144 const uint8* src_uv, int src_stride_uv, 145 uint8* dst_rgb565, int dst_stride_rgb565, 146 int width, int height); 234 int NV12ToRGB565(const uint8* src_y, 235 int src_stride_y, 236 const uint8* src_uv, 237 int src_stride_uv, 238 uint8* dst_rgb565, 239 int dst_stride_rgb565, 240 int width, 241 int height); 147 242 148 243 // I422ToARGB is in convert_argb.h 149 244 // Convert I422 to BGRA. 150 245 LIBYUV_API 151 int I422ToBGRA(const uint8* src_y, int src_stride_y, 152 const uint8* src_u, int src_stride_u, 153 const uint8* src_v, int src_stride_v, 154 uint8* dst_bgra, int dst_stride_bgra, 155 int width, int height); 246 int I422ToBGRA(const uint8* src_y, 247 int src_stride_y, 248 const uint8* src_u, 249 int src_stride_u, 250 const uint8* src_v, 251 int src_stride_v, 252 uint8* dst_bgra, 253 int dst_stride_bgra, 254 int width, 255 int height); 156 256 157 257 // Convert I422 to ABGR. 158 258 LIBYUV_API 159 int I422ToABGR(const uint8* src_y, int src_stride_y, 160 const uint8* src_u, int src_stride_u, 161 const uint8* src_v, int src_stride_v, 162 uint8* dst_abgr, int dst_stride_abgr, 163 int width, int height); 259 int I422ToABGR(const uint8* src_y, 260 int src_stride_y, 261 const uint8* src_u, 262 int src_stride_u, 263 const uint8* src_v, 264 int src_stride_v, 265 uint8* dst_abgr, 266 int dst_stride_abgr, 267 int width, 268 int height); 164 269 165 270 // Convert I422 to RGBA. 166 271 LIBYUV_API 167 int I422ToRGBA(const uint8* src_y, int src_stride_y, 168 const uint8* src_u, int src_stride_u, 169 const uint8* src_v, int src_stride_v, 170 uint8* dst_rgba, int dst_stride_rgba, 171 int width, int height); 272 int I422ToRGBA(const uint8* src_y, 273 int src_stride_y, 274 const uint8* src_u, 275 int src_stride_u, 276 const uint8* src_v, 277 int src_stride_v, 278 uint8* dst_rgba, 279 int dst_stride_rgba, 280 int width, 281 int height); 172 282 173 283 // Alias … … 175 285 176 286 LIBYUV_API 177 int RAWToRGB24(const uint8* src_raw, int src_stride_raw, 178 uint8* dst_rgb24, int dst_stride_rgb24, 179 int width, int height); 287 int RAWToRGB24(const uint8* src_raw, 288 int src_stride_raw, 289 uint8* dst_rgb24, 290 int dst_stride_rgb24, 291 int width, 292 int height); 180 293 181 294 // Draw a rectangle into I420. 182 295 LIBYUV_API 183 int I420Rect(uint8* dst_y, int dst_stride_y, 184 uint8* dst_u, int dst_stride_u, 185 uint8* dst_v, int dst_stride_v, 186 int x, int y, int width, int height, 187 int value_y, int value_u, int value_v); 296 int I420Rect(uint8* dst_y, 297 int dst_stride_y, 298 uint8* dst_u, 299 int dst_stride_u, 300 uint8* dst_v, 301 int dst_stride_v, 302 int x, 303 int y, 304 int width, 305 int height, 306 int value_y, 307 int value_u, 308 int value_v); 188 309 189 310 // Draw a rectangle into ARGB. 190 311 LIBYUV_API 191 int ARGBRect(uint8* dst_argb, int dst_stride_argb, 192 int x, int y, int width, int height, uint32 value); 312 int ARGBRect(uint8* dst_argb, 313 int dst_stride_argb, 314 int x, 315 int y, 316 int width, 317 int height, 318 uint32 value); 193 319 194 320 // Convert ARGB to gray scale ARGB. 195 321 LIBYUV_API 196 int ARGBGrayTo(const uint8* src_argb, int src_stride_argb, 197 uint8* dst_argb, int dst_stride_argb, 198 int width, int height); 322 int ARGBGrayTo(const uint8* src_argb, 323 int src_stride_argb, 324 uint8* dst_argb, 325 int dst_stride_argb, 326 int width, 327 int height); 199 328 200 329 // Make a rectangle of ARGB gray scale. 201 330 LIBYUV_API 202 int ARGBGray(uint8* dst_argb, int dst_stride_argb, 203 int x, int y, int width, int height); 331 int ARGBGray(uint8* dst_argb, 332 int dst_stride_argb, 333 int x, 334 int y, 335 int width, 336 int height); 204 337 205 338 // Make a rectangle of ARGB Sepia tone. 206 339 LIBYUV_API 207 int ARGBSepia(uint8* dst_argb, int dst_stride_argb, 208 int x, int y, int width, int height); 340 int ARGBSepia(uint8* dst_argb, 341 int dst_stride_argb, 342 int x, 343 int y, 344 int width, 345 int height); 209 346 210 347 // Apply a matrix rotation to each ARGB pixel. … … 215 352 // The last 4 coefficients apply to B, G, R, A and produce A of the output. 216 353 LIBYUV_API 217 int ARGBColorMatrix(const uint8* src_argb, int src_stride_argb, 218 uint8* dst_argb, int dst_stride_argb, 354 int ARGBColorMatrix(const uint8* src_argb, 355 int src_stride_argb, 356 uint8* dst_argb, 357 int dst_stride_argb, 219 358 const int8* matrix_argb, 220 int width, int height); 359 int width, 360 int height); 221 361 222 362 // Deprecated. Use ARGBColorMatrix instead. … … 227 367 // The last 4 coefficients apply to B, G, R, A and produce R of the output. 228 368 LIBYUV_API 229 int RGBColorMatrix(uint8* dst_argb, int dst_stride_argb, 369 int RGBColorMatrix(uint8* dst_argb, 370 int dst_stride_argb, 230 371 const int8* matrix_rgb, 231 int x, int y, int width, int height); 372 int x, 373 int y, 374 int width, 375 int height); 232 376 233 377 // Apply a color table each ARGB pixel. 234 378 // Table contains 256 ARGB values. 235 379 LIBYUV_API 236 int ARGBColorTable(uint8* dst_argb, int dst_stride_argb, 380 int ARGBColorTable(uint8* dst_argb, 381 int dst_stride_argb, 237 382 const uint8* table_argb, 238 int x, int y, int width, int height); 383 int x, 384 int y, 385 int width, 386 int height); 239 387 240 388 // Apply a color table each ARGB pixel but preserve destination alpha. 241 389 // Table contains 256 ARGB values. 242 390 LIBYUV_API 243 int RGBColorTable(uint8* dst_argb, int dst_stride_argb, 391 int RGBColorTable(uint8* dst_argb, 392 int dst_stride_argb, 244 393 const uint8* table_argb, 245 int x, int y, int width, int height); 394 int x, 395 int y, 396 int width, 397 int height); 246 398 247 399 // Apply a luma/color table each ARGB pixel but preserve destination alpha. … … 249 401 // RGB (YJ style) and C is an 8 bit color component (R, G or B). 250 402 LIBYUV_API 251 int ARGBLumaColorTable(const uint8* src_argb, int src_stride_argb, 252 uint8* dst_argb, int dst_stride_argb, 403 int ARGBLumaColorTable(const uint8* src_argb, 404 int src_stride_argb, 405 uint8* dst_argb, 406 int dst_stride_argb, 253 407 const uint8* luma_rgb_table, 254 int width, int height); 408 int width, 409 int height); 255 410 256 411 // Apply a 3 term polynomial to ARGB values. … … 263 418 264 419 LIBYUV_API 265 int ARGBPolynomial(const uint8* src_argb, int src_stride_argb, 266 uint8* dst_argb, int dst_stride_argb, 420 int ARGBPolynomial(const uint8* src_argb, 421 int src_stride_argb, 422 uint8* dst_argb, 423 int dst_stride_argb, 267 424 const float* poly, 268 int width, int height); 425 int width, 426 int height); 427 428 // Convert plane of 16 bit shorts to half floats. 429 // Source values are multiplied by scale before storing as half float. 430 LIBYUV_API 431 int HalfFloatPlane(const uint16* src_y, 432 int src_stride_y, 433 uint16* dst_y, 434 int dst_stride_y, 435 float scale, 436 int width, 437 int height); 269 438 270 439 // Quantize a rectangle of ARGB. Alpha unaffected. … … 273 442 // interval_offset should be a value between 0 and 255. 274 443 LIBYUV_API 275 int ARGBQuantize(uint8* dst_argb, int dst_stride_argb, 276 int scale, int interval_size, int interval_offset, 277 int x, int y, int width, int height); 444 int ARGBQuantize(uint8* dst_argb, 445 int dst_stride_argb, 446 int scale, 447 int interval_size, 448 int interval_offset, 449 int x, 450 int y, 451 int width, 452 int height); 278 453 279 454 // Copy ARGB to ARGB. 280 455 LIBYUV_API 281 int ARGBCopy(const uint8* src_argb, int src_stride_argb, 282 uint8* dst_argb, int dst_stride_argb, 283 int width, int height); 456 int ARGBCopy(const uint8* src_argb, 457 int src_stride_argb, 458 uint8* dst_argb, 459 int dst_stride_argb, 460 int width, 461 int height); 284 462 285 463 // Copy Alpha channel of ARGB to alpha of ARGB. 286 464 LIBYUV_API 287 int ARGBCopyAlpha(const uint8* src_argb, int src_stride_argb, 288 uint8* dst_argb, int dst_stride_argb, 289 int width, int height); 465 int ARGBCopyAlpha(const uint8* src_argb, 466 int src_stride_argb, 467 uint8* dst_argb, 468 int dst_stride_argb, 469 int width, 470 int height); 290 471 291 472 // Extract the alpha channel from ARGB. 292 473 LIBYUV_API 293 int ARGBExtractAlpha(const uint8* src_argb, int src_stride_argb, 294 uint8* dst_a, int dst_stride_a, 295 int width, int height); 474 int ARGBExtractAlpha(const uint8* src_argb, 475 int src_stride_argb, 476 uint8* dst_a, 477 int dst_stride_a, 478 int width, 479 int height); 296 480 297 481 // Copy Y channel to Alpha of ARGB. 298 482 LIBYUV_API 299 int ARGBCopyYToAlpha(const uint8* src_y, int src_stride_y, 300 uint8* dst_argb, int dst_stride_argb, 301 int width, int height); 302 303 typedef void (*ARGBBlendRow)(const uint8* src_argb0, const uint8* src_argb1, 304 uint8* dst_argb, int width); 483 int ARGBCopyYToAlpha(const uint8* src_y, 484 int src_stride_y, 485 uint8* dst_argb, 486 int dst_stride_argb, 487 int width, 488 int height); 489 490 typedef void (*ARGBBlendRow)(const uint8* src_argb0, 491 const uint8* src_argb1, 492 uint8* dst_argb, 493 int width); 305 494 306 495 // Get function to Alpha Blend ARGB pixels and store to destination. … … 312 501 // Alpha of destination is set to 255. 313 502 LIBYUV_API 314 int ARGBBlend(const uint8* src_argb0, int src_stride_argb0, 315 const uint8* src_argb1, int src_stride_argb1, 316 uint8* dst_argb, int dst_stride_argb, 317 int width, int height); 503 int ARGBBlend(const uint8* src_argb0, 504 int src_stride_argb0, 505 const uint8* src_argb1, 506 int src_stride_argb1, 507 uint8* dst_argb, 508 int dst_stride_argb, 509 int width, 510 int height); 318 511 319 512 // Alpha Blend plane and store to destination. 320 513 // Source is not pre-multiplied by alpha. 321 514 LIBYUV_API 322 int BlendPlane(const uint8* src_y0, int src_stride_y0, 323 const uint8* src_y1, int src_stride_y1, 324 const uint8* alpha, int alpha_stride, 325 uint8* dst_y, int dst_stride_y, 326 int width, int height); 515 int BlendPlane(const uint8* src_y0, 516 int src_stride_y0, 517 const uint8* src_y1, 518 int src_stride_y1, 519 const uint8* alpha, 520 int alpha_stride, 521 uint8* dst_y, 522 int dst_stride_y, 523 int width, 524 int height); 327 525 328 526 // Alpha Blend YUV images and store to destination. … … 330 528 // Alpha is full width x height and subsampled to half size to apply to UV. 331 529 LIBYUV_API 332 int I420Blend(const uint8* src_y0, int src_stride_y0, 333 const uint8* src_u0, int src_stride_u0, 334 const uint8* src_v0, int src_stride_v0, 335 const uint8* src_y1, int src_stride_y1, 336 const uint8* src_u1, int src_stride_u1, 337 const uint8* src_v1, int src_stride_v1, 338 const uint8* alpha, int alpha_stride, 339 uint8* dst_y, int dst_stride_y, 340 uint8* dst_u, int dst_stride_u, 341 uint8* dst_v, int dst_stride_v, 342 int width, int height); 530 int I420Blend(const uint8* src_y0, 531 int src_stride_y0, 532 const uint8* src_u0, 533 int src_stride_u0, 534 const uint8* src_v0, 535 int src_stride_v0, 536 const uint8* src_y1, 537 int src_stride_y1, 538 const uint8* src_u1, 539 int src_stride_u1, 540 const uint8* src_v1, 541 int src_stride_v1, 542 const uint8* alpha, 543 int alpha_stride, 544 uint8* dst_y, 545 int dst_stride_y, 546 uint8* dst_u, 547 int dst_stride_u, 548 uint8* dst_v, 549 int dst_stride_v, 550 int width, 551 int height); 343 552 344 553 // Multiply ARGB image by ARGB image. Shifted down by 8. Saturates to 255. 345 554 LIBYUV_API 346 int ARGBMultiply(const uint8* src_argb0, int src_stride_argb0, 347 const uint8* src_argb1, int src_stride_argb1, 348 uint8* dst_argb, int dst_stride_argb, 349 int width, int height); 555 int ARGBMultiply(const uint8* src_argb0, 556 int src_stride_argb0, 557 const uint8* src_argb1, 558 int src_stride_argb1, 559 uint8* dst_argb, 560 int dst_stride_argb, 561 int width, 562 int height); 350 563 351 564 // Add ARGB image with ARGB image. Saturates to 255. 352 565 LIBYUV_API 353 int ARGBAdd(const uint8* src_argb0, int src_stride_argb0, 354 const uint8* src_argb1, int src_stride_argb1, 355 uint8* dst_argb, int dst_stride_argb, 356 int width, int height); 566 int ARGBAdd(const uint8* src_argb0, 567 int src_stride_argb0, 568 const uint8* src_argb1, 569 int src_stride_argb1, 570 uint8* dst_argb, 571 int dst_stride_argb, 572 int width, 573 int height); 357 574 358 575 // Subtract ARGB image (argb1) from ARGB image (argb0). Saturates to 0. 359 576 LIBYUV_API 360 int ARGBSubtract(const uint8* src_argb0, int src_stride_argb0, 361 const uint8* src_argb1, int src_stride_argb1, 362 uint8* dst_argb, int dst_stride_argb, 363 int width, int height); 577 int ARGBSubtract(const uint8* src_argb0, 578 int src_stride_argb0, 579 const uint8* src_argb1, 580 int src_stride_argb1, 581 uint8* dst_argb, 582 int dst_stride_argb, 583 int width, 584 int height); 364 585 365 586 // Convert I422 to YUY2. 366 587 LIBYUV_API 367 int I422ToYUY2(const uint8* src_y, int src_stride_y, 368 const uint8* src_u, int src_stride_u, 369 const uint8* src_v, int src_stride_v, 370 uint8* dst_frame, int dst_stride_frame, 371 int width, int height); 588 int I422ToYUY2(const uint8* src_y, 589 int src_stride_y, 590 const uint8* src_u, 591 int src_stride_u, 592 const uint8* src_v, 593 int src_stride_v, 594 uint8* dst_frame, 595 int dst_stride_frame, 596 int width, 597 int height); 372 598 373 599 // Convert I422 to UYVY. 374 600 LIBYUV_API 375 int I422ToUYVY(const uint8* src_y, int src_stride_y, 376 const uint8* src_u, int src_stride_u, 377 const uint8* src_v, int src_stride_v, 378 uint8* dst_frame, int dst_stride_frame, 379 int width, int height); 601 int I422ToUYVY(const uint8* src_y, 602 int src_stride_y, 603 const uint8* src_u, 604 int src_stride_u, 605 const uint8* src_v, 606 int src_stride_v, 607 uint8* dst_frame, 608 int dst_stride_frame, 609 int width, 610 int height); 380 611 381 612 // Convert unattentuated ARGB to preattenuated ARGB. 382 613 LIBYUV_API 383 int ARGBAttenuate(const uint8* src_argb, int src_stride_argb, 384 uint8* dst_argb, int dst_stride_argb, 385 int width, int height); 614 int ARGBAttenuate(const uint8* src_argb, 615 int src_stride_argb, 616 uint8* dst_argb, 617 int dst_stride_argb, 618 int width, 619 int height); 386 620 387 621 // Convert preattentuated ARGB to unattenuated ARGB. 388 622 LIBYUV_API 389 int ARGBUnattenuate(const uint8* src_argb, int src_stride_argb, 390 uint8* dst_argb, int dst_stride_argb, 391 int width, int height); 623 int ARGBUnattenuate(const uint8* src_argb, 624 int src_stride_argb, 625 uint8* dst_argb, 626 int dst_stride_argb, 627 int width, 628 int height); 392 629 393 630 // Internal function - do not call directly. … … 395 632 // of all values above and to the left of the entry. Used by ARGBBlur. 396 633 LIBYUV_API 397 int ARGBComputeCumulativeSum(const uint8* src_argb, int src_stride_argb, 398 int32* dst_cumsum, int dst_stride32_cumsum, 399 int width, int height); 634 int ARGBComputeCumulativeSum(const uint8* src_argb, 635 int src_stride_argb, 636 int32* dst_cumsum, 637 int dst_stride32_cumsum, 638 int width, 639 int height); 400 640 401 641 // Blur ARGB image. … … 406 646 // Blur is optimized for radius of 5 (11x11) or less. 407 647 LIBYUV_API 408 int ARGBBlur(const uint8* src_argb, int src_stride_argb, 409 uint8* dst_argb, int dst_stride_argb, 410 int32* dst_cumsum, int dst_stride32_cumsum, 411 int width, int height, int radius); 648 int ARGBBlur(const uint8* src_argb, 649 int src_stride_argb, 650 uint8* dst_argb, 651 int dst_stride_argb, 652 int32* dst_cumsum, 653 int dst_stride32_cumsum, 654 int width, 655 int height, 656 int radius); 412 657 413 658 // Multiply ARGB image by ARGB value. 414 659 LIBYUV_API 415 int ARGBShade(const uint8* src_argb, int src_stride_argb, 416 uint8* dst_argb, int dst_stride_argb, 417 int width, int height, uint32 value); 660 int ARGBShade(const uint8* src_argb, 661 int src_stride_argb, 662 uint8* dst_argb, 663 int dst_stride_argb, 664 int width, 665 int height, 666 uint32 value); 418 667 419 668 // Interpolate between two images using specified amount of interpolation … … 422 671 // and 255 means 1% src0 and 99% src1. 423 672 LIBYUV_API 424 int InterpolatePlane(const uint8* src0, int src_stride0, 425 const uint8* src1, int src_stride1, 426 uint8* dst, int dst_stride, 427 int width, int height, int interpolation); 673 int InterpolatePlane(const uint8* src0, 674 int src_stride0, 675 const uint8* src1, 676 int src_stride1, 677 uint8* dst, 678 int dst_stride, 679 int width, 680 int height, 681 int interpolation); 428 682 429 683 // Interpolate between two ARGB images using specified amount of interpolation 430 684 // Internally calls InterpolatePlane with width * 4 (bpp). 431 685 LIBYUV_API 432 int ARGBInterpolate(const uint8* src_argb0, int src_stride_argb0, 433 const uint8* src_argb1, int src_stride_argb1, 434 uint8* dst_argb, int dst_stride_argb, 435 int width, int height, int interpolation); 686 int ARGBInterpolate(const uint8* src_argb0, 687 int src_stride_argb0, 688 const uint8* src_argb1, 689 int src_stride_argb1, 690 uint8* dst_argb, 691 int dst_stride_argb, 692 int width, 693 int height, 694 int interpolation); 436 695 437 696 // Interpolate between two YUV images using specified amount of interpolation … … 439 698 // are half width and half height. 440 699 LIBYUV_API 441 int I420Interpolate(const uint8* src0_y, int src0_stride_y, 442 const uint8* src0_u, int src0_stride_u, 443 const uint8* src0_v, int src0_stride_v, 444 const uint8* src1_y, int src1_stride_y, 445 const uint8* src1_u, int src1_stride_u, 446 const uint8* src1_v, int src1_stride_v, 447 uint8* dst_y, int dst_stride_y, 448 uint8* dst_u, int dst_stride_u, 449 uint8* dst_v, int dst_stride_v, 450 int width, int height, int interpolation); 700 int I420Interpolate(const uint8* src0_y, 701 int src0_stride_y, 702 const uint8* src0_u, 703 int src0_stride_u, 704 const uint8* src0_v, 705 int src0_stride_v, 706 const uint8* src1_y, 707 int src1_stride_y, 708 const uint8* src1_u, 709 int src1_stride_u, 710 const uint8* src1_v, 711 int src1_stride_v, 712 uint8* dst_y, 713 int dst_stride_y, 714 uint8* dst_u, 715 int dst_stride_u, 716 uint8* dst_v, 717 int dst_stride_v, 718 int width, 719 int height, 720 int interpolation); 451 721 452 722 #if defined(__pnacl__) || defined(__CLR_VER) || \ … … 469 739 // of destination. Useful for scaling, rotation, mirror, texture mapping. 470 740 LIBYUV_API 471 void ARGBAffineRow_C(const uint8* src_argb, int src_argb_stride, 472 uint8* dst_argb, const float* uv_dudv, int width); 473 LIBYUV_API 474 void ARGBAffineRow_SSE2(const uint8* src_argb, int src_argb_stride, 475 uint8* dst_argb, const float* uv_dudv, int width); 741 void ARGBAffineRow_C(const uint8* src_argb, 742 int src_argb_stride, 743 uint8* dst_argb, 744 const float* uv_dudv, 745 int width); 746 LIBYUV_API 747 void ARGBAffineRow_SSE2(const uint8* src_argb, 748 int src_argb_stride, 749 uint8* dst_argb, 750 const float* uv_dudv, 751 int width); 476 752 477 753 // Shuffle ARGB channel order. e.g. BGRA to ARGB. 478 754 // shuffler is 16 bytes and must be aligned. 479 755 LIBYUV_API 480 int ARGBShuffle(const uint8* src_bgra, int src_stride_bgra, 481 uint8* dst_argb, int dst_stride_argb, 482 const uint8* shuffler, int width, int height); 756 int ARGBShuffle(const uint8* src_bgra, 757 int src_stride_bgra, 758 uint8* dst_argb, 759 int dst_stride_argb, 760 const uint8* shuffler, 761 int width, 762 int height); 483 763 484 764 // Sobel ARGB effect with planar output. 485 765 LIBYUV_API 486 int ARGBSobelToPlane(const uint8* src_argb, int src_stride_argb, 487 uint8* dst_y, int dst_stride_y, 488 int width, int height); 766 int ARGBSobelToPlane(const uint8* src_argb, 767 int src_stride_argb, 768 uint8* dst_y, 769 int dst_stride_y, 770 int width, 771 int height); 489 772 490 773 // Sobel ARGB effect. 491 774 LIBYUV_API 492 int ARGBSobel(const uint8* src_argb, int src_stride_argb, 493 uint8* dst_argb, int dst_stride_argb, 494 int width, int height); 775 int ARGBSobel(const uint8* src_argb, 776 int src_stride_argb, 777 uint8* dst_argb, 778 int dst_stride_argb, 779 int width, 780 int height); 495 781 496 782 // Sobel ARGB effect w/ Sobel X, Sobel, Sobel Y in ARGB. 497 783 LIBYUV_API 498 int ARGBSobelXY(const uint8* src_argb, int src_stride_argb, 499 uint8* dst_argb, int dst_stride_argb, 500 int width, int height); 784 int ARGBSobelXY(const uint8* src_argb, 785 int src_stride_argb, 786 uint8* dst_argb, 787 int dst_stride_argb, 788 int width, 789 int height); 501 790 502 791 #ifdef __cplusplus … … 505 794 #endif 506 795 507 #endif // INCLUDE_LIBYUV_PLANAR_FUNCTIONS_H_ NOLINT796 #endif // INCLUDE_LIBYUV_PLANAR_FUNCTIONS_H_
Note: See TracChangeset
for help on using the changeset viewer.