Lines Matching defs:buf
376 static int write_chunk_header(unsigned char *buf, int chunk_type, int chunk_size)
378 buf[0] = chunk_type;
379 AV_WB24(&buf[1], chunk_size + CHUNK_HEADER_SIZE);
385 unsigned char *buf)
391 ret = write_chunk_header(buf,
414 buf[ret++] = codebook[y + x * entry_size] ^ (y >= 4 ? 0x80 : 0);
416 AV_WB32(&buf[flagsind], flags);
421 AV_WB32(&buf[flagsind], flags);
425 buf[ret++] = codebook[y + x * entry_size] ^ (y >= 4 ? 0x80 : 0);
529 strip_info *info, unsigned char *buf)
544 ret += encode_codebook(s, info->v4_codebook, info->v4_size, 0x20, 0x24, buf + ret);
547 ret += encode_codebook(s, info->v1_codebook, info->v1_size, 0x22, 0x26, buf + ret);
572 ret += write_chunk_header(buf + ret, 0x32, mb_count);
575 buf[ret++] = s->mb[x].v1_vector;
589 AV_WB32(&buf[ret], flags);
596 buf[ret++] = mb->v1_vector;
599 buf[ret++] = mb->v4_vector[z];
603 write_chunk_header(buf + header_ofs, 0x30, ret - header_ofs - CHUNK_HEADER_SIZE);
626 AV_WB32(&buf[ret], flags);
631 memcpy(&buf[ret], temp, temp_size);
650 memcpy(&buf[ret], temp, temp_size);
657 AV_WB32(&buf[ret], flags);
659 memcpy(&buf[ret], temp, temp_size);
663 write_chunk_header(buf + header_ofs, 0x31, ret - header_ofs - CHUNK_HEADER_SIZE);
837 static void write_strip_keyframe(unsigned char *buf, int keyframe)
843 // buf[0] = keyframe ? 0x11: 0x10;
844 buf[0] = keyframe ? 0x10 : 0x11;
848 unsigned char *buf, int strip_size)
850 write_strip_keyframe(buf, keyframe);
851 AV_WB24(&buf[1], strip_size + STRIP_HEADER_SIZE);
852 // AV_WB16(&buf[4], y); /* using absolute y values works -- rl */
853 AV_WB16(&buf[4], 0); /* using relative values works as well -- rl */
854 AV_WB16(&buf[6], 0);
855 // AV_WB16(&buf[8], y + h); /* using absolute y values works -- rl */
856 AV_WB16(&buf[8], h); /* using relative values works as well -- rl */
857 AV_WB16(&buf[10], s->w);
864 unsigned char *buf, int64_t *best_score, int *no_skip)
991 memcpy(buf, s->strip_buf, best_size);
996 static int write_cvid_header(CinepakEncContext *s, unsigned char *buf,
999 buf[0] = isakeyframe ? 0 : 1;
1000 AV_WB24(&buf[1], data_size + CVID_HEADER_SIZE);
1001 AV_WB16(&buf[4], s->w);
1002 AV_WB16(&buf[6], s->h);
1003 AV_WB16(&buf[8], num_strips);
1009 int isakeyframe, unsigned char *buf, int buf_size, int *got_keyframe)
1126 memcpy(buf, s->frame_buf, best_size);