Commit Graph

79 Commits

Author SHA1 Message Date
Urvang Joshi
1c04a0d438 Common APIs for chunks metadata and color profile.
Change-Id: Ie105ce913c0b56e34cc26fd7ec397103354f268a
2012-08-29 08:21:43 -07:00
Urvang Joshi
ab3234ae6b Create WebPMuxFrameInfo struct for Mux APIs
Change-Id: I1f3b15d679280b5347124e1d59865a3df089043b
2012-08-23 15:18:51 +05:30
Urvang Joshi
e3990fd8e4 Alignment fixes
Change-Id: I99b570a6621be271abd3df1c3316cdd7286cfe83
2012-08-23 13:22:59 +05:30
James Zern
cbee59eba4 Merge commit 'v0.1.99'
* commit 'v0.1.99': (39 commits)
  Update ChangeLog
  add extra precision about default values and behaviour
  header/doc clean up
  Makefile.vc: fix webpmux.exe *-dynamic builds
  remove INAM, ICOP, ... chunks from the test webp file.
  harmonize authors as "Name (mail@address)"
  makefile.unix: provide examples/webpmux target
  update NEWS
  README: cosmetics
  man/cwebp.1: wording, change the date
  add a very crude progress report for lossless
  rename 'use_argb_input' to 'use_argb'
  add some padding bytes areas for later use
  fixing the findings by Frederic Kayser to the bitstream spec
  add missing ABI compatibility checks
  Doc: container spec text tweaks
  add ABI compatibility check
  mux.h: remove '* const' from function parameters
  encode.h: remove '* const' from function parameters
  decode.h: remove '* const' from function parameters
  ...

Conflicts:
	src/mux/muxinternal.c

Change-Id: I635d095c451742e878088464fe6232637a331511
2012-07-21 12:20:19 -07:00
Urvang Joshi
a4b9b1c604 Remove some unused enum values.
- WEBP_MUX_INVALID_PARAMETER: was used only at one place, and that too
should actually be an assert().
- WEBP_MUX_ERROR: was never used.

Change-Id: I8883cb4dfae7a7918507501f21fced0c04dda36a
2012-07-19 11:23:37 +05:30
Pascal Massimino
f7f16a2976 add ABI compatibility check
minor revision shouldn't matter, we only check major revision number.
Bumped all version numbers so that incompatibility starts *now*

Change-Id: Id06c20f03039845ae4cfb3fd121807b931d67ee4
2012-07-18 11:53:25 -07:00
James Zern
a3ec6225d5 mux.h: remove '* const' from function parameters
makes the public interface consistent and more readable

Change-Id: I33f1d1c4ee752e353e4c10636a4df4e44d7cd03f
2012-07-17 17:21:54 -07:00
Urvang Joshi
857650c8fc Mux: Add WebPDataInit() and remove WebPImageInfo
Change-Id: If661f7d198e284a103a53a451e9f74805119fcf9
2012-07-16 11:12:05 +05:30
James Zern
05108f6ea0 Merge "More spec/code matching in mux:" 2012-07-12 23:53:58 -07:00
Urvang Joshi
6808e69db8 More spec/code matching in mux:
- Match offsets, duration, width/height for frames/tiles and enforce
some constraints.
- Note that this also means using 'int's instead of 'uint32_t's for
16-bit and 24-bit fields.

Change-Id: If0b229ad9fce296372d961104aa36731a3b1304b
2012-07-13 11:47:24 +05:30
James Zern
7e622984bb cosmetics: param alignment, manpage wording
after eb6f9b8, c0e8859

Change-Id: I79bcea77d65eb6d1abf1156796996f3b9909b62b
2012-07-07 10:37:26 -07:00
Urvang Joshi
c0e8859d81 Get rid of image_info_ from WebPChunk struct.
The image_info_ was used only in GetImageCanvasWidthHeight(). So, now
we infer it from data there.
This removal fixes a bug: earlier, 'image_info' wasn't initialized in
the WebPMuxCreate() flow, and so the canvas width/height were being
calculated to be zero.

Also, a related refactoring: Combine CreateImageInfo() and
CreateDataFromImageInfo() into a single function CreateFrameTileData().

Change-Id: I7b0afb0d36dc6e13b9d6a1135fb027aa4e03716c
2012-07-04 18:49:56 +05:30
Pascal Massimino
7f22bd2596 check limit of width * height is 32 bits
Update the RIFF-specs file too

Change-Id: I113a7e25da2f7a19c1344c1dc5d496127cfe2596
2012-07-03 05:42:13 -07:00
Urvang Joshi
5d09a244b7 WebPMuxCreate() error handling:
Directly return NULL if no allocation is done yet.

