| /plan9/sys/src/games/mp3dec/ |
| H A D | layer12.c | 107 unsigned int nch, bound, ch, s, sb, nb; in mad_layer_I() local 135 for (ch = 0; ch < nch; ++ch) { in mad_layer_I() 143 allocation[ch][sb] = nb ? nb + 1 : 0; in mad_layer_I() 162 for (ch = 0; ch < nch; ++ch) { in mad_layer_I() 163 if (allocation[ch][sb]) { in mad_layer_I() 164 scalefactor[ch][sb] = mad_bit_read(&stream->ptr, 6); in mad_layer_I() 172 if (scalefactor[ch][sb] == 63) { in mad_layer_I() 185 for (ch = 0; ch < nch; ++ch) { in mad_layer_I() 186 nb = allocation[ch][sb]; in mad_layer_I() 187 frame->sbsample[ch][s][sb] = nb ? in mad_layer_I() [all …]
|
| /plan9/sys/src/games/mp3enc/ |
| H A D | quantize.c | 711 const int ch, in outer_loop() argument 742 gfc->OldValue[ch], xrpow, l3_enc_w); in outer_loop() 743 gfc->OldValue[ch] = cod_info->global_gain; in outer_loop() 911 int gr, ch, i; in iteration_finish() local 914 for (ch = 0; ch < gfc->channels_out; ch++) { in iteration_finish() 915 gr_info *cod_info = &l3_side->gr[gr].ch[ch].tt; in iteration_finish() 919 best_scalefac_store (gfc, gr, ch, l3_enc, l3_side, scalefac); in iteration_finish() 924 best_huffman_divide (gfc, gr, ch, cod_info, l3_enc[gr][ch]); in iteration_finish() 933 if (xr[gr][ch][i] < 0) l3_enc[gr][ch][i] *= -1; in iteration_finish() 960 const int ch, in VBR_encode_granule() argument [all …]
|
| H A D | encoder.c | 208 int ch,gr,mean_bits; in lame_encode_mp3_frame() local 270 for ( ch = 0; ch < gfc->channels_out; ch++ ) { in lame_encode_mp3_frame() 271 gfc->l3_side.gr[gr].ch[ch].tt.block_type=SHORT_TYPE; in lame_encode_mp3_frame() 341 for ( ch = 0; ch < gfc->channels_out; ch++ ) in lame_encode_mp3_frame() 342 bufp[ch] = &inbuf[ch][576 + gr*576-FFTOFFSET]; in lame_encode_mp3_frame() 357 for ( ch = 0; ch < gfc->channels_out; ch++ ) in lame_encode_mp3_frame() 358 gfc->l3_side.gr[gr].ch[ch].tt.block_type=blocktype[ch]; in lame_encode_mp3_frame() 369 for ( ch = 0; ch < gfc->channels_out; ch++ ) { in lame_encode_mp3_frame() 370 gfc->l3_side.gr[gr].ch[ch].tt.block_type=NORM_TYPE; in lame_encode_mp3_frame() 371 pe_MS[gr][ch]=pe[gr][ch]=700; in lame_encode_mp3_frame() [all …]
|
| H A D | quantize_pvt.c | 318 int ch; in on_pe() local 327 for (ch=0 ; ch < gfc->channels_out ; ch ++) { in on_pe() 331 cod_info = &l3_side->gr[gr].ch[ch].tt; in on_pe() 333 targ_bits[ch]=Min(MAX_BITS, tbits/gfc->channels_out); in on_pe() 336 add_bits[ch] = targ_bits[ch]*pe[gr][ch]/700.0-targ_bits[ch]; in on_pe() 338 add_bits[ch]=(pe[gr][ch]-750)/1.4; in on_pe() 341 if (add_bits[ch]<mean_bits/4) add_bits[ch]=mean_bits/4; in on_pe() 345 if (add_bits[ch] > .75*mean_bits) add_bits[ch]=mean_bits*.75; in on_pe() 346 if (add_bits[ch] < 0) add_bits[ch]=0; in on_pe() 348 if ((targ_bits[ch]+add_bits[ch]) > MAX_BITS) in on_pe() [all …]
|
| H A D | bitstream.c | 231 int gr, ch; in encodeSideInfo2() local 269 for (ch = 0; ch < gfc->channels_out; ch++) { in encodeSideInfo2() 272 CRC_writeheader(gfc,l3_side->scfsi[ch][band], 1,&crc); in encodeSideInfo2() 277 for (ch = 0; ch < gfc->channels_out; ch++) { in encodeSideInfo2() 278 gr_info *gi = &l3_side->gr[gr].ch[ch].tt; in encodeSideInfo2() 328 for (ch = 0; ch < gfc->channels_out; ch++) { in encodeSideInfo2() 329 gr_info *gi = &l3_side->gr[gr].ch[ch].tt; in encodeSideInfo2() 615 int gr, ch, sfb,data_bits,scale_bits,tot_bits=0; in writeMainData() local 623 for (ch = 0; ch < gfc->channels_out; ch++) { in writeMainData() 624 gr_info *gi = &l3_side->gr[gr].ch[ch].tt; in writeMainData() [all …]
|
| H A D | takehiro.c | 515 const int ch, in best_huffman_divide() argument 593 scfsi_calc(int ch, in scfsi_calc() argument 599 gr_info *gi = &l3_side->gr[1].ch[ch].tt; in scfsi_calc() 608 l3_side->scfsi[ch][i] = 0; in scfsi_calc() 612 if (scalefac[0][ch].l[sfb] != scalefac[1][ch].l[sfb]) in scfsi_calc() 617 scalefac[1][ch].l[sfb] = -1; in scfsi_calc() 619 l3_side->scfsi[ch][i] = 1; in scfsi_calc() 625 if (scalefac[1][ch].l[sfb] < 0) in scfsi_calc() 628 if (s1 < scalefac[1][ch].l[sfb]) in scfsi_calc() 629 s1 = scalefac[1][ch].l[sfb]; in scfsi_calc() [all …]
|
| /plan9/sys/src/cmd/gs/jpeg/ |
| H A D | rdswitch.c | 25 register int ch; in text_getc() local 27 ch = getc(file); in text_getc() 28 if (ch == '#') { in text_getc() 30 ch = getc(file); in text_getc() 31 } while (ch != '\n' && ch != EOF); in text_getc() 33 return ch; in text_getc() 42 register int ch; in read_text_integer() local 47 ch = text_getc(file); in read_text_integer() 48 if (ch == EOF) { in read_text_integer() 49 *termchar = ch; in read_text_integer() [all …]
|
| H A D | rdcolmap.c | 125 register int ch; in pbm_getc() local 127 ch = getc(infile); in pbm_getc() 128 if (ch == '#') { in pbm_getc() 130 ch = getc(infile); in pbm_getc() 131 } while (ch != '\n' && ch != EOF); in pbm_getc() 133 return ch; in pbm_getc() 144 register int ch; in read_pbm_integer() local 149 ch = pbm_getc(infile); in read_pbm_integer() 150 if (ch == EOF) in read_pbm_integer() 152 } while (ch == ' ' || ch == '\t' || ch == '\n' || ch == '\r'); in read_pbm_integer() [all …]
|
| H A D | rdppm.c | 88 register int ch; in pbm_getc() local 90 ch = getc(infile); in pbm_getc() 91 if (ch == '#') { in pbm_getc() 93 ch = getc(infile); in pbm_getc() 94 } while (ch != '\n' && ch != EOF); in pbm_getc() 96 return ch; in pbm_getc() 107 register int ch; in read_pbm_integer() local 112 ch = pbm_getc(infile); in read_pbm_integer() 113 if (ch == EOF) in read_pbm_integer() 115 } while (ch == ' ' || ch == '\t' || ch == '\n' || ch == '\r'); in read_pbm_integer() [all …]
|
| /plan9/sys/src/cmd/postscript/postbgi/ |
| H A D | postbgi.c | 288 int ch; /* return value from getopt() */ in header() local 303 while ( (ch = getopt(argc, argv, optnames)) != EOF ) in header() 304 if ( ch == 'L' ) in header() 306 else if ( ch == '?' ) in header() 332 int ch; /* option name - from getopt() */ in options() local 340 while ( (ch = getopt(argc, argv, optnames)) != EOF ) { in options() 341 switch ( ch ) { in options() 428 error(FATAL, "missing case for option %c", ch); in options() 565 int ch; /* next input character */ in conv() local 578 while ( (ch = get_char()) != EOF ) { in conv() [all …]
|
| /plan9/sys/src/cmd/postscript/postprint/ |
| H A D | postprint.c | 190 int ch; /* return value from getopt() */ in header() local 205 while ( (ch = getopt(argc, argv, optnames)) != EOF ) in header() 206 if ( ch == 'L' ) in header() 208 else if ( ch == '?' ) in header() 237 int ch; /* return value from getopt() */ in options() local 250 while ( (ch = getopt(argc, argv, optnames)) != EOF ) { in options() 251 switch ( ch ) { in options() 356 error(FATAL, "missing case for option %c\n", ch); in options() 503 int ch; /* next input character */ in text() local 519 while ( (ch = getc(fp_in)) != EOF ) in text() [all …]
|
| /plan9/sys/src/cmd/gs/src/ |
| H A D | gscrypt1.h | 35 #define encrypt_next(ch, state, chvar)\ argument 36 (chvar = ((ch) ^ (state >> 8)),\ 38 #define decrypt_this(ch, state)\ argument 39 ((ch) ^ (state >> 8)) 40 #define decrypt_next(ch, state, chvar)\ argument 41 (chvar = decrypt_this(ch, state),\ 42 decrypt_skip_next(ch, state)) 43 #define decrypt_skip_next(ch, state)\ argument 44 (state = ((ch) + state) * crypt_c1 + crypt_c2) 45 #define decrypt_skip_previous(ch, state)\ argument [all …]
|
| H A D | sbwbs.c | 206 uint sum = 0, j, ch; in bwbse_sort() local 211 for (ch = 0; ch <= 255; ch++) { in bwbse_sort() 212 sum += C[ch]; in bwbse_sort() 213 C[ch] = sum - C[ch]; in bwbse_sort() 221 for (ch = 0; ch <= 255; sum = C[ch], ch++) in bwbse_sort() 222 qsort(indices + sum, C[ch] - sum, in bwbse_sort() 403 int sum = 0, ch; in bwbsd_construct_offsets() local 405 for (ch = 0; ch <= 255; ch++) { in bwbsd_construct_offsets() 406 sum += C[ch]; in bwbsd_construct_offsets() 407 C[ch] = sum - C[ch]; in bwbsd_construct_offsets() [all …]
|
| H A D | sbcp.c | 51 byte ch = *++p; in s_xBCPE_process() local 53 if (ch <= 31 && escaped[ch]) { in s_xBCPE_process() 59 ch ^= 0x40; in s_xBCPE_process() 63 *++q = ch; in s_xBCPE_process() 134 byte ch; in s_xBCPD_process() local 149 ch = *++p; in s_xBCPD_process() 150 if (ch <= 31) in s_xBCPD_process() 151 switch (ch) { in s_xBCPD_process() 192 switch (ch) { in s_xBCPD_process() 207 ch ^= 0x40; in s_xBCPD_process() [all …]
|
| H A D | gdevpdtw.c | 69 pdf_different_encoding_element(const pdf_font_resource_t *pdfont, int ch, int encoding_index) in pdf_different_encoding_element() argument 71 if (pdfont->u.simple.Encoding[ch].is_difference) in pdf_different_encoding_element() 74 gs_glyph glyph0 = gs_c_known_encode(ch, encoding_index); in pdf_different_encoding_element() 75 gs_glyph glyph1 = pdfont->u.simple.Encoding[ch].glyph; in pdf_different_encoding_element() 82 if (!strings_equal(&str, &pdfont->u.simple.Encoding[ch].str)) in pdf_different_encoding_element() 93 int ch, code; in pdf_different_encoding_index() local 95 for (ch = ch0; ch < 256; ++ch) { in pdf_different_encoding_index() 96 code = pdf_different_encoding_element(pdfont, ch, base_encoding); in pdf_different_encoding_index() 102 return ch; in pdf_different_encoding_index() 109 int ch; in pdf_simple_font_needs_ToUnicode() local [all …]
|
| /plan9/sys/src/cmd/postscript/misc/ |
| H A D | pscrypt.c | 91 int ch; in options() local 103 while ( (ch = getopt(argc, argv, names)) != EOF ) in options() 104 switch ( ch ) { in options() 153 fprintf(stderr, "bad option -%c\n", ch); in options() 158 fprintf(stderr, "missing case for option -%c\n", ch); in options() 293 int ch; in nexthexchar() local 301 while ( (ch = Getc(fp_in)) != EOF && ! isxdigit(ch) ) ; in nexthexchar() 303 if ( isdigit(ch) ) in nexthexchar() 304 ch -= '0'; in nexthexchar() 305 else if ( isupper(ch) ) in nexthexchar() [all …]
|
| H A D | macfont.c | 69 int ch; in options() local 81 while ( (ch = getopt(argc, argv, names)) != EOF ) { in options() 82 switch ( ch ) { in options() 96 error(FATAL, "missing case for option %c\n", ch); in options() 200 int ch; local 211 if ( (ch = getc(fp_in)) == '\r' ) 212 ch = '\n'; 213 putc(ch, fp_out);
|
| H A D | ibmfont.c | 69 int ch; in options() local 81 while ( (ch = getopt(argc, argv, names)) != EOF ) { in options() 82 switch ( ch ) { in options() 96 error(FATAL, "missing case for option %c\n", ch); in options() 197 int ch; local 208 if ( (ch = getc(fp_in)) == '\r' ) 209 ch = '\n'; 210 putc(ch, fp_out);
|
| /plan9/sys/src/cmd/usb/audio/ |
| H A D | audiosub.c | 57 int ctl, ch, u, x; in audio_interface() local 214 for(ch = 0; ch < (nb - 8)/b[5]; ch++){ in audio_interface() 219 controls[0][ctl].name, ch+1); in audio_interface() 223 controls[u][ctl].chans |= 1 <<(ch+1); in audio_interface() 265 for(ch = 0; ch < b[7] && ch < 8; ch++){ in audio_interface() 266 aa->freqs[ch] = b[8+3*ch] | b[9+3*ch]<<8 | b[10+3*ch]<<16; in audio_interface() 268 fprint(2, " %d", b[8+3*ch] | b[9+3*ch]<<8 | b[10+3*ch]<<16); in audio_interface() 270 if(ch < 8) in audio_interface() 271 aa->freqs[ch] = -1; in audio_interface() 274 if(ch > 1) in audio_interface()
|
| /plan9/sys/src/cmd/unix/drawterm/libauth/ |
| H A D | auth_userpasswd.c | 31 Chalstate *ch; in auth_userpasswd() local 38 if((ch = auth_challenge("user=%q proto=p9cr role=server", user)) == nil) in auth_userpasswd() 42 netresp(key, atol(ch->chal), resp); in auth_userpasswd() 45 ch->resp = resp; in auth_userpasswd() 46 ch->nresp = strlen(resp); in auth_userpasswd() 47 ai = auth_response(ch); in auth_userpasswd() 48 auth_freechal(ch); in auth_userpasswd()
|
| /plan9/sys/src/libauth/ |
| H A D | auth_userpasswd.c | 30 Chalstate *ch; in auth_userpasswd() local 37 if((ch = auth_challenge("user=%q proto=p9cr role=server", user)) == nil) in auth_userpasswd() 41 netresp(key, atol(ch->chal), resp); in auth_userpasswd() 44 ch->resp = resp; in auth_userpasswd() 45 ch->nresp = strlen(resp); in auth_userpasswd() 46 ai = auth_response(ch); in auth_userpasswd() 47 auth_freechal(ch); in auth_userpasswd()
|
| /plan9/sys/src/cmd/postscript/postdaisy/ |
| H A D | postdaisy.c | 209 int ch; /* return value from getopt() */ in header() local 224 while ( (ch = getopt(argc, argv, optnames)) != EOF ) in header() 225 if ( ch == 'L' ) in header() 227 else if ( ch == '?' ) in header() 256 int ch; /* return value from getopt() */ in options() local 270 while ( (ch = getopt(argc, argv, optnames)) != EOF ) { in options() 271 switch ( ch ) { in options() 381 error(FATAL, "missing case for option %c\n", ch); in options() 523 int ch; /* next input character */ in text() local 537 while ( (ch = getc(fp_in)) != EOF ) in text() [all …]
|
| H A D | Opostdaisy.c | 207 int ch; /* return value from getopt() */ in header() local 222 while ( (ch = getopt(argc, argv, optnames)) != EOF ) in header() 223 if ( ch == 'L' ) in header() 225 else if ( ch == '?' ) in header() 254 int ch; /* return value from getopt() */ in options() local 268 while ( (ch = getopt(argc, argv, optnames)) != EOF ) { in options() 269 switch ( ch ) { in options() 379 error(FATAL, "missing case for option %c\n", ch); in options() 521 int ch; /* next input character */ in text() local 535 while ( (ch = getc(fp_in)) != EOF ) in text() [all …]
|
| /plan9/sys/src/cmd/troff/ |
| H A D | t11.c | 95 char buf[100], ch[100], s1[100], s2[100], s3[100], cmd[300]; in getfont() local 123 sscanf(buf, "%s %s %s %s", ch, s1, s2, s3); in getfont() 136 if (strlen(ch) == 1) { /* it's ascii */ in getfont() 137 n = ch[0]; /* origin includes non-graphics */ in getfont() 138 chtemp[n].num = ch[0]; in getfont() 139 } else if (ch[0] == '\\' && ch[1] == '0') { in getfont() 140 n = strtol(ch+1, 0, 0); /* \0octal or \0xhex */ in getfont() 143 } else if (mbtowc(&wc, ch, strlen(ch)) > 1) { in getfont() 144 chtemp[nw].num = chadd(ch, MBchar, Install); in getfont() 149 if (strcmp(ch, "---") == 0) { /* no name */ in getfont() [all …]
|
| /plan9/sys/src/cmd/tbl/ |
| H A D | ts.c | 29 letter (int ch) in letter() argument 31 if (ch >= 'a' && ch <= 'z') in letter() 33 if (ch >= 'A' && ch <= 'Z') in letter()
|