webm/libwebp.git
21 hours agoCleaup Near-lossless code. 89/73589/2 master
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

22 hours 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

3 days 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"

4 days 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

4 days 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

4 days 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

4 days 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 days 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 days 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[]

7 days 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

7 days 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

8 days 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

10 days 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"

10 days agowicdec: (msvs) quiet some /analyze warnings 42/73542/2
James Zern [Sat, 17 Jan 2015 01:43:36 +0000 (17:43 -0800)]
wicdec: (msvs) quiet some /analyze warnings

add additional return checks and asserts to avoid:
C6102: Using 'XXX' from failed function call ...

Change-Id: I51f5fa630324e0cd7b2d9fceefecb4f4021474b1

10 days agoMerge "MIPS: dspr2: Added optimization for MultARGBRow function"
pascal massimino [Sat, 17 Jan 2015 16:56:01 +0000 (08:56 -0800)]
Merge "MIPS: dspr2: Added optimization for MultARGBRow function"

10 days agoMerge "dsp/cpu: (msvs) add include for __cpuidex"
pascal massimino [Sat, 17 Jan 2015 16:55:31 +0000 (08:55 -0800)]
Merge "dsp/cpu: (msvs) add include for __cpuidex"

10 days agoMerge changes I87544e92,I0bb6cda5
pascal massimino [Sat, 17 Jan 2015 16:54:30 +0000 (08:54 -0800)]
Merge changes I87544e92,I0bb6cda5

* changes:
  VP8LEncodeStream: add an assert
  VP8LColorCacheCopy: promote an int before shifting

10 days agodwebp/WritePNG: mark png variables volatile 38/73538/3
James Zern [Fri, 16 Jan 2015 23:39:24 +0000 (15:39 -0800)]
dwebp/WritePNG: mark png variables volatile

these are used on both sides of the setjmp().

Change-Id: I4a789bfb3a5d56946a22286c5a140008d90e1ba2

10 days agodwebp: include setjmp.h w/WEBP_HAVE_PNG 37/73537/2
James Zern [Fri, 16 Jan 2015 23:38:40 +0000 (15:38 -0800)]
dwebp: include setjmp.h w/WEBP_HAVE_PNG

setjmp() is used in WritePNG().

Change-Id: Iadd836272fc7d368d635c891507ce2a08c4d3dec

10 days agodwebp: correct sign in format strings 39/73539/3
James Zern [Fri, 16 Jan 2015 23:43:11 +0000 (15:43 -0800)]
dwebp: correct sign in format strings

width / height are unsigned; fixes a warning with msvs /analyze:
C6340: Mismatch on sign: 'const unsigned int' passed as _Param_(4) when
some signed type is required in call to 'fprintf'.

Change-Id: I5f1fad4c93745baf17d70178a5e66579ccd2b155

10 days agoVP8LEncodeStream: add an assert 41/73541/1
James Zern [Sat, 17 Jan 2015 01:48:51 +0000 (17:48 -0800)]
VP8LEncodeStream: add an assert

check enc->argb_ to quiet an msvs /analyze warning:
C6387: 'enc->argb_+y*width' could be '0':  this does not adhere to the
specification for the function 'memcpy'.

Change-Id: I87544e92ee0d3ea38942a475c30c6d552f9877b7

10 days agoVP8LColorCacheCopy: promote an int before shifting 40/73540/1
James Zern [Sat, 17 Jan 2015 01:46:38 +0000 (17:46 -0800)]
VP8LColorCacheCopy: promote an int before shifting

quiets an msvs /analyze warning, the cast is due to an earlier msvs
build warning.
C6297: Arithmetic overflow:  32-bit value is shifted, then cast to
64-bit value.  Results might not be an expected value.

Change-Id: I0bb6cda57879f2fbd1e3515f6753a11bc08d14ac

10 days agodsp/cpu: (msvs) add include for __cpuidex 36/73536/1
James Zern [Sat, 17 Jan 2015 00:14:49 +0000 (16:14 -0800)]
dsp/cpu: (msvs) add include for __cpuidex

and only use it on x86 / x64 where it's available.
has the side-effect of quieting a msvs /analyze warning:
C6001: Using uninitialized memory 'cpu_info'.

Change-Id: Iae51be3b22b2ee949cfc473eeea9fd9fb6b3c2cb