Change-Id: If39ab7f5a55833263d3372fa0a5d9b0a600cb9ed
2012-07-02 11:20:09 +05:30
Urvang Joshi
777341c3d0 Fix a memleak in WebPMuxCreate()
Change-Id: I3658b5ae487082aef28989eb8abc274c207fef0f
2012-07-02 10:19:21 +05:30
Urvang Joshi
97649c8f6b Mux: Allow only some frames/tiles to have alpha.
And related const fixes.

Change-Id: I79f6f1b9f8c6faac8cc4ef24b58edff6d90de045
2012-06-29 17:17:19 +05:30
Pascal Massimino
e012dfd90f make width/height coding match the spec
* width/height in VP8X chunk is 24bit now
* Added some more constants #defines

Change-Id: I2f8ca7f965a247bccd341dd079ed2abf549c39d7
2012-06-28 00:20:28 -07:00
James Zern
b9ae4f0d88 cosmetics after mux changes b74ed6e, b494ad5
Change-Id: I8f693b1ba2537de89bda1dfbcf3b95abd17e420a
2012-06-22 14:30:01 -07:00
Urvang Joshi
b494ad5096 Mux: only allow adding frame/tiles at the end.
Change-Id: I5d685628da8c8ac85144cee2e5808b30ec79fef9
2012-06-22 11:18:18 -07:00
James Zern
e595e7c552 Merge "add demux.c to the makefiles" 2012-06-21 23:44:44 -07:00
James Zern
da47b5bda7 Merge "demux: add {Next,Prev}Chunk" 2012-06-21 23:43:03 -07:00
James Zern
e5f467420d add demux.c to the makefiles
Change-Id: If98c0ea859c845261218196df35e905589f09e76
2012-06-21 23:21:41 -07:00
James Zern
4708393c3b demux: add {Next,Prev}Chunk
replaces WebPDemuxSetChunk(). makes this consistent with the Frame
interface.

Change-Id: Ia2b1b98cc290f35b41fd14ee35a2a17cecac7ba8
2012-06-21 23:18:39 -07:00
James Zern
e8a0a821d2 demux: quiet msvc warnings
min_size is safe to be a uint32_t so avoid the size_t -> uint32_t
conversion

Change-Id: Ib53fe58d313b55dfcf3bee35d0cad48f210d07bf
2012-06-21 23:09:38 -07:00
Urvang Joshi
b74ed6e766 Mux API change:
'Set' and 'Get' methods for images take/return a bitstream as input,
instead of separate 'image' and 'alpha' arguments.

Also,
- Make WebPDataCopy() a public API
- Use WebPData for storing data in WebPChunk.
- Fix a potential memleak.

Change-Id: I4bf5ee6b39971384cb124b5b43921c27e9aabf3e
2012-06-20 11:00:42 -07:00
James Zern
622ef12ea5 demux: rename SetTile to SelectTile
Change-Id: I52b0b30578aeb77b71069f355c6b00901b948634
2012-06-18 13:49:41 -07:00
James Zern
02dd37a2a3 demux: add {Next,Prev}Frame
Replaces WebPDemuxSetFrame().

Change-Id: I38cef0ebeabb5c2f164322502abe1780f7a65e06
2012-06-18 13:37:16 -07:00
James Zern
b402b1fbb9 libwebp/demux: add Frame/Chunk iteration
Change-Id: I2da68611b375de48391adcf446df31a93450c7d8
2012-06-12 23:45:11 -07:00
James Zern
ad9ada3b9f libwebp/demux: add WebPDemuxGetI
Enables queries for format flag, canvas width/height.

Change-Id: I1d97a633712141e42dfc86c95492eb6da5cefa01
2012-06-12 23:45:10 -07:00
James Zern
2f2d4d5889 libwebp/demux: add extended format parsing
Extends parser to support 'VP8X' and its components

Change-Id: I81c59093b02c7ad27810a7b0473129ea06f99952
2012-06-12 23:45:08 -07:00
James Zern
962dcef6a8 libwebp/demux: add simple format parsing
Adds image parsing / validation framework for 'VP8 '/'VP8L' files

Change-Id: I8b0a5d1f20d86ab137c881a01dba3275ea191aa4
2012-06-12 23:45:06 -07:00
James Zern
f8f94081be libwebp: add WebPDemux stub functions
beginning of a separate interface to demux webp files.

Change-Id: If8bf9c43defe5f6c8678afd03541f7cd8261c99a
2012-06-12 23:45:02 -07:00
Urvang Joshi
fbdcb7ea38 NumNamedElements() should take an enum param.
- Move TAG_ID to webp/mux.h
- Rename it to WebPChunkId
- Rename IDs to WEBP_CHUNK_<tag>
- Remove "name" param from ChunkInfo struct and related changes.
- Rename WebPMuxNumNamedElements to WebPMuxNumChunks().
- WebPMuxNumChunks() takes WebPChunkId as param.

