core side of vpx update

This commit is contained in:
Anthony Minessale 2019-01-17 20:41:53 +00:00 committed by Andrey Volk
parent f49279b45e
commit b644421c87
3 changed files with 234 additions and 239 deletions

View File

@ -198,46 +198,52 @@ libfreeswitch_libyuv_la_SOURCES = \
libs/libyuv/source/compare.cc \
libs/libyuv/source/compare_common.cc \
libs/libyuv/source/compare_gcc.cc \
libs/libyuv/source/convert.cc \
libs/libyuv/source/convert_argb.cc \
libs/libyuv/source/convert_from.cc \
libs/libyuv/source/convert_from_argb.cc \
libs/libyuv/source/convert_to_argb.cc \
libs/libyuv/source/convert_to_i420.cc \
libs/libyuv/source/cpu_id.cc \
libs/libyuv/source/planar_functions.cc \
libs/libyuv/source/rotate.cc \
libs/libyuv/source/rotate_any.cc \
libs/libyuv/source/rotate_argb.cc \
libs/libyuv/source/rotate_common.cc \
libs/libyuv/source/rotate_gcc.cc \
libs/libyuv/source/rotate_mips.cc \
libs/libyuv/source/row_any.cc \
libs/libyuv/source/row_common.cc \
libs/libyuv/source/row_mips.cc \
libs/libyuv/source/row_gcc.cc \
libs/libyuv/source/scale.cc \
libs/libyuv/source/scale_any.cc \
libs/libyuv/source/scale_argb.cc \
libs/libyuv/source/scale_common.cc \
libs/libyuv/source/scale_gcc.cc \
libs/libyuv/source/scale_mips.cc \
libs/libyuv/source/video_common.cc \
libs/libyuv/source/compare_mmi.cc \
libs/libyuv/source/compare_msa.cc \
libs/libyuv/source/compare_neon64.cc \
libs/libyuv/source/compare_neon.cc \
libs/libyuv/source/compare_win.cc \
libs/libyuv/source/convert_argb.cc \
libs/libyuv/source/convert.cc \
libs/libyuv/source/convert_from_argb.cc \
libs/libyuv/source/convert_from.cc \
libs/libyuv/source/convert_jpeg.cc \
libs/libyuv/source/convert_to_argb.cc \
libs/libyuv/source/convert_to_i420.cc \
libs/libyuv/source/cpu_id.cc \
libs/libyuv/source/mjpeg_decoder.cc \
libs/libyuv/source/mjpeg_validate.cc \
libs/libyuv/source/planar_functions.cc \
libs/libyuv/source/rotate_any.cc \
libs/libyuv/source/rotate_argb.cc \
libs/libyuv/source/rotate.cc \
libs/libyuv/source/rotate_common.cc \
libs/libyuv/source/rotate_gcc.cc \
libs/libyuv/source/rotate_mmi.cc \
libs/libyuv/source/rotate_msa.cc \
libs/libyuv/source/rotate_neon64.cc \
libs/libyuv/source/rotate_neon.cc \
libs/libyuv/source/rotate_win.cc \
libs/libyuv/source/row_any.cc \
libs/libyuv/source/row_common.cc \
libs/libyuv/source/row_gcc.cc \
libs/libyuv/source/row_mmi.cc \
libs/libyuv/source/row_msa.cc \
libs/libyuv/source/row_neon64.cc \
libs/libyuv/source/row_neon.cc \
libs/libyuv/source/row_win.cc \
libs/libyuv/source/scale_any.cc \
libs/libyuv/source/scale_argb.cc \
libs/libyuv/source/scale.cc \
libs/libyuv/source/scale_common.cc \
libs/libyuv/source/scale_gcc.cc \
libs/libyuv/source/scale_mmi.cc \
libs/libyuv/source/scale_msa.cc \
libs/libyuv/source/scale_neon64.cc \
libs/libyuv/source/scale_neon.cc \
libs/libyuv/source/scale_win.cc
libs/libyuv/source/scale_win.cc \
libs/libyuv/source/video_common.cc
libfreeswitch_libyuv_la_CPPFLAGS = -O2 -fomit-frame-pointer -Ilibs/libyuv/include
CORE_LIBS+=libfreeswitch_libyuv.la

View File

