webm/libwebp.git
4 days agoMerge "MIPS: dspr2: added optimization for TrueMotion" master
James Zern [Thu, 26 Feb 2015 22:07:00 +0000 (14:07 -0800)]
Merge "MIPS: dspr2: added optimization for TrueMotion"

4 days agoWebPPictureRescale: add a note about 0 width/height 74/73874/2
James Zern [Thu, 26 Feb 2015 04:04:09 +0000 (20:04 -0800)]
WebPPictureRescale: add a note about 0 width/height

Change-Id: I3890bb3fd32a148d7dd24c714546160c6c59d4ea

4 days agoMIPS: dspr2: added optimization for TrueMotion 64/73864/2
Djordje Pesut [Wed, 25 Feb 2015 13:09:56 +0000 (14:09 +0100)]
MIPS: dspr2: added optimization for TrueMotion

affected functions:
      TM4 - TrueMotion4
      TM8uv - TrueMotion8
      TM16 - TrueMotion16

Change-Id: Iff4377c4b0ae94716789c03fe1cd5bfd91f79188

5 days agoexamples/Android.mk: add webpmux_example target 62/73862/2
James Zern [Wed, 25 Feb 2015 02:49:44 +0000 (18:49 -0800)]
examples/Android.mk: add webpmux_example target

renamed from 'webpmux' to avoid name clash with the library module name

Change-Id: I33bbdbdcb25a6f35bd85c9a0dbbb93b2428b05f3

5 days agoAndroid.mk: add webpmux target 61/73861/1
James Zern [Wed, 25 Feb 2015 02:49:31 +0000 (18:49 -0800)]
Android.mk: add webpmux target

Change-Id: I60fc898fd804e23f08d760694192c5d04adcae91

5 days agoAndroid.mk: add webpdemux target 60/73860/1
James Zern [Wed, 25 Feb 2015 02:38:58 +0000 (18:38 -0800)]
Android.mk: add webpdemux target

Change-Id: I2fbbefbee59a96c52f5addcfc5bfe1216caad5cc

5 days agoAndroid.mk: add webpdecoder{,_static} targets 59/73859/1
James Zern [Wed, 25 Feb 2015 02:25:06 +0000 (18:25 -0800)]
Android.mk: add webpdecoder{,_static} targets

webpdecoder_static is reused to create libwebpdecoder.so and
libwebp.{a,so}

Change-Id: I940293cb755040c0ea45dc13f22624de8f355867

5 days agoAndroid.mk: split source lists per-directory 58/73858/1
James Zern [Wed, 25 Feb 2015 01:26:07 +0000 (17:26 -0800)]
Android.mk: split source lists per-directory

will allow reuse in future targets

Change-Id: Iededc19d954226e62f2d2383a2b80f268d613647

6 days agoMIPS: dspr2: Added optimization for some convert functions 49/73849/1
Djordje Pesut [Tue, 24 Feb 2015 09:51:34 +0000 (10:51 +0100)]
MIPS: dspr2: Added optimization for some convert functions

affected functions:
      VP8LConvertBGRAToRGBA4444_C
      VP8LConvertBGRAToRGB565_C
      VP8LConvertBGRAToBGR_C

Change-Id: I81513d242d33ebb9fef397ee6a2ca75d17f66e97

7 days agoMIPS: dspr2: Added optimization for some convert functions 21/73821/1
Djordje Pesut [Mon, 23 Feb 2015 16:44:06 +0000 (17:44 +0100)]
MIPS: dspr2: Added optimization for some convert functions

affected functions:
  VP8LConvertBGRAToRGB_C
  VP8LConvertBGRAToRGBA_C

Change-Id: I5f25795c385688f2432d0710296e589f3793cb2b

7 days agoMIPS: [mips32|dspr2]: GetResidualCost rebased 10/73810/3
Djordje Pesut [Fri, 20 Feb 2015 11:34:09 +0000 (12:34 +0100)]
MIPS: [mips32|dspr2]: GetResidualCost rebased

Change-Id: Ie15524c773f7a8c79e002097881a508187ca7cc6

10 days agoSpeedup method StoreImageToBitMask by 5%. 13/73813/1
Vikas Arora [Fri, 20 Feb 2015 17:45:32 +0000 (09:45 -0800)]
Speedup method StoreImageToBitMask by 5%.

Speedup method StoreImageToBitMask by replacing the code to find histogram
index and Huffman tree codes at every iteration to a more optimal code that
updates these only when the current pixel (to write) crosses the histogram
tile-row boundary.

This change speeds up the StoreImageToBitMask method by 5%.

Change-Id: If01a1ccd7820f9a3a3e5bc449d070defa51be14b

11 days agofix iOS arm64 build with Xcode 6.3 07/73807/1
James Zern [Thu, 19 Feb 2015 20:16:58 +0000 (12:16 -0800)]
fix iOS arm64 build with Xcode 6.3

the standard vtbl functions are available there [1][2].
based on a patch from: aaroncrespo
fixes issue #243.

