Frank Barchard
cec28e7088
PlaneScale, UVScale and ARGBScale test 3x and 4x down sample.
...
Intel SkylakeX
UVTest3x (1925 ms)
UVTest4x (2915 ms)
PlaneTest3x (2040 ms)
PlaneTest4x (4292 ms)
ARGBTest3x (2079 ms)
ARGBTest4x (1854 ms)
Pixel 2
ARGBTest3x (3602 ms)
ARGBTest4x (4064 ms)
PlaneTest3x (3331 ms)
PlaneTest4x (8977 ms)
UVTest3x (3473 ms)
UVTest4x (6970 ms)
Bug: b/171798872, b/171884264
Change-Id: Iebc70fed907857b6cb71a9baf2aba9861ef1e3f7
Reviewed-on: https://chromium-review.googlesource.com/c/libyuv/libyuv/+/2505601
Reviewed-by: richard winterton <rrwinterton@gmail.com>
Commit-Queue: Frank Barchard <fbarchard@chromium.org>
2020-10-28 20:41:59 +00:00
Frank Barchard
d730dc2f18
2x down sample for UV planes ported to SSSE3 / NEON
...
Bug: libuyv:838
Change-Id: Id9fb3282a3e86143d76b5e0cb557f0523a88b3c8
Reviewed-on: https://chromium-review.googlesource.com/c/libyuv/libyuv/+/2465578
Reviewed-by: richard winterton <rrwinterton@gmail.com>
Commit-Queue: Frank Barchard <fbarchard@chromium.org>
2020-10-13 21:42:15 +00:00
Frank Barchard
e647902212
NV12Scale function and ScaleUV for packed UV plane bilinear scaling
...
Bug: libyuv:718, libyuv:838, b/168918847
Change-Id: I3300c1e7d51407b9c3201cf52b68e2e11346ff5f
Reviewed-on: https://chromium-review.googlesource.com/c/libyuv/libyuv/+/2427868
Commit-Queue: Frank Barchard <fbarchard@chromium.org>
Reviewed-by: richard winterton <rrwinterton@gmail.com>
2020-09-29 23:49:05 +00:00
Shiyou Yin
bed9292f2c
Move init process of msa after mmi.
...
Some processors support both MSA and MMI.
when they are enabled together, MSA will be preferd.
This patch move MSA initialization after MMI, so that
MSA can overide MMI and be setted to effective.
Change-Id: I8a52cce83ee4ec9727d47c99b287c9580329b149
Reviewed-on: https://chromium-review.googlesource.com/c/libyuv/libyuv/+/2155944
Reviewed-by: Frank Barchard <fbarchard@chromium.org>
Commit-Queue: Frank Barchard <fbarchard@chromium.org>
2020-04-28 11:01:51 +00:00
Frank Barchard
20bf569a04
Fix ConvertToI420() for odd crop_y
...
The original src_u calculation of FOURCC_I420 shifted half width if
crop_y is odd.
This CL fixs the problem and also add a test case for it.
Bug: b:115278653
Test: pass libyuv_unittest
Change-Id: Ia9732d22e64e13de26df47726ba44ad1c5a06484
Reviewed-on: https://chromium-review.googlesource.com/c/1258743
Reviewed-by: Frank Barchard <fbarchard@chromium.org>
2018-10-03 19:14:01 +00:00
Frank Barchard
67eff529ad
ubsan fix for 16 bit scaling
...
Bug: libyuv:813
Test: tested downstream for ubsan.
Change-Id: I28c1d4e815348d051f781c9b7d8197f74905cab7
Reviewed-on: https://chromium-review.googlesource.com/1173721
Reviewed-by: Frank Barchard <fbarchard@chromium.org>
Reviewed-by: Mirko Bonadei <mbonadei@chromium.org>
Commit-Queue: Frank Barchard <fbarchard@chromium.org>
2018-08-14 17:40:44 +00:00
lixia zhang
21be9122aa
libyuv:loongson optimize compare/row/scale/rotate files with mmi.
...
Currently, libyuv supports MIPS SIMD Arch(MSA),
but libyuv does not supports MultiMedia Instruction(MMI)(such as loongson3a platform).
In order to improve performance of libyuv on loongson3a platform,
this provides optimize 98 functions with mmi.
BUG=libyuv:804
Change-Id: I8947626009efad769b3103a867363ece25d79629
Reviewed-on: https://chromium-review.googlesource.com/1122064
Commit-Queue: Frank Barchard <fbarchard@chromium.org>
Reviewed-by: Frank Barchard <fbarchard@chromium.org>
2018-07-20 22:53:04 +00:00
Frank Barchard
92e22cf5b6
Lint cleanup after C99 change CL
...
TBR=braveyao@chromium.org
Bug: libyuv:774
Test: git cl lint
Change-Id: I51cf8107a8db17fbc9952d610f3e4d7aac5aa743
Reviewed-on: https://chromium-review.googlesource.com/882217
Reviewed-by: Frank Barchard <fbarchard@chromium.org>
2018-01-24 19:16:03 +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
Frank Barchard
3b81288ece
Remove Mips DSPR2 code
...
Bug: libyuv:765
Test: build for mips still passes
Change-Id: I99105ad3951d2210c0793e3b9241c178442fdc37
Reviewed-on: https://chromium-review.googlesource.com/826404
Reviewed-by: Weiyong Yao <braveyao@chromium.org>
Commit-Queue: Frank Barchard <fbarchard@chromium.org>
2017-12-14 18:22:16 +00:00
Frank Barchard
8f5e9cd9eb
ScaleRowUp2_16_C port of NEON to C
...
Single pass upsample with bilinear filter.
NEON version optimized - Pixel Sailfish QC821
Was TestScaleRowUp2_16 (5741 ms)
Now TestScaleRowUp2_16 (4484 ms)
C TestScaleRowUp2_16 (6555 ms)
TBR=kjellander@chromium.org
BUG=libyuv:718
TEST=LibYUVScaleTest.TestScaleRowUp2_16 (709 ms)
Change-Id: Ib04ceb53e0ab644a392c39c3396e313530161d92
Reviewed-on: https://chromium-review.googlesource.com/646701
Reviewed-by: Frank Barchard <fbarchard@google.com>
Reviewed-by: Cheng Wang <wangcheng@google.com>
2017-09-05 21:40:39 +00:00
Frank Barchard
73a603e120
clang-format 5.0 applied to libyuv
...
BUG=None
TEST=try bots and lint test
Change-Id: I1ab462adf2d309117862c5eb4b244a61ae202951
Reviewed-on: https://chromium-review.googlesource.com/450658
Commit-Queue: Frank Barchard <fbarchard@google.com>
Reviewed-by: Henrik Kjellander <kjellander@chromium.org>
2017-03-08 18:50:12 +00:00
Frank Barchard
136aa9d37c
any11p fix for buffer overrun
...
BUG=libyuv:686
TESTED=untested
Change-Id: Idfae93349dd78b1b633a596631e5397e11b77d0b
Reviewed-on: https://chromium-review.googlesource.com/448320
Reviewed-by: Frank Barchard <fbarchard@google.com>
Reviewed-by: Henrik Kjellander <kjellander@chromium.org>
Commit-Queue: Frank Barchard <fbarchard@google.com>
2017-03-03 19:57:35 +00:00
Manojkumar Bhosale
45b176d153
Add MSA optimized Interpolate/MergeUV/Misc functions
...
BUG=libyuv:634
Change-Id: If8d60bd57f01fe95bc2fd26196466574195cc126
Performance Gain (vs C auto-vectorized)
InterpolateRow_MSA - ~3.3x
InterpolateRow_Any_MSA - ~2.5x
ARGBSetRow_MSA - ~1.0x
ARGBSetRow_Any_MSA - ~1.0x
ARGBToRGB24Row_MSA - ~1.9x
ARGBToRGB24Row_Any_MSA - ~1.6x
MergeUVRow_MSA - ~1.6x
MergeUVRow_Any_MSA - ~1.2x
Performance Gain (vs C non-vectorized)
InterpolateRow_MSA - ~11.3x
InterpolateRow_Any_MSA - ~ 7.9x
ARGBSetRow_MSA - ~ 6.2x
ARGBSetRow_Any_MSA - ~ 4.0x
ARGBToRGB24Row_MSA - ~ 9.9x
ARGBToRGB24Row_Any_MSA - ~ 8.4x
MergeUVRow_MSA - ~12.7x
MergeUVRow_Any_MSA - ~ 8.0x
Change-Id: If8d60bd57f01fe95bc2fd26196466574195cc126
Reviewed-on: https://chromium-review.googlesource.com/445817
Reviewed-by: Frank Barchard <fbarchard@google.com>
Commit-Queue: Frank Barchard <fbarchard@google.com>
2017-02-23 01:42:22 +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
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
0d880e5bc0
rename MIPS_DSPR2 to DSPR2 for consistency
...
When attempting to normalize function names to end in Row_SIMD it was made
harder with MIPS_DSPR2 naming convention.
Other CPUs do not include the vendor. This should be named consistently.
Removed the DISABLE_MIPS in favour of DISABLE_ASM for consistency with other
processors.
TBR=harryjin@google.com
BUG=libyuv:562
Review URL: https://codereview.chromium.org/1677633002 .
2016-02-05 14:49:54 -08:00
Frank Barchard
fc52d8ded2
Odd width variation of scale down by 2 for subsampling
...
R=dhrosa@google.com , harryjin@google.com
BUG=libyuv:538
Review URL: https://codereview.chromium.org/1558093003 .
2016-01-06 15:12:17 -08:00
Frank Barchard
f4447745ae
Add rounding to InterpolateRow for improved quality and consistency.
...
Remove inaccurate specializations for 1/4 and 3/4, since they round
incorrectly. Specialize for 100% and 50% are kept due to performance.
Make C and ARM code match SSSE3.
Make unittests expect zero difference.
BUG=libyuv:535
R=harryjin@google.com
Review URL: https://codereview.chromium.org/1533643005 .
2015-12-17 15:24:06 -08:00
fbarchard@google.com
05416e2d9a
Box filter for YUV use rows with accumulation buffer for better memory behavior. The old code would do columns accumulated into registers, and then store the result once. This was slow from a memory point of view. The new code does a row of source at a time, updating an accumulation buffer every row. The accumulation buffer is small, and should fit cache. Before each accumulation of N rows, the buffer needs to be reset to zero. If the memset is a bottleneck, it would be faster to do the first row without an add, storing to the accumulation buffer, and then add for the remaining rows.
...
BUG=425
TESTED=out\release\libyuv_unittest --gtest_filter=*ScaleTo1x1*
R=harryjin@google.com
Review URL: https://webrtc-codereview.appspot.com/52659004
git-svn-id: http://libyuv.googlecode.com/svn/trunk@1428 16f28f9a-4ce2-e073-06de-1de4eb20be90
2015-06-09 01:05:18 +00:00
fbarchard@google.com
2b7f6b7dee
ScaleAddRows_Any_SSE2 functions for handling odd widths.
...
BUG=425
TESTED=out\release\libyuv_unittest_old --gtest_filter=*.ScaleDownBy3_*
R=tpsiaki@google.com
Review URL: https://webrtc-codereview.appspot.com/45219004
git-svn-id: http://libyuv.googlecode.com/svn/trunk@1377 16f28f9a-4ce2-e073-06de-1de4eb20be90
2015-04-22 00:51:56 +00:00
fbarchard@google.com
013e812275
Port box filter to AVX2.
...
BUG=libyuv:425
TESTED=c:\intelsde\sde -ast -hsw -- out\release\libyuv_unittest.exe --gtest_catch_exceptions=0 --gtest_filter=*libyuvTest.ScaleTo640x360_Box
R=tpsiaki@google.com
Review URL: https://webrtc-codereview.appspot.com/43149004
git-svn-id: http://libyuv.googlecode.com/svn/trunk@1367 16f28f9a-4ce2-e073-06de-1de4eb20be90
2015-04-14 00:21:15 +00:00
fbarchard@google.com
fd8054791c
build fixe for InterpolateRow_MIPS_DSPR2
...
BUG=398
TESTED=untested
R=harryjin@google.com
Review URL: https://webrtc-codereview.appspot.com/37999004
git-svn-id: http://libyuv.googlecode.com/svn/trunk@1268 16f28f9a-4ce2-e073-06de-1de4eb20be90
2015-02-07 01:01:30 +00:00
fbarchard@google.com
9ed836b154
The 'Any' versions of functions can handle any width now, so remove the check from the calling code. This has 2 advantages - less code, and less overhead in calling function when any function is NOT used. Downside is more code for case where any is used.
...
BUG=373
TESTED=libyuv_unittest still passes
R=harryjin@google.com
Review URL: https://webrtc-codereview.appspot.com/24129004
git-svn-id: http://libyuv.googlecode.com/svn/trunk@1143 16f28f9a-4ce2-e073-06de-1de4eb20be90
2014-10-24 23:29:31 +00:00
fbarchard@google.com
044f914c29
Change scale to unaligned movdqu.
...
BUG=365
TESTED=scale unittests
R=tpsiaki@google.com
Review URL: https://webrtc-codereview.appspot.com/22879004
git-svn-id: http://libyuv.googlecode.com/svn/trunk@1101 16f28f9a-4ce2-e073-06de-1de4eb20be90
2014-10-01 01:16:04 +00:00
fbarchard@google.com
b18413e568
YUV scaling with 16 bit planes
...
BUG=331
TESTED=libyuv_unittest --gunit_also_run_disabled_tests --gtest_filter=**.ScaleFrom1280x720*
R=debargha@google.com , tpsiaki@google.com
Review URL: https://webrtc-codereview.appspot.com/17569004
git-svn-id: http://libyuv.googlecode.com/svn/trunk@1005 16f28f9a-4ce2-e073-06de-1de4eb20be90
2014-05-20 19:22:30 +00:00
fbarchard@google.com
ecf5a1446e
common functions (c row functions) ported to C89.
...
BUG=303
TESTED=cl /c /TC /Iinclude source/scale_common.cc
R=tpsiaki@google.com
Review URL: https://webrtc-codereview.appspot.com/6909004
git-svn-id: http://libyuv.googlecode.com/svn/trunk@961 16f28f9a-4ce2-e073-06de-1de4eb20be90
2014-01-10 20:55:39 +00:00
fbarchard@google.com
6700a27c97
Scale mirror bug fix.
...
BUG=304
TESTED=try
R=tpsiaki@google.com
Review URL: https://webrtc-codereview.appspot.com/6789005
git-svn-id: http://libyuv.googlecode.com/svn/trunk@959 16f28f9a-4ce2-e073-06de-1de4eb20be90
2014-01-09 20:21:24 +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
db73518b19
use LIBYUV_BOOL instead of bool
...
BUG=303
TESTED=try
R=tpsiaki@google.com
Review URL: https://webrtc-codereview.appspot.com/6519006
git-svn-id: http://libyuv.googlecode.com/svn/trunk@953 16f28f9a-4ce2-e073-06de-1de4eb20be90
2014-01-07 03:59:31 +00:00
fbarchard@google.com
a1f5254a95
Switch to c style casts for all source and includes.
...
BUG=303
TESTED=try
R=tpsiaki@google.com
Review URL: https://webrtc-codereview.appspot.com/6629004
git-svn-id: http://libyuv.googlecode.com/svn/trunk@952 16f28f9a-4ce2-e073-06de-1de4eb20be90
2014-01-07 03:03:00 +00:00
fbarchard@google.com
dd49958058
Only do 1x1 work around for large source
...
BUG=302
TESTED=hammer effects
Review URL: https://webrtc-codereview.appspot.com/6549005
git-svn-id: http://libyuv.googlecode.com/svn/trunk@949 16f28f9a-4ce2-e073-06de-1de4eb20be90
2014-01-03 08:42:55 +00:00
fbarchard@google.com
a1b92bd744
Warning fixes for implicite casts that vs2012 complains about with higher warning levels
...
BUG=302
TESTED=hammer build
R=tpsiaki@google.com
Review URL: https://webrtc-codereview.appspot.com/6559004
git-svn-id: http://libyuv.googlecode.com/svn/trunk@948 16f28f9a-4ce2-e073-06de-1de4eb20be90
2014-01-03 02:38:49 +00:00
fbarchard@google.com
909c76e317
point sample 64 bit column filter
...
BUG=302
TESTED=ARGBScaleClipTo320x240_None etc
R=tpsiaki@google.com
Review URL: https://webrtc-codereview.appspot.com/6539004
git-svn-id: http://libyuv.googlecode.com/svn/trunk@946 16f28f9a-4ce2-e073-06de-1de4eb20be90
2014-01-03 02:03:07 +00:00
fbarchard@google.com
6dc80ab585
gargantuan width support on ARGBScale
...
BUG=302
TEST=libyuv ARGBScale tests with LIBYUV_WIDTH=90000
R=tpsiaki@google.com
Review URL: https://webrtc-codereview.appspot.com/6519005
git-svn-id: http://libyuv.googlecode.com/svn/trunk@944 16f28f9a-4ce2-e073-06de-1de4eb20be90
2014-01-03 01:15:31 +00:00
fbarchard@google.com
ac9b96c076
Work around for 1 pixel destination
...
BUG=302
TEST=*1x1*
R=tpsiaki@google.com
Review URL: https://webrtc-codereview.appspot.com/6519004
git-svn-id: http://libyuv.googlecode.com/svn/trunk@943 16f28f9a-4ce2-e073-06de-1de4eb20be90
2014-01-03 00:51:12 +00:00
fbarchard@google.com
90a36b29d3
Use 64 bit fixed point for scaling columns if source is 32k or wider.
...
BUG=302
TESTED=out\release\libyuv_unittest --gtest_filter=*I*ToI*
R=tpsiaki@google.com
Review URL: https://webrtc-codereview.appspot.com/6509004
git-svn-id: http://libyuv.googlecode.com/svn/trunk@942 16f28f9a-4ce2-e073-06de-1de4eb20be90
2014-01-03 00:34:55 +00:00
fbarchard@google.com
5dba58cb1e
FixedDiv1 using a single 64/32 divide. Removes size restriction from slope.
...
BUG=302
TESTED=libyuv scale tests
R=tpsiaki@google.com
Review URL: https://webrtc-codereview.appspot.com/6489004
git-svn-id: http://libyuv.googlecode.com/svn/trunk@940 16f28f9a-4ce2-e073-06de-1de4eb20be90
2014-01-02 22:32:09 +00:00
fbarchard@google.com
a6b8e0da51
Reduce filter to None if 1 pixel wide.
...
BUG=none
TESTED=talk media_unittest YuvScalerTest.TestScaleUp1x6OptInt
R=tpsiaki@google.com
Review URL: https://webrtc-codereview.appspot.com/5449005
git-svn-id: http://libyuv.googlecode.com/svn/trunk@906 16f28f9a-4ce2-e073-06de-1de4eb20be90
2013-12-09 19:56:16 +00:00
fbarchard@google.com
5f29eaafae
Fix for off by one in scale - only source should be src - 0x10001 because dest will hit exact pixel.
...
BUG=292
TESTED=valgrind
Review URL: https://webrtc-codereview.appspot.com/5359004
git-svn-id: http://libyuv.googlecode.com/svn/trunk@902 16f28f9a-4ce2-e073-06de-1de4eb20be90
2013-12-08 18:03:00 +00:00
fbarchard@google.com
aae7deb5cf
yuv use scale slope calc
...
BUG=none
TEST=drmem
R=tpsiaki@google.com
Review URL: https://webrtc-codereview.appspot.com/5319004
git-svn-id: http://libyuv.googlecode.com/svn/trunk@899 16f28f9a-4ce2-e073-06de-1de4eb20be90
2013-12-07 00:55:23 +00:00
fbarchard@google.com
5e24e55f98
Couple fixes for scale common
...
BUG=none
TESTED=local build
R=tpsiaki@google.com
Review URL: https://webrtc-codereview.appspot.com/5289004
git-svn-id: http://libyuv.googlecode.com/svn/trunk@897 16f28f9a-4ce2-e073-06de-1de4eb20be90
2013-12-06 19:20:40 +00:00
fbarchard@google.com
980150f7f1
Compute slope considering filtering, mirror.
...
BUG=261
TEST=valgrind
R=tpsiaki@google.com
Review URL: https://webrtc-codereview.appspot.com/5199004
git-svn-id: http://libyuv.googlecode.com/svn/trunk@896 16f28f9a-4ce2-e073-06de-1de4eb20be90
2013-12-06 18:13:46 +00:00
fbarchard@google.com
ec0cc5bb2d
Function to switch filters to a simplier one based on scale factors.
...
BUG=none
TEST=untested
R=tpsiaki@google.com
Review URL: https://webrtc-codereview.appspot.com/4989004
git-svn-id: http://libyuv.googlecode.com/svn/trunk@894 16f28f9a-4ce2-e073-06de-1de4eb20be90
2013-12-05 00:28:12 +00:00
fbarchard@google.com
99a1298c54
I444ToI420 etc use ScalePlane on Y to allow mirroring.
...
BUG=291
TESTED=unittests still pass.
R=tpsiaki@google.com
Review URL: https://webrtc-codereview.appspot.com/4979004
git-svn-id: http://libyuv.googlecode.com/svn/trunk@893 16f28f9a-4ce2-e073-06de-1de4eb20be90
2013-12-04 23:36:06 +00:00
fbarchard@google.com
06f730d8a6
Change do while loops to for loops to allow 0 or 1 wide
...
BUG=289
TESTED=drmemory on odd width
R=tpsiaki@google.com
Review URL: https://webrtc-codereview.appspot.com/4719004
git-svn-id: http://libyuv.googlecode.com/svn/trunk@882 16f28f9a-4ce2-e073-06de-1de4eb20be90
2013-12-02 20:03:04 +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