Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 443d08d7 authored by Haynes Mathew George's avatar Haynes Mathew George Committed by Evan McClain
Browse files

stagefright: Additional types for Colorconvertor



- Define structure and enums to be used by stagefright
  to interact with mm-color-convertor library

Patchset 1: Add QCOM_HARDWARE ifdefs.

Change-Id: If2a01e3255b8e108f4559e016f31e6195976476a
Signed-off-by: default avatarEvan McClain <aeroevan@gmail.com>
parent 94e9db50
Loading
Loading
Loading
Loading
+45 −0
Original line number Diff line number Diff line
@@ -83,6 +83,51 @@ private:
    ColorConverter &operator=(const ColorConverter &);
};

#ifdef QCOM_HARDWARE
//------------------------------------------
enum ColorConvertFormat {
    RGB565 = 1,
    YCbCr420Tile,
    YCbCr420SP,
    YCbCr420P,
    YCrCb420P,
};

/* 64 bit flag variable, reserving bits as needed */
enum ColorConvertFlags {
    COLOR_CONVERT_ALIGN_NONE = 1,
    COLOR_CONVERT_CENTER_OUTPUT = 1<<1,
    COLOR_CONVERT_ALIGN_16 =   1<<4,
    COLOR_CONVERT_ALIGN_2048 = 1<<11,
    COLOR_CONVERT_ALIGN_8192 = 1<<13,
};

struct ColorConvertParams {
    size_t width;
    size_t height;

    size_t cropWidth;
    size_t cropHeight;

    size_t cropLeft;
    size_t cropRight;
    size_t cropTop;
    size_t cropBottom;

    ColorConvertFormat colorFormat;
    const void * data;
    int fd;

    uint64_t flags;
};

typedef int (* ConvertFn)(ColorConvertParams src,
                          ColorConvertParams dst, uint8_t *adjustedClip);

int convert(ColorConvertParams src, ColorConvertParams dst,
            uint8_t *adjustedClip);
#endif

}  // namespace android

#endif  // COLOR_CONVERTER_H_
+4 −0
Original line number Diff line number Diff line
@@ -9,6 +9,10 @@ LOCAL_C_INCLUDES := \
        $(TOP)/frameworks/base/include/media/stagefright/openmax \
        $(TOP)/hardware/msm7k

ifeq ($(BOARD_USES_QCOM_HARDWARE),true)
        LOCAL_CFLAGS += -DQCOM_HARDWARE
endif

LOCAL_MODULE:= libstagefright_color_conversion

include $(BUILD_STATIC_LIBRARY)