michael@0: // Copyright (c) 2010 The Chromium Authors. All rights reserved. michael@0: // Use of this source code is governed by a BSD-style license that can be michael@0: // found in the LICENSE file. michael@0: #ifndef MEDIA_BASE_YCBCR_TO_RGB565_H_ michael@0: #define MEDIA_BASE_YCBCR_TO_RGB565_H_ michael@0: #include "yuv_convert.h" michael@0: #include "mozilla/arm.h" michael@0: michael@0: // It's currently only worth including this if we have NEON support. michael@0: #ifdef MOZILLA_MAY_SUPPORT_NEON michael@0: #define HAVE_YCBCR_TO_RGB565 1 michael@0: #endif michael@0: michael@0: namespace mozilla { michael@0: michael@0: namespace gfx { michael@0: michael@0: #ifdef HAVE_YCBCR_TO_RGB565 michael@0: // Convert a frame of YUV to 16 bit RGB565. michael@0: NS_GFX_(void) ConvertYCbCrToRGB565(const uint8* yplane, michael@0: const uint8* uplane, michael@0: const uint8* vplane, michael@0: uint8* rgbframe, michael@0: int pic_x, michael@0: int pic_y, michael@0: int pic_width, michael@0: int pic_height, michael@0: int ystride, michael@0: int uvstride, michael@0: int rgbstride, michael@0: YUVType yuv_type); michael@0: michael@0: // Used to test if we have an accelerated version. michael@0: NS_GFX_(bool) IsConvertYCbCrToRGB565Fast(int pic_x, michael@0: int pic_y, michael@0: int pic_width, michael@0: int pic_height, michael@0: YUVType yuv_type); michael@0: michael@0: // Scale a frame of YUV to 16 bit RGB565. michael@0: NS_GFX_(void) ScaleYCbCrToRGB565(const uint8_t *yplane, michael@0: const uint8_t *uplane, michael@0: const uint8_t *vplane, michael@0: uint8_t *rgbframe, michael@0: int source_x0, michael@0: int source_y0, michael@0: int source_width, michael@0: int source_height, michael@0: int width, michael@0: int height, michael@0: int ystride, michael@0: int uvstride, michael@0: int rgbstride, michael@0: YUVType yuv_type, michael@0: ScaleFilter filter); michael@0: michael@0: // Used to test if we have an accelerated version. michael@0: NS_GFX_(bool) IsScaleYCbCrToRGB565Fast(int source_x0, michael@0: int source_y0, michael@0: int source_width, michael@0: int source_height, michael@0: int width, michael@0: int height, michael@0: YUVType yuv_type, michael@0: ScaleFilter filter); michael@0: #endif // HAVE_YCBCR_TO_RGB565 michael@0: michael@0: } // namespace gfx michael@0: michael@0: } // namespace mozilla michael@0: michael@0: #endif // MEDIA_BASE_YCBCR_TO_RGB565_H_