11 days agoMIPS: dspr2: Added optimization for MultARGBRow function 22/73522/2
Djordje Pesut [Mon, 22 Dec 2014 12:51:22 +0000 (13:51 +0100)]
MIPS: dspr2: Added optimization for MultARGBRow function

Change-Id: Ide549ae0d80413bea8c19fe091d97bffe8b17985

11 days agoMIPS: dspr2: added optimization for function QuantizeBlock 21/73521/2
Djordje Pesut [Fri, 16 Jan 2015 10:18:27 +0000 (11:18 +0100)]
MIPS: dspr2: added optimization for function QuantizeBlock

Change-Id: Id217116890b7408d23464216608ce67ae545688a

11 days agodsp/cpu: (msvs) avoid immintrin.h on _M_ARM 20/73520/1
James Zern [Fri, 16 Jan 2015 07:04:08 +0000 (23:04 -0800)]
dsp/cpu: (msvs) avoid immintrin.h on _M_ARM

_xgetgv() isn't relevant there anyway

broken since:
279e661 Merge "dsp/cpu: add include for _xgetbv() w/MSVS"

Change-Id: Iaa7bc0c5be9c06bfffab39e194c64c09bf5b5a27

11 days agosimplify/reorganize arguments for CollectColorBlueTransforms 08/73508/5
Pascal Massimino [Thu, 15 Jan 2015 15:31:46 +0000 (07:31 -0800)]
simplify/reorganize arguments for CollectColorBlueTransforms

and other various call sites too.

Change-Id: Icb8f828dfe25672662de18d0e48e7d3144b1f38d

12 days agoDisable costly TraceBackwards for method=0. 09/73509/1
Vikas Arora [Thu, 15 Jan 2015 17:00:47 +0000 (09:00 -0800)]
Disable costly TraceBackwards for method=0.

Disable costly TraceBackwards heuristic for computing the backward references
for low_effort (method=0) compression.

The TraceBackwards heuristic is already disabled for lower (q < 25) quality
range. Following is the compression data for 1000 image corpus for q >= 25.

This speeds up compression (q >= 25) by a factor of 2.5-3X with slight loss of
compression density (0.7% for lower quality range and 1.2% for higher qualities).

Change-Id: I256c9e2137c7de4083f423ea32ee12d3b0f46253

12 days agoMIPS: dspr2: added optimization for function TransformColorRed 07/73507/1
Djordje Pesut [Wed, 14 Jan 2015 09:25:40 +0000 (10:25 +0100)]
MIPS: dspr2: added optimization for function TransformColorRed

added new function CollectColorRedTransforms to C, which calls
TransformColorRed and it is realized via pointer to function

Change-Id: Ia68d73bfcf1ca2cb443dc2825910946221f87835

12 days agoMerge "MIPS: dspr2: added optimization for function TransformColorBlue"
pascal massimino [Thu, 15 Jan 2015 08:06:01 +0000 (00:06 -0800)]
Merge "MIPS: dspr2: added optimization for function TransformColorBlue"

12 days agoMerge "dsp/cpu: add include for _xgetbv() w/MSVS"
pascal massimino [Thu, 15 Jan 2015 08:05:35 +0000 (00:05 -0800)]
Merge "dsp/cpu: add include for _xgetbv() w/MSVS"

12 days agodsp/cpu: add include for _xgetbv() w/MSVS 06/73506/1
James Zern [Thu, 15 Jan 2015 07:31:35 +0000 (23:31 -0800)]
dsp/cpu: add include for _xgetbv() w/MSVS

explicitly add immintrin.h instead of transitively picking it up via
windows.h presumably. makes the code easier to move around.

Change-Id: If70d5143ac94fc331da763ce034358858e460e06

13 days agogif2webp: Move GIF decoding related code to a support library. 79/73479/2
Urvang Joshi [Tue, 13 Jan 2015 23:43:31 +0000 (15:43 -0800)]
gif2webp: Move GIF decoding related code to a support library.

Change-Id: Ifa5e663eb0db7e1e08174fe6608bd45950281abb

13 days agoMerge "AnimEncoder API: Add info in README.mux"
Pascal Massimino [Tue, 13 Jan 2015 22:14:38 +0000 (14:14 -0800)]
Merge "AnimEncoder API: Add info in README.mux"

2 weeks agoMIPS: dspr2: added optimization for function TransformColorBlue 60/73460/2
Djordje Pesut [Tue, 6 Jan 2015 08:31:58 +0000 (09:31 +0100)]
MIPS: dspr2: added optimization for function TransformColorBlue

