mirror of
https://github.com/webmproject/libwebp.git
synced 2025-07-18 23:09:52 +02:00
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
This commit is contained in:
@ -76,7 +76,7 @@ static WebPMuxError ChunkVerifyAndAssignData(WebPChunk* chunk,
|
||||
//------------------------------------------------------------------------------
|
||||
// Create a mux object from WebP-RIFF data.
|
||||
|
||||
WebPMux* WebPMuxCreateInternal(const WebPData* const bitstream, int copy_data,
|
||||
WebPMux* WebPMuxCreateInternal(const WebPData* bitstream, int copy_data,
|
||||
int version) {
|
||||
size_t riff_size;
|
||||
uint32_t tag;
|
||||
@ -89,7 +89,9 @@ WebPMux* WebPMuxCreateInternal(const WebPData* const bitstream, int copy_data,
|
||||
ChunkInit(&chunk);
|
||||
|
||||
// Sanity checks.
|
||||
if (version != WEBP_MUX_ABI_VERSION) return NULL; // version mismatch
|
||||
if (WEBP_ABI_IS_INCOMPATIBLE(version, WEBP_MUX_ABI_VERSION)) {
|
||||
return NULL; // version mismatch
|
||||
}
|
||||
if (bitstream == NULL) return NULL;
|
||||
|
||||
data = bitstream->bytes_;
|
||||
@ -188,7 +190,7 @@ WebPMux* WebPMuxCreateInternal(const WebPData* const bitstream, int copy_data,
|
||||
//------------------------------------------------------------------------------
|
||||
// Get API(s).
|
||||
|
||||
WebPMuxError WebPMuxGetFeatures(const WebPMux* const mux, uint32_t* flags) {
|
||||
WebPMuxError WebPMuxGetFeatures(const WebPMux* mux, uint32_t* flags) {
|
||||
WebPData data;
|
||||
WebPMuxError err;
|
||||
|
||||
@ -268,8 +270,7 @@ static WebPMuxError SynthesizeBitstream(WebPMuxImage* const wpi,
|
||||
return WEBP_MUX_OK;
|
||||
}
|
||||
|
||||
WebPMuxError WebPMuxGetImage(const WebPMux* const mux,
|
||||
WebPData* const bitstream) {
|
||||
WebPMuxError WebPMuxGetImage(const WebPMux* mux, WebPData* bitstream) {
|
||||
WebPMuxError err;
|
||||
WebPMuxImage* wpi = NULL;
|
||||
|
||||
@ -288,20 +289,18 @@ WebPMuxError WebPMuxGetImage(const WebPMux* const mux,
|
||||
return SynthesizeBitstream(wpi, bitstream);
|
||||
}
|
||||
|
||||
WebPMuxError WebPMuxGetMetadata(const WebPMux* const mux,
|
||||
WebPData* const metadata) {
|
||||
WebPMuxError WebPMuxGetMetadata(const WebPMux* mux, WebPData* metadata) {
|
||||
if (mux == NULL || metadata == NULL) return WEBP_MUX_INVALID_ARGUMENT;
|
||||
return MuxGet(mux, IDX_META, 1, metadata);
|
||||
}
|
||||
|
||||
WebPMuxError WebPMuxGetColorProfile(const WebPMux* const mux,
|
||||
WebPData* const color_profile) {
|
||||
WebPMuxError WebPMuxGetColorProfile(const WebPMux* mux,
|
||||
WebPData* color_profile) {
|
||||
if (mux == NULL || color_profile == NULL) return WEBP_MUX_INVALID_ARGUMENT;
|
||||
return MuxGet(mux, IDX_ICCP, 1, color_profile);
|
||||
}
|
||||
|
||||
WebPMuxError WebPMuxGetLoopCount(const WebPMux* const mux,
|
||||
int* const loop_count) {
|
||||
WebPMuxError WebPMuxGetLoopCount(const WebPMux* mux, int* loop_count) {
|
||||
WebPData image;
|
||||
WebPMuxError err;
|
||||
|
||||
@ -348,16 +347,16 @@ static WebPMuxError MuxGetFrameTileInternal(
|
||||
return SynthesizeBitstream(wpi, bitstream);
|
||||
}
|
||||
|
||||
WebPMuxError WebPMuxGetFrame(const WebPMux* const mux, uint32_t nth,
|
||||
WebPData* const bitstream, int* const x_offset,
|
||||
int* const y_offset, int* const duration) {
|
||||
WebPMuxError WebPMuxGetFrame(const WebPMux* mux, uint32_t nth,
|
||||
WebPData* bitstream,
|
||||
int* x_offset, int* y_offset, int* duration) {
|
||||
return MuxGetFrameTileInternal(mux, nth, bitstream, x_offset, y_offset,
|
||||
duration, kChunks[IDX_FRAME].tag);
|
||||
}
|
||||
|
||||
WebPMuxError WebPMuxGetTile(const WebPMux* const mux, uint32_t nth,
|
||||
WebPData* const bitstream,
|
||||
int* const x_offset, int* const y_offset) {
|
||||
WebPMuxError WebPMuxGetTile(const WebPMux* mux, uint32_t nth,
|
||||
WebPData* bitstream,
|
||||
int* x_offset, int* y_offset) {
|
||||
return MuxGetFrameTileInternal(mux, nth, bitstream, x_offset, y_offset, NULL,
|
||||
kChunks[IDX_TILE].tag);
|
||||
}
|
||||
@ -384,7 +383,7 @@ static int CountChunks(const WebPChunk* const chunk_list, uint32_t tag) {
|
||||
return count;
|
||||
}
|
||||
|
||||
WebPMuxError WebPMuxNumChunks(const WebPMux* const mux,
|
||||
WebPMuxError WebPMuxNumChunks(const WebPMux* mux,
|
||||
WebPChunkId id, int* num_elements) {
|
||||
if (mux == NULL || num_elements == NULL) {
|
||||
return WEBP_MUX_INVALID_ARGUMENT;
|
||||
|
Reference in New Issue
Block a user