mirror of
https://chromium.googlesource.com/libyuv/libyuv
synced 2025-12-07 01:06:46 +08:00
safe for x86 and memset for arm
BUG=none TEST=none Review URL: https://webrtc-codereview.appspot.com/401005 git-svn-id: http://libyuv.googlecode.com/svn/trunk@183 16f28f9a-4ce2-e073-06de-1de4eb20be90
This commit is contained in:
parent
8058db48d0
commit
2842f2536d
@ -1,6 +1,6 @@
|
|||||||
Name: libyuv
|
Name: libyuv
|
||||||
URL: http://code.google.com/p/libyuv/
|
URL: http://code.google.com/p/libyuv/
|
||||||
Version: 182
|
Version: 183
|
||||||
License: BSD
|
License: BSD
|
||||||
License File: LICENSE
|
License File: LICENSE
|
||||||
|
|
||||||
|
|||||||
@ -11,7 +11,7 @@
|
|||||||
#ifndef INCLUDE_LIBYUV_VERSION_H_
|
#ifndef INCLUDE_LIBYUV_VERSION_H_
|
||||||
#define INCLUDE_LIBYUV_VERSION_H_
|
#define INCLUDE_LIBYUV_VERSION_H_
|
||||||
|
|
||||||
#define LIBYUV_VERSION 182
|
#define LIBYUV_VERSION 183
|
||||||
|
|
||||||
#endif // INCLUDE_LIBYUV_VERSION_H_
|
#endif // INCLUDE_LIBYUV_VERSION_H_
|
||||||
|
|
||||||
|
|||||||
30
libyuv.gyp
30
libyuv.gyp
@ -11,9 +11,13 @@
|
|||||||
{
|
{
|
||||||
'target_name': 'libyuv',
|
'target_name': 'libyuv',
|
||||||
'type': 'static_library',
|
'type': 'static_library',
|
||||||
|
'defines': [
|
||||||
|
#'HAVE_JPEG',
|
||||||
|
],
|
||||||
'include_dirs': [
|
'include_dirs': [
|
||||||
'include',
|
'include',
|
||||||
'.',
|
'.',
|
||||||
|
#'third_party/libjpeg_turbo',
|
||||||
],
|
],
|
||||||
'direct_dependent_settings': {
|
'direct_dependent_settings': {
|
||||||
'include_dirs': [
|
'include_dirs': [
|
||||||
@ -42,32 +46,16 @@
|
|||||||
'source/cpu_id.cc',
|
'source/cpu_id.cc',
|
||||||
'source/format_conversion.cc',
|
'source/format_conversion.cc',
|
||||||
'source/planar_functions.cc',
|
'source/planar_functions.cc',
|
||||||
|
#'source/mjpeg_decoder.cc',
|
||||||
'source/rotate.cc',
|
'source/rotate.cc',
|
||||||
|
'source/rotate_neon.cc',
|
||||||
'source/row_common.cc',
|
'source/row_common.cc',
|
||||||
|
'source/row_posix.cc',
|
||||||
|
'source/row_neon.cc',
|
||||||
|
'source/row_win.cc',
|
||||||
'source/scale.cc',
|
'source/scale.cc',
|
||||||
'source/video_common.cc',
|
'source/video_common.cc',
|
||||||
],
|
],
|
||||||
'conditions': [
|
|
||||||
['OS=="win"', {
|
|
||||||
'sources': [
|
|
||||||
'source/row_win.cc',
|
|
||||||
],
|
|
||||||
},{ # else
|
|
||||||
'sources': [
|
|
||||||
'source/row_posix.cc',
|
|
||||||
],
|
|
||||||
}],
|
|
||||||
['target_arch=="arm"',{
|
|
||||||
'conditions': [
|
|
||||||
['arm_neon==1', {
|
|
||||||
'sources' : [
|
|
||||||
'source/rotate_neon.cc',
|
|
||||||
'source/row_neon.cc',
|
|
||||||
],
|
|
||||||
}],
|
|
||||||
],
|
|
||||||
}],
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
], # targets
|
], # targets
|
||||||
}
|
}
|
||||||
|
|||||||
@ -16,6 +16,7 @@
|
|||||||
# The tests are based on gtest
|
# The tests are based on gtest
|
||||||
'testing/gtest.gyp:gtest',
|
'testing/gtest.gyp:gtest',
|
||||||
'testing/gtest.gyp:gtest_main',
|
'testing/gtest.gyp:gtest_main',
|
||||||
|
#'third_party/libjpeg_turbo/libjpeg.gyp:libjpeg',
|
||||||
],
|
],
|
||||||
'sources': [
|
'sources': [
|
||||||
# headers
|
# headers
|
||||||
|
|||||||
@ -647,6 +647,13 @@ int Q420ToI420(const uint8* src_y, int src_stride_y,
|
|||||||
// READSAFE_ALWAYS - enables read ahead on systems without memory exceptions
|
// READSAFE_ALWAYS - enables read ahead on systems without memory exceptions
|
||||||
// or where buffers are padded by 64 bytes.
|
// or where buffers are padded by 64 bytes.
|
||||||
|
|
||||||
|
#if defined(HAS_RGB24TOARGBROW_SSSE3) || \
|
||||||
|
defined(HAS_RGB24TOARGBROW_SSSE3) || \
|
||||||
|
defined(HAS_RAWTOARGBROW_SSSE3) || \
|
||||||
|
defined(HAS_RGB565TOARGBROW_SSE2) || \
|
||||||
|
defined(HAS_ARGB1555TOARGBROW_SSE2) || \
|
||||||
|
defined(HAS_ARGB4444TOARGBROW_SSE2)
|
||||||
|
|
||||||
#define READSAFE_ODDHEIGHT
|
#define READSAFE_ODDHEIGHT
|
||||||
|
|
||||||
static bool TestReadSafe(const uint8* src_yuy2, int src_stride_yuy2,
|
static bool TestReadSafe(const uint8* src_yuy2, int src_stride_yuy2,
|
||||||
@ -676,6 +683,7 @@ static bool TestReadSafe(const uint8* src_yuy2, int src_stride_yuy2,
|
|||||||
return false;
|
return false;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
// Convert YUY2 to I420.
|
// Convert YUY2 to I420.
|
||||||
int YUY2ToI420(const uint8* src_yuy2, int src_stride_yuy2,
|
int YUY2ToI420(const uint8* src_yuy2, int src_stride_yuy2,
|
||||||
|
|||||||
@ -29,13 +29,7 @@ typedef signed int INT32;
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
extern "C" {
|
extern "C" {
|
||||||
// TODO(fbarchard): Port libjpeg_turbo to arm/neon
|
|
||||||
#if defined(__arm__)
|
|
||||||
// On ARM, require a system-installed libjpeg if JPEG support is enabled.
|
|
||||||
#include <jpeglib.h>
|
#include <jpeglib.h>
|
||||||
#else
|
|
||||||
#include "third_party/libjpeg_turbo/src/jpeglib.h"
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
namespace libyuv {
|
namespace libyuv {
|
||||||
|
|||||||
@ -10,6 +10,8 @@
|
|||||||
|
|
||||||
#include "libyuv/planar_functions.h"
|
#include "libyuv/planar_functions.h"
|
||||||
|
|
||||||
|
#include <string.h> // for memset()
|
||||||
|
|
||||||
#include "libyuv/cpu_id.h"
|
#include "libyuv/cpu_id.h"
|
||||||
#include "row.h"
|
#include "row.h"
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user