mirror of
https://github.com/webmproject/libwebp.git
synced 2025-07-16 13:59:51 +02:00
WebPReportProgress: use non-encoder specific params
Take picture and percent value storage location instead of VP8Encoder. This will allow reuse by the lossless encoder. Change-Id: Ic49dbc800cc3e2df60d20f4ebac277f68ed6031b
This commit is contained in:
@ -416,7 +416,8 @@ int VP8EncWrite(VP8Encoder* const enc) {
|
||||
if (size)
|
||||
ok = ok && pic->writer(buf, size, pic);
|
||||
VP8BitWriterWipeOut(enc->parts_ + p); // will free the internal buffer.
|
||||
ok = ok && WebPReportProgress(enc, enc->percent_ + percent_per_part);
|
||||
ok = ok && WebPReportProgress(pic, enc->percent_ + percent_per_part,
|
||||
&enc->percent_);
|
||||
}
|
||||
|
||||
// Padding byte
|
||||
@ -425,7 +426,7 @@ int VP8EncWrite(VP8Encoder* const enc) {
|
||||
}
|
||||
|
||||
enc->coded_size_ = (int)(CHUNK_HEADER_SIZE + riff_size);
|
||||
ok = ok && WebPReportProgress(enc, final_percent);
|
||||
ok = ok && WebPReportProgress(pic, final_percent, &enc->percent_);
|
||||
return ok;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user