added new function CollectColorBlueTransforms to C, which calls
TransformColorBlue and it is realized via pointer to function

Change-Id: Ia488b7a7a689223b5d33aae9724afab89b97fced

2 weeks agocpu: fix AVX2 detection for gcc/clang targets 67/73467/1
James Zern [Tue, 13 Jan 2015 01:58:57 +0000 (17:58 -0800)]
cpu: fix AVX2 detection for gcc/clang targets

ecx needs to be set to 0; the visual studio builds were already doing
this.

https://software.intel.com/en-us/articles/how-to-detect-new-instruction-support-in-the-4th-generation-intel-core-processor-family

Change-Id: I95efb115b4d50bbdb6b14fca2aa63d0a24974e55

2 weeks agoAnimEncoder API: Add info in README.mux 65/73465/1
Urvang Joshi [Mon, 12 Jan 2015 23:48:18 +0000 (15:48 -0800)]
AnimEncoder API: Add info in README.mux

Also, add code snippet for WebPConfig in the example.

Change-Id: Ia50222690d0e2a84bdc5e9bf362675902a810f22

2 weeks agofollow-up: clean up WebPRescalerXXX dsp function 64/73464/5
Pascal Massimino [Sat, 10 Jan 2015 14:46:00 +0000 (06:46 -0800)]
follow-up: clean up WebPRescalerXXX dsp function

by removing redundant RFIX macros and using a plain-C fallback.

Change-Id: I52436c672bf20780b6fe3bcf43fe73e1abac10ff

2 weeks agodsp: s/USE_INTRINSICS/WEBP_USE_INTRINSICS/ 63/73463/1
James Zern [Mon, 12 Jan 2015 22:26:08 +0000 (14:26 -0800)]
dsp: s/USE_INTRINSICS/WEBP_USE_INTRINSICS/

for consistency with other defines shared across modules

Change-Id: I30cdb9f892e9ea48265883f560500ffb1d6799ee

2 weeks agoMerge "introduce a separate WebPRescalerDspInit to initialize pointers"
James Zern [Mon, 12 Jan 2015 22:25:37 +0000 (14:25 -0800)]
Merge "introduce a separate WebPRescalerDspInit to initialize pointers"

2 weeks agointroduce a separate WebPRescalerDspInit to initialize pointers 57/73457/3
Pascal Massimino [Sat, 10 Jan 2015 14:46:00 +0000 (06:46 -0800)]
introduce a separate WebPRescalerDspInit to initialize pointers

so that we keep the details of WebPRescaler in utils/rescaler.c
when possible.

Change-Id: Ib6c1029a09b84cbc7a7d2f70dafa4d4d9132cecc

2 weeks agofix handling of zero-sized partition #0 corner case 58/73458/2
Pascal Massimino [Sat, 10 Jan 2015 23:24:08 +0000 (15:24 -0800)]
fix handling of zero-sized partition #0 corner case

reported in https://code.google.com/p/webp/issues/detail?id=237

An empty partition #0 should be indicative of a bitstream error.
The previous code was correct, only an assert was triggered in debug mode.
But we might as well handle the case properly right away...

Change-Id: I4dc31a46191fa9e65659c9a5bf5de9605e93f2f5

2 weeks agoMerge "move rescaler functions to rescaler* files in src/dsp/"
pascal massimino [Sat, 10 Jan 2015 13:41:45 +0000 (05:41 -0800)]
Merge "move rescaler functions to rescaler* files in src/dsp/"

2 weeks agoMerge changes I230b3532,Idf3057a7
pascal massimino [Sat, 10 Jan 2015 10:14:48 +0000 (02:14 -0800)]
Merge changes I230b3532,Idf3057a7

* changes:
  enable NEON for Windows ARM builds
  Makefile.vc: add rudimentary Windows ARM support

2 weeks agoMerge "anim_encode: fix type conversion warnings"
pascal massimino [Sat, 10 Jan 2015 10:12:25 +0000 (02:12 -0800)]
Merge "anim_encode: fix type conversion warnings"

2 weeks agoMerge "dec_neon: remove returns from void functions"
pascal massimino [Sat, 10 Jan 2015 10:08:19 +0000 (02:08 -0800)]
Merge "dec_neon: remove returns from void functions"

2 weeks agoMakefile.vc: add gif2webp target 56/73456/1
James Zern [Sat, 10 Jan 2015 04:26:46 +0000 (20:26 -0800)]
Makefile.vc: add gif2webp target