[1]
http://adcdownload.apple.com//Developer_Tools/Xcode_6.3_beta/Xcode_6.3_beta_Release_Notes.pdf
[2] Apple LLVM Compiler Version 6.1
- Xcode 6.3 updates the Apple LLVM compiler to version 6.1.0.
[...]
Support for the arm64 architecture has been significantly revised to
align with ARM's implementation, where the most visible impact is that a
few of the vector intrinsics have changed to match ARM's specifications.

Change-Id: I79a0016f44b9dbe36d0373f7f00a50ab3c2ca447

11 days ago1-2% faster encoding by removing an indirection in GetResidualCost() 04/73804/1
Pascal Massimino [Thu, 19 Feb 2015 07:44:35 +0000 (08:44 +0100)]
1-2% faster encoding by removing an indirection in GetResidualCost()

The MIPS code for cost is not updated yet, that's why i keep Residual::*cost
around for now. Should be removed in favor of *costs later.

Change-Id: Id1d09a8c37ea8c5b34ad5eb8811d6a3ec6c4d89f

12 days agoMIPS: dspr2: added otpimization for DC8uv, DC8uvNoTop and DC8uvNoLeft 99/73799/2
Djordje Pesut [Wed, 18 Feb 2015 15:23:39 +0000 (16:23 +0100)]
MIPS: dspr2: added otpimization for DC8uv, DC8uvNoTop and DC8uvNoLeft

added macros for load/store

Change-Id: I151d4d49bf1fab87fc3a82cb8e8e0835fe10b690

12 days agoMIPS: dspr2: added optimization for functions RD4 and LD4 98/73798/4
Djordje Pesut [Wed, 18 Feb 2015 13:00:46 +0000 (14:00 +0100)]
MIPS: dspr2: added optimization for functions RD4 and LD4

Change-Id: I71216c1300f4eb254de4ae940ea9dcdba50aa080

12 days agoMerge "4-5% faster encoding using SSE2 for GetResidualCost"
Pascal Massimino [Wed, 18 Feb 2015 12:46:53 +0000 (04:46 -0800)]
Merge "4-5% faster encoding using SSE2 for GetResidualCost"

12 days agoMIPS: dspr2: added optimizaton for functions VE4 and DC4 97/73797/1
Djordje Pesut [Wed, 18 Feb 2015 10:25:08 +0000 (11:25 +0100)]
MIPS: dspr2: added optimizaton for functions VE4 and DC4

Change-Id: I118adc6d3872742d8b1f9dbac438cba6fc90b7a9

12 days ago4-5% faster encoding using SSE2 for GetResidualCost 96/73796/1
Pascal Massimino [Wed, 18 Feb 2015 08:40:30 +0000 (09:40 +0100)]
4-5% faster encoding using SSE2 for GetResidualCost

new file: cost_sse2.c

Change-Id: I4896c07f5ff2443ef743f4435fe2758d95a672ed

13 days agoMerge "MIPS: dspr2: added optimization for simple filtering functions"
James Zern [Tue, 17 Feb 2015 22:57:05 +0000 (14:57 -0800)]
Merge "MIPS: dspr2: added optimization for simple filtering functions"

2 weeks agoMerge "dsp: normalize WEBP_TSAN_IGNORE_FUNCTION usage"
pascal massimino [Sat, 14 Feb 2015 09:57:08 +0000 (01:57 -0800)]
Merge "dsp: normalize WEBP_TSAN_IGNORE_FUNCTION usage"

2 weeks agodsp: normalize WEBP_TSAN_IGNORE_FUNCTION usage 87/73787/1
James Zern [Fri, 13 Feb 2015 08:24:25 +0000 (00:24 -0800)]
dsp: normalize WEBP_TSAN_IGNORE_FUNCTION usage

the attribute is only necessary in one location; remove it from the
prototypes.

Change-Id: I3820a3c34fbb029fd7ac69a1b0a9b76091bdbde2

2 weeks agoMIPS: dspr2: added optimization for simple filtering functions 78/73778/1
Djordje Pesut [Fri, 13 Feb 2015 08:24:53 +0000 (09:24 +0100)]
MIPS: dspr2: added optimization for simple filtering functions

affected functions: SimpleVFilter16, SimpleHFilter16,
                    SimpleVFilter16i and SimpleHFilter16i

noticed bug in FilterLoop26 (fix included in this patch)

Change-Id: I72d9c1e45cbac6393eba52bb549b04924d463e30

2 weeks agoMerge "MIPS: dspr2: Added optimization for function VP8LTransformColorInverse_C"
pascal massimino [Fri, 13 Feb 2015 08:12:52 +0000 (00:12 -0800)]
Merge "MIPS: dspr2: Added optimization for function VP8LTransformColorInverse_C"

2 weeks agoMIPS: dspr2: Added optimization for function VP8LTransformColorInverse_C 77/73777/2
Djordje Pesut [Fri, 13 Feb 2015 06:53:29 +0000 (07:53 +0100)]
MIPS: dspr2: Added optimization for function VP8LTransformColorInverse_C

