Lines Matching defs:pdither
88 { DITHER_DATA *pdither ;
90 pdither = psf->dither ; /* This may be NULL. */
94 { if (pdither == NULL)
97 if (pdither->read_short)
98 psf->read_short = pdither->read_short ;
99 if (pdither->read_int)
100 psf->read_int = pdither->read_int ;
101 if (pdither->read_float)
102 psf->read_float = pdither->read_float ;
103 if (pdither->read_double)
104 psf->read_double = pdither->read_double ;
110 { if (pdither == NULL)
113 if (pdither->write_short)
114 psf->write_short = pdither->write_short ;
115 if (pdither->write_int)
116 psf->write_int = pdither->write_int ;
117 if (pdither->write_float)
118 psf->write_float = pdither->write_float ;
119 if (pdither->write_double)
120 psf->write_double = pdither->write_double ;
126 { if (pdither == NULL)
127 pdither = psf->dither = calloc (1, sizeof (DITHER_DATA)) ;
128 if (pdither == NULL)
134 pdither->read_int = psf->read_int ;
143 pdither->read_short = psf->read_short ;
153 { if (pdither == NULL)
154 pdither = psf->dither = calloc (1, sizeof (DITHER_DATA)) ;
155 if (pdither == NULL)
161 pdither->write_int = psf->write_int ;
175 pdither->write_short = psf->write_short ;
178 pdither->write_int = psf->write_int ;
181 pdither->write_float = psf->write_float ;
184 pdither->write_double = psf->write_double ;
217 { DITHER_DATA *pdither ;
221 if ((pdither = psf->dither) == NULL)
233 return pdither->write_short (psf, ptr, len) ;
236 bufferlen = sizeof (pdither->buffer) / (sizeof (short)) ;
243 dither_short (ptr, (short*) pdither->buffer, writecount / psf->sf.channels, psf->sf.channels) ;
245 thiswrite = (int) pdither->write_short (psf, (short*) pdither->buffer, writecount) ;
257 { DITHER_DATA *pdither ;
261 if ((pdither = psf->dither) == NULL)
278 return pdither->write_int (psf, ptr, len) ;
282 bufferlen = sizeof (pdither->buffer) / (sizeof (int)) ;
289 dither_int (ptr, (int*) pdither->buffer, writecount / psf->sf.channels, psf->sf.channels) ;
291 thiswrite = (int) pdither->write_int (psf, (int*) pdither->buffer, writecount) ;
303 { DITHER_DATA *pdither ;
307 if ((pdither = psf->dither) == NULL)
324 return pdither->write_float (psf, ptr, len) ;
327 bufferlen = sizeof (pdither->buffer) / (sizeof (float)) ;
334 dither_float (ptr, (float*) pdither->buffer, writecount / psf->sf.channels, psf->sf.channels) ;
336 thiswrite = (int) pdither->write_float (psf, (float*) pdither->buffer, writecount) ;
348 { DITHER_DATA *pdither ;
352 if ((pdither = psf->dither) == NULL)
369 return pdither->write_double (psf, ptr, len) ;
373 bufferlen = sizeof (pdither->buffer) / sizeof (double) ;
380 dither_double (ptr, (double*) pdither->buffer, writecount / psf->sf.channels, psf->sf.channels) ;
382 thiswrite = (int) pdither->write_double (psf, (double*) pdither->buffer, writecount) ;