Home | History | Annotate | Download | only in enc

Lines Matching refs:pic

33 static int PutPaddingByte(const WebPPicture* const pic) {
35 return !!pic->writer(pad_byte, 1, pic);
43 const WebPPicture* const pic = enc->pic_;
49 if (!pic->writer(riff, sizeof(riff), pic)) {
56 const WebPPicture* const pic = enc->pic_;
63 assert(pic->width >= 1 && pic->height >= 1);
64 assert(pic->width <= MAX_CANVAS_SIZE && pic->height <= MAX_CANVAS_SIZE);
72 PutLE24(vp8x + CHUNK_HEADER_SIZE + 4, pic->width - 1);
73 PutLE24(vp8x + CHUNK_HEADER_SIZE + 7, pic->height - 1);
74 if (!pic->writer(vp8x, sizeof(vp8x), pic)) {
81 const WebPPicture* const pic = enc->pic_;
90 if (!pic->writer(alpha_chunk_hdr, sizeof(alpha_chunk_hdr), pic)) {
95 if (!pic->writer(enc->alpha_data_, enc->alpha_data_size_, pic)) {
100 if ((enc->alpha_data_size_ & 1) && !PutPaddingByte(pic)) {
106 static WebPEncodingError PutVP8Header(const WebPPicture* const pic,
113 if (!pic->writer(vp8_chunk_hdr, sizeof(vp8_chunk_hdr), pic)) {
119 static WebPEncodingError PutVP8FrameHeader(const WebPPicture* const pic,
141 vp8_frm_hdr[6] = pic->width & 0xff;
142 vp8_frm_hdr[7] = pic->width >> 8;
143 vp8_frm_hdr[8] = pic->height & 0xff;
144 vp8_frm_hdr[9] = pic->height >> 8;
146 if (!pic->writer(vp8_frm_hdr, sizeof(vp8_frm_hdr), pic)) {
155 WebPPicture* const pic = enc->pic_;
175 err = PutVP8Header(pic, vp8_size);
179 err = PutVP8FrameHeader(pic, enc->profile_, size0);
187 return WebPEncodingSetError(pic, err);
253 WebPPicture* const pic) {
259 return WebPEncodingSetError(pic, VP8_ENC_ERROR_PARTITION_OVERFLOW);
265 return p ? pic->writer(buf, 3 * p, pic) : 1;
277 WebPPicture* const pic = enc->pic_;
287 return WebPEncodingSetError(pic, VP8_ENC_ERROR_BITSTREAM_OUT_OF_MEMORY);
293 return WebPEncodingSetError(pic, VP8_ENC_ERROR_BITSTREAM_OUT_OF_MEMORY);
357 WebPPicture* const pic = enc->pic_;
392 return WebPEncodingSetError(pic, VP8_ENC_ERROR_FILE_TOO_BIG);
400 && pic->writer(part0, size0, pic)
401 && EmitPartitionsSize(enc, pic);
410 ok = ok && pic->writer(buf, size, pic);
412 ok = ok && WebPReportProgress(pic, enc->percent_ + percent_per_part,
418 ok = PutPaddingByte(pic);
422 ok = ok && WebPReportProgress(pic, final_percent, &enc->percent_);