Change-Id: I8b60e22c9f6c0badab6267a33751dfc28750f457

2 weeks agoMerge "ApplyFiltersAndEncode: only copy lossless stats"
pascal massimino [Fri, 13 Feb 2015 07:47:55 +0000 (23:47 -0800)]
Merge "ApplyFiltersAndEncode: only copy lossless stats"

2 weeks agodoc/webp-container-spec: note MSB order for chunk diagrams 76/73776/1
James Zern [Fri, 13 Feb 2015 04:15:47 +0000 (20:15 -0800)]
doc/webp-container-spec: note MSB order for chunk diagrams

addresses question in issue #241

Change-Id: Iff6a172d5822f6ec8b9bc0951a1c9cd3f98c9251

2 weeks agoApplyFiltersAndEncode: only copy lossless stats 75/73775/1
James Zern [Fri, 13 Feb 2015 03:44:25 +0000 (19:44 -0800)]
ApplyFiltersAndEncode: only copy lossless stats

this avoids a race with multi-threaded lossy + alpha compression

Change-Id: Ie437105f5a899ed28b9c8885b6ca5431092ce8f5

2 weeks agoMerge "dsp/mips: add some missing TSan annotations"
James Zern [Thu, 12 Feb 2015 22:55:32 +0000 (14:55 -0800)]
Merge "dsp/mips: add some missing TSan annotations"

2 weeks agoMerge "MIPS: dspr2: Added optimization for function VP8LAddGreenToBlueAndRed_C"
pascal massimino [Thu, 12 Feb 2015 22:48:17 +0000 (14:48 -0800)]
Merge "MIPS: dspr2: Added optimization for function VP8LAddGreenToBlueAndRed_C"

2 weeks agodsp/mips: add some missing TSan annotations 73/73773/1
James Zern [Thu, 12 Feb 2015 22:36:33 +0000 (14:36 -0800)]
dsp/mips: add some missing TSan annotations

Change-Id: I3c832aefdeac26c6c75c35b19b45c1a2f67493c5

2 weeks agoMIPS: dspr2: Added optimization for function VP8LAddGreenToBlueAndRed_C 49/73749/2
Djordje Pesut [Wed, 11 Feb 2015 10:24:12 +0000 (11:24 +0100)]
MIPS: dspr2: Added optimization for function VP8LAddGreenToBlueAndRed_C

Change-Id: If897c6c2f1c4b8405789298e135d6a1e4bf13012

2 weeks agomove some cost tables from enc/ to dsp/ 66/73766/1
James Zern [Thu, 12 Feb 2015 00:09:07 +0000 (16:09 -0800)]
move some cost tables from enc/ to dsp/

removes circular dependency between dsp and enc.

since:
a987fae MIPS: dspr2: added optimization for function GetResidualCost

Change-Id: Ifeb8fc02de89e2ba982ed7ffacd925d649bfec3c

2 weeks agoMerge "picture_csp: fix build w/USE_GAMMA_COMPRESSION undefined"
pascal massimino [Tue, 10 Feb 2015 08:09:03 +0000 (00:09 -0800)]
Merge "picture_csp: fix build w/USE_GAMMA_COMPRESSION undefined"

2 weeks agoMerge "VP8LDspInitMIPSdspR2: add missing TSan annotation"
pascal massimino [Tue, 10 Feb 2015 08:02:41 +0000 (00:02 -0800)]
Merge "VP8LDspInitMIPSdspR2: add missing TSan annotation"

2 weeks agopicture_csp: fix build w/USE_GAMMA_COMPRESSION undefined 38/73738/1
James Zern [Tue, 10 Feb 2015 07:57:14 +0000 (23:57 -0800)]
picture_csp: fix build w/USE_GAMMA_COMPRESSION undefined

kGammaFix is now only defined with USE_GAMMA_COMPRESSION;

fixes:
use of undeclared identifier 'kGammaFix'

Change-Id: Ib1e2f410eff9b83be065894f88181f91dd2776e1

2 weeks agoVP8LDspInitMIPSdspR2: add missing TSan annotation 36/73736/2
James Zern [Tue, 10 Feb 2015 07:06:28 +0000 (23:06 -0800)]
VP8LDspInitMIPSdspR2: add missing TSan annotation

Change-Id: Ic0d84e95daf063976b40fb5ba1e94d3547e2afba

2 weeks agoMerge "VP8LDspInit: remove memcpy"
pascal massimino [Tue, 10 Feb 2015 07:48:44 +0000 (23:48 -0800)]
Merge "VP8LDspInit: remove memcpy"

2 weeks agopicture_csp::InitGammaTables*: add missing TSan annotations 35/73735/2
James Zern [Tue, 10 Feb 2015 06:43:08 +0000 (22:43 -0800)]
picture_csp::InitGammaTables*: add missing TSan annotations

