| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef MEDIA_BASE_YUV_CONVERT_H_ | 5 #ifndef MEDIA_BASE_YUV_CONVERT_H_ |
| 6 #define MEDIA_BASE_YUV_CONVERT_H_ | 6 #define MEDIA_BASE_YUV_CONVERT_H_ |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 | 9 |
| 10 namespace media { | 10 namespace media { |
| (...skipping 23 matching lines...) Expand all Loading... |
| 34 FILTER_NONE, // No filter (point sampled). | 34 FILTER_NONE, // No filter (point sampled). |
| 35 FILTER_BILINEAR, // Bilinear filter. | 35 FILTER_BILINEAR, // Bilinear filter. |
| 36 }; | 36 }; |
| 37 | 37 |
| 38 // Convert a frame of YUV to 32 bit ARGB. | 38 // Convert a frame of YUV to 32 bit ARGB. |
| 39 // Pass in YV16/YV12 depending on source format | 39 // Pass in YV16/YV12 depending on source format |
| 40 void ConvertYUVToRGB32(const uint8* yplane, | 40 void ConvertYUVToRGB32(const uint8* yplane, |
| 41 const uint8* uplane, | 41 const uint8* uplane, |
| 42 const uint8* vplane, | 42 const uint8* vplane, |
| 43 uint8* rgbframe, | 43 uint8* rgbframe, |
| 44 int frame_width, | 44 int source_width, |
| 45 int frame_height, | 45 int source_height, |
| 46 int ystride, | 46 int ystride, |
| 47 int uvstride, | 47 int uvstride, |
| 48 int rgbstride, | 48 int rgbstride, |
| 49 YUVType yuv_type); | 49 YUVType yuv_type); |
| 50 | 50 |
| 51 // Scale a frame of YUV to 32 bit ARGB. | 51 // Scale a frame of YUV to 32 bit ARGB. |
| 52 // Supports rotation and mirroring. | 52 // Supports rotation and mirroring. |
| 53 void ScaleYUVToRGB32(const uint8* yplane, | 53 void ScaleYUVToRGB32(const uint8* yplane, |
| 54 const uint8* uplane, | 54 const uint8* uplane, |
| 55 const uint8* vplane, | 55 const uint8* vplane, |
| 56 uint8* rgbframe, | 56 uint8* rgbframe, |
| 57 int frame_width, | 57 int source_width, |
| 58 int frame_height, | 58 int source_height, |
| 59 int scaled_width, | 59 int width, |
| 60 int scaled_height, | 60 int height, |
| 61 int ystride, | 61 int ystride, |
| 62 int uvstride, | 62 int uvstride, |
| 63 int rgbstride, | 63 int rgbstride, |
| 64 YUVType yuv_type, | 64 YUVType yuv_type, |
| 65 Rotate view_rotate, | 65 Rotate view_rotate, |
| 66 ScaleFilter filter); | 66 ScaleFilter filter); |
| 67 | 67 |
| 68 } // namespace media | 68 } // namespace media |
| 69 | 69 |
| 70 #endif // MEDIA_BASE_YUV_CONVERT_H_ | 70 #endif // MEDIA_BASE_YUV_CONVERT_H_ |
| OLD | NEW |