Lines Matching refs:dest_buf
42 int FPDFAPI_FlateOutput(void* context, unsigned char* dest_buf, unsigned int dest_size)
44 ((z_stream*)context)->next_out = dest_buf;
51 FXSYS_memset8(dest_buf + written, '\0', dest_size - written);
72 void FPDFAPI_FlateCompress(unsigned char* dest_buf, unsigned long* dest_size, const unsigned char* src_buf, unsigned long src_size)
74 compress(dest_buf, dest_size, src_buf, src_size);
128 int CLZWDecoder::Decode(FX_LPBYTE dest_buf, FX_DWORD& dest_size, const FX_BYTE* src_buf, FX_DWORD& src_size, FX_BOOL bEarlyChange)
134 m_pOutput = dest_buf;
238 FX_LPBYTE dest_buf = FX_Alloc( FX_BYTE, (row_size + 1) * row_count);
239 if (dest_buf == NULL) {
244 FX_LPBYTE pDestData = dest_buf;
319 data_buf = dest_buf;
392 FX_LPBYTE dest_buf = FX_Alloc( FX_BYTE, row_size * row_count);
393 if (dest_buf == NULL) {
398 FX_LPBYTE pDestData = dest_buf;
470 data_buf = dest_buf;
473 static void TIFF_PredictorEncodeLine(FX_LPBYTE dest_buf, int row_size, int BitsPerComponent, int Colors, int Columns)
489 FX_BYTE cur = (dest_buf[index] >> (8 - col - BitsPerComponent)) & mask;
490 FX_BYTE left = (dest_buf[index_pre] >> (8 - col_pre - BitsPerComponent)) & mask;
494 dest_buf[index] &= ~(mask << ((8 - col - BitsPerComponent)));
495 dest_buf[index] |= cur;
499 dest_buf[i] -= dest_buf[i - BytesPerPixel];
503 FX_WORD pixel = (dest_buf[i] << 8) | dest_buf[i + 1];
504 pixel -= (dest_buf[i - BytesPerPixel] << 8) | dest_buf[i - BytesPerPixel + 1];
505 dest_buf[i] = pixel >> 8;
506 dest_buf[i + 1] = (FX_BYTE)pixel;
524 static void TIFF_PredictLine(FX_LPBYTE dest_buf, int row_size, int BitsPerComponent, int Colors, int Columns)
533 if( ((dest_buf[index] >> (7 - col)) & 1) ^ ((dest_buf[index_pre] >> (8 - col_pre)) & 1) ) {
534 dest_buf[index] |= 1 << (7 - col);
536 dest_buf[index] &= ~(1 << (7 - col));
544 FX_WORD pixel = (dest_buf[i - BytesPerPixel] << 8) | dest_buf[i - BytesPerPixel + 1];
545 pixel += (dest_buf[i] << 8) | dest_buf[i + 1];
546 dest_buf[i] = pixel >> 8;
547 dest_buf[i + 1] = (FX_BYTE)pixel;
551 dest_buf[i] += dest_buf[i - BytesPerPixel];
728 FX_LPBYTE& dest_buf, FX_DWORD& dest_size, FX_DWORD& offset)
739 dest_buf = NULL;
747 dest_buf = NULL;
770 dest_buf = NULL;
789 dest_buf = NULL;
795 dest_buf = NULL;
811 dest_buf = result_tmp_bufs[0];
815 dest_buf = NULL;
832 dest_buf = result_buf;
838 dest_buf = NULL;
845 dest_buf = guess_buf;
862 FX_DWORD estimated_size, FX_LPBYTE& dest_buf, FX_DWORD& dest_size)
865 dest_buf = NULL;
891 dest_buf = FX_Alloc( FX_BYTE, dest_size + 1);
892 if (dest_buf == NULL) {
895 dest_buf[dest_size] = '\0';
896 pDecoder->Decode(dest_buf, dest_size, src_buf, offset, bEarlyChange);
899 FlateUncompress(src_buf, src_size, estimated_size, dest_buf, dest_size, offset);
905 PNG_Predictor(dest_buf, dest_size, Colors, BitsPerComponent, Columns);
907 TIFF_Predictor(dest_buf, dest_size, Colors, BitsPerComponent, Columns);
913 FX_LPBYTE& dest_buf, FX_DWORD& dest_size)
916 return Encode(src_buf, src_size, dest_buf, dest_size);
930 ret = Encode(pSrcBuf, src_size, dest_buf, dest_size);
934 FX_BOOL CCodec_FlateModule::Encode(FX_LPCBYTE src_buf, FX_DWORD src_size, FX_LPBYTE& dest_buf, FX_DWORD& dest_size)
937 dest_buf = FX_Alloc( FX_BYTE, dest_size);
938 if (dest_buf == NULL) {
942 FPDFAPI_FlateCompress(dest_buf, &temp_size, src_buf, src_size);