mirror of
https://chromium.googlesource.com/libyuv/libyuv
synced 2025-12-06 16:56:55 +08:00
Adds files and functions for rotate any, but does not hook them up to the caller.
rotate any R=harryjin@google.com BUG=libyuv:464 Review URL: https://webrtc-codereview.appspot.com/53769004.
This commit is contained in:
parent
3a3a89ccd4
commit
2fa4f5a3ea
@ -19,6 +19,7 @@ LOCAL_SRC_FILES := \
|
||||
source/cpu_id.cc \
|
||||
source/planar_functions.cc \
|
||||
source/rotate.cc \
|
||||
source/rotate_any.cc \
|
||||
source/rotate_argb.cc \
|
||||
source/rotate_common.cc \
|
||||
source/rotate_mips.cc \
|
||||
|
||||
1
BUILD.gn
1
BUILD.gn
@ -56,6 +56,7 @@ source_set("libyuv") {
|
||||
"source/mjpeg_validate.cc",
|
||||
"source/planar_functions.cc",
|
||||
"source/rotate.cc",
|
||||
"source/rotate_any.cc",
|
||||
"source/rotate_argb.cc",
|
||||
"source/rotate_common.cc",
|
||||
"source/rotate_mips.cc",
|
||||
|
||||
@ -28,6 +28,7 @@ set(ly_source_files
|
||||
${ly_src_dir}/mjpeg_validate.cc
|
||||
${ly_src_dir}/planar_functions.cc
|
||||
${ly_src_dir}/rotate.cc
|
||||
${ly_src_dir}/rotate_any.cc
|
||||
${ly_src_dir}/rotate_argb.cc
|
||||
${ly_src_dir}/rotate_common.cc
|
||||
${ly_src_dir}/rotate_mips.cc
|
||||
|
||||
@ -98,10 +98,18 @@ void TransposeWx8_NEON(const uint8* src, int src_stride,
|
||||
uint8* dst, int dst_stride, int width);
|
||||
void TransposeWx8_SSSE3(const uint8* src, int src_stride,
|
||||
uint8* dst, int dst_stride, int width);
|
||||
void TransposeWx8_FAST_SSSE3(const uint8* src, int src_stride,
|
||||
uint8* dst, int dst_stride, int width);
|
||||
void TransposeWx8_MIPS_DSPR2(const uint8* src, int src_stride,
|
||||
uint8* dst, int dst_stride, int width);
|
||||
|
||||
void TransposeWx8_FAST_SSSE3(const uint8* src, int src_stride,
|
||||
void TransposeWx8_Any_NEON(const uint8* src, int src_stride,
|
||||
uint8* dst, int dst_stride, int width);
|
||||
void TransposeWx8_Any_SSSE3(const uint8* src, int src_stride,
|
||||
uint8* dst, int dst_stride, int width);
|
||||
void TransposeWx8_FAST_Any_SSSE3(const uint8* src, int src_stride,
|
||||
uint8* dst, int dst_stride, int width);
|
||||
void TransposeWx8_Any_MIPS_DSPR2(const uint8* src, int src_stride,
|
||||
uint8* dst, int dst_stride, int width);
|
||||
|
||||
void TransposeUVWxH_C(const uint8* src, int src_stride,
|
||||
|
||||
@ -22,6 +22,7 @@
|
||||
'include/libyuv/planar_functions.h',
|
||||
'include/libyuv/rotate.h',
|
||||
'include/libyuv/rotate_argb.h',
|
||||
'include/libyuv/rotate_row.h',
|
||||
'include/libyuv/row.h',
|
||||
'include/libyuv/scale.h',
|
||||
'include/libyuv/scale_argb.h',
|
||||
@ -46,6 +47,7 @@
|
||||
'source/mjpeg_validate.cc',
|
||||
'source/planar_functions.cc',
|
||||
'source/rotate.cc',
|
||||
'source/rotate_any.cc',
|
||||
'source/rotate_argb.cc',
|
||||
'source/rotate_common.cc',
|
||||
'source/rotate_mips.cc',
|
||||
|
||||
1
linux.mk
1
linux.mk
@ -18,6 +18,7 @@ LOCAL_OBJ_FILES := \
|
||||
source/cpu_id.o \
|
||||
source/planar_functions.o \
|
||||
source/rotate.o \
|
||||
source/rotate_any.o \
|
||||
source/rotate_argb.o \
|
||||
source/rotate_common.o \
|
||||
source/rotate_gcc.o \
|
||||
|
||||
55
source/rotate_any.cc
Normal file
55
source/rotate_any.cc
Normal file
@ -0,0 +1,55 @@
|
||||
/*
|
||||
* Copyright 2015 The LibYuv Project Authors. All rights reserved.
|
||||
*
|
||||
* Use of this source code is governed by a BSD-style license
|
||||
* that can be found in the LICENSE file in the root of the source
|
||||
* tree. An additional intellectual property rights grant can be found
|
||||
* in the file PATENTS. All contributing project authors may
|
||||
* be found in the AUTHORS file in the root of the source tree.
|
||||
*/
|
||||
|
||||
#include "libyuv/rotate.h"
|
||||
#include "libyuv/rotate_row.h"
|
||||
|
||||
#include "libyuv/basic_types.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
namespace libyuv {
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define TANY(NAMEANY, TPOS_SIMD, TPOS_C, MASK) \
|
||||
void NAMEANY(const uint8* src, int src_stride, \
|
||||
uint8* dst, int dst_stride, int width) { \
|
||||
int r = width & MASK; \
|
||||
int n = width - r; \
|
||||
if (n > 0) { \
|
||||
TPOS_SIMD(src, src_stride, dst, dst_stride, n); \
|
||||
} \
|
||||
TPOS_C(src + n, src_stride, dst + n * dst_stride, dst_stride, r); \
|
||||
}
|
||||
|
||||
#ifdef HAS_TRANSPOSE_WX8_NEON
|
||||
TANY(TransposeWx8_Any_NEON, TransposeWx8_NEON, TransposeWx8_C, 7)
|
||||
#endif
|
||||
#ifdef HAS_TRANSPOSEWX8_SSSE3
|
||||
TANY(TransposeWx8_Any_SSSE3, TransposeWx8_SSSE3, TransposeWx8_C, 7)
|
||||
#endif
|
||||
#ifdef HAS_TRANSPOSEWX8_FAST_SSSE3
|
||||
TANY(TransposeWx8_FAST_Any_SSSE3, TransposeWx8_FAST_SSSE3, TransposeWx8_C, 15)
|
||||
#endif
|
||||
#ifdef HAS_TRANSPOSE_WX8_MIPS_DSPR2
|
||||
TANY(TransposeWx8_Any_MIPS_DSPR2, TransposeWx8_MIPS_DSPR2, TransposeWx8_C, 7)
|
||||
#endif
|
||||
|
||||
#undef TANY
|
||||
|
||||
#ifdef __cplusplus
|
||||
} // extern "C"
|
||||
} // namespace libyuv
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
# This is a generic makefile for libyuv for Windows Arm.
|
||||
# call "c:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\bin\x86_arm\vcvarsx86_arm.bat"
|
||||
# nmake /f winarm.mk
|
||||
# make -f winarm.mk
|
||||
# nmake /f winarm.mk clean
|
||||
@ -21,11 +22,13 @@ LOCAL_OBJ_FILES = \
|
||||
source/cpu_id.o\
|
||||
source/planar_functions.o\
|
||||
source/rotate.o\
|
||||
source/rotate_any.o\
|
||||
source/rotate_argb.o\
|
||||
source/rotate_common.o\
|
||||
source/row_any.o\
|
||||
source/row_common.o\
|
||||
source/scale.o\
|
||||
source/scale_any.o\
|
||||
source/scale_argb.o\
|
||||
source/scale_common.o\
|
||||
source/video_common.o
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user