Lines Matching defs:buf
363 static int encode_slice_plane(int16_t *blocks, int mb_count, uint8_t *buf, unsigned buf_size, int *qmat, int sub_sample_chroma,
370 init_put_bits(&pb, buf, buf_size);
376 return put_bits_ptr(&pb) - pb.buf;
381 unsigned mb_count, uint8_t *buf, unsigned data_size,
388 buf, data_size, ctx->qmat_luma[qp - 1], 0, ctx->scantable);
391 *u_data_size = encode_slice_plane(blocks_u, mb_count, buf + *y_data_size, data_size - *y_data_size,
394 *v_data_size = encode_slice_plane(blocks_v, mb_count, buf + *y_data_size + *u_data_size,
436 unsigned mb_count, uint8_t *buf, unsigned data_size, unsigned* a_data_size)
446 init_put_bits(&pb, buf, data_size);
540 int mb_y, unsigned mb_count, uint8_t *buf, unsigned data_size,
596 mb_count, buf + hdr_size, data_size - hdr_size,
611 mb_count, buf + hdr_size, data_size - hdr_size,
619 mb_count, buf + hdr_size, data_size - hdr_size,
628 mb_count, buf + hdr_size, data_size - hdr_size,
635 buf[0] = hdr_size << 3;
636 buf[1] = *qp;
637 AV_WB16(buf + 2, y_data_size);
638 AV_WB16(buf + 4, u_data_size);
641 AV_WB16(buf + 6, v_data_size); /* write v data size only if there is alpha */
647 buf + hdr_size + slice_size,
658 uint8_t *buf, const int buf_size, const int picture_index, const int is_top_field)
688 sl_data_sizes = buf + hdr_size;
713 buf[0] = hdr_size << 3;
714 AV_WB32(buf + 1, sl_data - buf);
715 AV_WB16(buf + 5, slice_per_line * mb_height); /* picture size */
716 buf[7] = av_log2(DEFAULT_SLICE_MB_WIDTH) << 4; /* number of slices */
718 return sl_data - buf;
726 uint8_t *buf;
735 buf = pkt->data;
738 bytestream_put_be32(&buf, compress_frame_size);/* frame size will be update after picture(s) encoding */
739 bytestream_put_buffer(&buf, "icpf", 4);
741 bytestream_put_be16(&buf, header_size);
742 bytestream_put_be16(&buf, 0); /* version */
743 bytestream_put_buffer(&buf, ctx->vendor, 4);
744 bytestream_put_be16(&buf, avctx->width);
745 bytestream_put_be16(&buf, avctx->height);
761 *buf++ = frame_flags;
762 *buf++ = 0; /* reserved */
764 *buf++ = ff_int_from_list_or_default(avctx, "frame color primaries", pict->color_primaries, valid_primaries, 0);
765 *buf++ = ff_int_from_list_or_default(avctx, "frame color trc", pict->color_trc, valid_trc, 0);
766 *buf++ = ff_int_from_list_or_default(avctx, "frame colorspace", pict->colorspace, valid_colorspace, 0);
769 *buf++ = 0xA0;/* src b64a and no alpha */
771 *buf++ = 0xA2;/* src b64a and 16b alpha */
774 *buf++ = 32;/* src v210 and no alpha */
776 *buf++ = 0; /* reserved */
777 *buf++ = 3; /* luma and chroma matrix present */
779 bytestream_put_buffer(&buf, QMAT_LUMA[avctx->profile], 64);
780 bytestream_put_buffer(&buf, QMAT_CHROMA[avctx->profile], 64);
782 pic_size = prores_encode_picture(avctx, pict, buf,