gif2webp.exe is excluded from 'all' as libgif requires C99 support which
is only available from VS2013 onward. additional include paths/libraries
can be added with CL=/I... + LINK=... for this target.

Change-Id: If9f6be1c4029f486a9d6cdc0e862376cbd1e1be0

2 weeks agoenable NEON for Windows ARM builds 55/73455/1
James Zern [Sat, 10 Jan 2015 03:10:58 +0000 (19:10 -0800)]
enable NEON for Windows ARM builds

Change-Id: I230b353214ce44ab29ffd2df6ccd14345d6578e8

2 weeks agoMakefile.vc: add rudimentary Windows ARM support 54/73454/1
James Zern [Sat, 10 Jan 2015 03:09:14 +0000 (19:09 -0800)]
Makefile.vc: add rudimentary Windows ARM support

untested

builds only libwebp (targeting windows phone), with threading disabled
for now due to the use of desktop specific threading API

Change-Id: Idf3057a73c88e1a672ffe0a7c72d2626d701b706

2 weeks agodec_neon: remove returns from void functions 53/73453/1
James Zern [Sat, 10 Jan 2015 02:08:05 +0000 (18:08 -0800)]
dec_neon: remove returns from void functions

Change-Id: I3c66a5dfe3de2bb3653cbbf1b92b0328aba62881

2 weeks agoanim_encode: fix type conversion warnings 52/73452/1
James Zern [Sat, 10 Jan 2015 01:06:56 +0000 (17:06 -0800)]
anim_encode: fix type conversion warnings

fixes:
C4267: '=' : conversion from 'size_t' to 'int', possible loss of data

Change-Id: Ie8e0bbd6f19fde21b2dbbd2a92cc99e76502dfed

2 weeks agoRemove gif2webp_util which is no longer needed. 51/73451/1
Urvang Joshi [Fri, 9 Jan 2015 21:06:29 +0000 (13:06 -0800)]
Remove gif2webp_util which is no longer needed.

Change-Id: I5e1237ab250273bc1e6fb4c422fb502f8ca8aeb6

2 weeks agomove rescaler functions to rescaler* files in src/dsp/ 46/73446/2
Djordje Pesut [Fri, 9 Jan 2015 11:05:53 +0000 (12:05 +0100)]
move rescaler functions to rescaler* files in src/dsp/

Change-Id: I906add1b1010a59ebfcc2dd81e15745433cc206b

2 weeks agowebpmux: remove experimental fragment handling 45/73445/1
James Zern [Fri, 9 Jan 2015 04:03:51 +0000 (20:03 -0800)]
webpmux: remove experimental fragment handling

Change-Id: I1c418b76b43dfb20cbf7f97d7011ca0d76472ba0

2 weeks agomux: remove experimental FRGM parsing 44/73444/1
James Zern [Fri, 9 Jan 2015 04:02:40 +0000 (20:02 -0800)]
mux: remove experimental FRGM parsing

fragment references remain: to be removed in a future commit

Change-Id: I02974c8a709cfe16dce72568639c8b912859de8e

2 weeks agoAnimEncoder API: Optimize single-frame animated images 99/73399/6
Urvang Joshi [Wed, 7 Jan 2015 00:37:53 +0000 (16:37 -0800)]
AnimEncoder API: Optimize single-frame animated images

Try converting them to a non-animated image and pick that one if it's smaller
in size.

Change-Id: Ib97438fd2a95b1bfa9b7526a0938a9d85df33a57

2 weeks agoMerge "Move over gif2webp to the new AnimEncoder API."
pascal massimino [Thu, 8 Jan 2015 20:30:34 +0000 (12:30 -0800)]
Merge "Move over gif2webp to the new AnimEncoder API."

2 weeks agoMIPS: move WORK_AROUND_GCC define to appropriate place 39/73439/1
Djordje Pesut [Thu, 8 Jan 2015 14:55:41 +0000 (15:55 +0100)]
MIPS: move WORK_AROUND_GCC define to appropriate place

Change-Id: I3055eca57dc4e9d39533a5b8170bbf7af9cd818f

2 weeks agoMIPS: dspr2: added optimization for functions SSEAxB 38/73438/1
Djordje Pesut [Thu, 8 Jan 2015 12:38:20 +0000 (13:38 +0100)]
MIPS: dspr2: added optimization for functions SSEAxB