Change-Id: I66ca5b3e7b1614f861a9b68bd437f58b24cb1ebb

2 weeks agoVP8LDspInit: remove memcpy 37/73737/1
James Zern [Tue, 10 Feb 2015 07:39:47 +0000 (23:39 -0800)]
VP8LDspInit: remove memcpy

without this change the TSan annotation is useless

Change-Id: Ief511379f3aad75889815d4fe8362aed5c1abac7

2 weeks agoVP8YUVInit: add missing TSan annotation 34/73734/1
James Zern [Tue, 10 Feb 2015 06:42:12 +0000 (22:42 -0800)]
VP8YUVInit: add missing TSan annotation

Change-Id: I7f8868de425e1aac3721b3e328844725104d14db

2 weeks agodsp/enc::InitTables: add missing TSan annotation 33/73733/1
James Zern [Tue, 10 Feb 2015 06:40:45 +0000 (22:40 -0800)]
dsp/enc::InitTables: add missing TSan annotation

Change-Id: I262b9071417a0ec502c7c0380f27da6413cc74e4

2 weeks agoVP8EncDspCostInit*: add missing TSan annotations 32/73732/1
James Zern [Tue, 10 Feb 2015 06:39:14 +0000 (22:39 -0800)]
VP8EncDspCostInit*: add missing TSan annotations

Change-Id: I4cdb84bc8c9a8c6aa34b5773c8fb69e5810a9809

3 weeks agoMerge "doc/webp-container-spec: cosmetics"
James Zern [Mon, 9 Feb 2015 22:37:45 +0000 (14:37 -0800)]
Merge "doc/webp-container-spec: cosmetics"

3 weeks agoMIPS: mips32: Added optimization for function SetResidualCoeffs 12/73712/4
Djordje Pesut [Mon, 9 Feb 2015 09:56:23 +0000 (10:56 +0100)]
MIPS: mips32: Added optimization for function SetResidualCoeffs

Change-Id: If67c10285df71ba7dd1aff6c24c2145c280dd2bf

3 weeks agoMIPS: dspr2: added optimization for function GetResidualCost 99/73699/5
Pascal Massimino [Sat, 7 Feb 2015 10:13:26 +0000 (02:13 -0800)]
MIPS: dspr2: added optimization for function GetResidualCost

set/get residual C functions moved to new file in src/dsp
mips32 version of GetResidualCost moved to new file

Change-Id: I7cebb7933a89820ff28c187249a9181f281081d2

3 weeks agodoc/webp-container-spec: cosmetics 06/73706/1
James Zern [Fri, 6 Feb 2015 22:50:49 +0000 (14:50 -0800)]
doc/webp-container-spec: cosmetics

partially normalize indent, vertical whitespace and capitalization with
the copy used on developers.google.com/speed/webp

Change-Id: I8044418eeb9eaf5bd5c799675c74f6f845d503d6

3 weeks agoMerge "VP8TBufferClear: remove some misleading const's"
pascal massimino [Fri, 6 Feb 2015 10:01:15 +0000 (02:01 -0800)]
Merge "VP8TBufferClear: remove some misleading const's"

3 weeks agoMerge "VP8EmitTokens: remove unnecessary param void cast"
pascal massimino [Fri, 6 Feb 2015 10:00:16 +0000 (02:00 -0800)]
Merge "VP8EmitTokens: remove unnecessary param void cast"

3 weeks agoVP8TBufferClear: remove some misleading const's 98/73698/1
James Zern [Thu, 5 Feb 2015 03:56:34 +0000 (19:56 -0800)]
VP8TBufferClear: remove some misleading const's

the input to the function is non-const and the pointer being operated is
being free'd; removes an unnecessary cast in the process

Change-Id: Ic515ed672ddf7f8e4e36eeac696ff7aa8a3652f7

3 weeks agoVP8EmitTokens: remove unnecessary param void cast 97/73697/1
James Zern [Thu, 5 Feb 2015 03:57:56 +0000 (19:57 -0800)]
VP8EmitTokens: remove unnecessary param void cast

'final_pass' is used within the function

Change-Id: I81be1a6e18cafaa6ae685ed8ad2b107fa7ed29cf

3 weeks agocosmetics: upsampling_sse2: add const to some casts 96/73696/1
James Zern [Thu, 5 Feb 2015 03:54:12 +0000 (19:54 -0800)]
cosmetics: upsampling_sse2: add const to some casts

source pointers are often cast to __m128*, retain the const in those
cases

Change-Id: Ia6df6690c85f580b20f19ce85cc6ec7b52620aee

3 weeks agocosmetics: lossless_sse2: add const to some casts 95/73695/1
James Zern [Thu, 5 Feb 2015 03:53:47 +0000 (19:53 -0800)]
cosmetics: lossless_sse2: add const to some casts

source pointers are often cast to __m128*, retain the const in those
cases

Change-Id: I2405b18c6bb829b76c3a9814057ccbe6e14220d9

