Frank Barchard
413a8d8041
Add AYUVToNV12 and NV21ToNV12
...
BUG=libyuv:832
TESTED=out/Release/libyuv_unittest --gtest_filter=*ToNV12* --libyuv_width=1280 --libyuv_height=720 --libyuv_repeat=1000 --libyuv_flags=-1 --libyuv_cpu_info=-1
R=rrwinterton@gmail.com
Change-Id: Id03b4613211fb6a6e163d10daa7c692fe31e36d8
Reviewed-on: https://chromium-review.googlesource.com/c/libyuv/libyuv/+/1560080
Commit-Queue: Frank Barchard <fbarchard@chromium.org>
Reviewed-by: richard winterton <rrwinterton@gmail.com>
Reviewed-by: Frank Barchard <fbarchard@chromium.org>
2019-04-12 17:48:45 +00:00
Frank Barchard
b36c86fdfe
Port box filter to NEON
...
Bug: libyuv:821
Change-Id: I4a6b9bee2c2fae199c73c9ec7ecb32bde37c1852
Tested: out/Release/libyuv_unittest --gtest_filter=*ScaleFrom1920x1080_Box --libyuv_width=160 --libyuv_height=90 --libyuv_repeat=1000
Reviewed-on: https://chromium-review.googlesource.com/c/1298598
Commit-Queue: Frank Barchard <fbarchard@chromium.org>
Reviewed-by: Miguel Casas <mcasas@chromium.org>
2018-10-25 18:56:29 +00:00
Frank Barchard
7e389884a1
Switch to C99 types
...
Append _t to all sized types.
uint64 becomes uint64_t etc
Bug: libyuv:774
Test: try bots build on all platforms
Change-Id: Ide273d7f8012313d6610415d514a956d6f3a8cac
Reviewed-on: https://chromium-review.googlesource.com/879922
Reviewed-by: Miguel Casas <mcasas@chromium.org>
2018-01-23 19:16:05 +00:00
Lei Zhang
8445617191
Mark a bunch of kArray variables as const.
...
This allows the linker to move the variables from the .data section to
the .rodata section.
Bug: libyuv:254
Test: out/Release/libyuv_unittest --gtest_filter=* --libyuv_width=1280 --libyuv_height=720 --libyuv_repeat=999 --libyuv_flags=-1 --libyuv_cpu_info=-1
Change-Id: I6998570f1af4337d7b80313d9e18e36aa20d6ec0
Reviewed-on: https://chromium-review.googlesource.com/777033
Commit-Queue: Frank Barchard <fbarchard@chromium.org>
Reviewed-by: Frank Barchard <fbarchard@chromium.org>
2017-11-27 23:38:44 +00:00
Frank Barchard
0acc67712f
clang format / lint cleanup for arm scale functions
...
TBR=kjellander@chromium.org
BUG=libyuv:725
TEST=lint
Change-Id: I76f777427f9b1458faba12796fb0011d8e3228d5
Reviewed-on: https://chromium-review.googlesource.com/646586
Reviewed-by: Cheng Wang <wangcheng@google.com>
2017-08-31 22:41:08 +00:00
Frank Barchard
a826dd7112
ARGBScaleDown by 2 with nearest neighbor optimized
...
TBR=kjellander@chromium.org
BUG=libyuv:723
TEST=ScaleDownBy2_None
Change-Id: I6861e62d3a67dde916b87fdc46eb02f2b4ee9f17
Reviewed-on: https://chromium-review.googlesource.com/644149
Reviewed-by: Frank Barchard <fbarchard@google.com>
Reviewed-by: Cheng Wang <wangcheng@google.com>
2017-08-30 23:22:14 +00:00
Frank Barchard
1c85f98846
Scale down by 2 linear use 'half add' to average pixels.
...
Use ld2 to load even and odd pixels into different registers
and hadd to half add them to each other.
Previously used paired and shift.
TBR=kjellander@chromium.org
BUG=libyuv:723
TEST=ScaleDownBy2_Linear
Change-Id: I3ec72bcf7d4c746837217496c301eb4e4ad963cf
Reviewed-on: https://chromium-review.googlesource.com/644113
Reviewed-by: Cheng Wang <wangcheng@google.com>
2017-08-30 22:10:32 +00:00
Frank Barchard
6c94ad13b5
Remove ARM NaCL macros from source
...
NaCL has been disabled for awhile, so the code
will still build, but only with C versions.
This change removes the MEMACCESS() macros from
Neon and Neon64 source.
BUG=libyuv:702
TEST=try bots build for arm.
R=kjellander@chromium.org
Change-Id: Id581a5c8ff71e18cc69595e7fee9337f97c44a19
Reviewed-on: https://chromium-review.googlesource.com/528332
Reviewed-by: Cheng Wang <wangcheng@google.com>
Commit-Queue: Frank Barchard <fbarchard@google.com>
2017-06-09 22:22:07 +00:00
Frank Barchard
bbe8c233f2
scale warning fixes for unused parameters
...
BUG=libyuv:680
TEST=builds and runs with no warnings
Change-Id: I7d60ef44292fa6ad4f7c4e2e2657359b864d2dab
Reviewed-on: https://chromium-review.googlesource.com/442670
Commit-Queue: Frank Barchard <fbarchard@google.com>
Reviewed-by: Henrik Kjellander <kjellander@chromium.org>
2017-02-15 21:38:59 +00:00
Frank Barchard
e62309f259
clang-format libyuv
...
BUG=libyuv:654
R=kjellander@chromium.org
Review URL: https://codereview.chromium.org/2469353005 .
2016-11-07 17:37:23 -08:00
Frank Barchard
6ad3aa6ae4
fix multi-line comment warning
...
../../source/scale_neon.cc:576:1: error: multi-line comment [-Werror=comment]
// #define BLENDER(a, b, f) (uint8)((int)(a) + \
^
BUG=None
TEST=try bots
Review URL: https://codereview.chromium.org/2344203003 .
2016-09-16 15:16:39 -07:00
Frank Barchard
137aa63afe
Fix some comment typos
...
BUG=None
TEST=try bots
Review URL: https://codereview.chromium.org/2346633002 .
2016-09-15 15:38:19 -07:00
Frank Barchard
b8ddb5a2a7
rounding for arm filter
...
R=wangcheng@google.com , harryjin@google.com
BUG=libyuv:607
Review URL: https://codereview.chromium.org/2093913004 .
2016-06-24 16:07:49 -07:00
Frank Barchard
cc88adc620
YUV scale filter columns improved filtering accuracy
...
upscale a YUV image. observe change in hue.. green especially.
disable ScaleFilterCols_SSSE3, falling back on ScaleFilterCols_C
observe hue.. green especially, is better.
was ScaleFrom1280x720_Bilinear (1620 ms)
now ScaleFrom1280x720_Bilinear (1907 ms)
BUG=libyuv:605
TEST=try bots
R=harryjin@google.com , wangcheng@google.com
Review URL: https://codereview.chromium.org/2084533006 .
2016-06-23 20:16:55 -07:00
Frank Barchard
cf101116c9
Remove initialize to zero on output variables for inline.
...
Inline that uses temporary variables is currently initializing them
to 0 and passing in as output "+r".
This CL replaces the output constraint to "=&r" for most meaning an
output with early write (before inputs). This allows the initialize
to zero step to be removed, saving 1 instruction.
BUG=libyuv:580
TESTED=local libyuv build on gcc/linux and try bots
R=harryjin@google.com
Review URL: https://codereview.chromium.org/1895743008 .
2016-04-18 16:24:26 -07:00
Frank Barchard
1f461f73d8
remove align directives
...
R=harryjin@google.com
BUG=none
Review URL: https://webrtc-codereview.appspot.com/54809004 .
2015-08-04 17:00:03 -07:00
fbarchard@google.com
ab6b224675
fix for arm builds where tmp for assembly produces an error if its uninitialized.
...
BUG=libyuv:432
TESTED=try bots
R=tpsiaki@google.com
Review URL: https://webrtc-codereview.appspot.com/49249004
git-svn-id: http://libyuv.googlecode.com/svn/trunk@1392 16f28f9a-4ce2-e073-06de-1de4eb20be90
2015-04-30 18:21:19 +00:00
fbarchard@google.com
c9986313ac
lsl by 2 requires a number sign for xcode on ios 64 bit build. add the # sign for ios compatibility. remove legacy x86 asm files that are unused. the unused files cause complications in build systems that build all files.
...
BUG=libyuv:423
TESTED=try bots
R=noahric@google.com
Review URL: https://webrtc-codereview.appspot.com/45119004
git-svn-id: http://libyuv.googlecode.com/svn/trunk@1369 16f28f9a-4ce2-e073-06de-1de4eb20be90
2015-04-14 19:57:33 +00:00
yang.zhang@arm.com
5f609856de
Add ScaleARGBFilterCols_NEON for ARM32/64
...
ARM32/64 NEON versions of ScaleARGBFilterCols_NEON are implemented.
BUG=319
TESTED=libyuvTest.* on ARM32/64 with Android
R=fbarchard@google.com
Change-Id: Ifea62bc25d846bf16cb51d13b408de7bf58dccd4
Review URL: https://webrtc-codereview.appspot.com/46699004
git-svn-id: http://libyuv.googlecode.com/svn/trunk@1361 16f28f9a-4ce2-e073-06de-1de4eb20be90
2015-04-07 03:45:29 +00:00
fbarchard@google.com
e2ea106068
shift for arm wants a # sign for nacl and ios.
...
BUG=420
TESTED=d:/src/nacl_sdk/pepper_canary/toolchain/win_arm_newlib/bin/arm-nacl-g++ -o newlib/Release/source/scale_neon_arm.o -c source/scale_neon.cc -g -O2 -pthread -MMD -DNDEBUG -Id:/src/nacl_sdk/pepper_canary/include -Id:/src/nacl_sdk/pepper_canary/include/newlib -I./include
R=tpsiaki@google.com
Review URL: https://webrtc-codereview.appspot.com/47949004
git-svn-id: http://libyuv.googlecode.com/svn/trunk@1356 16f28f9a-4ce2-e073-06de-1de4eb20be90
2015-04-03 23:28:44 +00:00
yang.zhang@arm.com
f23d6222ac
Add ScaleARGBCols_NEON for ARM32/64
...
ARM32/64 NEON versions of ScaleARGBCols_NEON are implemented.
BUG=319
TESTED=libyuvTest.* on ARM32/64 with Android
R=fbarchard@google.com
Change-Id: Id9ad97f7aa5d8a34cd55ace9e648cb6ff028efd9
Review URL: https://webrtc-codereview.appspot.com/47689004
git-svn-id: http://libyuv.googlecode.com/svn/trunk@1351 16f28f9a-4ce2-e073-06de-1de4eb20be90
2015-03-31 03:03:05 +00:00
yang.zhang@arm.com
0d3bfab6db
Add nacl macros to ScaleFilterCols_NEON on ARM32/64 platform
...
Add the nacl macros to ARM functions. If not, a bunch of code is failing
to validate.
BUG=319
TESTED=libyuvTest.* on ARM32/64 with Android
R=fbarchard@google.com
Change-Id: I7a36434f18e0de8b8f8a9fe01167bfe50cff8962
Review URL: https://webrtc-codereview.appspot.com/47739004
git-svn-id: http://libyuv.googlecode.com/svn/trunk@1343 16f28f9a-4ce2-e073-06de-1de4eb20be90
2015-03-24 08:02:30 +00:00
yang.zhang@arm.com
d6d7de5742
Add ScaleFilterCols_NEON for ARM32/64
...
ARM32/64 NEON versions of ScaleFilterCols_NEON are implemented.
BUG=319
TESTED=libyuvTest.* on ARM32/64 with Android
R=fbarchard@google.com
Change-Id: I5b0838769ffb0182155d7cd6bcc520eb81eb5c4e
Review URL: https://webrtc-codereview.appspot.com/41349004
git-svn-id: http://libyuv.googlecode.com/svn/trunk@1340 16f28f9a-4ce2-e073-06de-1de4eb20be90
2015-03-19 03:55:05 +00:00
yang.zhang@arm.com
4d387fc619
Add ScaleARGBRowDown2Linear_NEON for ARM32/64
...
ARM32/64 NEON versions of ScaleARGBRowDown2Linear_NEON are implemented.
BUG=319
TESTED=libyuvTest.ARGBScale* on ARM32/64 with Android
R=fbarchard@google.com
Change-Id: Ife602c81b51aa36e0d56b9d628f278a24eed96f6
Review URL: https://webrtc-codereview.appspot.com/44689004
git-svn-id: http://libyuv.googlecode.com/svn/trunk@1336 16f28f9a-4ce2-e073-06de-1de4eb20be90
2015-03-17 02:23:59 +00:00
yang.zhang@arm.com
ca5b1bd58b
Add ScaleAddRows_NEON for ARM32/64
...
ARM32/64 NEON versions of ScaleAddRows_NEON are implemented.
BUG=319
TESTED=libyuvTest.Scale* on ARM32/64 with Android
R=fbarchard@google.com
Change-Id: I45b88c2b5f576042ba5b3d8d6f8851257fdb7218
Review URL: https://webrtc-codereview.appspot.com/46379004
git-svn-id: http://libyuv.googlecode.com/svn/trunk@1326 16f28f9a-4ce2-e073-06de-1de4eb20be90
2015-03-16 02:57:46 +00:00
yang.zhang@arm.com
274c9bce92
Add ScaleRowDown2Linear_NEON for ARM32/64
...
ARM32/64 NEON versions of ScaleRowDown2Linear_NEON are implemented.
BUG=319
TESTED=libyuvTest.ScaleDownBy2_Linear on ARM32/64 with Android
R=fbarchard@google.com
Change-Id: I2c7f43a0d56ed4dfded5bdbbb61765d87d65a2ba
Review URL: https://webrtc-codereview.appspot.com/43519005
git-svn-id: http://libyuv.googlecode.com/svn/trunk@1307 16f28f9a-4ce2-e073-06de-1de4eb20be90
2015-03-03 02:17:16 +00:00
fbarchard@google.com
8cbfc5d41f
Change ifdefs for arm 32 and 64 bit so there will only be 32 bit in legacy mode.
...
BUG=357
TESTED=ios arm64 build
R=tpsiaki@google.com
Review URL: https://webrtc-codereview.appspot.com/29429004
git-svn-id: http://libyuv.googlecode.com/svn/trunk@1083 16f28f9a-4ce2-e073-06de-1de4eb20be90
2014-09-15 22:05:01 +00:00
fbarchard@google.com
f67b426bdf
Add some more bic's for scale nacl code
...
BUG=333
TESTED=ncval
R=thorcarpenter@google.com
Review URL: https://webrtc-codereview.appspot.com/20719004
git-svn-id: http://libyuv.googlecode.com/svn/trunk@1017 16f28f9a-4ce2-e073-06de-1de4eb20be90
2014-06-17 23:12:55 +00:00
fbarchard@google.com
4b7a04e864
port neon to arm64. the register names have changes from r0 to w0 or x0 depending on size. Passing them as parameters (e.g. %0) makes the code register name agnostic.
...
BUG=333
TESTED=32 bit build still works.
R=nfullagar@chromium.org
Review URL: https://webrtc-codereview.appspot.com/20669005
git-svn-id: http://libyuv.googlecode.com/svn/trunk@1016 16f28f9a-4ce2-e073-06de-1de4eb20be90
2014-06-17 18:16:29 +00:00
fbarchard@google.com
4e5e44e21e
scale neon nacl port
...
BUG=333
TESTED=ncval
R=tpsiaki@google.com
Review URL: https://webrtc-codereview.appspot.com/18549004
git-svn-id: http://libyuv.googlecode.com/svn/trunk@1015 16f28f9a-4ce2-e073-06de-1de4eb20be90
2014-06-16 17:09:48 +00:00
fbarchard@google.com
37ad8b6507
Port libyuv neon to nacl - compare
...
BUG=333
TESTED=d:\src\nacl_sdk\pepper_canary\tools\ncval.exe newlib/Release/nacltest_arm.nexe
R=nfullagar@chromium.org
Review URL: https://webrtc-codereview.appspot.com/17599004
git-svn-id: http://libyuv.googlecode.com/svn/trunk@1006 16f28f9a-4ce2-e073-06de-1de4eb20be90
2014-05-21 19:04:15 +00:00
fbarchard@google.com
1f923e3ea6
Declare parameters that are unused, since C does not let you give a type without name.
...
BUG=303
TEST=compile -x c
Review URL: https://webrtc-codereview.appspot.com/6599006
git-svn-id: http://libyuv.googlecode.com/svn/trunk@954 16f28f9a-4ce2-e073-06de-1de4eb20be90
2014-01-07 05:42:27 +00:00
fbarchard@google.com
06ed625808
Neon RGBToUV more accurate coefficients and subsample averaging. Instead of adding 4 pixels and making coefficients 4x smaller, this makes the coefficients 2x small and does a shift, for best accuracy.
...
BUG=297
TESTED=try bots
R=tpsiaki@google.com , yunqingwang@google.com
Review URL: https://webrtc-codereview.appspot.com/6309004
git-svn-id: http://libyuv.googlecode.com/svn/trunk@920 16f28f9a-4ce2-e073-06de-1de4eb20be90
2013-12-26 19:17:21 +00:00
fbarchard@google.com
c2295807bd
Reduce alignment for loops from 16 bytes to 4 bytes. Reduces outer loop overhead without hurting innerloop time.
...
BUG=none
TESTED=try bots
R=fbarchard@chromium.org , mflodman@webrtc.org
Review URL: https://webrtc-codereview.appspot.com/4659004
git-svn-id: http://libyuv.googlecode.com/svn/trunk@880 16f28f9a-4ce2-e073-06de-1de4eb20be90
2013-12-02 15:57:39 +00:00
fbarchard@google.com
dbe4814361
Move scale row functions to scale_win etc
...
BUG=none
TEST=untested
R=tpsiaki@google.com
Review URL: https://webrtc-codereview.appspot.com/4509005
git-svn-id: http://libyuv.googlecode.com/svn/trunk@879 16f28f9a-4ce2-e073-06de-1de4eb20be90
2013-11-28 01:16:15 +00:00
fbarchard@google.com
f2aa91a1ac
replace static const with static to avoid internal compiler error with gcc
...
BUG=258
TEST=try bots
R=johannkoenig@google.com
Review URL: https://webrtc-codereview.appspot.com/1944004
git-svn-id: http://libyuv.googlecode.com/svn/trunk@743 16f28f9a-4ce2-e073-06de-1de4eb20be90
2013-08-02 17:48:24 +00:00
fbarchard@google.com
2c4e3993c0
Change vld and vst to specify only elements and size not sign for better arm compiler compatability.
...
BUG=none
TEST=none
R=kma@webrtc.org , mflodman@webrtc.org
Review URL: https://webrtc-codereview.appspot.com/1643004
git-svn-id: http://libyuv.googlecode.com/svn/trunk@721 16f28f9a-4ce2-e073-06de-1de4eb20be90
2013-06-10 16:21:57 +00:00
fbarchard@google.com
8ffe78abd2
Scale down by 4 used 3rd pixel
...
BUG=232
TEST=convert.exe -f 0 faces_640x480_P420.yuv face2_160x120_P420.yuv
R=changjun.yang@intel.com
Review URL: https://webrtc-codereview.appspot.com/1579005
git-svn-id: http://libyuv.googlecode.com/svn/trunk@709 16f28f9a-4ce2-e073-06de-1de4eb20be90
2013-05-30 07:14:14 +00:00
fbarchard@google.com
8b54a8f9f2
Specialized scale down sample to 1 / 2 size adjust to match general purpose code which uses odd pixel (rounded up - nearest neighbor).
...
BUG=223
TEST=out\Debug\convert.exe -f 0 faces_640x480_P420.yuv face2_320x240_P420.yuv
R=johannkoenig@google.com
Review URL: https://webrtc-codereview.appspot.com/1583005
git-svn-id: http://libyuv.googlecode.com/svn/trunk@708 16f28f9a-4ce2-e073-06de-1de4eb20be90
2013-05-29 19:29:46 +00:00
fbarchard@google.com
83a63e65a6
Change YUV_DISABLE_ASM to LIBYUV_DISABLE_NEON, LIBYUV_DISABLE_MIPS, LIBYUV_DISABLE_X86
...
BUG=189
TESTED=try
Review URL: https://webrtc-codereview.appspot.com/1113006
git-svn-id: http://libyuv.googlecode.com/svn/trunk@582 16f28f9a-4ce2-e073-06de-1de4eb20be90
2013-02-27 00:20:29 +00:00
fbarchard@google.com
cde587092f
Replace two spaces with one after .
...
BUG=none
TEST=lint
Review URL: https://webrtc-codereview.appspot.com/1063010
git-svn-id: http://libyuv.googlecode.com/svn/trunk@553 16f28f9a-4ce2-e073-06de-1de4eb20be90
2013-01-28 00:02:35 +00:00
fbarchard@google.com
958a0b0c19
lint cleanup
...
BUG=none
TEST=lint
Review URL: https://webrtc-codereview.appspot.com/931013
git-svn-id: http://libyuv.googlecode.com/svn/trunk@496 16f28f9a-4ce2-e073-06de-1de4eb20be90
2012-11-17 00:00:23 +00:00
fbarchard@google.com
8e50e619db
ARGBScale_NEON
...
BUG=none
TEST=./libyuv_unittest --gtest_filter=*ARGBScale*
Review URL: https://webrtc-codereview.appspot.com/964016
git-svn-id: http://libyuv.googlecode.com/svn/trunk@494 16f28f9a-4ce2-e073-06de-1de4eb20be90
2012-11-16 19:32:16 +00:00
fbarchard@google.com
66d16f4100
argb scale 2x upsample with specialization for 25/75%
...
BUG=none
TEST=none
Review URL: https://webrtc-codereview.appspot.com/938014
git-svn-id: http://libyuv.googlecode.com/svn/trunk@486 16f28f9a-4ce2-e073-06de-1de4eb20be90
2012-11-13 20:43:25 +00:00
fbarchard@google.com
31d05032f7
I420ToYUY2_Any_Neon to handle odd sizes
...
BUG=none
TEST=none
Review URL: https://webrtc-codereview.appspot.com/922007
git-svn-id: http://libyuv.googlecode.com/svn/trunk@437 16f28f9a-4ce2-e073-06de-1de4eb20be90
2012-10-23 09:04:37 +00:00
fbarchard@google.com
64ce0ab544
Move Neon source to its own files.
...
BUG=none
TEST=none
Review URL: https://webrtc-codereview.appspot.com/860009
git-svn-id: http://libyuv.googlecode.com/svn/trunk@396 16f28f9a-4ce2-e073-06de-1de4eb20be90
2012-10-09 00:05:29 +00:00