mirror of
https://chromium.googlesource.com/libyuv/libyuv
synced 2026-01-01 03:12:16 +08:00
I420ToNV12_Neon bug fix
BUG=135 TEST=/libyuv_unittest --gtest_filter=*NV* Review URL: https://webrtc-codereview.appspot.com/939005 git-svn-id: http://libyuv.googlecode.com/svn/trunk@444 16f28f9a-4ce2-e073-06de-1de4eb20be90
This commit is contained in:
parent
d3728d9222
commit
d26b451472
@ -1,6 +1,6 @@
|
||||
Name: libyuv
|
||||
URL: http://code.google.com/p/libyuv/
|
||||
Version: 443
|
||||
Version: 444
|
||||
License: BSD
|
||||
License File: LICENSE
|
||||
|
||||
|
||||
@ -11,6 +11,6 @@
|
||||
#ifndef INCLUDE_LIBYUV_VERSION_H_ // NOLINT
|
||||
#define INCLUDE_LIBYUV_VERSION_H_
|
||||
|
||||
#define LIBYUV_VERSION 443
|
||||
#define LIBYUV_VERSION 444
|
||||
|
||||
#endif // INCLUDE_LIBYUV_VERSION_H_ NOLINT
|
||||
|
||||
@ -530,7 +530,7 @@ int I420ToNV12(const uint8* src_y, int src_stride_y,
|
||||
int halfheight = (height + 1) >> 1;
|
||||
for (int y = 0; y < halfheight; ++y) {
|
||||
// Copy a row of UV.
|
||||
MergeUV_C(src_u, src_v, dst_uv, halfwidth);
|
||||
MergeUV(src_u, src_v, dst_uv, halfwidth);
|
||||
src_u += src_stride_u;
|
||||
src_v += src_stride_v;
|
||||
dst_uv += dst_stride_uv;
|
||||
|
||||
@ -19,7 +19,6 @@ extern "C" {
|
||||
#ifdef HAS_SPLITUV_MIPS_DSPR2
|
||||
void SplitUV_MIPS_DSPR2(const uint8* src_uv, uint8* dst_u, uint8* dst_v,
|
||||
int width) {
|
||||
|
||||
__asm__ __volatile__ (
|
||||
".set push \n"
|
||||
".set noreorder \n"
|
||||
|
||||
@ -385,10 +385,10 @@ void MergeUV_NEON(const uint8* src_u, const uint8* src_v, uint8* dst_uv,
|
||||
asm volatile (
|
||||
".p2align 2 \n"
|
||||
"1: \n"
|
||||
"vld1.u8 {q0}, [%1]! \n" // load U
|
||||
"vld1.u8 {q1}, [%2]! \n" // load V
|
||||
"vld1.u8 {q0}, [%0]! \n" // load U
|
||||
"vld1.u8 {q1}, [%1]! \n" // load V
|
||||
"subs %3, %3, #16 \n" // 16 processed per loop
|
||||
"vst2.u8 {q0, q1}, [%0]! \n" // store 16 pairs of UV
|
||||
"vst2.u8 {q0, q1}, [%2]! \n" // store 16 pairs of UV
|
||||
"bgt 1b \n"
|
||||
:
|
||||
"+r"(src_u), // %0
|
||||
|
||||
@ -1957,7 +1957,7 @@ void ScaleFilterRows_MIPS_DSPR2(unsigned char *dst_ptr,
|
||||
const unsigned char* src_ptr,
|
||||
ptrdiff_t src_stride,
|
||||
int dst_width, int source_y_fraction);
|
||||
#endif // if defined(__mips_dsp) && (__mips_dsp_rev >= 2)
|
||||
#endif // defined(__mips_dsp) && (__mips_dsp_rev >= 2)
|
||||
|
||||
// CPU agnostic row functions
|
||||
static void ScaleRowDown2_C(const uint8* src_ptr, ptrdiff_t /* src_stride */,
|
||||
@ -2326,7 +2326,7 @@ static void ScalePlaneDown2(int /* src_width */, int /* src_height */,
|
||||
ScaleRowDown2 = filtering ? ScaleRowDown2Int_SSE2 : ScaleRowDown2_SSE2;
|
||||
}
|
||||
}
|
||||
#elif defined (HAS_SCALEROWDOWN2_MIPS_DSPR2)
|
||||
#elif defined(HAS_SCALEROWDOWN2_MIPS_DSPR2)
|
||||
if (TestCpuFlag(kCpuHasMIPS_DSPR2) &&
|
||||
IS_ALIGNED(src_ptr, 4) && IS_ALIGNED(src_stride, 4) &&
|
||||
IS_ALIGNED(dst_ptr, 4) && IS_ALIGNED(dst_stride, 4)) {
|
||||
|
||||
@ -76,7 +76,6 @@ void ScaleRowDown2_MIPS_DSPR2(const uint8* src_ptr, ptrdiff_t /* src_stride */,
|
||||
|
||||
void ScaleRowDown2Int_MIPS_DSPR2(const uint8* src_ptr, ptrdiff_t src_stride,
|
||||
uint8* dst, int dst_width) {
|
||||
|
||||
const uint8* t = src_ptr + src_stride;
|
||||
|
||||
__asm__ __volatile__ (
|
||||
@ -178,7 +177,6 @@ void ScaleFilterRows_MIPS_DSPR2(unsigned char *dst_ptr,
|
||||
const unsigned char* src_ptr,
|
||||
ptrdiff_t src_stride,
|
||||
int dst_width, int source_y_fraction) {
|
||||
|
||||
int y0_fraction = 256 - source_y_fraction;
|
||||
const unsigned char* src_ptr1 = src_ptr + src_stride;
|
||||
|
||||
@ -233,8 +231,7 @@ void ScaleFilterRows_MIPS_DSPR2(unsigned char *dst_ptr,
|
||||
"t6", "t7", "t8", "t9"
|
||||
);
|
||||
}
|
||||
|
||||
#endif // if defined(__mips_dsp) && (__mips_dsp_rev >= 2)
|
||||
#endif // defined(__mips_dsp) && (__mips_dsp_rev >= 2)
|
||||
|
||||
#ifdef __cplusplus
|
||||
} // extern "C"
|
||||
|
||||
@ -8,7 +8,7 @@
|
||||
* be found in the AUTHORS file in the root of the source tree.
|
||||
*/
|
||||
|
||||
#ifndef UNIT_TEST_UNIT_TEST_H_
|
||||
#ifndef UNIT_TEST_UNIT_TEST_H_ // NOLINT
|
||||
#define UNIT_TEST_UNIT_TEST_H_
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
@ -72,4 +72,4 @@ class libyuvTest : public ::testing::Test {
|
||||
int benchmark_pixels_div256_; // Total pixels to benchmark / 256.
|
||||
};
|
||||
|
||||
#endif // UNIT_TEST_UNIT_TEST_H_
|
||||
#endif // UNIT_TEST_UNIT_TEST_H_ NOLINT
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user