3 weeks agocosmetics: enc_sse2: add const to some casts 94/73694/1
James Zern [Thu, 5 Feb 2015 03:53:25 +0000 (19:53 -0800)]
cosmetics: enc_sse2: add const to some casts

source pointers are often cast to __m128*, retain the const in those
cases

Change-Id: Ib85d63abbb9fc33096f893c2524d3ce8ae3ebd03

3 weeks agocosmetics: dec_sse2: add const to some casts 93/73693/1
James Zern [Thu, 5 Feb 2015 03:52:59 +0000 (19:52 -0800)]
cosmetics: dec_sse2: add const to some casts

source pointers are often cast to __m128*, retain the const in those
cases

Change-Id: I77decb55f1382bea4b646a11b77dfa40bf1ef94d

3 weeks agocosmetics: argb_sse2: add const to some casts 92/73692/1
James Zern [Thu, 5 Feb 2015 03:52:32 +0000 (19:52 -0800)]
cosmetics: argb_sse2: add const to some casts

source pointers are often cast to __m128*, retain the const in those
cases

Change-Id: I87fa2de11dafcc77767aab64e13b8c5585ebf5cd

3 weeks agocosmetics: alpha_processing_sse2: add const to some casts 91/73691/1
James Zern [Thu, 5 Feb 2015 03:47:47 +0000 (19:47 -0800)]
cosmetics: alpha_processing_sse2: add const to some casts

source pointers are often cast to __m128*, retain the const in those
cases

Change-Id: I00ba15af2f43d125ceb2620e82fd43d420fbb9d3

3 weeks agovwebp: clear canvas at the beginning of each loop 90/73690/1
James Zern [Fri, 6 Feb 2015 05:09:27 +0000 (21:09 -0800)]
vwebp: clear canvas at the beginning of each loop

this is in line with the recommendation in the spec, cf.,
5603947 webp-container-spec: clarify background clear on loop

Change-Id: Id3910395b05a1a1f2804be841b61f97bd4bac593

3 weeks agoMerge "webp-container-spec: clarify background clear on loop"
pascal massimino [Thu, 5 Feb 2015 22:44:27 +0000 (14:44 -0800)]
Merge "webp-container-spec: clarify background clear on loop"

3 weeks agoUpdated the near-lossless level mapping. 78/73678/1
Vikas Arora [Thu, 5 Feb 2015 19:16:37 +0000 (11:16 -0800)]
Updated the near-lossless level mapping.

Updated the near-lossless level mapping and make it correlated to lossy
quality i.e 100 => minimum loss (in-fact no-loss) and the visual-quality loss
increases with decrease in near-lossless level (quality) till value 0.

The new mapping implies following (PSNR) loss-metric:
-near_lossless 100: No-loss (bit-stream same as -lossless).
-near_lossless  80: Very very high PSNR (around 54dB).
-near_lossless  60: Very high PSNR (around 48dB).
-near_lossless  40: High PSNR (around 42dB).
-near_lossless  20: Moderate PSNR (around 36dB).
-near_lossless   0: Low PSNR (around 30dB).

Change-Id: I930de4b18950faf2868c97d42e9e49ba0b642960

3 weeks agowebp-container-spec: clarify background clear on loop 75/73675/1
James Zern [Thu, 5 Feb 2015 02:07:00 +0000 (18:07 -0800)]
webp-container-spec: clarify background clear on loop

at the beginning of the loop there's an implicit clear of the entire
canvas to the background (or application defined) color. this avoids
adding the final composited frame to the first.

Change-Id: Ia3a52cf4482c6176334a5c9c99a0ddd07d1776e7

3 weeks agoImplement true-motion prediction in SSE2 68/73668/1
Pascal Massimino [Wed, 4 Feb 2015 16:02:22 +0000 (17:02 +0100)]
Implement true-motion prediction in SSE2

(along with DC/HE/VE for chroma/luma16)

Overall effect is ~1% faster decoding.

Change-Id: I90917e050d61874cbc8da0e88f26b5dd6131c265

3 weeks agomake VP8PredLuma16[] array non-const 67/73667/1
Pascal Massimino [Wed, 4 Feb 2015 16:00:22 +0000 (17:00 +0100)]
make VP8PredLuma16[] array non-const

Change-Id: I0ce7e4e847f9fffefb6544db9636068442a2d264

3 weeks agoMerge "MIPS: dspr2: Added optimization for function CollectHistogram"
Djordje Pesut [Wed, 4 Feb 2015 06:42:32 +0000 (22:42 -0800)]
Merge "MIPS: dspr2: Added optimization for function CollectHistogram"

3 weeks agoUse integers for kmin/kmax for simplicity. 58/73658/1
Urvang Joshi [Tue, 3 Feb 2015 21:57:52 +0000 (13:57 -0800)]
Use integers for kmin/kmax for simplicity.

Change-Id: I62237975d663641552107759af8d2d329b70a7c4

