mirror of
https://github.com/webmproject/libwebp.git
synced 2025-07-14 21:09:55 +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:
@ -26,11 +26,14 @@ static void MuxInit(WebPMux* const mux) {
|
||||
}
|
||||
|
||||
WebPMux* WebPNewInternal(int version) {
|
||||
WebPMux* const mux = (version == WEBP_MUX_ABI_VERSION) ?
|
||||
(WebPMux*)malloc(sizeof(WebPMux)) : NULL;
|
||||
// If mux is NULL MuxInit is a noop.
|
||||
MuxInit(mux);
|
||||
return mux;
|
||||
if (WEBP_ABI_IS_INCOMPATIBLE(version, WEBP_MUX_ABI_VERSION)) {
|
||||
return NULL;
|
||||
} else {
|
||||
WebPMux* const mux = (WebPMux*)malloc(sizeof(WebPMux));
|
||||
// If mux is NULL MuxInit is a noop.
|
||||
MuxInit(mux);
|
||||
return mux;
|
||||
}
|
||||
}
|
||||
|
||||
static void DeleteAllChunks(WebPChunk** const chunk_list) {
|
||||
@ -49,7 +52,7 @@ static void MuxRelease(WebPMux* const mux) {
|
||||
DeleteAllChunks(&mux->unknown_);
|
||||
}
|
||||
|
||||
void WebPMuxDelete(WebPMux* const mux) {
|
||||
void WebPMuxDelete(WebPMux* mux) {
|
||||
// If mux is NULL MuxRelease is a noop.
|
||||
MuxRelease(mux);
|
||||
free(mux);
|
||||
@ -202,8 +205,8 @@ static WebPMuxError DeleteLoopCount(WebPMux* const mux) {
|
||||
//------------------------------------------------------------------------------
|
||||
// Set API(s).
|
||||
|
||||
WebPMuxError WebPMuxSetImage(WebPMux* const mux,
|
||||
const WebPData* const bitstream, int copy_data) {
|
||||
WebPMuxError WebPMuxSetImage(WebPMux* mux,
|
||||
const WebPData* bitstream, int copy_data) {
|
||||
WebPMuxError err;
|
||||
WebPChunk chunk;
|
||||
WebPMuxImage wpi;
|
||||
@ -257,8 +260,7 @@ WebPMuxError WebPMuxSetImage(WebPMux* const mux,
|
||||
return err;
|
||||
}
|
||||
|
||||
WebPMuxError WebPMuxSetMetadata(WebPMux* const mux,
|
||||
const WebPData* const metadata,
|
||||
WebPMuxError WebPMuxSetMetadata(WebPMux* mux, const WebPData* metadata,
|
||||
int copy_data) {
|
||||
WebPMuxError err;
|
||||
|
||||
@ -275,8 +277,7 @@ WebPMuxError WebPMuxSetMetadata(WebPMux* const mux,
|
||||
return MuxSet(mux, IDX_META, 1, metadata, copy_data);
|
||||
}
|
||||
|
||||
WebPMuxError WebPMuxSetColorProfile(WebPMux* const mux,
|
||||
const WebPData* const color_profile,
|
||||
WebPMuxError WebPMuxSetColorProfile(WebPMux* mux, const WebPData* color_profile,
|
||||
int copy_data) {
|
||||
WebPMuxError err;
|
||||
|
||||
@ -293,7 +294,7 @@ WebPMuxError WebPMuxSetColorProfile(WebPMux* const mux,
|
||||
return MuxSet(mux, IDX_ICCP, 1, color_profile, copy_data);
|
||||
}
|
||||
|
||||
WebPMuxError WebPMuxSetLoopCount(WebPMux* const mux, int loop_count) {
|
||||
WebPMuxError WebPMuxSetLoopCount(WebPMux* mux, int loop_count) {
|
||||
WebPMuxError err;
|
||||
uint8_t* data = NULL;
|
||||
|
||||
@ -396,16 +397,14 @@ static WebPMuxError MuxPushFrameTileInternal(
|
||||
return err;
|
||||
}
|
||||
|
||||
WebPMuxError WebPMuxPushFrame(WebPMux* const mux,
|
||||
const WebPData* const bitstream,
|
||||
WebPMuxError WebPMuxPushFrame(WebPMux* mux, const WebPData* bitstream,
|
||||
int x_offset, int y_offset,
|
||||
int duration, int copy_data) {
|
||||
return MuxPushFrameTileInternal(mux, bitstream, x_offset, y_offset,
|
||||
duration, copy_data, kChunks[IDX_FRAME].tag);
|
||||
}
|
||||
|
||||
WebPMuxError WebPMuxPushTile(WebPMux* const mux,
|
||||
const WebPData* const bitstream,
|
||||
WebPMuxError WebPMuxPushTile(WebPMux* mux, const WebPData* bitstream,
|
||||
int x_offset, int y_offset,
|
||||
int copy_data) {
|
||||
return MuxPushFrameTileInternal(mux, bitstream, x_offset, y_offset,
|
||||
@ -416,7 +415,7 @@ WebPMuxError WebPMuxPushTile(WebPMux* const mux,
|
||||
//------------------------------------------------------------------------------
|
||||
// Delete API(s).
|
||||
|
||||
WebPMuxError WebPMuxDeleteImage(WebPMux* const mux) {
|
||||
WebPMuxError WebPMuxDeleteImage(WebPMux* mux) {
|
||||
WebPMuxError err;
|
||||
|
||||
if (mux == NULL) return WEBP_MUX_INVALID_ARGUMENT;
|
||||
@ -429,11 +428,11 @@ WebPMuxError WebPMuxDeleteImage(WebPMux* const mux) {
|
||||
return WEBP_MUX_OK;
|
||||
}
|
||||
|
||||
WebPMuxError WebPMuxDeleteMetadata(WebPMux* const mux) {
|
||||
WebPMuxError WebPMuxDeleteMetadata(WebPMux* mux) {
|
||||
return MuxDeleteAllNamedData(mux, IDX_META);
|
||||
}
|
||||
|
||||
WebPMuxError WebPMuxDeleteColorProfile(WebPMux* const mux) {
|
||||
WebPMuxError WebPMuxDeleteColorProfile(WebPMux* mux) {
|
||||
return MuxDeleteAllNamedData(mux, IDX_ICCP);
|
||||
}
|
||||
|
||||
@ -446,11 +445,11 @@ static WebPMuxError DeleteFrameTileInternal(WebPMux* const mux, uint32_t nth,
|
||||
return MuxImageDeleteNth(&mux->images_, nth, id);
|
||||
}
|
||||
|
||||
WebPMuxError WebPMuxDeleteFrame(WebPMux* const mux, uint32_t nth) {
|
||||
WebPMuxError WebPMuxDeleteFrame(WebPMux* mux, uint32_t nth) {
|
||||
return DeleteFrameTileInternal(mux, nth, IDX_FRAME);
|
||||
}
|
||||
|
||||
WebPMuxError WebPMuxDeleteTile(WebPMux* const mux, uint32_t nth) {
|
||||
WebPMuxError WebPMuxDeleteTile(WebPMux* mux, uint32_t nth) {
|
||||
return DeleteFrameTileInternal(mux, nth, IDX_TILE);
|
||||
}
|
||||
|
||||
@ -644,8 +643,7 @@ static WebPMuxError CreateVP8XChunk(WebPMux* const mux) {
|
||||
return err;
|
||||
}
|
||||
|
||||
WebPMuxError WebPMuxAssemble(WebPMux* const mux,
|
||||
WebPData* const assembled_data) {
|
||||
WebPMuxError WebPMuxAssemble(WebPMux* mux, WebPData* assembled_data) {
|
||||
size_t size = 0;
|
||||
uint8_t* data = NULL;
|
||||
uint8_t* dst = NULL;
|
||||
|
Reference in New Issue
Block a user