Lines Matching refs:bw
43 static FLAC__bool add_entropy_coding_method_(FLAC__BitWriter *bw, const FLAC__EntropyCodingMethod *…
44 static FLAC__bool add_residual_partitioned_rice_(FLAC__BitWriter *bw, const FLAC__int32 residual[],…
46 FLAC__bool FLAC__add_metadata_block(const FLAC__StreamMetadata *metadata, FLAC__BitWriter *bw) in FLAC__add_metadata_block() argument
51 if(!FLAC__bitwriter_write_raw_uint32(bw, metadata->is_last, FLAC__STREAM_METADATA_IS_LAST_LEN)) in FLAC__add_metadata_block()
54 if(!FLAC__bitwriter_write_raw_uint32(bw, metadata->type, FLAC__STREAM_METADATA_TYPE_LEN)) in FLAC__add_metadata_block()
67 if(!FLAC__bitwriter_write_raw_uint32(bw, i, FLAC__STREAM_METADATA_LENGTH_LEN)) in FLAC__add_metadata_block()
73 …if(!FLAC__bitwriter_write_raw_uint32(bw, metadata->data.stream_info.min_blocksize, FLAC__STREAM_ME… in FLAC__add_metadata_block()
76 …if(!FLAC__bitwriter_write_raw_uint32(bw, metadata->data.stream_info.max_blocksize, FLAC__STREAM_ME… in FLAC__add_metadata_block()
79 …if(!FLAC__bitwriter_write_raw_uint32(bw, metadata->data.stream_info.min_framesize, FLAC__STREAM_ME… in FLAC__add_metadata_block()
82 …if(!FLAC__bitwriter_write_raw_uint32(bw, metadata->data.stream_info.max_framesize, FLAC__STREAM_ME… in FLAC__add_metadata_block()
85 …if(!FLAC__bitwriter_write_raw_uint32(bw, metadata->data.stream_info.sample_rate, FLAC__STREAM_META… in FLAC__add_metadata_block()
89 …if(!FLAC__bitwriter_write_raw_uint32(bw, metadata->data.stream_info.channels-1, FLAC__STREAM_METAD… in FLAC__add_metadata_block()
93 …if(!FLAC__bitwriter_write_raw_uint32(bw, metadata->data.stream_info.bits_per_sample-1, FLAC__STREA… in FLAC__add_metadata_block()
95 …if(!FLAC__bitwriter_write_raw_uint64(bw, metadata->data.stream_info.total_samples, FLAC__STREAM_ME… in FLAC__add_metadata_block()
97 if(!FLAC__bitwriter_write_byte_block(bw, metadata->data.stream_info.md5sum, 16)) in FLAC__add_metadata_block()
101 if(!FLAC__bitwriter_write_zeroes(bw, metadata->length * 8)) in FLAC__add_metadata_block()
105 …if(!FLAC__bitwriter_write_byte_block(bw, metadata->data.application.id, FLAC__STREAM_METADATA_APPL… in FLAC__add_metadata_block()
107 …if(!FLAC__bitwriter_write_byte_block(bw, metadata->data.application.data, metadata->length - (FLAC… in FLAC__add_metadata_block()
112 …if(!FLAC__bitwriter_write_raw_uint64(bw, metadata->data.seek_table.points[i].sample_number, FLAC__… in FLAC__add_metadata_block()
114 …if(!FLAC__bitwriter_write_raw_uint64(bw, metadata->data.seek_table.points[i].stream_offset, FLAC__… in FLAC__add_metadata_block()
116 …if(!FLAC__bitwriter_write_raw_uint32(bw, metadata->data.seek_table.points[i].frame_samples, FLAC__… in FLAC__add_metadata_block()
121 if(!FLAC__bitwriter_write_raw_uint32_little_endian(bw, vendor_string_length)) in FLAC__add_metadata_block()
123 …if(!FLAC__bitwriter_write_byte_block(bw, (const FLAC__byte*)FLAC__VENDOR_STRING, vendor_string_len… in FLAC__add_metadata_block()
125 …if(!FLAC__bitwriter_write_raw_uint32_little_endian(bw, metadata->data.vorbis_comment.num_comments)) in FLAC__add_metadata_block()
128 …if(!FLAC__bitwriter_write_raw_uint32_little_endian(bw, metadata->data.vorbis_comment.comments[i].l… in FLAC__add_metadata_block()
130 …if(!FLAC__bitwriter_write_byte_block(bw, metadata->data.vorbis_comment.comments[i].entry, metadata… in FLAC__add_metadata_block()
136 …if(!FLAC__bitwriter_write_byte_block(bw, (const FLAC__byte*)metadata->data.cue_sheet.media_catalog… in FLAC__add_metadata_block()
138 …if(!FLAC__bitwriter_write_raw_uint64(bw, metadata->data.cue_sheet.lead_in, FLAC__STREAM_METADATA_C… in FLAC__add_metadata_block()
140 …if(!FLAC__bitwriter_write_raw_uint32(bw, metadata->data.cue_sheet.is_cd? 1 : 0, FLAC__STREAM_METAD… in FLAC__add_metadata_block()
142 if(!FLAC__bitwriter_write_zeroes(bw, FLAC__STREAM_METADATA_CUESHEET_RESERVED_LEN)) in FLAC__add_metadata_block()
144 …if(!FLAC__bitwriter_write_raw_uint32(bw, metadata->data.cue_sheet.num_tracks, FLAC__STREAM_METADAT… in FLAC__add_metadata_block()
149 …if(!FLAC__bitwriter_write_raw_uint64(bw, track->offset, FLAC__STREAM_METADATA_CUESHEET_TRACK_OFFSE… in FLAC__add_metadata_block()
151 …if(!FLAC__bitwriter_write_raw_uint32(bw, track->number, FLAC__STREAM_METADATA_CUESHEET_TRACK_NUMBE… in FLAC__add_metadata_block()
154 …if(!FLAC__bitwriter_write_byte_block(bw, (const FLAC__byte*)track->isrc, FLAC__STREAM_METADATA_CUE… in FLAC__add_metadata_block()
156 …if(!FLAC__bitwriter_write_raw_uint32(bw, track->type, FLAC__STREAM_METADATA_CUESHEET_TRACK_TYPE_LE… in FLAC__add_metadata_block()
158 …if(!FLAC__bitwriter_write_raw_uint32(bw, track->pre_emphasis, FLAC__STREAM_METADATA_CUESHEET_TRACK… in FLAC__add_metadata_block()
160 if(!FLAC__bitwriter_write_zeroes(bw, FLAC__STREAM_METADATA_CUESHEET_TRACK_RESERVED_LEN)) in FLAC__add_metadata_block()
162 …if(!FLAC__bitwriter_write_raw_uint32(bw, track->num_indices, FLAC__STREAM_METADATA_CUESHEET_TRACK_… in FLAC__add_metadata_block()
167 …if(!FLAC__bitwriter_write_raw_uint64(bw, indx->offset, FLAC__STREAM_METADATA_CUESHEET_INDEX_OFFSET… in FLAC__add_metadata_block()
169 …if(!FLAC__bitwriter_write_raw_uint32(bw, indx->number, FLAC__STREAM_METADATA_CUESHEET_INDEX_NUMBER… in FLAC__add_metadata_block()
171 if(!FLAC__bitwriter_write_zeroes(bw, FLAC__STREAM_METADATA_CUESHEET_INDEX_RESERVED_LEN)) in FLAC__add_metadata_block()
179 …if(!FLAC__bitwriter_write_raw_uint32(bw, metadata->data.picture.type, FLAC__STREAM_METADATA_PICTUR… in FLAC__add_metadata_block()
182 … if(!FLAC__bitwriter_write_raw_uint32(bw, len, FLAC__STREAM_METADATA_PICTURE_MIME_TYPE_LENGTH_LEN)) in FLAC__add_metadata_block()
184 …if(!FLAC__bitwriter_write_byte_block(bw, (const FLAC__byte*)metadata->data.picture.mime_type, len)) in FLAC__add_metadata_block()
187 …if(!FLAC__bitwriter_write_raw_uint32(bw, len, FLAC__STREAM_METADATA_PICTURE_DESCRIPTION_LENGTH_LEN… in FLAC__add_metadata_block()
189 if(!FLAC__bitwriter_write_byte_block(bw, metadata->data.picture.description, len)) in FLAC__add_metadata_block()
191 …if(!FLAC__bitwriter_write_raw_uint32(bw, metadata->data.picture.width, FLAC__STREAM_METADATA_PICTU… in FLAC__add_metadata_block()
193 …if(!FLAC__bitwriter_write_raw_uint32(bw, metadata->data.picture.height, FLAC__STREAM_METADATA_PICT… in FLAC__add_metadata_block()
195 …if(!FLAC__bitwriter_write_raw_uint32(bw, metadata->data.picture.depth, FLAC__STREAM_METADATA_PICTU… in FLAC__add_metadata_block()
197 …if(!FLAC__bitwriter_write_raw_uint32(bw, metadata->data.picture.colors, FLAC__STREAM_METADATA_PICT… in FLAC__add_metadata_block()
199 …if(!FLAC__bitwriter_write_raw_uint32(bw, metadata->data.picture.data_length, FLAC__STREAM_METADATA… in FLAC__add_metadata_block()
201 …if(!FLAC__bitwriter_write_byte_block(bw, metadata->data.picture.data, metadata->data.picture.data_… in FLAC__add_metadata_block()
206 if(!FLAC__bitwriter_write_byte_block(bw, metadata->data.unknown.data, metadata->length)) in FLAC__add_metadata_block()
211 FLAC__ASSERT(FLAC__bitwriter_is_byte_aligned(bw)); in FLAC__add_metadata_block()
215 FLAC__bool FLAC__frame_add_header(const FLAC__FrameHeader *header, FLAC__BitWriter *bw) in FLAC__frame_add_header() argument
220 FLAC__ASSERT(FLAC__bitwriter_is_byte_aligned(bw)); in FLAC__frame_add_header()
222 if(!FLAC__bitwriter_write_raw_uint32(bw, FLAC__FRAME_HEADER_SYNC, FLAC__FRAME_HEADER_SYNC_LEN)) in FLAC__frame_add_header()
225 if(!FLAC__bitwriter_write_raw_uint32(bw, 0, FLAC__FRAME_HEADER_RESERVED_LEN)) in FLAC__frame_add_header()
228 …if(!FLAC__bitwriter_write_raw_uint32(bw, (header->number_type == FLAC__FRAME_NUMBER_TYPE_FRAME_NUM… in FLAC__frame_add_header()
256 if(!FLAC__bitwriter_write_raw_uint32(bw, u, FLAC__FRAME_HEADER_BLOCK_SIZE_LEN)) in FLAC__frame_add_header()
284 if(!FLAC__bitwriter_write_raw_uint32(bw, u, FLAC__FRAME_HEADER_SAMPLE_RATE_LEN)) in FLAC__frame_add_header()
307 if(!FLAC__bitwriter_write_raw_uint32(bw, u, FLAC__FRAME_HEADER_CHANNEL_ASSIGNMENT_LEN)) in FLAC__frame_add_header()
319 if(!FLAC__bitwriter_write_raw_uint32(bw, u, FLAC__FRAME_HEADER_BITS_PER_SAMPLE_LEN)) in FLAC__frame_add_header()
322 if(!FLAC__bitwriter_write_raw_uint32(bw, 0, FLAC__FRAME_HEADER_ZERO_PAD_LEN)) in FLAC__frame_add_header()
326 if(!FLAC__bitwriter_write_utf8_uint32(bw, header->number.frame_number)) in FLAC__frame_add_header()
330 if(!FLAC__bitwriter_write_utf8_uint64(bw, header->number.sample_number)) in FLAC__frame_add_header()
335 if(!FLAC__bitwriter_write_raw_uint32(bw, header->blocksize-1, (blocksize_hint==6)? 8:16)) in FLAC__frame_add_header()
340 if(!FLAC__bitwriter_write_raw_uint32(bw, header->sample_rate / 1000, 8)) in FLAC__frame_add_header()
344 if(!FLAC__bitwriter_write_raw_uint32(bw, header->sample_rate, 16)) in FLAC__frame_add_header()
348 if(!FLAC__bitwriter_write_raw_uint32(bw, header->sample_rate / 10, 16)) in FLAC__frame_add_header()
354 if(!FLAC__bitwriter_get_write_crc8(bw, &crc)) in FLAC__frame_add_header()
356 if(!FLAC__bitwriter_write_raw_uint32(bw, crc, FLAC__FRAME_HEADER_CRC_LEN)) in FLAC__frame_add_header()
362 …LAC__Subframe_Constant *subframe, unsigned subframe_bps, unsigned wasted_bits, FLAC__BitWriter *bw) in FLAC__subframe_add_constant() argument
367 …FLAC__bitwriter_write_raw_uint32(bw, FLAC__SUBFRAME_TYPE_CONSTANT_BYTE_ALIGNED_MASK | (wasted_bits… in FLAC__subframe_add_constant()
368 (wasted_bits? FLAC__bitwriter_write_unary_unsigned(bw, wasted_bits-1) : true) && in FLAC__subframe_add_constant()
369 FLAC__bitwriter_write_raw_int32(bw, subframe->value, subframe_bps) in FLAC__subframe_add_constant()
375 …frame, unsigned residual_samples, unsigned subframe_bps, unsigned wasted_bits, FLAC__BitWriter *bw) in FLAC__subframe_add_fixed() argument
379 …if(!FLAC__bitwriter_write_raw_uint32(bw, FLAC__SUBFRAME_TYPE_FIXED_BYTE_ALIGNED_MASK | (subframe->… in FLAC__subframe_add_fixed()
382 if(!FLAC__bitwriter_write_unary_unsigned(bw, wasted_bits-1)) in FLAC__subframe_add_fixed()
386 if(!FLAC__bitwriter_write_raw_int32(bw, subframe->warmup[i], subframe_bps)) in FLAC__subframe_add_fixed()
389 if(!add_entropy_coding_method_(bw, &subframe->entropy_coding_method)) in FLAC__subframe_add_fixed()
395 bw, in FLAC__subframe_add_fixed()
413 …frame, unsigned residual_samples, unsigned subframe_bps, unsigned wasted_bits, FLAC__BitWriter *bw) in FLAC__subframe_add_lpc() argument
417 …if(!FLAC__bitwriter_write_raw_uint32(bw, FLAC__SUBFRAME_TYPE_LPC_BYTE_ALIGNED_MASK | ((subframe->o… in FLAC__subframe_add_lpc()
420 if(!FLAC__bitwriter_write_unary_unsigned(bw, wasted_bits-1)) in FLAC__subframe_add_lpc()
424 if(!FLAC__bitwriter_write_raw_int32(bw, subframe->warmup[i], subframe_bps)) in FLAC__subframe_add_lpc()
427 …if(!FLAC__bitwriter_write_raw_uint32(bw, subframe->qlp_coeff_precision-1, FLAC__SUBFRAME_LPC_QLP_C… in FLAC__subframe_add_lpc()
429 …if(!FLAC__bitwriter_write_raw_int32(bw, subframe->quantization_level, FLAC__SUBFRAME_LPC_QLP_SHIFT… in FLAC__subframe_add_lpc()
432 if(!FLAC__bitwriter_write_raw_int32(bw, subframe->qlp_coeff[i], subframe->qlp_coeff_precision)) in FLAC__subframe_add_lpc()
435 if(!add_entropy_coding_method_(bw, &subframe->entropy_coding_method)) in FLAC__subframe_add_lpc()
441 bw, in FLAC__subframe_add_lpc()
459 …atim *subframe, unsigned samples, unsigned subframe_bps, unsigned wasted_bits, FLAC__BitWriter *bw) in FLAC__subframe_add_verbatim() argument
464 …if(!FLAC__bitwriter_write_raw_uint32(bw, FLAC__SUBFRAME_TYPE_VERBATIM_BYTE_ALIGNED_MASK | (wasted_… in FLAC__subframe_add_verbatim()
467 if(!FLAC__bitwriter_write_unary_unsigned(bw, wasted_bits-1)) in FLAC__subframe_add_verbatim()
471 if(!FLAC__bitwriter_write_raw_int32(bw, signal[i], subframe_bps)) in FLAC__subframe_add_verbatim()
477 FLAC__bool add_entropy_coding_method_(FLAC__BitWriter *bw, const FLAC__EntropyCodingMethod *method) in add_entropy_coding_method_() argument
479 if(!FLAC__bitwriter_write_raw_uint32(bw, method->type, FLAC__ENTROPY_CODING_METHOD_TYPE_LEN)) in add_entropy_coding_method_()
484 …if(!FLAC__bitwriter_write_raw_uint32(bw, method->data.partitioned_rice.order, FLAC__ENTROPY_CODING… in add_entropy_coding_method_()
493 FLAC__bool add_residual_partitioned_rice_(FLAC__BitWriter *bw, const FLAC__int32 residual[], const … in add_residual_partitioned_rice_() argument
502 if(!FLAC__bitwriter_write_raw_uint32(bw, rice_parameters[0], plen)) in add_residual_partitioned_rice_()
504 if(!FLAC__bitwriter_write_rice_signed_block(bw, residual, residual_samples, rice_parameters[0])) in add_residual_partitioned_rice_()
509 if(!FLAC__bitwriter_write_raw_uint32(bw, pesc, plen)) in add_residual_partitioned_rice_()
511 …if(!FLAC__bitwriter_write_raw_uint32(bw, raw_bits[0], FLAC__ENTROPY_CODING_METHOD_PARTITIONED_RICE… in add_residual_partitioned_rice_()
514 if(!FLAC__bitwriter_write_raw_int32(bw, residual[i], raw_bits[0])) in add_residual_partitioned_rice_()
530 if(!FLAC__bitwriter_write_raw_uint32(bw, rice_parameters[i], plen)) in add_residual_partitioned_rice_()
532 if(!FLAC__bitwriter_write_rice_signed_block(bw, residual+k_last, k-k_last, rice_parameters[i])) in add_residual_partitioned_rice_()
536 if(!FLAC__bitwriter_write_raw_uint32(bw, pesc, plen)) in add_residual_partitioned_rice_()
538 …if(!FLAC__bitwriter_write_raw_uint32(bw, raw_bits[i], FLAC__ENTROPY_CODING_METHOD_PARTITIONED_RICE… in add_residual_partitioned_rice_()
541 if(!FLAC__bitwriter_write_raw_int32(bw, residual[j], raw_bits[i])) in add_residual_partitioned_rice_()