Commit Graph

3176 Commits

Author SHA1 Message Date
hui su
386e4ba2f0 Reset segment id if we decide not to update segment map
This avoids potential encoder and decoder mismatch.

Change-Id: I5282d3e168afc6193033ad3fce8fbc35618ab2f5
2016-07-25 17:08:10 -07:00
Parag Salasakar
7b87e8485b Merge "Add MSA optimized YUV to RGB upsampling functions" 2016-07-22 17:26:33 +00:00
Parag Salasakar
d3ddacb625 Add MSA optimized YUV to RGB upsampling functions
We add the following MSA optimized YUV to RGB upsampling functions:
- UpsampleRgbLinePair
- UpsampleBgrLinePair
- UpsampleRgbaLinePair
- UpsampleBgraLinePair
- UpsampleArgbLinePair
- UpsampleRgba4444LinePair
- UpsampleRgb565LinePair

Change-Id: I7264a615edc7eb376e443e9d38bd8e3c9a2cab1f
2016-07-22 14:28:30 +00:00
Pascal Massimino
eb98d8d87c webp_quality: detect lossless format and features
lossless bitstream are returned as quality 101

Change-Id: I8b28287169b710ecf8d4d694abbf0cedc6447908
2016-07-22 00:16:56 -07:00
James Zern
ebee57f4d1 move imageio/example_util.[hc] (back to) examples/
decoding and file i/o have been split to imageio, all that remains is
some string routines used for parameter parsing in the examples

Change-Id: I77386cd8aa39124b9e14c95fdbaa17ea4ab5bb24
2016-07-21 20:41:03 -07:00
James Zern
99542bbf3e webpdec: s/ExUtil//
PrintWebPError, LoadWebP, DecodeWebP, DecodeWebPIncremental

Change-Id: Ie17578b91c7efdf6e5fe63568a95f79788b7f8ee
2016-07-21 20:40:11 -07:00
James Zern
da573cf490 imageio_util: s/ExUtil/ImgIoUtil/
ExUtil(SetBinaryMode|ReadFile|ReadFromStdin|WriteFile|CopyPlane) ->
ImgIoUtil(SetBinaryMode|ReadFile|ReadFromStdin|WriteFile|CopyPlane)

Change-Id: I5497f8fe514347efeb83b8b8866ef334390fc18e
2016-07-21 20:40:11 -07:00
James Zern
bdda5bd4bf split example_util.h
move ExUtil*File to imageio_util.h
ExUtil*WebP* to webpdec.h

string parsing routines remain

Change-Id: I0560c4a74e86710d83bc4b5b234f1b5ef9a86f9d
2016-07-21 19:14:58 -07:00
James Zern
15ed462b2d .gitignore: add extras/{get_disto,webp_quality}
Change-Id: Ibc0178e3abdf8de86183cbfded9a9b2400246ac7
2016-07-21 15:26:48 -07:00
Pascal Massimino
7be5748963 Merge "VP8EstimateQuality(): roughty estimate webp bitstream quality factor" 2016-07-21 13:48:19 +00:00
James Zern
57020525ed Makefile.vc: add missing imageio target
Change-Id: I7069fc70e60ff58d5dc2e365e2b23a0e5be716eb
2016-07-20 23:12:57 -07:00
skal
e8ab6a825a VP8EstimateQuality(): roughty estimate webp bitstream quality factor
This function returns a rough estimation of the quality factor used
for compressing the WebP bitstream.

Simple command line: 'webp_quality [-quiet] in.webp'
should print the estimated quality factor.

Change-Id: Ifba3e489461f5a587003ac9f08cc7556e9b24ac2
2016-07-20 21:50:25 -07:00
James Zern
fee7b3d6ca Merge "'extras/get_disto' example: compute PSNR between two files" 2016-07-21 00:56:16 +00:00
skal
1e7d4401dc 'extras/get_disto' example: compute PSNR between two files
Change-Id: I40e693e52d8eb4e32b86273952dac2e5eefe6e7c
2016-07-20 16:54:28 -07:00
James Zern
4cecab63bd pngdec.c,jpegdec.[hc]: remove unnecessary includes
example_util.h hasn't been needed since:
a9947c3 cwebp: add support for stdin input

Change-Id: Ic4fcefd5567aa3f4a5c1d443e8c6d9b4fc2fb53f
2016-07-20 12:12:14 -07:00
James Zern
259f0434a5 makefile.unix: normalize image decode lib name
libexample_dec -> libimagedec

+ add it to OUT_LIBS so it can be removed by the clean target