list of optimized functions: SSE16x16, SSE8x8, SSE16x8, SSE4x4

Change-Id: Ie99e7cdd73b0d4ff855977315a5d0db9ffaa5f04

2 weeks agoMove over gif2webp to the new AnimEncoder API. 98/73398/4
Urvang Joshi [Wed, 7 Jan 2015 00:34:21 +0000 (16:34 -0800)]
Move over gif2webp to the new AnimEncoder API.

As frame disposal and blending are GIF specific, they are handled in gif2webp
itself now.

Change-Id: Idcf557bd48edf5c283ce7fef151789c3ffb8ce12

2 weeks agoMIPS: dspr2: added optimization for function Average 37/73437/1
Djordje Pesut [Thu, 8 Jan 2015 10:46:15 +0000 (11:46 +0100)]
MIPS: dspr2: added optimization for function Average

Change-Id: I7ca316bc3f5fbdaf8dcaf9a2d2227a5134bf4f63

2 weeks agoMerge "Tune BackwardReferencesLz77 for low_effort (m=0)."
pascal massimino [Thu, 8 Jan 2015 08:46:51 +0000 (00:46 -0800)]
Merge "Tune BackwardReferencesLz77 for low_effort (m=0)."

2 weeks agoMerge "Speedup VP8LGetHistoImageSymbols for low effort (m=0) mode."
pascal massimino [Thu, 8 Jan 2015 08:46:43 +0000 (00:46 -0800)]
Merge "Speedup VP8LGetHistoImageSymbols for low effort (m=0) mode."

2 weeks agoTune BackwardReferencesLz77 for low_effort (m=0). 36/73436/1
Vikas Arora [Mon, 22 Dec 2014 17:00:30 +0000 (17:00 +0000)]
Tune BackwardReferencesLz77 for low_effort (m=0).

- Lower the threshold parameters for HashChainFindCopy.

For 1000 image PNG corpus (m=0), this change yields speedup of 15-20% at
lower quality range (0.25% drop in compression density) and about 10%
for higher quality range without any drop in the compression density.
Following is the compression stats (before/after) for method = 0:
         Before           After
         bpp/MPs          bpp/MPs
q=0      2.8615/18.000    2.8651/18.631
q=5      2.8615/18.216    2.8650/20.517
q=10     2.8572/18.070    2.8650/21.992
q=15     2.8519/18.371    2.8584/21.747
q=20     2.8454/18.975    2.8515/20.448
q=25     2.8230/8.531     2.8253/9.585
// Compression density remains same for q-range [30-100]
q=30     2.7310/7.706     2.7310/8.028
q=35     2.7253/6.855     2.7253/7.184
q=40     2.7231/6.364     2.7231/6.604
q=45     2.7216/5.844     2.7216/6.223
q=50     2.7196/5.210     2.7196/5.731
q=55     2.7208/4.766     2.7208/4.970
q=60     2.7195/4.495     2.7195/4.602
q=65     2.7185/4.024     2.7185/4.236
q=70     2.7174/3.699     2.7174/3.861
q=75     2.7164/3.449     2.7164/3.605
q=80     2.7161/3.222     2.7161/3.038
q=85     2.7153/2.919     2.7153/2.946
q=90     2.7145/2.766     2.7145/2.771
q=95     2.7124/2.548     2.7124/2.575
q=100    2.6873/2.253     2.6873/2.335

Change-Id: I0e17581fb71f6094032ad06c6203350bd502f9a1

2 weeks agoSpeedup VP8LGetHistoImageSymbols for low effort (m=0) mode. 35/73435/1
Vikas Arora [Fri, 19 Dec 2014 17:33:17 +0000 (17:33 +0000)]
Speedup VP8LGetHistoImageSymbols for low effort (m=0) mode.

- Do light weight entropy based histogram combine and leave out CPU
  intensive stochastic and greedy heuristics for combining the
  histograms.

For 1000 image PNG corpus (m=0), this change yields speedup of 10% at
lower quality range (1% drop in compression density) and about 5% for
higher quality range (1% drop in compression density). Following is the
compression stats (before/after) for method = 0:
         Before           After
         bpp/MPs          bpp/MPs