@ -8,7 +8,6 @@
* be found in the AUTHORS file in the root of the source tree.
*/
/*!\file
* \brief Describes the vpx image descriptor and associated operations
*
@ -30,7 +29,6 @@ extern "C" {
*/
#define VPX_IMAGE_ABI_VERSION (4) /**<\hideinitializer*/
#define VPX_IMG_FMT_PLANAR 0x100 /**< Image is a planar format. */
#define VPX_IMG_FMT_UV_FLIP 0x200 /**< V plane precedes U in memory. */
#define VPX_IMG_FMT_HAS_ALPHA 0x400 /**< Image has an alpha channel. */
@ -52,9 +50,11 @@ extern "C" {
VPX_IMG_FMT_ARGB_LE, /**< 32 bit packed BGRA, alpha=255 */
VPX_IMG_FMT_RGB565_LE, /**< 16 bit per pixel, gggbbbbb rrrrrggg */
VPX_IMG_FMT_RGB555_LE, /**< 16 bit per pixel, gggbbbbb 0rrrrrgg */
VPX_IMG_FMT_YV12 = VPX_IMG_FMT_PLANAR | VPX_IMG_FMT_UV_FLIP | 1, /**< planar YVU */
VPX_IMG_FMT_YV12 =
VPX_IMG_FMT_PLANAR | VPX_IMG_FMT_UV_FLIP | 1, /**< planar YVU */
VPX_IMG_FMT_I420 = VPX_IMG_FMT_PLANAR | 2,
VPX_IMG_FMT_VPXYV12 = VPX_IMG_FMT_PLANAR | VPX_IMG_FMT_UV_FLIP | 3, /** < planar 4:2:0 format with vpx color space */
VPX_IMG_FMT_VPXYV12 = VPX_IMG_FMT_PLANAR | VPX_IMG_FMT_UV_FLIP |
3, /** < planar 4:2:0 format with vpx color space */
VPX_IMG_FMT_VPXI420 = VPX_IMG_FMT_PLANAR | 4,
VPX_IMG_FMT_I422 = VPX_IMG_FMT_PLANAR | 5,
VPX_IMG_FMT_I444 = VPX_IMG_FMT_PLANAR | 6,
@ -118,11 +118,10 @@ extern "C" {
int bps; /**< bits per sample (for packed formats) */
/* The following member may be set by the application to associate data
* with this image.
/*!\brief The following member may be set by the application to associate
* data with this image.
*/
void *user_priv; /**< may be set by the application to associate data
* with this image. */
void *user_priv;
/* The following members should be treated as private. */
unsigned char *img_data; /**< private */
@ -158,10 +157,8 @@ extern "C" {
* parameter is non-null, the value of the img parameter will be
* returned.
*/
vpx_image_t *vpx_img_alloc(vpx_image_t *img,
vpx_img_fmt_t fmt,
unsigned int d_w,
unsigned int d_h,
vpx_image_t *vpx_img_alloc(vpx_image_t *img, vpx_img_fmt_t fmt,
unsigned int d_w, unsigned int d_h,
unsigned int align);
/*!\brief Open a descriptor, using existing storage for the underlying image
@ -183,14 +180,10 @@ extern "C" {
* parameter is non-null, the value of the img parameter will be
* returned.
*/
vpx_image_t *vpx_img_wrap(vpx_image_t *img,
vpx_img_fmt_t fmt,
unsigned int d_w,
unsigned int d_h,
unsigned int align,
vpx_image_t *vpx_img_wrap(vpx_image_t *img, vpx_img_fmt_t fmt, unsigned int d_w,
unsigned int d_h, unsigned int align,
unsigned char *img_data);
/*!\brief Set the rectangle identifying the displayed portion of the image
*
* Updates the displayed rectangle (aka viewport) on the image surface to
@ -204,12 +197,8 @@ extern "C" {
*
* \return 0 if the requested rectangle is valid, nonzero otherwise.
*/
int vpx_img_set_rect(vpx_image_t *img,
unsigned int x,
unsigned int y,
unsigned int w,
unsigned int h);
int vpx_img_set_rect(vpx_image_t *img, unsigned int x, unsigned int y,
unsigned int w, unsigned int h);
/*!\brief Flip the image vertically (top for bottom)
*

View File

@ -384,15 +384,15 @@ SWITCH_DECLARE(void) switch_img_patch_rgb(switch_image_t *IMG, switch_image_t *i
}
if (img->fmt == SWITCH_IMG_FMT_ARGB && IMG->fmt == SWITCH_IMG_FMT_ARGB) {
uint8* src_argb0 = img->planes[SWITCH_PLANE_PACKED];
uint8_t* src_argb0 = img->planes[SWITCH_PLANE_PACKED];
int src_stride_argb0 = img->stride[SWITCH_PLANE_PACKED];
uint8* src_argb1 = IMG->planes[SWITCH_PLANE_PACKED];
uint8_t* src_argb1 = IMG->planes[SWITCH_PLANE_PACKED];
int src_stride_argb1 = IMG->stride[SWITCH_PLANE_PACKED];
uint8* dst_argb = IMG->planes[SWITCH_PLANE_PACKED];
uint8_t* dst_argb = IMG->planes[SWITCH_PLANE_PACKED];
int dst_stride_argb = IMG->stride[SWITCH_PLANE_PACKED];
int width = MIN(img->d_w, IMG->d_w - abs(x));
int height = MIN(img->d_h, IMG->d_h - abs(y));
void (*ARGBBlendRow)(const uint8* src_argb, const uint8* src_argb1, uint8* dst_argb, int width) = GetARGBBlend();
void (*ARGBBlendRow)(const uint8_t* src_argb, const uint8_t* src_argb1, uint8_t* dst_argb, int width) = GetARGBBlend();
switch_img_attenuate(img);
@ -3277,10 +3277,10 @@ SWITCH_DECLARE(switch_status_t) switch_img_from_raw(switch_image_t *dest, void *
}
/*
int ConvertToI420(const uint8* src_frame, size_t src_size,
uint8* dst_y, int dst_stride_y,
uint8* dst_u, int dst_stride_u,
uint8* dst_v, int dst_stride_v,
int ConvertToI420(const uint8_t* src_frame, size_t src_size,
uint8_t* dst_y, int dst_stride_y,
uint8_t* dst_u, int dst_stride_u,
uint8_t* dst_v, int dst_stride_v,
int crop_x, int crop_y,
int src_width, int src_height,
int crop_width, int crop_height,