convert_yuv_to_rgb.h revision 5821806d5e7f356e8fa4b058a389a808ea183019
1// Copyright (c) 2012 The Chromium Authors. All rights reserved. 2// Use of this source code is governed by a BSD-style license that can be 3// found in the LICENSE file. 4 5#ifndef MEDIA_BASE_SIMD_CONVERT_YUV_TO_RGB_H_ 6#define MEDIA_BASE_SIMD_CONVERT_YUV_TO_RGB_H_ 7 8#include "base/basictypes.h" 9#include "media/base/yuv_convert.h" 10 11namespace media { 12 13typedef void (*ConvertYUVToRGB32Proc)(const uint8*, 14 const uint8*, 15 const uint8*, 16 uint8*, 17 int, 18 int, 19 int, 20 int, 21 int, 22 YUVType); 23 24void ConvertYUVToRGB32_C(const uint8* yplane, 25 const uint8* uplane, 26 const uint8* vplane, 27 uint8* rgbframe, 28 int width, 29 int height, 30 int ystride, 31 int uvstride, 32 int rgbstride, 33 YUVType yuv_type); 34 35void ConvertYUVToRGB32_SSE(const uint8* yplane, 36 const uint8* uplane, 37 const uint8* vplane, 38 uint8* rgbframe, 39 int width, 40 int height, 41 int ystride, 42 int uvstride, 43 int rgbstride, 44 YUVType yuv_type); 45 46void ConvertYUVToRGB32_MMX(const uint8* yplane, 47 const uint8* uplane, 48 const uint8* vplane, 49 uint8* rgbframe, 50 int width, 51 int height, 52 int ystride, 53 int uvstride, 54 int rgbstride, 55 YUVType yuv_type); 56 57} // namespace media 58 59// Assembly functions are declared without namespace. 60extern "C" { 61 62typedef void (*ConvertYUVToRGB32RowProc)(const uint8*, 63 const uint8*, 64 const uint8*, 65 uint8*, 66 int); 67typedef void (*ScaleYUVToRGB32RowProc)(const uint8*, 68 const uint8*, 69 const uint8*, 70 uint8*, 71 int, 72 int); 73 74void ConvertYUVToRGB32Row_C(const uint8* yplane, 75 const uint8* uplane, 76 const uint8* vplane, 77 uint8* rgbframe, 78 int width); 79 80void ConvertYUVToRGB32Row_MMX(const uint8* yplane, 81 const uint8* uplane, 82 const uint8* vplane, 83 uint8* rgbframe, 84 int width); 85 86void ConvertYUVToRGB32Row_SSE(const uint8* yplane, 87 const uint8* uplane, 88 const uint8* vplane, 89 uint8* rgbframe, 90 int width); 91 92void ScaleYUVToRGB32Row_C(const uint8* y_buf, 93 const uint8* u_buf, 94 const uint8* v_buf, 95 uint8* rgb_buf, 96 int width, 97 int source_dx); 98 99void ScaleYUVToRGB32Row_MMX(const uint8* y_buf, 100 const uint8* u_buf, 101 const uint8* v_buf, 102 uint8* rgb_buf, 103 int width, 104 int source_dx); 105 106void ScaleYUVToRGB32Row_SSE(const uint8* y_buf, 107 const uint8* u_buf, 108 const uint8* v_buf, 109 uint8* rgb_buf, 110 int width, 111 int source_dx); 112 113void ScaleYUVToRGB32Row_SSE2_X64(const uint8* y_buf, 114 const uint8* u_buf, 115 const uint8* v_buf, 116 uint8* rgb_buf, 117 int width, 118 int source_dx); 119 120void LinearScaleYUVToRGB32Row_C(const uint8* y_buf, 121 const uint8* u_buf, 122 const uint8* v_buf, 123 uint8* rgb_buf, 124 int width, 125 int source_dx); 126 127void LinearScaleYUVToRGB32RowWithRange_C(const uint8* y_buf, 128 const uint8* u_buf, 129 const uint8* v_buf, 130 uint8* rgb_buf, 131 int dest_width, 132 int source_x, 133 int source_dx); 134 135void LinearScaleYUVToRGB32Row_MMX(const uint8* y_buf, 136 const uint8* u_buf, 137 const uint8* v_buf, 138 uint8* rgb_buf, 139 int width, 140 int source_dx); 141 142void LinearScaleYUVToRGB32Row_SSE(const uint8* y_buf, 143 const uint8* u_buf, 144 const uint8* v_buf, 145 uint8* rgb_buf, 146 int width, 147 int source_dx); 148 149void LinearScaleYUVToRGB32Row_MMX_X64(const uint8* y_buf, 150 const uint8* u_buf, 151 const uint8* v_buf, 152 uint8* rgb_buf, 153 int width, 154 int source_dx); 155 156} // extern "C" 157 158#endif // MEDIA_BASE_SIMD_CONVERT_YUV_TO_RGB_H_ 159