q=0      2.8336/16.577    2.8615/18.000
q=5      2.8336/16.504    2.8615/18.216
q=10     2.8293/16.419    2.8572/18.070
q=15     2.8242/17.582    2.8519/18.371
q=20     2.8182/16.131    2.8454/18.975
q=25     2.7924/7.670     2.8230/8.531
q=30     2.7078/6.635     2.7310/7.706
q=35     2.7028/6.203     2.7253/6.855
q=40     2.7005/6.198     2.7231/6.364
q=45     2.6989/5.570     2.7216/5.844
q=50     2.6970/5.087     2.7196/5.210
q=55     2.6963/4.589     2.7208/4.766
q=60     2.6949/4.292     2.7195/4.495
q=65     2.6940/3.970     2.7185/4.024
q=70     2.6929/3.698     2.7174/3.699
q=75     2.6919/3.427     2.7164/3.449
q=80     2.6918/3.106     2.7161/3.222
q=85     2.6909/2.856     2.7153/2.919
q=90     2.6902/2.695     2.7145/2.766
q=95     2.6881/2.499     2.7124/2.548
q=100    2.6873/2.253     2.6873/2.285

Change-Id: I0567945068f8dc7888041e93d872f9def91f50ba

2 weeks agoargb_sse2: cosmetics 34/73434/1
pascal massimino [Thu, 8 Jan 2015 08:17:24 +0000 (00:17 -0800)]
argb_sse2: cosmetics

clarify some variable names in PackARGB() + add some comments

Change-Id: I2bb91d6c52dcbcdebe0f92d5f2136c2d7d11af2a

2 weeks agomake the 'last_cpuinfo_used' variable names unique 33/73433/1
James Zern [Wed, 7 Jan 2015 23:18:14 +0000 (15:18 -0800)]
make the 'last_cpuinfo_used' variable names unique

allows the sources to be #include'd in some hackish builds (don't do
that!)

Change-Id: I0c7a43acbebd0e2d5068845e6daa8ce47361cd91

2 weeks agoAnimEncoder API: Init method for default options. 10/73410/1
Urvang Joshi [Wed, 7 Jan 2015 22:32:11 +0000 (14:32 -0800)]
AnimEncoder API: Init method for default options.

Change-Id: I3ccd7fe782e10c51986b55fc1a515d958ff70752

2 weeks agoMerge "AnimEncoder API: Remove AnimEncoderFrameOptions."
pascal massimino [Wed, 7 Jan 2015 21:39:10 +0000 (13:39 -0800)]
Merge "AnimEncoder API: Remove AnimEncoderFrameOptions."

2 weeks agoMerge "AnimEncoder API: GenerateCandidates bugfix."
pascal massimino [Wed, 7 Jan 2015 21:38:24 +0000 (13:38 -0800)]
Merge "AnimEncoder API: GenerateCandidates bugfix."

2 weeks agoMerge "AnimEncoder API: Compute change rectangle for first frame too."
pascal massimino [Wed, 7 Jan 2015 21:37:27 +0000 (13:37 -0800)]
Merge "AnimEncoder API: Compute change rectangle for first frame too."

2 weeks agoMerge "AnimEncoder API: In Assemble(), always set animation parameters."
pascal massimino [Wed, 7 Jan 2015 21:36:53 +0000 (13:36 -0800)]
Merge "AnimEncoder API: In Assemble(), always set animation parameters."

2 weeks agoMerge "AnimEncoder lib cleanup: prev to prev canvas not needed."
pascal massimino [Wed, 7 Jan 2015 21:36:21 +0000 (13:36 -0800)]
Merge "AnimEncoder lib cleanup: prev to prev canvas not needed."

2 weeks agoMerge "WebPAnimEncoder API: Header and implementation"
pascal massimino [Wed, 7 Jan 2015 21:35:49 +0000 (13:35 -0800)]
Merge "WebPAnimEncoder API: Header and implementation"

2 weeks agoAnimEncoder API: Remove AnimEncoderFrameOptions. 97/73397/2
Urvang Joshi [Wed, 7 Jan 2015 00:32:31 +0000 (16:32 -0800)]
AnimEncoder API: Remove AnimEncoderFrameOptions.

We only need config now, so this struct is not needed.

Change-Id: I5139956d13c36ceb4871d52122f248fe70f40c4b

2 weeks agoAnimEncoder API: GenerateCandidates bugfix. 96/73396/2
Urvang Joshi [Wed, 7 Jan 2015 00:30:00 +0000 (16:30 -0800)]
AnimEncoder API: GenerateCandidates bugfix.

