gfx/ycbcr/ycbcr_to_rgb565.h

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/gfx/ycbcr/ycbcr_to_rgb565.h	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,72 @@
     1.4 +// Copyright (c) 2010 The Chromium Authors. All rights reserved.
     1.5 +// Use of this source code is governed by a BSD-style license that can be
     1.6 +// found in the LICENSE file.
     1.7 +#ifndef MEDIA_BASE_YCBCR_TO_RGB565_H_
     1.8 +#define MEDIA_BASE_YCBCR_TO_RGB565_H_
     1.9 +#include "yuv_convert.h"
    1.10 +#include "mozilla/arm.h"
    1.11 +
    1.12 +// It's currently only worth including this if we have NEON support.
    1.13 +#ifdef MOZILLA_MAY_SUPPORT_NEON
    1.14 +#define HAVE_YCBCR_TO_RGB565 1
    1.15 +#endif
    1.16 +
    1.17 +namespace mozilla {
    1.18 +
    1.19 +namespace gfx {
    1.20 +
    1.21 +#ifdef HAVE_YCBCR_TO_RGB565
    1.22 +// Convert a frame of YUV to 16 bit RGB565.
    1.23 +NS_GFX_(void) ConvertYCbCrToRGB565(const uint8* yplane,
    1.24 +                                   const uint8* uplane,
    1.25 +                                   const uint8* vplane,
    1.26 +                                   uint8* rgbframe,
    1.27 +                                   int pic_x,
    1.28 +                                   int pic_y,
    1.29 +                                   int pic_width,
    1.30 +                                   int pic_height,
    1.31 +                                   int ystride,
    1.32 +                                   int uvstride,
    1.33 +                                   int rgbstride,
    1.34 +                                   YUVType yuv_type);
    1.35 +
    1.36 +// Used to test if we have an accelerated version.
    1.37 +NS_GFX_(bool) IsConvertYCbCrToRGB565Fast(int pic_x,
    1.38 +                                         int pic_y,
    1.39 +                                         int pic_width,
    1.40 +                                         int pic_height,
    1.41 +                                         YUVType yuv_type);
    1.42 +
    1.43 +// Scale a frame of YUV to 16 bit RGB565.
    1.44 +NS_GFX_(void) ScaleYCbCrToRGB565(const uint8_t *yplane,
    1.45 +                                 const uint8_t *uplane,
    1.46 +                                 const uint8_t *vplane,
    1.47 +                                 uint8_t *rgbframe,
    1.48 +                                 int source_x0,
    1.49 +                                 int source_y0,
    1.50 +                                 int source_width,
    1.51 +                                 int source_height,
    1.52 +                                 int width,
    1.53 +                                 int height,
    1.54 +                                 int ystride,
    1.55 +                                 int uvstride,
    1.56 +                                 int rgbstride,
    1.57 +                                 YUVType yuv_type,
    1.58 +                                 ScaleFilter filter);
    1.59 +
    1.60 +// Used to test if we have an accelerated version.
    1.61 +NS_GFX_(bool) IsScaleYCbCrToRGB565Fast(int source_x0,
    1.62 +                                       int source_y0,
    1.63 +                                       int source_width,
    1.64 +                                       int source_height,
    1.65 +                                       int width,
    1.66 +                                       int height,
    1.67 +                                       YUVType yuv_type,
    1.68 +                                       ScaleFilter filter);
    1.69 +#endif // HAVE_YCBCR_TO_RGB565
    1.70 +
    1.71 +}  // namespace gfx
    1.72 +
    1.73 +}  // namespace mozilla
    1.74 +
    1.75 +#endif // MEDIA_BASE_YCBCR_TO_RGB565_H_

mercurial