mirror of
https://github.com/webmproject/libwebp.git
synced 2025-07-16 22:09:57 +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:
@ -70,9 +70,10 @@ void VP8IteratorInit(VP8Encoder* const enc, VP8EncIterator* const it) {
|
||||
}
|
||||
|
||||
int VP8IteratorProgress(const VP8EncIterator* const it, int delta) {
|
||||
if (delta && it->enc_->pic_->progress_hook) {
|
||||
const int percent = it->percent0_ + delta * it->y_ / (it->enc_->mb_h_ - 1);
|
||||
return WebPReportProgress(it->enc_, percent);
|
||||
VP8Encoder* const enc = it->enc_;
|
||||
if (delta && enc->pic_->progress_hook) {
|
||||
const int percent = it->percent0_ + delta * it->y_ / (enc->mb_h_ - 1);
|
||||
return WebPReportProgress(enc->pic_, percent, &enc->percent_);
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
Reference in New Issue
Block a user