Home | History | Annotate | Download | only in enc

Lines Matching refs:pic

30 static int PutPaddingByte(const WebPPicture* const pic) {
33 return !!pic->writer(pad_byte, 1, pic);
41 const WebPPicture* const pic = enc->pic_;
47 if (!pic->writer(riff, sizeof(riff), pic)) {
54 const WebPPicture* const pic = enc->pic_;
61 assert(pic->width >= 1 && pic->height >= 1);
62 assert(pic->width <= MAX_CANVAS_SIZE && pic->height <= MAX_CANVAS_SIZE);
70 PutLE24(vp8x + CHUNK_HEADER_SIZE + 4, pic->width - 1);
71 PutLE24(vp8x + CHUNK_HEADER_SIZE + 7, pic->height - 1);
72 if(!pic->writer(vp8x, sizeof(vp8x), pic)) {
79 const WebPPicture* const pic = enc->pic_;
88 if (!pic->writer(alpha_chunk_hdr, sizeof(alpha_chunk_hdr), pic)) {
93 if (!pic->writer(enc->alpha_data_, enc->alpha_data_size_, pic)) {
98 if ((enc->alpha_data_size_ & 1) && !PutPaddingByte(pic)) {
104 static WebPEncodingError PutVP8Header(const WebPPicture* const pic,
111 if (!pic->writer(vp8_chunk_hdr, sizeof(vp8_chunk_hdr), pic)) {
117 static WebPEncodingError PutVP8FrameHeader(const WebPPicture* const pic,
139 vp8_frm_hdr[6] = pic->width & 0xff;
140 vp8_frm_hdr[7] = pic->width >> 8;
141 vp8_frm_hdr[8] = pic->height & 0xff;
142 vp8_frm_hdr[9] = pic->height >> 8;
144 if (!pic->writer(vp8_frm_hdr, sizeof(vp8_frm_hdr), pic)) {
153 WebPPicture* const pic = enc->pic_;
173 err = PutVP8Header(pic, vp8_size);
177 err = PutVP8FrameHeader(pic, enc->profile_, size0);
185 return WebPEncodingSetError(pic, err);
251 WebPPicture* const pic) {
257 return WebPEncodingSetError(pic, VP8_ENC_ERROR_PARTITION_OVERFLOW);
263 return p ? pic->writer(buf, 3 * p, pic) : 1;
275 WebPPicture* const pic = enc->pic_;
285 return WebPEncodingSetError(pic, VP8_ENC_ERROR_BITSTREAM_OUT_OF_MEMORY);
291 return WebPEncodingSetError(pic, VP8_ENC_ERROR_BITSTREAM_OUT_OF_MEMORY);
355 WebPPicture* const pic = enc->pic_;
390 return WebPEncodingSetError(pic, VP8_ENC_ERROR_FILE_TOO_BIG);
398 && pic->writer(part0, size0, pic)
399 && EmitPartitionsSize(enc, pic);
408 ok = ok && pic->writer(buf, size, pic);
410 ok = ok && WebPReportProgress(pic, enc->percent_ + percent_per_part,
416 ok = PutPaddingByte(pic);
420 ok = ok && WebPReportProgress(pic, final_percent, &enc->percent_);