3 weeks agoAnimEncode API: kmax=0 should imply all keyframes. 56/73656/1
Urvang Joshi [Tue, 3 Feb 2015 19:42:13 +0000 (11:42 -0800)]
AnimEncode API: kmax=0 should imply all keyframes.

Earlier, it wasn't adding any keyframes at all.

Change-Id: If3824fc8e57548b8610a52e875fb9279f862fa57

3 weeks agoMIPS: dspr2: Added optimization for function CollectHistogram 48/73648/2
Djordje Pesut [Tue, 3 Feb 2015 07:38:08 +0000 (08:38 +0100)]
MIPS: dspr2: Added optimization for function CollectHistogram

Change-Id: Id6b87ea1c9d21fee9494ad6c53ffc84ef60d5974

3 weeks agovwebp: remove unnecessary static Help() prototype 47/73647/1
James Zern [Tue, 3 Feb 2015 07:35:01 +0000 (23:35 -0800)]
vwebp: remove unnecessary static Help() prototype

all uses occur after its declaration

Change-Id: I775642ce6d1dec3bc6da2fa0d5d87490992c7e6c

3 weeks agoMerge "dec/vp8: clear 'dither_' on skipped blocks"
pascal massimino [Tue, 3 Feb 2015 07:04:40 +0000 (23:04 -0800)]
Merge "dec/vp8: clear 'dither_' on skipped blocks"

3 weeks agoMerge "vwebp/animation: display last frame on end-of-loop"
pascal massimino [Tue, 3 Feb 2015 07:03:22 +0000 (23:03 -0800)]
Merge "vwebp/animation: display last frame on end-of-loop"

3 weeks agovwebp/animation: display last frame on end-of-loop 46/73646/1
James Zern [Tue, 3 Feb 2015 04:05:54 +0000 (20:05 -0800)]
vwebp/animation: display last frame on end-of-loop

previously the first frame would be redisplayed, which might be
unexpected if the final frame was meant to be a composite, for example.

Change-Id: I4da795623c71501e2fa426e8fba8fb2ffcbab58a

3 weeks agoenc/near_lossless.c: fix alignment 44/73644/1
James Zern [Tue, 3 Feb 2015 03:35:12 +0000 (19:35 -0800)]
enc/near_lossless.c: fix alignment

Change-Id: Ifd1b1b88c375abf655d94e2ba7d52087110294a5

3 weeks agodec/vp8: clear 'dither_' on skipped blocks 45/73645/1
James Zern [Tue, 3 Feb 2015 03:28:34 +0000 (19:28 -0800)]
dec/vp8: clear 'dither_' on skipped blocks

DitherRow() only checks this value, not 'skip_' so previously it was
uninitialized for these blocks.

Change-Id: I0f698b81854ee9d91edacb51c1e3bdab9cba96f2

4 weeks agoMerge "lossless_neon: enable subtract green for aarch64"
James Zern [Tue, 3 Feb 2015 00:01:40 +0000 (16:01 -0800)]
Merge "lossless_neon: enable subtract green for aarch64"

4 weeks agoSSE2 version of GradientUnfilter 36/73636/1
Pascal Massimino [Sat, 31 Jan 2015 22:16:10 +0000 (23:16 +0100)]
SSE2 version of GradientUnfilter

somewhat 1-2% faster decoder for lossy+alpha

Change-Id: Ib317e26e9fcb8d37af02668ffbfccc4664e659fe

4 weeks agolossless_neon: enable subtract green for aarch64 35/73635/1
James Zern [Sat, 31 Jan 2015 17:47:15 +0000 (09:47 -0800)]
lossless_neon: enable subtract green for aarch64

similar to:
1ba61b0 enable NEON intrinsics in aarch64 builds

vtbl1_u8 is available everywhere but Xcode-based iOS arm64 builds, use
vtbl1q_u8 there.

performance varies based on the input, 1-3% on encode was observed

Change-Id: Ifec35b37eb856acfcf69ed7f16fa078cd40b7034

4 weeks agoSpeedup AnalyzeAndInit for low effort compression. 28/73628/1
Vikas Arora [Fri, 30 Jan 2015 18:31:14 +0000 (10:31 -0800)]
Speedup AnalyzeAndInit for low effort compression.

AnalyzeSubtractGreen constitutes about 8-10% of the comression CPU cycles.
Statistically, subtract-green is proved to be useful for most of the
non-palette compression. So instead of evaluating the entropy (by calling
AnalyzeSubtractGreen) apply subtract-green transform for the low-effort
compression.

This changes speeds up the compression at m=0 by 8-10% (with very slight loss
of 0.07% in the compression density).

Change-Id: I9797dc39437ae089716acb14631bbc77d367acf4

4 weeks agoSpeedup Analyze methods for lossless compression. 23/73623/2
Vikas Arora [Fri, 30 Jan 2015 17:08:30 +0000 (09:08 -0800)]
Speedup Analyze methods for lossless compression.

Speed up AnalyzeSubtractGreen by looping through the image pixel once to
compute the two histograms.

