201 size = strlen(
"CS=ITU601")+3;
304 int align= (-(size_t)(buf))&3;
310 for(i=0; i<size && i<
align; i++){
311 if(buf[i]==0xFF) ff_count++;
313 for(; i<size-15; i+=16){
316 v= *(uint32_t*)(&buf[i]);
317 acc= (((v & (v>>4))&0x0F0F0F0F)+0x01010101)&0x10101010;
318 v= *(uint32_t*)(&buf[i+4]);
319 acc+=(((v & (v>>4))&0x0F0F0F0F)+0x01010101)&0x10101010;
320 v= *(uint32_t*)(&buf[i+8]);
321 acc+=(((v & (v>>4))&0x0F0F0F0F)+0x01010101)&0x10101010;
322 v= *(uint32_t*)(&buf[i+12]);
323 acc+=(((v & (v>>4))&0x0F0F0F0F)+0x01010101)&0x10101010;
331 if(buf[i]==0xFF) ff_count++;
334 if(ff_count==0)
return;
339 for(i=size-1; ff_count; i--){
357 if(length)
put_bits(pbc, length, (1<<length)-1);
380 uint8_t *huff_size, uint16_t *huff_code)
395 put_bits(&s->
pb, huff_size[nbits], huff_code[nbits]);
403 int mant, nbits, code, i, j;
404 int component,
dc,
run, last_index,
val;
407 uint16_t *huff_code_ac;
410 component = (n <= 3 ? 0 : (n&1) + 1);
412 val = dc - s->
last_dc[component];
428 for(i=1;i<=last_index;i++) {
435 put_bits(&s->
pb, huff_size_ac[0xf0], huff_code_ac[0xf0]);
445 code = (run << 4) | nbits;
447 put_bits(&s->
pb, huff_size_ac[code], huff_code_ac[code]);
455 if (last_index < 63 || run != 0)
456 put_bits(&s->
pb, huff_size_ac[0], huff_code_ac[0]);
497 const AVFrame *pic_arg,
int *got_packet)
513 for(i=0; i < 3; i++) {
522 #if CONFIG_MJPEG_ENCODER
538 #if CONFIG_AMV_ENCODER