As 'curr_canvas_mod' is being modified during calls to IncreaseTransparency()
and FlattenSimilarBlocks(), GetSubRect() should get the sub-frame from
'curr_canvas_mod' as well.

Earlier, GetSubRect() was computed from 'curr_canvas', so modifying
'curr_canvas_mod' had no effect on encoding.

Change-Id: Ia847503007b66364817fe57def5a9e3c37d1b3cc

2 weeks agoAnimEncoder API: Compute change rectangle for first frame too. 95/73395/2
Urvang Joshi [Wed, 7 Jan 2015 00:26:55 +0000 (16:26 -0800)]
AnimEncoder API: Compute change rectangle for first frame too.

Earlier, we were always using full canvas for first frame.

Change-Id: Ib8d32961682c4b07010ea559a71dd59ab9ec0157

2 weeks agoAnimEncoder API: In Assemble(), always set animation parameters. 94/73394/2
Urvang Joshi [Wed, 7 Jan 2015 00:24:07 +0000 (16:24 -0800)]
AnimEncoder API: In Assemble(), always set animation parameters.

We set the parameters even if there is just one frame. This is to make sure
assembly is correct even if single frame animation is NOT converted to a full
frame later.

Change-Id: If79e6aa5e2575cb0f3cd229f16c655b3663c35b0

2 weeks agoAnimEncoder lib cleanup: prev to prev canvas not needed. 93/73393/2
Urvang Joshi [Wed, 7 Jan 2015 00:22:29 +0000 (16:22 -0800)]
AnimEncoder lib cleanup: prev to prev canvas not needed.

Given that we decided to only handle frame disposal for output WebP
internally,
only current and previous canvas need to be maintained.

Change-Id: I625293bed5aeb5aabf4eca779f6ec3ee84c9ff2a

2 weeks agoWebPAnimEncoder API: Header and implementation 91/73391/2
Urvang Joshi [Wed, 7 Jan 2015 00:12:48 +0000 (16:12 -0800)]
WebPAnimEncoder API: Header and implementation

A separate API to generate animated WebP images.
It will eventually replace the internal gif2webp_util methods.

Also: update makefiles.

Change-Id: Idf61dfc1016c10b24fea70425d1a2323cffba515

2 weeks agomove argb_*.o build target to encoder list 00/73400/1
Pascal Massimino [Wed, 7 Jan 2015 08:11:57 +0000 (00:11 -0800)]
move argb_*.o build target to encoder list

Change-Id: I4ea41edb4611a4287da6017dbb7ae6dc01541dd2

2 weeks agoMerge "multi-thread fix: lock each entry points with a static var"
Pascal Massimino [Wed, 7 Jan 2015 08:03:51 +0000 (00:03 -0800)]
Merge "multi-thread fix: lock each entry points with a static var"

2 weeks agoMerge "SSE2 implementation of VP8PackARGB"
Pascal Massimino [Wed, 7 Jan 2015 07:53:50 +0000 (23:53 -0800)]
Merge "SSE2 implementation of VP8PackARGB"

2 weeks agoMerge "add -Wformat-nonliteral and -Wformat-security"
Pascal Massimino [Wed, 7 Jan 2015 07:50:25 +0000 (23:50 -0800)]
Merge "add -Wformat-nonliteral and -Wformat-security"

2 weeks agoadd -Wformat-nonliteral and -Wformat-security 70/73370/2
Pascal Massimino [Mon, 5 Jan 2015 15:20:18 +0000 (07:20 -0800)]
add -Wformat-nonliteral and -Wformat-security

can be useful, not sure they are a subset of the flags we
use already...

Change-Id: Iec742a99427a791d9527368302a1136df2ff96cd

2 weeks agoMerge "MIPS: dspr2: added optimization for function Intra4Preds"
James Zern [Wed, 7 Jan 2015 00:15:10 +0000 (16:15 -0800)]
Merge "MIPS: dspr2: added optimization for function Intra4Preds"

3 weeks agomulti-thread fix: lock each entry points with a static var 69/73369/3
Pascal Massimino [Mon, 5 Jan 2015 14:51:54 +0000 (06:51 -0800)]
multi-thread fix: lock each entry points with a static var

we compare the current VP8GetCPUInfo pointer to the last used.
This is less code overall and each implementation is still
testable separately (by just changing VP8GetCPUInfo, but not
a separate threads!)

Change-Id: Ia13fa8ffc4561a884508f6ab71ed0d1b9f1ce59b