Change-Id: Ic6546e4a9ab823b556cdbc600faa137076546a2b
2012-06-11 12:26:13 +05:30
Urvang Joshi
6d5c797cee Remove support for partial files in Mux.
Change-Id: Ie084f308c79a3cfaf2ea13e800397debc2643470
2012-06-07 13:46:42 +05:30
Urvang Joshi
f1df5587d9 WebPMuxAssemble() returns WebPData*.
Also add an API 'WebPDataFree()'

Change-Id: I00dc4c67fd78a541a18aaf0e65b8ef62d9769803
2012-06-07 11:05:57 +05:30
Urvang Joshi
814a063925 Rename 'Add' APIs to 'Set'.
Change-Id: I10a836a5bc3c9207b6f7fa423bb64bc9bcac055b
2012-06-05 20:37:51 +05:30
Urvang Joshi
4fc4a47f6e Use WebPData in MUX set APIs
Change-Id: Ibdede3c1cd02c6aeef333718592da313f10f6408
2012-06-05 14:21:46 +05:30
Vikas Arora
069f903a08 Change in lossless bit-stream.
Change the lossless signature to 0x2f
Add 1 bit indicator for 'droppable (or trivial) alpha)'.
Add 3 bit lossless version (for future extension like yuv support).
Change the sub-resolution information to 3 bits implying range [2 .. 9]

Change-Id: Ic7b8c069240bbcd326cf5d5d4cd2dde8667851e2
2012-06-04 12:47:01 +05:30
Urvang Joshi
c13f663261 Move consts to internal header format_constants.h
Change-Id: Ic6180c16d0b4245680738992925e4608c593fbe8
2012-05-24 15:02:02 +05:30
Urvang Joshi
c975c44ea5 Alpha flag fix for lossless.
- Make sure alpha flag is set in case of a lossless file with VP8X chunk.
  The semantic of ALPHA_FLAG changes with this: it means the images
  contain alpha (rather than ALPH chunk in particular).
- Update the mux container spec to add 1-line description of alpha
  flag.
- Rename "HasLosslessImages()" to "MuxHasLosslessImages()", and other
  similar function renames.
- Rename FeatureFlags to WebPFeatureFlags
- Elaborated a comment for a special case.
- A misc comment fix.

Change-Id: If212ccf4338c125b4c71c10bf281a51b3ba7ff45
2012-05-24 11:35:12 +05:30
Urvang Joshi
8d77dc29e1 Add support for lossless in mux:
- Separate out 'CHUNK_INDEX' from 'TAG_ID' (this is to help with the
  situation where two different tags - "VP8 " and "VP8L" can have the
  same TAG_ID -> IMAGE_ID).
- Some internal methods now take 'CHUNK_INDEX' param instea of 'TAG_ID'
  as appropriate.
- Add kChunks[] entry for lossless.
- Rename WebPMuxImage.vp8_ --> WebPMuxImage.img_
- SetImage() and AddFrame/Tile() infer whether the bitstream is a
  lossless one based on LOSSLESS_MAGIC_BYTE. The correct tag is stored
  based on this.

Also, handle the case when GetVP8Info/GetVP8LInfo() fails.

Change-Id: I6b3bc9555cedb791b43f743b5a7770958864bb05
2012-05-21 13:54:18 +05:30
Urvang Joshi
c579a71012 Introduce CHUNK_SIZE_BYTES in muxi.h.
Plus a style fix.

Change-Id: Id94df6c91a96598cb022c813e0981f542aebe982
2012-05-10 13:16:18 +05:30
James Zern
b3515c6215 mux: drop 'chunk' from ChunkInfo member names
fixes naming style (members should be lowercase, not camelcase).

Change-Id: I431acdfe3cc3740d9effe9df80a94ca284a072b6
2012-05-01 17:47:18 -07:00
James Zern
aea7923ca2 muxi.h: remove some unused defines
Change-Id: I713659b7ed83bafedd94a0b16379decea293a2f0
2012-05-01 17:47:11 -07:00
pascal massimino
4718e44988 Merge "muxedit: a few more size_t changes" 2012-04-28 03:04:08 -07:00
pascal massimino
82654f961d Merge "muxedit: remove a few redundant NULL checks" 2012-04-28 02:50:27 -07:00
James Zern
ccddb3fc6f muxedit: remove a few redundant NULL checks
Change-Id: I8285a7694d40b0f5c986dbfe40703251682eaafc
2012-04-27 19:06:03 -07:00
James Zern
a6cdf7107a muxedit: a few more size_t changes
Change-Id: I18266dc572426cb3daace6e0ad8f2ae21687a151
2012-04-27 18:53:08 -07:00
pascal massimino
a384689292 Merge "mux: remove unused LIST_ID" 2012-04-27 03:03:34 -07:00
James Zern
dee466926b mux: remove unused LIST_ID
The 'LIST' fourcc is not a well known value in the context of webp.

Change-Id: I6a571f5f3acd6463cf3cad7c5d5ffa89d0597fb6
2012-04-25 18:18:25 -07:00