Change-Id: I3ef4711e261ead2e5d437182ad3b495ae3da7cbc
2016-07-20 11:39:20 -07:00
skal
ed34c39bfc fix: examples/libexample_dec.a => imageio/libexample_dec.a
Change-Id: Id32c8d5ca749178e49c3c446562eca9a81a5a02e
2016-07-20 08:33:50 -07:00
Pascal Massimino
33d8d0d4d3 Merge "move examples/{example_util,image_dec} to imageio/" 2016-07-20 14:03:05 +00:00
Pascal Massimino
c960b82e5c Merge "extras.h: correct include guard" 2016-07-20 13:13:14 +00:00
Pascal Massimino
fe3cd28a53 Merge ".gitignore: add .gradle, /build" 2016-07-20 13:12:28 +00:00
Pascal Massimino
45fbeba5cd Merge "Do token recording and counting in a single loop" 2016-07-20 13:07:41 +00:00
James Zern
4f33c82098 .gitignore: add .gradle, /build
outputs from gradlew

Change-Id: Idbeac1575a062b2590ee577fc3a0ef33efe974c0
2016-07-19 19:28:09 -07:00
James Zern
c379b55a93 move examples/{example_util,image_dec} to imageio/
Change-Id: I2508c786a095a2a75bebf766210c64e2af88f9b6
2016-07-19 19:06:29 -07:00
James Zern
5108d9aa00 extras.h: correct include guard
replace WEBP with EXTRAS after moving this file to the top-level folder
of the same name

Change-Id: Ide4dab027bd09f5df701f1adf2bf896c130a5441
2016-07-19 19:04:36 -07:00
James Zern
ad497fbce3 move src/extras to the top-level
reserve src/ for the code of the main libraries: libwebp, libwebpdemux
and libwebpmux

+ demote this library to internal only; i.e., don't install the header +
lib with make install

Change-Id: I8c9844db8f494be0fa0a2549a5b75b5cebcf666d
2016-07-19 17:23:17 -07:00
hui su
0c0fb83211 Do token recording and counting in a single loop
Change-Id: I8afd3c486b210bd67888de03e91dde7f78276f89
2016-07-19 16:28:26 -07:00
Parag Salasakar
9ac74f922e Add MSA optimized rescaling functions
We add the following MSA optimized rescaling functions:
- RescalerExportRowExpand
- RescalerExportRowShrink

Change-Id: Ic1c76065423b02617db94cf0c22bb564219b36e6
2016-07-19 15:52:42 +00:00
Parag Salasakar
cb19dbc1a4 Add MSA optimized color transform functions
We add the following MSA optimized color transform functions:
- TransformColor
- SubtractGreenFromBlueAndRed

Change-Id: Ib182d2b5faa7191f503ce70f0dfde0ac89402fd3
2016-07-18 13:49:24 +00:00
Urvang Joshi
3f4042b52a WebPAnimEncoder: If 'minimize_size' and 'allow_mixed' on, try lossy + lossless.
This improves compression by ~5% at default quality.