AnalyzeEntropy code cleanup.
Removed some 'if' conditions and pointer indirections inside pixel iterate loop.

Change-Id: Ia65e3033988ff67df8e3ecce19d6e34cfc76358e

4 weeks agoEnable Near-lossless feature. 22/73622/1
Vikas Arora [Fri, 30 Jan 2015 00:02:09 +0000 (16:02 -0800)]
Enable Near-lossless feature.

Enable the WebP near-lossless feature by pre-processing the image to smoothen
the pixels.

On a 1000 PNG image corpus, for which WebP lossless (default settings) gets
25% compression gains, following is the performance of near-lossless feature
at various '-near_lossless' levels:
-near_lossless 90: 30% (very very high PSNR 54-60dB)
-near_lossless 75: 38% (very high PSNR 48-54dB)
-near_lossless 50: 45% (high PSNR 42-48dB)
-near_lossless 25: 48% (moderate PSNR 36-42dB)
-near_lossless 10: 50% (PSNR 30-36dB)

WebP near-lossless is specifically useful for discrete-tone images like
line-art, icons etc.

Change-Id: I7d12a2c9362ccd076d09710ea05c85fa64664c38

4 weeks agoAnimEncoder API: Fix for kmax=1 and default kmin case. 15/73615/1
Urvang Joshi [Thu, 29 Jan 2015 21:26:01 +0000 (13:26 -0800)]
AnimEncoder API: Fix for kmax=1 and default kmin case.

Some frames that were previously selected as key-frames were incorrectly
being reset to sub-frames.

Change-Id: Iee342dbb9a9aec144b8185c3b54ca56aa7038bfb

4 weeks agoadd SSE2 variants for alpha filtering functions 10/73610/2
Pascal Massimino [Thu, 29 Jan 2015 07:06:29 +0000 (08:06 +0100)]
add SSE2 variants for alpha filtering functions

The 'inverse' variants are harder to parallelize, since
the result of filtering is used for prediction.
The 'direct' way is relatively easier.

The heavy bottleneck left for optimization is still GradientUnfilter()

Change-Id: I358008f492a887e8fff6600cb27857b18dee86e9

4 weeks agoTemporarily disable encoding of alpha plane with color cache. 07/73607/1
Urvang Joshi [Wed, 28 Jan 2015 23:28:02 +0000 (15:28 -0800)]
Temporarily disable encoding of alpha plane with color cache.

This is to avoid triggering the related decoder bug.

Change-Id: I8fa074a5393bcd62aa4a2232cd4e02935e927a89

4 weeks agoMerge "Lossless decoding: Remove an unnecessary if condition."
James Zern [Wed, 28 Jan 2015 07:35:10 +0000 (23:35 -0800)]
Merge "Lossless decoding: Remove an unnecessary if condition."

4 weeks agoMerge "Simplify backward refs calculation for low-effort."
James Zern [Wed, 28 Jan 2015 07:32:21 +0000 (23:32 -0800)]
Merge "Simplify backward refs calculation for low-effort."

4 weeks agoAlpha coding: reorganize the filter/unfiltering code 01/73601/1
Pascal Massimino [Wed, 28 Jan 2015 07:02:41 +0000 (08:02 +0100)]
Alpha coding: reorganize the filter/unfiltering code

Move the filtering code to their own dsp/ spot
New function: VP8FiltersInit()

Change-Id: I0b2041eab42346c59b972f2575b05509e6a8f7b1

4 weeks agoSimplify backward refs calculation for low-effort. 97/73597/1
Vikas Arora [Tue, 27 Jan 2015 17:35:32 +0000 (09:35 -0800)]
Simplify backward refs calculation for low-effort.

Simplify and speedup backward references for low-effort settings by evaluating
LZ77 references only. This change speeds up compression by 10-25% at lower
(q <= 25) quality range with a slight drop (0.2%) in the compression density.

Change-Id: Ibd6f03b1a062d8ab9191786c2a425e9132e4779f

5 weeks agoCleaup Near-lossless code. 89/73589/2
Vikas Arora [Mon, 26 Jan 2015 22:55:54 +0000 (14:55 -0800)]
Cleaup Near-lossless code.

Cleaup Near-lossless code
- Simplified and refactored the code.
- Removed the requirement (TODO) to allocate the buffer of size WxH and work
  with buffer of size 3xW.
- Disabled the Near-lossless prr-processing for small icon images (W < 64 and H < 64).

Change-Id: Id7ee90c90622368d5528de4dd14fd5ead593bb1b

5 weeks agoRemove the post-transform near-lossless heuristic. 88/73588/2
Vikas Arora [Mon, 26 Jan 2015 21:18:17 +0000 (13:18 -0800)]
Remove the post-transform near-lossless heuristic.

Remove the post-transform (prediction, subtract green & cross-color)
near-lossless heuristic, that's not ready yet and produces unacceptable visual
(banding) artifacts.

Change-Id: I9b606a790ce0344c588f2ef83a09c57ac19c2fc1

