Lines Matching refs:enc
46 #include "../enc/vp8li.h"
286 static int EncodeAlpha(VP8Encoder* const enc,
290 const WebPPicture* const pic = enc->pic_;
302 assert(enc != NULL && pic != NULL && pic->a != NULL);
344 enc->sse_[3] = sse;
355 static int CompressAlphaJob(VP8Encoder* const enc, void* dummy) {
356 const WebPConfig* config = enc->config_;
364 if (!EncodeAlpha(enc, config->alpha_quality, config->alpha_compression,
372 enc->alpha_data_size_ = (uint32_t)alpha_size;
373 enc->alpha_data_ = alpha_data;
378 void VP8EncInitAlpha(VP8Encoder* const enc) {
379 enc->has_alpha_ = WebPPictureHasTransparency(enc->pic_);
380 enc->alpha_data_ = NULL;
381 enc->alpha_data_size_ = 0;
382 if (enc->thread_level_ > 0) {
383 WebPWorker* const worker = &enc->alpha_worker_;
385 worker->data1 = enc;
391 int VP8EncStartAlpha(VP8Encoder* const enc) {
392 if (enc->has_alpha_) {
393 if (enc->thread_level_ > 0) {
394 WebPWorker* const worker = &enc->alpha_worker_;
402 return CompressAlphaJob(enc, NULL); // just do the job right away
408 int VP8EncFinishAlpha(VP8Encoder* const enc) {
409 if (enc->has_alpha_) {
410 if (enc->thread_level_ > 0) {
411 WebPWorker* const worker = &enc->alpha_worker_;
415 return WebPReportProgress(enc->pic_, enc->percent_ + 20, &enc->percent_);
418 int VP8EncDeleteAlpha(VP8Encoder* const enc) {
420 if (enc->thread_level_ > 0) {
421 WebPWorker* const worker = &enc->alpha_worker_;
427 WebPSafeFree(enc->alpha_data_);
428 enc->alpha_data_ = NULL;
429 enc->alpha_data_size_ = 0;
430 enc->has_alpha_ = 0;