Frank Barchard
78e44628c6
Add MSA optimized SplitUV, Set, MirrorUV, SobelX and SobelY row functions.
...
TBR=kjellander@chromium.org
R=fbarchard@google.com
Bug:libyuv:634
Change-Id: Ie2342f841f1bb8469fc4631b784eddd804f5d53e
Reviewed-on: https://chromium-review.googlesource.com/616765
Reviewed-by: Frank Barchard <fbarchard@google.com>
2017-08-17 18:39:22 +00:00
Frank Barchard
56bbcdf422
Reintroduce the max version of scale
...
add ScaleMaxSamples_NEON function with max
done on original values.
TBR=kjellander@chromium.org
BUG=libyuv:717
TEST=LibYUVPlanarTest.TestScaleMaxSamples_Opt
Change-Id: Id99338860782b10ffd24f66242eb42014c2e229e
Reviewed-on: https://chromium-review.googlesource.com/614685
Reviewed-by: Frank Barchard <fbarchard@google.com>
Reviewed-by: Cheng Wang <wangcheng@google.com>
2017-08-14 23:33:56 +00:00
Frank Barchard
83ca1abe09
Change ScaleSumSamples to return Sum of Squares
...
TBR=kjellander@chromium.org
BUG=libyuv:717
TEST=LibYUVPlanarTest.TestScaleSumSamples_Opt
Change-Id: I5208666f3968c5c4b0f1b0c951f24216d78ee3fe
Reviewed-on: https://chromium-review.googlesource.com/607184
Reviewed-by: Cheng Wang <wangcheng@google.com>
2017-08-09 22:19:45 +00:00
Frank Barchard
8676ad7004
scale float samples and return max value
...
BUG=libyuv:717
TEST=ScaleSum unittest to compare C vs Arm implementation
TBR=kjellander@chromium.org
Change-Id: Iaa7af5547d979aad4722f868d31b405340115748
Reviewed-on: https://chromium-review.googlesource.com/600534
Reviewed-by: Cheng Wang <wangcheng@google.com>
2017-08-04 23:34:30 +00:00
Frank Barchard
6825b161d7
HalfFloat SSE2/AVX2 optimized port scheduling.
...
Uses 1 add instead of 2 leas to reduce port pressure on ports 1 and 5
used for SIMD instructions.
BUG=libyuv:670
TEST=~/iaca-lin64/bin/iaca.sh -arch HSW out/Release/obj/libyuv/row_gcc.o
Change-Id: I3965ee5dcb49941a535efa611b5988d977f5b65c
Reviewed-on: https://chromium-review.googlesource.com/433391
Reviewed-by: Frank Barchard <fbarchard@google.com>
Commit-Queue: Frank Barchard <fbarchard@google.com>
2017-02-11 01:02:06 +00:00
Frank Barchard
b89bcda273
Add comments for ARGBToUV_C and ARGBToUVJ_C
...
ARGBToUV_C and ARGBToUVJ_C are generated functions with subtle
difference in rounding. Adding comment to make them easier to find.
TBR=kjellander@chromium.org
BUG=libyuv:634
TEST=untested
Change-Id: I9912d256a1e04c58475d33bdb472c37484f6cab9
Reviewed-on: https://chromium-review.googlesource.com/434980
Reviewed-by: Frank Barchard <fbarchard@google.com>
Commit-Queue: Frank Barchard <fbarchard@google.com>
2017-01-30 23:44:05 +00:00
Frank Barchard
000d2fa91a
Libyuv MIPS DSPR2 optimizations.
...
Optimized functions:
I444ToARGBRow_DSPR2
I422ToARGB4444Row_DSPR2
I422ToARGB1555Row_DSPR2
NV12ToARGBRow_DSPR2
BGRAToUVRow_DSPR2
BGRAToYRow_DSPR2
ABGRToUVRow_DSPR2
ARGBToYRow_DSPR2
ABGRToYRow_DSPR2
RGBAToUVRow_DSPR2
RGBAToYRow_DSPR2
ARGBToUVRow_DSPR2
RGB24ToARGBRow_DSPR2
RAWToARGBRow_DSPR2
RGB565ToARGBRow_DSPR2
ARGB1555ToARGBRow_DSPR2
ARGB4444ToARGBRow_DSPR2
ScaleAddRow_DSPR2
Bug-fixes in functions:
ScaleRowDown2_DSPR2
ScaleRowDown4_DSPR2
BUG=
Review-Url: https://codereview.chromium.org/2626123003 .
2017-01-11 12:19:13 -08: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
d363ea6527
Remove I411 support.
...
YUV 411 is very uncommon format. Remove support.
Update documentation to reflect that 411 is deprecated.
Simplify tests for YUV to only test with the new side by side YUV but keep old 3 plane test around with a macro for now.
BUG=libyuv:645
R=kjellander@chromium.org
Review URL: https://codereview.chromium.org/2406123002 .
2016-10-11 11:14:16 -07:00
Frank Barchard
7fc932ddd3
Add low level support for 12 bit 420, 422 and 444 YUV video frame conversion.
...
BUG=libyuv:560,chromium:445071
TEST=untested
R=hubbe@chromium.org
Review URL: https://codereview.chromium.org/2371293002 .
2016-09-29 15:06:30 -07:00
Frank Barchard
c11e9b7fb7
bt709 coefficients for video constrained space
...
Original bt709 color space coefficients were full range yuv for higher
quality. This change makes the coefficients use the video constrained
color space the same as bt601 which is 16 to 240 for Y and 16 to 235 for
chroma channels.
BUG=libyuv:639
TEST=libyuv unittests run locally
R=hubbe@chromium.org
Review URL: https://codereview.chromium.org/2367253003 .
2016-09-28 15:07:46 -07:00
Frank Barchard
de944ed8c7
YuvConstants declare alignment for externs as well as declarations
...
On visual c 2013 and earlier a warning is generated if externs
are not declared with the same alignment as the declaration, when
using /ltcg
BUG=libyuv:633
TEST=standalong test built with cl /Bv /GL /Ox /nologo a.cc b.cc /link /ltcg
R=skal@google.com
Review URL: https://codereview.chromium.org/2291533004 .
2016-08-30 11:06:46 -07:00
Frank Barchard
46a8eaaf0c
fix typo in YUV
...
R=braveyao@chromium.org
BUG=None
Review URL: https://codereview.chromium.org/2152623002 .
2016-07-13 17:17:19 -07:00
Frank Barchard
1aa4ddd21c
Attribute aligned 32 for YUV conversion structure on Intel
...
Fix for unaligned memory exception.
R=braveyao@chromium.org
BUG=libyuv:616
Review URL: https://codereview.chromium.org/2152553002 .
2016-07-13 12:19:26 -07:00
Frank Barchard
84e04699c2
Add libyuv:Android420ToI420 function which takes 3 pointers
...
to Y,U,V and a pixel stride for U and V. The pixel stride is expected to be 1 or 2.
TEST=LibYUVConvertTest.Android420ToI420_Opt
BUG=libyuv:604
R=braveyao@chromium.org
Review URL: https://codereview.chromium.org/2114843002 .
2016-07-12 16:23:51 -07:00
Magnus Jedvert
942db3016a
Add ARGBExtractAlpha function
...
BUG=libyuv:572
R=fbarchard@google.com
Review URL: https://codereview.chromium.org/1995293002 .
2016-05-26 10:30:57 +02:00
Frank Barchard
3c862e3d29
Fix stride bug for msan on I420Interpolate.
...
When using C version of I420Interpolate for msan, a 50% interpolation
would cause stride to be cast to int, which could cause erroneous
memory reads on 64 bit build.
This CL makes the stride use ptrdiff_t for HalfRow_C
BUG=libyuv:582
TESTED=try bots tests
R=dhrosa@google.com
Review URL: https://codereview.chromium.org/1872953002 .
2016-04-08 15:58:53 -07:00
Frank Barchard
0e554b18fe
port NV12ToRGB565Row_AVX2 to gcc
...
NV12ToRGB565Row for Intel is implemented as a 2 step conversion:
NV12ToARGBRow_SSSE3 and ARGBToRGB565Row_SSE2
NV12ToARGBRow has an AVX2 version, so this CL implements
NV12ToRGB565Row_AVX2 with call to NV12ToARGBRow_AVX2 and
ARGBToRGB565Row_SSE2.
R=harryjin@google.com
BUG=libyuv:554
Review URL: https://codereview.chromium.org/1687953002 .
2016-02-10 11:13:41 -08:00
Frank Barchard
c39509c8e5
add avx2 wrappers for functions that can call I422ToARGBRow_AVX2
...
R=harryjin@google.com
BUG=libyuv:557
Review URL: https://codereview.chromium.org/1687713002 .
2016-02-09 17:14:29 -08:00
Frank Barchard
081475b3c8
refactor ARGBToI422 using ARGBToI420 internally
...
R=harryjin@google.com
BUG=libyuv:546
Review URL: https://codereview.chromium.org/1574253004 .
2016-01-12 17:05:49 -08:00
Frank Barchard
3f4d86053e
avx2 interpolate use 8 bit
...
BUG=libyuv:535
R=dhrosa@google.com
Review URL: https://codereview.chromium.org/1535833003 .
2015-12-21 10:57:32 -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
Frank Barchard
b0b22f88b9
Unroll C version of YUV blender for improved performance.
...
R=dhrosa@google.com , harryjin@google.com
BUG=libyuv:527
Review URL: https://codereview.chromium.org/1502343003 .
2015-12-07 12:02:45 -08:00
Frank Barchard
8af0ebf816
planar blend use signed images
...
R=dhrosa@google.com , harryjin@google.com , jzern@chromium.org
BUG=libyuv:527
Review URL: https://codereview.chromium.org/1491533002 .
2015-12-02 14:20:17 -08:00
Frank Barchard
6100f50f13
fix yvu constants for avx2 yuv to rgb
...
the yvu matrix for yuv to rgb had an incorrect entry, affecting yuv to bgra,
yuv to abgr and yuv to raw.
fix the matrix and reenable avx2 functions.
R=harryjin@google.com
BUG=libyuv:522
Review URL: https://codereview.chromium.org/1411763004 .
2015-11-10 10:45:44 -08:00
Frank Barchard
d95d2169d9
rename yuv matrix constants to be more clear about what they are
...
R=harryjin@google.com
BUG=none
Review URL: https://codereview.chromium.org/1429693006 .
2015-11-03 17:09:53 -08:00
Frank Barchard
ce4c2fad1d
Raw 24 bit RGB to RGB24 (bgr)
...
Add unittests that do 1 step conversion vs 2 step conversion.
Tests end swapping versions match direct conversions.
R=harryjin@google.com
BUG=libyuv:518
Review URL: https://codereview.chromium.org/1419103007 .
2015-11-03 10:30:30 -08:00
Frank Barchard
2c7aa0070a
remove I422ToBGRA and use I422ToRGBA internally
...
Removes low levels for I420ToBGRA and I420ToRAW and reimplements them as I420ToRGBA and I420ToRGB24 with transposed color matrix.
Adds unittests that do 1 step conversion vs 2 steps to test end swapping versions match direct conversions.
R=harryjin@google.com
BUG=libyuv:518
Review URL: https://codereview.chromium.org/1427993004 .
2015-11-02 10:24:12 -08:00
Frank Barchard
5d97b93369
refactor I420ToABGR to use I420ToARGBRow
...
Using a transposed conversion matrix, I420ToARGB can output ABGR.
R=harryjin@google.com , xhwang@chromium.org
BUG=libyuv:473
Review URL: https://codereview.chromium.org/1413573010 .
2015-10-30 11:56:57 -07:00
Frank Barchard
b86dbf24d3
refactor I420AlphaToABGR to use I420AlphaToARGB internally
...
swap U and V and transpose conversion matrix, so I420AlphaToARGB and
I420AlphaToABGR share low level code.
Having less code with same performance allows more focused
optimization for future ARM versions.
R=harryjin@google.com
TBR=harryjin@chromium.org
BUG=libyuv:473,libyuv:516
Review URL: https://codereview.chromium.org/1422263002 .
2015-10-27 14:17:21 -07:00
Frank Barchard
cf160cdbaa
implement I444ToABGR by swapping uv and transpose matrix
...
U contributes to B and G. V contributes to R and G.
By swapping U and V, they contribute to the opposite channels. Adjust the matrix so the U contribution is in the matrix location such that it till contribute to the
new B channel and vice versa.
This allows ABGR versions of YUV conversion to use the same low level code as ARGB, just using a different matrix and swapping U and V pointers.
As a result the existing I444ToABGRRow functions are no longer needed and are removed.
Previously this function was only Intel AVX2 optimized for Windwos. Now it is also optimized for Arm and GCC.
ARMv7 Neon
Was LibYUVConvertTest.I444ToABGR_Opt (75971 ms)
Now LibYUVConvertTest.I444ToABGR_Opt (3672 ms)
20.6 times faster.
R=xhwang@chromium.org
BUG=libyuv:515
Review URL: https://codereview.chromium.org/1414133006 .
2015-10-27 10:21:21 -07:00
Frank Barchard
430bb0a0f0
odd width 444 fix
...
TBR=harryjin@google.com
BUG=libyuv:510
Review URL: https://codereview.chromium.org/1415583003 .
2015-10-21 20:03:19 -07:00
Frank Barchard
ba4b409d51
Fix ARGBToI411 odd width bug.
...
The any function for handling ARGBToI411 was not handling the pixel
replication correctly. On 422 and odd width was handled by duplicating
a pixel of source. 411 needs replication for remainders of 1, 2 or 3
pixels.
The C version was handling odd width but with an average of the remainder
pixels, which does not match the SIMD 'any' handling off remainder.
This changes the odd width handling to mimic the any version.
TBR=harryjin@google.com
BUG=libyuv:491
Review URL: https://codereview.chromium.org/1411733004 .
2015-10-21 12:22:24 -07:00
Frank Barchard
52a5504950
fix for C version of YUV to RGB for Arm
...
YuvPixel for arm was miscomputing YG.
TBR=harryjin@google.com
BUG=libyuv:506
Review URL: https://codereview.chromium.org/1402333002 .
2015-10-15 12:43:37 -07:00
Frank Barchard
4abd096548
fix for yuv to rgb on arm64.
...
fill in aarch64 yuv constants to match how the code expects them.
TBR=harryjin@google.com
BUG=libyuv:502
Review URL: https://codereview.chromium.org/1396253004 .
2015-10-12 12:02:54 -07:00
Frank Barchard
2e4466e282
change all pix parameters to width for consistency
...
TBR=harryjin@google.com
BUG=none
Review URL: https://codereview.chromium.org/1398633002 .
2015-10-07 22:30:36 -07:00
Frank Barchard
76a599ec3b
fix jpeg and bt.709 yuvconstants for neon64.
...
yuv constants for bt.601 were previously ported to neon64, as well
as the code to respect other color spaces. But the jpeg and bt.709
colour conversion constants were still in armv7 form. This changes
the constants for aarch64 builds to be compatible with the code.
yuv constants are now passed as const *
Remove Yvu constants which were used for older version on nv21 but not new code.
TBR=harryjin@google.com
BUG=none
Review URL: https://codereview.chromium.org/1398623002 .
2015-10-07 19:46:56 -07:00
Frank Barchard
013080f2d2
Pass yuvconstants to YUV conversions for neon 64 bit
...
SETUP provided by zhongwei.yao@linaro.org
Previously the 64 bit Neon code had hard coded constants in the setup macro
for YUV conversion, while 32 bit Neon code supported the yuvconstants
parameter.
This change accepts the constants passed to the YUV conversion row function,
allowing different color spaces to be respected - naming JPEG and BT.709.
As well as the existing BT.601.
TBR=harryjin@google.com
BUG=libyuv:472
Review URL: https://codereview.chromium.org/1384323002 .
2015-10-06 22:19:14 -07:00
Frank Barchard
914a9856c7
Reimplement NV21ToARGB to allow different color matrix.
...
Low level for NV21ToARGB written to accept yuv matrix used by
other YUV to ARGB functions.
Previously NV21 was implemented for Windows using NV12 with a different
matrix that swapped U and V. But the Arm version of the low level does
not allow the matrix U and V contributions to be swapped.
Using a new low level function that reads NV21 and uses the same
yuvconstants as other YUV conversion functions allows an Arm port of
this function.
TBR=harryjin@google.com
BUG=libyuv:500
Review URL: https://codereview.chromium.org/1388273002 .
2015-10-06 20:34:44 -07:00
Frank Barchard
febc26a2c9
win64 version of I422AlphaToARGB.
...
Was
I420AlphaToARGB_Premult (8861 ms)
I420AlphaToARGB_Opt (7119 ms)
Now
I420AlphaToABGR_Premult (2840 ms)
I420AlphaToARGB_Opt (484 ms)
C function switched to 1 step.
Was
I420AlphaToARGB_Premult (8862 ms)
I420AlphaToABGR_Opt (6718 ms)
Now
I420AlphaToARGB_Premult (8706 ms)
I420AlphaToARGB_Opt (6541 ms)
R=harryjin@google.com
BUG=libyuv:496, libyuv:473
Review URL: https://codereview.chromium.org/1359183003 .
2015-09-25 15:06:41 -07:00
Frank Barchard
e365cdde3b
I420Alpha row function in 1 pass.
...
API change - I420AlphaToARGB takes flag indicating if RGB should be
premultiplied by alpha.
This version implements an efficient SSSE3 version for Windows.
C version done in 2 steps.
Was
libyuvTest.I420AlphaToARGB_Any (1136 ms)
libyuvTest.I420AlphaToARGB_Unaligned (1210 ms)
libyuvTest.I420AlphaToARGB_Invert (966 ms)
libyuvTest.I420AlphaToARGB_Opt (1031 ms)
libyuvTest.I420AlphaToABGR_Any (1020 ms)
libyuvTest.I420AlphaToABGR_Unaligned (1359 ms)
libyuvTest.I420AlphaToABGR_Invert (1082 ms)
libyuvTest.I420AlphaToABGR_Opt (986 ms)
R=harryjin@google.com
BUG=libyuv:496
Review URL: https://codereview.chromium.org/1367093002 .
2015-09-25 10:29:20 -07:00
Frank Barchard
000cf89ca8
YUY2ToARGB avx2 in 1 step conversion.
...
Includes UYVYToARGB ssse3 fix.
Was
YUY2ToARGB_Opt (433 ms)
69.79% libyuv_unittest libyuv_unittest [.] I422ToARGBRow_AVX2
20.73% libyuv_unittest libyuv_unittest [.] YUY2ToUV422Row_AVX2
6.04% libyuv_unittest libyuv_unittest [.] YUY2ToYRow_AVX2
0.77% libyuv_unittest libyuv_unittest [.] YUY2ToARGBRow_AVX2
Now
YUY2ToARGB_Opt (280 ms)
95.66% libyuv_unittest libyuv_unittest [.] YUY2ToARGBRow_AVX2
BUG=libyuv:494
R=harryjin@google.com
Review URL: https://codereview.chromium.org/1364813002 .
2015-09-23 11:15:18 -07:00
Frank Barchard
5f3d4270d1
yuy2 to rgb gcc versions
...
read in read function for yuv conversion
R=harryjin@google.com
BUG=libyuv:488
Review URL: https://codereview.chromium.org/1355393002 .
2015-09-22 14:27:33 -07:00
Frank Barchard
f96890a0be
yuvconstants for all YUV to RGB conversion functions.
...
R=harryjin@google.com
BUG=libyuv:488
Review URL: https://codereview.chromium.org/1363503002 .
2015-09-22 10:26:03 -07:00
Frank Barchard
62c49dc811
move constants into common
...
R=harryjin@google.com
BUG=libyuv:488
Review URL: https://codereview.chromium.org/1359443005 .
2015-09-18 16:28:44 -07:00
Frank Barchard
28427a53e2
I444ToABGR for android
...
Reimplements I444ToARGB as a matrix function.
new I444ToABGR as matrix functions with wrappers and any functions.
Allows for future J444 and H444 versions.
I444ToABGR user level function added.
BUG=libyuv:490, libyuv:449
R=harryjin@google.com
Review URL: https://codereview.chromium.org/1355733002 .
2015-09-18 11:20:58 -07:00
Frank Barchard
28ce7d94f5
j422toabgr neon port using i422toabgr matrix function.
...
R=harryjin@google.com
BUG=libyuv:488
Review URL: https://codereview.chromium.org/1353923003 .
2015-09-17 15:20:55 -07:00
Frank Barchard
6a6b67e7a9
Add H422ToARGB armv7 neon version.
...
Patch provided by zhongwei.yao@linaro.org
R=fbarchard@chromium.org , fbarchard@google.com
BUG=libyuv:488
Review URL: https://codereview.chromium.org/1344393002 .
2015-09-17 10:38:15 -07:00
Frank Barchard
509c644245
Add J422ToARGB armv7 neon version.
...
R=fbarchard@chromium.org , fbarchard@google.com
BUG=libyuv:488
Review URL: https://codereview.chromium.org/1334173005 .
2015-09-15 15:01:48 -07:00
Frank Barchard
67a9e30225
neon yuv matrix function
...
R=harryjin@google.com
BUG=libyuv:488
Review URL: https://codereview.chromium.org/1337973002 .
2015-09-11 11:12:30 -07:00
Frank Barchard
ed55d24d9f
H420 functionality
...
R=harryjin@google.com
BUG=libyuv:488
Review URL: https://webrtc-codereview.appspot.com/54869004 .
2015-09-06 11:01:40 -07:00
Frank Barchard
7060e0d826
I420ToABGRMatrix functions with J420ToABGR wrapper.
...
Allows direct conversion from JPeg to ABGR for android.
BUG=libyuv:488
R=harryjin@google.com
Review URL: https://webrtc-codereview.appspot.com/55719004 .
2015-09-03 10:42:36 -07:00
Frank Barchard
925c3d9e26
I420ToARGB conversion with matrix.
...
Take color conversion constants as a parameter to row function for I420ToARGBMatrixRow_SSSE3.
Allows future variations of color space using a single low level.
R=harryjin@google.com
BUG=libyuv:488
Review URL: https://webrtc-codereview.appspot.com/56669004 .
2015-09-02 10:45:42 -07:00
Frank Barchard
d317a70c1d
llvm64 link error fix.
...
R=harryjin@google.com
BUG=libyuv:485
Review URL: https://webrtc-codereview.appspot.com/58479004 .
2015-08-24 14:21:04 -07:00
Frank Barchard
ee9aaea02f
i422torgb565 is asm for clangcl as well
...
Merge branch 'master' of https://chromium.googlesource.com/libyuv/libyuv into convertcl
allow lto for llvm but not gcc
R=harryjin@google.com
BUG=libyuv:469
Review URL: https://webrtc-codereview.appspot.com/52769004 .
2015-08-19 10:46:30 -07:00
Frank Barchard
18a9027ad9
const warning fix on dither, bump chromium deps and add files to ignore list generated by arm build
...
BUG=none
R=harryjin@google.com
Review URL: https://webrtc-codereview.appspot.com/57639004 .
2015-07-27 11:47:01 -07:00
Frank Barchard
faebf89ce0
src_uv typo fix
...
R=harryjin@google.com
BUG=none
Review URL: https://webrtc-codereview.appspot.com/51299004 .
2015-07-15 18:21:06 -07:00
Frank Barchard
a209d7314b
simd for 1 to 1
...
R=harryjin@google.com , harryjin
BUG=448
Review URL: https://webrtc-codereview.appspot.com/55619004 .
2015-06-17 18:22:11 -07:00
fbarchard@google.com
cfce47efc8
Change Sobel to use JPeg Luma calculation instead of extracting G channel. Using luma produces a better sobel that respects all 3 channels of RGB. Historically the G channel was used to improve performance, and because the luma of I420 is a constrained range, hurting quality. Using the JPeg variation of YUV, the luma is more accurate, including cross platform, better optimized for AVX2 and odd widths, and full range.
...
BUG=444
TESTED=ARGBSobelXY_Opt
R=harryjin@google.com
Review URL: https://webrtc-codereview.appspot.com/57479004
git-svn-id: http://libyuv.googlecode.com/svn/trunk@1414 16f28f9a-4ce2-e073-06de-1de4eb20be90
2015-05-27 22:32:26 +00:00
fbarchard@google.com
d28cd77f99
Enable assembly for clangcl build on Windows. Previously assembly was disabled so clangcl would work, but only with C code. As clangcl mimics both Visual C and GCC, ifdefs need to pick one or the other or often you'll end up with both. In this CL we disable most Visual C code and use the GCC versions which allow assembly for both 32 and 64 bit intel.
...
BUG=412
TESTED=clang=1 build on windows
R=tpsiaki@google.com
Review URL: https://webrtc-codereview.appspot.com/51389004
git-svn-id: http://libyuv.googlecode.com/svn/trunk@1341 16f28f9a-4ce2-e073-06de-1de4eb20be90
2015-03-19 20:36:31 +00:00
fbarchard@google.com
0e4388aea3
I422ToRGB24 AVX2 and I422ToRAW
...
BUG=none
TESTED=I422ToRGB24 unittest
R=tpsiaki@google.com
Review URL: https://webrtc-codereview.appspot.com/46619004
git-svn-id: http://libyuv.googlecode.com/svn/trunk@1337 16f28f9a-4ce2-e073-06de-1de4eb20be90
2015-03-17 17:25:27 +00:00
fbarchard@google.com
92f7f421fd
rename I400 to J400 and I400 reference to I400. J400 is a simple replication of values to convert to RGB, which is what the old I400 was. I400 reference is the Y part of the YUV formula, so renaming that to I400.
...
BUG=none
TESTED=libyuvTest (5925 ms total)
R=tpsiaki@google.com
Review URL: https://webrtc-codereview.appspot.com/50369005
git-svn-id: http://libyuv.googlecode.com/svn/trunk@1333 16f28f9a-4ce2-e073-06de-1de4eb20be90
2015-03-17 00:01:18 +00:00
fbarchard@google.com
f301777060
Fix YToARGB and tweaks to thresholds in YUV tests.
...
BUG=411
TESTED=libyuvTest.TestYToARGB
R=bcornell@google.com
Review URL: https://webrtc-codereview.appspot.com/44709004
git-svn-id: http://libyuv.googlecode.com/svn/trunk@1330 16f28f9a-4ce2-e073-06de-1de4eb20be90
2015-03-16 19:50:33 +00:00
fbarchard@google.com
e408a3759f
Improve accuracy of J422 color space using higher precission fixed point and bias.
...
BUG=414
TESTED=TestFullYUVJ
R=tpsiaki@google.com
Review URL: https://webrtc-codereview.appspot.com/44679004
git-svn-id: http://libyuv.googlecode.com/svn/trunk@1327 16f28f9a-4ce2-e073-06de-1de4eb20be90
2015-03-16 18:08:12 +00:00
fbarchard@google.com
bdeb9ac584
switch from 8x8 to 4x4 matrix for dithering
...
BUG=407
TESTED=Dither unittests
R=brucedawson@google.com
Review URL: https://webrtc-codereview.appspot.com/46459004
git-svn-id: http://libyuv.googlecode.com/svn/trunk@1310 16f28f9a-4ce2-e073-06de-1de4eb20be90
2015-03-06 18:28:00 +00:00
fbarchard@google.com
693e0217c8
ARGBToRGB565 C version use unsigned dither matrix pattern to bump pixels to next brighter value.
...
BUG=407
TESTED=unittest passes
R=harryjin@google.com
Review URL: https://webrtc-codereview.appspot.com/43539004
git-svn-id: http://libyuv.googlecode.com/svn/trunk@1306 16f28f9a-4ce2-e073-06de-1de4eb20be90
2015-03-02 23:46:09 +00:00
fbarchard@google.com
933bd40c3c
port ARGBToRGB565 and ARGB1555 to AVX2. Enable functions that use ARGBToRGB565 AVX2 code. Add ARGBToRGB565Dither function.
...
BUG=403
TESTED=local windows build
R=harryjin@google.com
Review URL: https://webrtc-codereview.appspot.com/42109004
git-svn-id: http://libyuv.googlecode.com/svn/trunk@1302 16f28f9a-4ce2-e073-06de-1de4eb20be90
2015-02-27 21:15:28 +00:00
fbarchard@google.com
3c11d4bf6e
align avx2 buffers to 32 bytes
...
BUG=403
TESTED=untested
R=harryjin@google.com
Review URL: https://webrtc-codereview.appspot.com/40929004
git-svn-id: http://libyuv.googlecode.com/svn/trunk@1294 16f28f9a-4ce2-e073-06de-1de4eb20be90
2015-02-24 23:31:28 +00:00
fbarchard@google.com
446fa95587
I422ToRGB565, ARGB4444 and ARGB1555 for AVX2
...
BUG=403
TESTED=avx2 emulator
Review URL: https://webrtc-codereview.appspot.com/34359004
git-svn-id: http://libyuv.googlecode.com/svn/trunk@1293 16f28f9a-4ce2-e073-06de-1de4eb20be90
2015-02-24 23:14:46 +00:00
fbarchard@google.com
239962fa00
YUY2 and UYVY to ARGB AVX2 versions via wrappers.
...
BUG=403
TESTED=UNTESTED
R=harryjin@google.com
Review URL: https://webrtc-codereview.appspot.com/34339004
git-svn-id: http://libyuv.googlecode.com/svn/trunk@1291 16f28f9a-4ce2-e073-06de-1de4eb20be90
2015-02-24 18:58:51 +00:00
kjellander@google.com
28d1a582ba
Revert "YUY2ToARGB and UYVYToARGB AVX with C wrapper to call lower level conversions."
...
This reverts r1288 due to breaking compilation on bots:
http://build.chromium.org/p/client.libyuv/builders/Mac64%20Debug/builds/365
http://build.chromium.org/p/client.libyuv/builders/Linux64%20Debug/builds/667
TBR=fbarchard@google.com
TESTED=Reverted locally and all built fine again.
Review URL: https://webrtc-codereview.appspot.com/40879004
git-svn-id: http://libyuv.googlecode.com/svn/trunk@1289 16f28f9a-4ce2-e073-06de-1de4eb20be90
2015-02-23 09:22:22 +00:00
fbarchard@google.com
b52606c024
YUY2ToARGB and UYVYToARGB AVX with C wrapper to call lower level conversions.
...
BUG=403
TESTED=convert unittest
R=brucedawson@google.com
Review URL: https://webrtc-codereview.appspot.com/40839004
git-svn-id: http://libyuv.googlecode.com/svn/trunk@1288 16f28f9a-4ce2-e073-06de-1de4eb20be90
2015-02-21 00:49:35 +00:00
fbarchard@google.com
cfd6f897c4
use named type for pointer
...
BUG=403
TESTED=try bot
Review URL: https://webrtc-codereview.appspot.com/38179004
git-svn-id: http://libyuv.googlecode.com/svn/trunk@1287 16f28f9a-4ce2-e073-06de-1de4eb20be90
2015-02-20 23:26:27 +00:00
fbarchard@google.com
6a192487fe
Switch SSSE3 row wrappers from variable sized malloc to fixed size array with loop to process a portion of the row at a time. This helps performance in the case where the image has been coalesced into a single large row and the allocator, although only called once, is slow to clear the pages. Also the smaller temporary buffer fits cache, further improving performance.
...
BUG=403
TESTED=YUY2ToARGB unittest
R=harryjin@google.com
Review URL: https://webrtc-codereview.appspot.com/40849004
git-svn-id: http://libyuv.googlecode.com/svn/trunk@1286 16f28f9a-4ce2-e073-06de-1de4eb20be90
2015-02-20 22:46:15 +00:00
fbarchard@google.com
0887315390
Remove bayer format support from libyuv. This format is very rare and used on legacy hardware. Its not well optimized and has bugs related to odd widths. Removing the format will allow tests to pass under more circumstances, run faster and allow focus on higher priority quality and performance issues.
...
BUG=301
TESTED=local unittests build/pass on windows gyp build.
R=harryjin@google.com
Review URL: https://webrtc-codereview.appspot.com/38059004
git-svn-id: http://libyuv.googlecode.com/svn/trunk@1270 16f28f9a-4ce2-e073-06de-1de4eb20be90
2015-02-09 19:58:19 +00:00
fbarchard@google.com
c4e032c543
change Y multiplier and bias to compensate for 257/256 which makes YToARGB exactly match float math.
...
Histogram Before
hist -3 -2 -1 0 1 2 3
red 0 0 1809408 13140736 1827072 0 0
green 0 0 1679912 13471329 1625975 0 0
blue 168448 994816 1876480 10655488 1893376 1006336 182272
Histogram After
hist -3 -2 -1 0 1 2 3
red 0 0 558848 15632128 586240 0 0
green 0 0 209907 16350588 216721 0 0
blue 14848 642816 1989376 11363328 2053120 695040 18688
BUG=394
TESTED=more stringent luma tests
R=brucedawson@google.com
Review URL: https://webrtc-codereview.appspot.com/38859004
git-svn-id: http://libyuv.googlecode.com/svn/trunk@1259 16f28f9a-4ce2-e073-06de-1de4eb20be90
2015-02-04 19:45:26 +00:00
fbarchard@google.com
4848b06016
YPixel subtract bias to match C code
...
BUG=392
TESTED=TestGreyYUV
R=harryjin@google.com
Review URL: https://webrtc-codereview.appspot.com/37799004
git-svn-id: http://libyuv.googlecode.com/svn/trunk@1253 16f28f9a-4ce2-e073-06de-1de4eb20be90
2015-01-26 23:58:20 +00:00
fbarchard@google.com
29db9b0b89
C version of YToARGB with ubias removed to produce consistent luma ramp.
...
BUG=392
TESTED=TestGreyYUV
R=harryjin@google.com
Review URL: https://webrtc-codereview.appspot.com/35869004
git-svn-id: http://libyuv.googlecode.com/svn/trunk@1251 16f28f9a-4ce2-e073-06de-1de4eb20be90
2015-01-26 23:07:46 +00:00
fbarchard@google.com
d12a08712b
adjust ubias to minimize error histogram centering error.
...
BUG=324
TESTED=TestFullYUV
R=harryjin@google.com
Review URL: https://webrtc-codereview.appspot.com/37739004
git-svn-id: http://libyuv.googlecode.com/svn/trunk@1248 16f28f9a-4ce2-e073-06de-1de4eb20be90
2015-01-23 22:16:33 +00:00
fbarchard@google.com
c62d30111f
adjust bias on Y channel so error histogram is better centered on green channel
...
BUG=324
TESTED=FullYUVTest
R=tpsiaki@google.com
Review URL: https://webrtc-codereview.appspot.com/38689004
git-svn-id: http://libyuv.googlecode.com/svn/trunk@1245 16f28f9a-4ce2-e073-06de-1de4eb20be90
2015-01-22 19:43:34 +00:00
fbarchard@google.com
319f047710
Compute chroma using negative coefficients to extend range of U contribution on B to 2
...
BUG=324
TESTED=TestI420
R=tpsiaki@google.com
Review URL: https://webrtc-codereview.appspot.com/41569004
git-svn-id: http://libyuv.googlecode.com/svn/trunk@1238 16f28f9a-4ce2-e073-06de-1de4eb20be90
2015-01-21 18:45:13 +00:00
fbarchard@google.com
3842299be8
YUV use same constant as asm then multiply by 0x0101 to replicate the value.
...
BUG=324
TESTED=try bots
R=harryjin@google.com
Review URL: https://webrtc-codereview.appspot.com/41559004
git-svn-id: http://libyuv.googlecode.com/svn/trunk@1235 16f28f9a-4ce2-e073-06de-1de4eb20be90
2015-01-21 00:11:44 +00:00
fbarchard@google.com
c3d09f6021
Improve accuracy of luma channel in YUV to RGB conversion
...
BUG=324
TESTED=TestFullYUV
R=harryjin@google.com
Review URL: https://webrtc-codereview.appspot.com/36859004
git-svn-id: http://libyuv.googlecode.com/svn/trunk@1233 16f28f9a-4ce2-e073-06de-1de4eb20be90
2015-01-20 23:42:15 +00:00
fbarchard@google.com
292c2286a6
prototype of a YUV to RGB function to achieve higher quality and performance at the same time. The chroma is made more accurate by using negative values that allow more range and then subtract the contributions from the luma contributes. The luma is made more accurate using a multiply that duplicates the Y bits out to 16 bits and then does a 2.14 bit fixed point coefficient. The replication is done for free as part of the multiply.
...
BUG=391
TESTED=TestYUV
R=harryjin@google.com
Review URL: https://webrtc-codereview.appspot.com/36819004
git-svn-id: http://libyuv.googlecode.com/svn/trunk@1232 16f28f9a-4ce2-e073-06de-1de4eb20be90
2015-01-20 18:21:16 +00:00
fbarchard@google.com
a5a15198b4
Add J422 support which is 2x1 subsampling with jpeg color space.
...
BUG=391
TESTED=color_test
R=tpsiaki@google.com
Review URL: https://webrtc-codereview.appspot.com/41479004
git-svn-id: http://libyuv.googlecode.com/svn/trunk@1228 16f28f9a-4ce2-e073-06de-1de4eb20be90
2015-01-14 19:16:01 +00:00
fbarchard@google.com
b2a6af1be6
Change rectangle low level functions to use more conventional row functions including 'any' variations. Previously the yuv function SetPlane stored 32 bit values. Now a more conventional memset() style function is used for YUV that stores bytes. On Haswell a rep stosb is used for YUV. Overall benefit of this CL is improved performance for 'any' width, and simpler row assembly instead of full image assembly. Previously ARGBRect used a low level function that supported a rectangle in assembly. Now it uses a row function, and relies on row coalesce to combine into a single low level call.
...
BUG=371
TESTED=untested
R=brucedawson@google.com , harryjin@google.com
Review URL: https://webrtc-codereview.appspot.com/35689004
git-svn-id: http://libyuv.googlecode.com/svn/trunk@1222 16f28f9a-4ce2-e073-06de-1de4eb20be90
2015-01-12 03:58:24 +00:00
fbarchard@google.com
992c3b089a
Use HAS_ARGBSETROWS_X86 to detect presence of function.
...
BUG=none
TESTED=rectangle unittests
R=harryjin@google.com
Review URL: https://webrtc-codereview.appspot.com/35639004
git-svn-id: http://libyuv.googlecode.com/svn/trunk@1218 16f28f9a-4ce2-e073-06de-1de4eb20be90
2015-01-07 00:11:51 +00:00
fbarchard@google.com
5304aaaed1
Use post bias to adjust for Y - 16 to improve performance.
...
BUG=388
TESTED=set LIBYUV_DISABLE_ASM=1 out\release\libyuv_unittest --gtest_catch_exceptions=0 --gtest_filter=*I420ToARGB_Opt
R=brucedawson@google.com , harryjin@google.com
Review URL: https://webrtc-codereview.appspot.com/35609004
git-svn-id: http://libyuv.googlecode.com/svn/trunk@1213 16f28f9a-4ce2-e073-06de-1de4eb20be90
2014-12-30 00:02:06 +00:00
fbarchard@google.com
40e3457574
J420ToARGB jpeg variation of YUV color space to ARGB.
...
BUG=241
TESTED=J420ToARGB unittest
R=harryjin@google.com
Review URL: https://webrtc-codereview.appspot.com/32929004
git-svn-id: http://libyuv.googlecode.com/svn/trunk@1212 16f28f9a-4ce2-e073-06de-1de4eb20be90
2014-12-29 19:17:53 +00:00
fbarchard@google.com
ca308327d2
Remove unaligned functions, since most function support unaligned memory now. This reduces complexity and improves performance for unaligned cases because C code can be avoided, and overhead is less. Downside is old cpus (core2 and earlier) will be slower for aligned memory case. Except mips, which has alignment requirement, but remove unaligned variant.
...
BUG=365
TESTED=unittest builds and passes locally
R=harryjin@google.com
Review URL: https://webrtc-codereview.appspot.com/24839004
git-svn-id: http://libyuv.googlecode.com/svn/trunk@1113 16f28f9a-4ce2-e073-06de-1de4eb20be90
2014-10-07 00:59:31 +00:00
fbarchard@google.com
d83f63a3b4
InterpolateRow used for scale handle unaligned memory. Remove HalfRow which is not used.
...
BUG=367
TESTED=unittest on I422ToI420
R=harryjin@google.com
Review URL: https://webrtc-codereview.appspot.com/28639004
git-svn-id: http://libyuv.googlecode.com/svn/trunk@1107 16f28f9a-4ce2-e073-06de-1de4eb20be90
2014-10-03 17:37:11 +00:00
ashok.bhat@gmail.com
c379d17195
Row AArch64 Neon implementation - Part 11
...
BUG=319
TESTED=libyuv_unittest
R=fbarchard@google.com
Change-Id: Id187c5cbdbbb5570598eb9fcd9c3d6699e175f03
Signed-off-by: Ashok Bhat <ashok.bhat@arm.com>
Review URL: https://webrtc-codereview.appspot.com/24759004
git-svn-id: http://libyuv.googlecode.com/svn/trunk@1096 16f28f9a-4ce2-e073-06de-1de4eb20be90
2014-09-29 18:10:20 +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
02ff4e77e5
clang compatibility ifdef
...
BUG=none
TEST=none
R=tpsiaki@google.com
Review URL: https://webrtc-codereview.appspot.com/7809004
git-svn-id: http://libyuv.googlecode.com/svn/trunk@978 16f28f9a-4ce2-e073-06de-1de4eb20be90
2014-01-31 00:27:40 +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
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
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
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
9fd689e5bf
Combines multiple allocs into one call.
...
BUG=300
TESTED=libyuv_unitests pass
R=tpsiaki@google.com
Review URL: https://webrtc-codereview.appspot.com/6459004
git-svn-id: http://libyuv.googlecode.com/svn/trunk@932 16f28f9a-4ce2-e073-06de-1de4eb20be90
2013-12-30 21:11:21 +00:00
fbarchard@google.com
d9c9f37ac4
Conversions use malloc for row buffers.
...
BUG=296
TESTED=libyuv convert_test
R=tpsiaki@google.com
Review URL: https://webrtc-codereview.appspot.com/6399004
git-svn-id: http://libyuv.googlecode.com/svn/trunk@928 16f28f9a-4ce2-e073-06de-1de4eb20be90
2013-12-27 02:00:30 +00:00