Lines Matching defs:buffer

191 static void Color_Negative (SANE_Byte * buffer, SANE_Int size,
193 static void Color_to_Gray (SANE_Byte * buffer, SANE_Int size, SANE_Int depth);
194 static void Gray_to_Lineart (SANE_Byte * buffer, SANE_Int size,
200 static void gamma_apply (TScanner * s, SANE_Byte * buffer, SANE_Int size,
724 Color_Negative (SANE_Byte * buffer, SANE_Int size, SANE_Int depth)
726 if (buffer != NULL)
733 USHORT *sColor = (void *) buffer;
743 *(buffer + a) = max_value - *(buffer + a);
793 Gray_to_Lineart (SANE_Byte * buffer, SANE_Int size, SANE_Int threshold)
797 if (buffer != NULL)
811 && (buffer[fromBufferPos_i] < threshold))
817 buffer[toBufferPos_i] = toBufferByte;
824 Color_to_Gray (SANE_Byte * buffer, SANE_Int size, SANE_Int depth)
828 if (buffer != NULL)
837 ptr_src = (void *) buffer;
838 ptr_dst = (void *) buffer;
942 gamma_apply (TScanner * s, SANE_Byte * buffer, SANE_Int size, SANE_Int depth)
944 if ((s != NULL) && (buffer != NULL))
948 SANE_Byte *pColor = buffer;
949 USHORT *sColor = (void *) buffer;
2430 /* Allocate buffer to read one line */
2474 SANE_Byte *buffer, *pbuffer;
2499 for 8bit data. Next buffer will be used to retrieve data from
2501 buffer = (SANE_Byte *) malloc (emul_maxlen * sizeof (SANE_Byte));
2503 if (buffer != NULL)
2505 pbuffer = buffer;
2520 /* read as many lines the buffer may contain and while there are lines to be read */
2527 /* copy to buffer as many bytes as we can */
2552 /* copy to buffer as many bytes as we can */
2559 /* the rest will be copied to s->rest buffer */
2574 /* process buffer before sending to frontend */
2578 buffer : contains retrieved image
2587 gamma_apply (s, buffer, emul_len, s->ScanParams.depth);
2593 Color_Negative (buffer, emul_len,
2597 Color_Negative (buffer, emul_len, s->ScanParams.depth);
2602 Color_to_Gray (buffer, emul_len, s->ScanParams.depth);
2614 Depth_16_to_8 (buffer, emul_len, buffer);
2628 Gray_to_Lineart (buffer, emul_len, s->cnv.threshold);
2636 memcpy (buf, buffer, *len);
2639 free (buffer);