3 weeks agoSSE2 implementation of VP8PackARGB 51/73351/6
Pascal Massimino [Mon, 5 Jan 2015 12:44:58 +0000 (04:44 -0800)]
SSE2 implementation of VP8PackARGB

Change-Id: I40c0e26a6a2701216e4ddebcf793aa535677f437

3 weeks agosimplify the PackARGB signature 60/73360/2
Pascal Massimino [Thu, 1 Jan 2015 20:13:45 +0000 (12:13 -0800)]
simplify the PackARGB signature

Change-Id: I51570e362126b2681f93211a4f59a3fedb5fd4b5

5 weeks agodemux: restore strict fragment flag check 49/73349/1
James Zern [Tue, 23 Dec 2014 17:47:06 +0000 (12:47 -0500)]
demux: restore strict fragment flag check

inadvertently removed in:
demux: remove experimental FRGM parsing

Change-Id: Ia9bb8211e2153df51e7a01cabe8552524b8ed218

5 weeks agoMerge "webp-container-spec: remove references to fragments"
James Zern [Tue, 23 Dec 2014 17:12:52 +0000 (09:12 -0800)]
Merge "webp-container-spec: remove references to fragments"

5 weeks agoMerge "demux: remove experimental FRGM parsing"
James Zern [Tue, 23 Dec 2014 17:12:15 +0000 (09:12 -0800)]
Merge "demux: remove experimental FRGM parsing"

5 weeks agoMerge changes I109ec4d9,I73fe7743
James Zern [Tue, 23 Dec 2014 17:11:22 +0000 (09:11 -0800)]
Merge changes I109ec4d9,I73fe7743

* changes:
  dec_neon: add DC8uvNoTop / DC8uvNoLeft
  dec_neon: add DC8uv

5 weeks agoMIPS: dspr2: added optimization for function Intra4Preds 45/73345/1
Djordje Pesut [Tue, 23 Dec 2014 16:29:59 +0000 (17:29 +0100)]
MIPS: dspr2: added optimization for function Intra4Preds

Change-Id: Ie2a23c356a8715817b020fbee2b40e878e2946de

5 weeks agomove VP8EncDspARGBInit() call closer to where it's needed 44/73344/1
Pascal Massimino [Tue, 23 Dec 2014 15:04:14 +0000 (16:04 +0100)]
move VP8EncDspARGBInit() call closer to where it's needed

Change-Id: I0d5121b456918f0ee6646903a8d71d4384deafe3

5 weeks agodec_neon: add DC8uvNoTop / DC8uvNoLeft 41/73341/1
James Zern [Mon, 22 Dec 2014 20:46:17 +0000 (15:46 -0500)]
dec_neon: add DC8uvNoTop / DC8uvNoLeft

adds do_top/do_left flags to DC8uv; ~88% / ~92% faster respectively
no change in DC8uv speed.

Change-Id: I109ec4d9ad13c9db64516e98ed4693a21a3e9b54

5 weeks agodec_neon: add DC8uv 40/73340/1
James Zern [Mon, 22 Dec 2014 19:36:45 +0000 (14:36 -0500)]
dec_neon: add DC8uv

~87% faster.

Change-Id: I73fe77437792f1361ce8ab0b411132c6ec0fa021

5 weeks agowebp-container-spec: remove references to fragments 36/73336/2
James Zern [Sat, 20 Dec 2014 01:43:55 +0000 (17:43 -0800)]
webp-container-spec: remove references to fragments

this portion of the format was never finalized

Change-Id: I80aa1b27457a0e52b047c7284df2f58b181ca5d8

5 weeks agoMIPS: dspr2: added optimization for function MakeARGB32 95/73295/4
Djordje Pesut [Thu, 20 Nov 2014 15:53:05 +0000 (16:53 +0100)]
MIPS: dspr2: added optimization for function MakeARGB32

inline function MakeARGB32 calls changed to call
via pointers to functions which make (a)rgb for
entire row

Change-Id: Ia4bd4be171a46c1e1821e408b073ff5791c587a9

5 weeks agodemux: remove experimental FRGM parsing 35/73335/1
James Zern [Sat, 20 Dec 2014 01:30:33 +0000 (17:30 -0800)]
demux: remove experimental FRGM parsing

references to fragments remain, along with some superfluous checks; these
will be removed in a future commit.

Change-Id: I39fe9314900ecbc5d60e5065b65fa1b4c668af63