5 weeks agoLossless decoding: Remove an unnecessary if condition. 82/73582/1
Urvang Joshi [Fri, 23 Jan 2015 23:10:49 +0000 (15:10 -0800)]
Lossless decoding: Remove an unnecessary if condition.

Change-Id: I4e32da538d7b8563305124fb5faa1f7ce8a976d1

5 weeks agoMerge "Regression fix for lossless decoding"
pascal massimino [Fri, 23 Jan 2015 21:51:21 +0000 (13:51 -0800)]
Merge "Regression fix for lossless decoding"

5 weeks agoRegression fix for lossless decoding 80/73580/1
Urvang Joshi [Fri, 23 Jan 2015 20:12:27 +0000 (12:12 -0800)]
Regression fix for lossless decoding

Reported here: https://code.google.com/p/webp/issues/detail?id=239

At the beginning of method 'DecodeImageData', pixels up to
'dec->last_pixel_' are assumed to be already cached. So, at the end of
previous call to that method also, that assumption should hold true.

Hence, we should cache all pixels up to 'src' regardless of 'src_last'.

This affects lossless incremental decoding only, as that is when
src_last and src_end differ.
Note: alpha decoding is implicitly incremental, as alpha decoding of
only the rows 'y_end - y_start' happens during FinishRow() call. So, this bug
affects alpha decoding in non-incremental decoding flow as well.

This bug was introduced in: https://gerrit.chromium.org/gerrit/#/c/59716.

Change-Id: Ide6edfeb2609b02aff701e1bd9fd776da0a16be0

5 weeks agoAnimEncoder: Bugfix for kmin = 1 and kmax = 2. 76/73576/1
Urvang Joshi [Fri, 23 Jan 2015 18:48:59 +0000 (10:48 -0800)]
AnimEncoder: Bugfix for kmin = 1 and kmax = 2.

SanitizeEncoderOptions() was changing kmin to 2 too, which resulted in a
bad state with kmin == kmax.

Change-Id: Ie7273f1949bac469e7e6c8efbc98b154caf6de0f

5 weeks agosimplify smart RGB->YUV conversion code 74/73574/1
Pascal Massimino [Fri, 23 Jan 2015 13:42:32 +0000 (14:42 +0100)]
simplify smart RGB->YUV conversion code

* use the same TFIX == YFIX precision (2bits)
* use int instead of float in LinearToGammaF()

output is visually equivalent. Code is a little faster.

Change-Id: Ie3cfebca351dbcbd924b3d00801d6523dca6981f

5 weeks agoBackwardReferencesHashChainFollowChosenPath: remove unused variable 72/73572/1
Pascal Massimino [Mon, 19 Jan 2015 20:31:56 +0000 (20:31 +0000)]
BackwardReferencesHashChainFollowChosenPath: remove unused variable

Change-Id: I8dc4622dbacca03a7876f8856a0db5b9b9ec2fbd

5 weeks agoFix to near lossless artefacts on palettized images. 64/73564/1
Pascal Massimino [Thu, 22 Jan 2015 16:47:50 +0000 (17:47 +0100)]
Fix to near lossless artefacts on palettized images.

Don't rely on palette not being there before the palette colors are counted.

Change-Id: I988286675d3398f2da8f6d2fb6462db08af8028d

5 weeks agoMerge changes Ia1686828,I399fda40
Pascal Massimino [Thu, 22 Jan 2015 08:08:27 +0000 (00:08 -0800)]
Merge changes Ia1686828,I399fda40

* changes:
  rename HashChainInit into HashChainReset
  use uint16_t for chosen_path[]

5 weeks agorename HashChainInit into HashChainReset 46/73546/1
Pascal Massimino [Tue, 20 Jan 2015 08:38:07 +0000 (00:38 -0800)]
rename HashChainInit into HashChainReset

this avoids the confusion with "VP8LHashChainInit"

Change-Id: Ia1686828c138729e5bda3cc5c8246d99c80915ef

5 weeks agouse uint16_t for chosen_path[] 45/73545/1
Pascal Massimino [Tue, 20 Jan 2015 08:34:09 +0000 (00:34 -0800)]
use uint16_t for chosen_path[]

len is MAX_LENGTH (4096) at max. This reduce memory for path by a half.

Change-Id: I399fda4093d93b1e9d956397b7b210956c5b948f

6 weeks agoMIPS: dspr2: Added optimization for function FTransformWHT 44/73544/1
Djordje Pesut [Mon, 19 Jan 2015 09:15:13 +0000 (10:15 +0100)]
MIPS: dspr2: Added optimization for function FTransformWHT

Change-Id: I918366cd1908304068c66da9965efb0aa63320cd

6 weeks agoMerge "wicdec: (msvs) quiet some /analyze warnings"
pascal massimino [Sat, 17 Jan 2015 20:15:16 +0000 (12:15 -0800)]
Merge "wicdec: (msvs) quiet some /analyze warnings"