If only 'allow_mixed' is on (but 'minimize_size' isn't), we continue to
use a heuristic to try one of the two or both.

Change-Id: Ia573a73ea26ad25f9debff759eed69d2b0449e82
2016-07-15 16:56:20 -07:00
James Zern
5e2eb89e1f cosmetics,dsp/*msa.c: associate '*' with the type
not the variable

Change-Id: If5823e9731c406655eaf1dc1aaa2e6554ca7daad
2016-07-15 15:40:41 -07:00
skal
5b60db5c9d FastMBAnalyze() for quick i16/i4 decision
The decision is based on the variance between DC values of each
sub-4x4 block. This heuristic is rather ok for predicting whether
the 2nd transform (intra-16) is going to help or not.
The decision threshold varies with quality (=quantization).

It's only used for -m 0 and -m 1, where no full RD-opt is performed.
It actually makes these modes quite faster, with RD curve much
closer to the -m 2 mode.

Change-Id: I15f972db97ba4082cbd1dfd16bee3eb2eca701a8
2016-07-15 11:21:08 -07:00
Parag Salasakar
567e697776 Add MSA optimized CollectHistogram function
We add the following MSA optimized encoder Histogram function:
- CollectHistogram

Change-Id: I28415704ec62c3ad375de06eeef468d9f514bb2d
2016-07-15 22:51:33 +05:30
Parag Salasakar
c54ab8dd1a Add MSA optimized quantization functions
We add the following MSA optimized encoder quantization functions:
- QuantizeBlock
- Quantize2Blocks

Change-Id: Ie32b442afa99eee62d2ef48942b41116a4e157d3
2016-07-15 15:33:47 +00:00
Pascal Massimino
ec6f68c51e Merge "Remove QuantizeBlockWHT() in enc.c" 2016-07-14 18:59:08 +00:00
Vincent Rabaud
2a5c417c68 Apply the RLE heuristic to LZ77.
Change-Id: I7317eed7e017ee8981f40fcf1737f97e0e3a238c
2016-07-14 20:12:48 +02:00
hui su
91b59e886b Remove QuantizeBlockWHT() in enc.c
QuantizeBlockWHT() is basically identical to QuantizeBlock(),
no need to keep two copies.

Change-Id: I970cb6948da1c750c1339971a55e3b40765cdd01
2016-07-14 10:44:18 -07:00
Parag Salasakar
fe57273736 Add MSA optimized SSE functions
We add the following MSA optimized encoder SSE functions:
- SSE16x16
- SSE16x8
- SSE8x8
- SSE4x4

Change-Id: I9ef9e903019337d9975c83264a652a7282bf5d5b
2016-07-14 15:43:23 +05:30
James Zern
6b53ca876e cosmetics,(dec|enc)_sse2.c: fix indent
Change-Id: Ic3326136ddd325e911e96c2e5a7f06b3e1d60f66
2016-07-13 16:11:29 -07:00
Pascal Massimino
b15d00d996 Merge "Add MSA optimized encoder IntraChromaPreds function" 2016-07-13 14:54:28 +00:00
Parag Salasakar
afe3cec813 Add MSA optimized encoder IntraChromaPreds function
We add the following MSA optimized intrapred chroma function:
- IntraChromaPreds

Change-Id: I051cd174f5ce675aeb94e648d52c5a340a133ed4
2016-07-13 18:13:51 +05:30
skal
fc8cad9f29 reduce the number of malloc/free cycles in huffman.c
pre-allocating a sorted[] array for most common cases of small
alphabet size cuts a lot of traffic.

Change-Id: I73ff2f6e507f81b0b0bb7d9801a344aa4bcb038a
2016-07-12 12:06:31 -07:00
Parag Salasakar
7b4b05e0dc Add MSA optimized encoder Intra16Preds function
We add the following MSA optimized intrapred 16x16 function:
- Intra16Preds

Change-Id: I89a249e041fbed377cb6a328c0b973add335b980
2016-07-12 14:30:03 +05:30
Parag Salasakar
c18787a0e9 Add MSA optimized encoder Intra4Preds function
We add the following MSA optimized intrapred 4x4 function:
- Intra4Preds

Change-Id: Icf325f3dcbf98bb6210811b666ce632cae575b22
2016-07-12 04:36:56 +00:00
Urvang Joshi
479d19085d webpmux: Also print compression info per frame.
As per the user request:
https://groups.google.com/a/webmproject.org/forum/#!topic/webp-discuss/dk9M-q1MFnw

Change-Id: Id2540413a89e1f043e50abb0cec7c69367ee8325
2016-07-08 15:44:38 -07:00
Vincent Rabaud
a80e8cfdf2 Provide support for CMake on Android studio 2.2.
Change-Id: Ib3508c20a220b29d42f963cf154cd9ab5236ed6e
2016-07-08 01:57:02 +02:00
Vincent Rabaud
6c62841076 Split the main CMake file.
This will well isolate contributions for original code,
generated code and SIMD (especially for Android).

Change-Id: Ie47664decc7f43c2f57260a72cab951c347281a7
2016-07-07 21:25:01 +02:00
Pascal Massimino
bbb6ecd9b0 Merge "Add MSA optimized distortion functions" 2016-07-07 08:59:40 +00:00
Parag Salasakar
7915396f40 Add MSA optimized distortion functions
We add the following MSA optimized distortion functions:
- Disto4x4
- Disto16x16

Change-Id: I0a545ed0182ea56a0d5f358639f6671c2c21b95c
2016-07-07 07:30:22 +00:00
Pascal Massimino
652e944f69 Merge "build.gradle: remove tab" 2016-07-07 05:48:41 +00:00
James Zern
c0991a141f io,EmitRescaledAlphaYUV: factor out a common expr
+ s/src_a/dst_a/
+ remove unnecessary (void) as expected_num_lines_out is used within the
  function

Change-Id: Ic45f798ef22bd19eaabf1a0512d1cf8a201bb4b5
2016-07-06 20:38:55 -07:00