| 1 | /* libFLAC - Free Lossless Audio Codec library |
| 2 | * Copyright (C) 2000-2009 Josh Coalson |
| 3 | * Copyright (C) 2011-2025 Xiph.Org Foundation |
| 4 | * |
| 5 | * Redistribution and use in source and binary forms, with or without |
| 6 | * modification, are permitted provided that the following conditions |
| 7 | * are met: |
| 8 | * |
| 9 | * - Redistributions of source code must retain the above copyright |
| 10 | * notice, this list of conditions and the following disclaimer. |
| 11 | * |
| 12 | * - Redistributions in binary form must reproduce the above copyright |
| 13 | * notice, this list of conditions and the following disclaimer in the |
| 14 | * documentation and/or other materials provided with the distribution. |
| 15 | * |
| 16 | * - Neither the name of the Xiph.org Foundation nor the names of its |
| 17 | * contributors may be used to endorse or promote products derived from |
| 18 | * this software without specific prior written permission. |
| 19 | * |
| 20 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |
| 21 | * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |
| 22 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |
| 23 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR |
| 24 | * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, |
| 25 | * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, |
| 26 | * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR |
| 27 | * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF |
| 28 | * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING |
| 29 | * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS |
| 30 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 31 | */ |
| 32 | |
| 33 | //ppgb #ifdef HAVE_CONFIG_H |
| 34 | #include "flac_config.h"cxx . . $ `<file>/external/flac/flac_config.h`/ |
| 35 | //ppgb #endif |
| 36 | |
| 37 | #include <stdio.h> |
| 38 | #include <string.h> /* for strlen() */ |
| 39 | #include "flac_private_stream_encoder_framing.h"cxx . . $ `<file>/external/flac/flac_private_stream_encoder_framing.h`/ |
| 40 | #include "flac_private_crc.h"cxx . . $ `<file>/external/flac/flac_private_crc.h`/ |
| 41 | #include "flac_FLAC_assert.h"cxx . . $ `<file>/external/flac/flac_FLAC_assert.h`/ |
| 42 | #include "flac_share_compat.h"cxx . . $ `<file>/external/flac/flac_share_compat.h`/ |
| 43 | |
| 44 | static FLAC__boolcxx . . $ FLAC__bool# add_entropy_coding_method_cxx . . $ add_entropy_coding_method_(5beee8f521febf58).(FLAC__BitWritercxx . . $ FLAC__BitWriter# *bw, const FLAC__EntropyCodingMethodcxx . . $ FLAC__EntropyCodingMethod# *method); |
| 45 | static FLAC__boolcxx . . $ FLAC__bool# add_residual_partitioned_rice_cxx . . $ add_residual_partitioned_rice_(fee1f9afe59d864c).(FLAC__BitWritercxx . . $ FLAC__BitWriter# *bw, const FLAC__int32cxx . . $ FLAC__int32# residual[], const uint32_tcxx . . $ uint32_t# residual_samples, const uint32_tcxx . . $ uint32_t# predictor_order, const uint32_tcxx . . $ uint32_t# rice_parameters[], const uint32_tcxx . . $ uint32_t# raw_bits[], const uint32_tcxx . . $ uint32_t# partition_order, const FLAC__boolcxx . . $ FLAC__bool# is_extended); |
| 46 | |
| 47 | FLAC__boolcxx . . $ FLAC__bool# FLAC__add_metadata_blockcxx . . $ FLAC__add_metadata_block(7b16f683b257b9d2).(const FLAC__StreamMetadatacxx . . $ FLAC__StreamMetadata# *metadata, FLAC__BitWritercxx . . $ FLAC__BitWriter# *bw, FLAC__boolcxx . . $ FLAC__bool# update_vendor_string) |
| 48 | { |
| 49 | uint32_tcxx . . $ uint32_t# i, j, metadata_length; |
| 50 | const uint32_tcxx . . $ uint32_t# vendor_string_length = (uint32_tcxx . . $ uint32_t#)strlencxx . . $ strlen(751346f8406fd082).(FLAC__VENDOR_STRINGcxx . . $ FLAC__VENDOR_STRING.); |
| 51 | const uint32_tcxx . . $ uint32_t# start_bits = FLAC__bitwriter_get_input_bits_unconsumedcxx . . $ FLAC__bitwriter_get_input_bits_unconsumed(a85bce63af5da0e3).(bw); |
| 52 | |
| 53 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(FLAC__bitwriter_is_byte_aligned(bw)); |
| 54 | |
| 55 | if(!FLAC__bitwriter_write_raw_uint32cxx . . $ FLAC__bitwriter_write_raw_uint32(33e8736f9674f0cb).(bw, metadata->is_lastcxx . . $ FLAC__StreamMetadata#is_last., FLAC__STREAM_METADATA_IS_LAST_LENcxx . . $ FLAC__STREAM_METADATA_IS_LAST_LEN.)) |
| 56 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 57 | |
| 58 | if(!FLAC__bitwriter_write_raw_uint32cxx . . $ FLAC__bitwriter_write_raw_uint32(33e8736f9674f0cb).(bw, metadata->typecxx . . $ FLAC__StreamMetadata#type., FLAC__STREAM_METADATA_TYPE_LENcxx . . $ FLAC__STREAM_METADATA_TYPE_LEN.)) |
| 59 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 60 | |
| 61 | /* |
| 62 | * First, for VORBIS_COMMENTs, adjust the length to reflect our vendor string |
| 63 | */ |
| 64 | metadata_length = metadata->lengthcxx . . $ FLAC__StreamMetadata#length.; |
| 65 | if(metadata->typecxx . . $ FLAC__StreamMetadata#type. == FLAC__METADATA_TYPE_VORBIS_COMMENTcxx . . $ FLAC__METADATA_TYPE_VORBIS_COMMENT. && update_vendor_string) { |
| 66 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(metadata->data.vorbis_comment.vendor_string.length == 0 || 0 != metadata->data.vorbis_comment.vendor_string.entry); |
| 67 | metadata_length -= metadata->datacxx . . $ FLAC__StreamMetadata#data..vorbis_commentcxx . . $ FLAC__StreamMetadata#$anonymous_type_34#vorbis_comment..vendor_stringcxx . . $ $anonymous_type_81a4853959168ec7_27#vendor_string..lengthcxx . . $ $anonymous_type_81a4853959168ec7_26#length.; |
| 68 | metadata_length += vendor_string_length; |
| 69 | } |
| 70 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(metadata_length < (1u << FLAC__STREAM_METADATA_LENGTH_LEN)); |
| 71 | /* double protection */ |
| 72 | if(metadata_length >= (1u << FLAC__STREAM_METADATA_LENGTH_LENcxx . . $ FLAC__STREAM_METADATA_LENGTH_LEN.)) |
| 73 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 74 | if(!FLAC__bitwriter_write_raw_uint32cxx . . $ FLAC__bitwriter_write_raw_uint32(33e8736f9674f0cb).(bw, metadata_length, FLAC__STREAM_METADATA_LENGTH_LENcxx . . $ FLAC__STREAM_METADATA_LENGTH_LEN.)) |
| 75 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 76 | |
| 77 | switch(metadata->typecxx . . $ FLAC__StreamMetadata#type.) { |
| 78 | case FLAC__METADATA_TYPE_STREAMINFOcxx . . $ FLAC__METADATA_TYPE_STREAMINFO.: |
| 79 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(metadata->data.stream_info.min_blocksize < (1u << FLAC__STREAM_METADATA_STREAMINFO_MIN_BLOCK_SIZE_LEN)); |
| 80 | if(!FLAC__bitwriter_write_raw_uint32cxx . . $ FLAC__bitwriter_write_raw_uint32(33e8736f9674f0cb).(bw, metadata->datacxx . . $ FLAC__StreamMetadata#data..stream_infocxx . . $ FLAC__StreamMetadata#$anonymous_type_34#stream_info..min_blocksizecxx . . $ $anonymous_type_81a4853959168ec7_21#min_blocksize., FLAC__STREAM_METADATA_STREAMINFO_MIN_BLOCK_SIZE_LENcxx . . $ FLAC__STREAM_METADATA_STREAMINFO_MIN_BLOCK_SIZE_LEN.)) |
| 81 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 82 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(metadata->data.stream_info.max_blocksize < (1u << FLAC__STREAM_METADATA_STREAMINFO_MAX_BLOCK_SIZE_LEN)); |
| 83 | if(!FLAC__bitwriter_write_raw_uint32cxx . . $ FLAC__bitwriter_write_raw_uint32(33e8736f9674f0cb).(bw, metadata->datacxx . . $ FLAC__StreamMetadata#data..stream_infocxx . . $ FLAC__StreamMetadata#$anonymous_type_34#stream_info..max_blocksizecxx . . $ $anonymous_type_81a4853959168ec7_21#max_blocksize., FLAC__STREAM_METADATA_STREAMINFO_MAX_BLOCK_SIZE_LENcxx . . $ FLAC__STREAM_METADATA_STREAMINFO_MAX_BLOCK_SIZE_LEN.)) |
| 84 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 85 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(metadata->data.stream_info.min_framesize < (1u << FLAC__STREAM_METADATA_STREAMINFO_MIN_FRAME_SIZE_LEN)); |
| 86 | if(!FLAC__bitwriter_write_raw_uint32cxx . . $ FLAC__bitwriter_write_raw_uint32(33e8736f9674f0cb).(bw, metadata->datacxx . . $ FLAC__StreamMetadata#data..stream_infocxx . . $ FLAC__StreamMetadata#$anonymous_type_34#stream_info..min_framesizecxx . . $ $anonymous_type_81a4853959168ec7_21#min_framesize., FLAC__STREAM_METADATA_STREAMINFO_MIN_FRAME_SIZE_LENcxx . . $ FLAC__STREAM_METADATA_STREAMINFO_MIN_FRAME_SIZE_LEN.)) |
| 87 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 88 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(metadata->data.stream_info.max_framesize < (1u << FLAC__STREAM_METADATA_STREAMINFO_MAX_FRAME_SIZE_LEN)); |
| 89 | if(!FLAC__bitwriter_write_raw_uint32cxx . . $ FLAC__bitwriter_write_raw_uint32(33e8736f9674f0cb).(bw, metadata->datacxx . . $ FLAC__StreamMetadata#data..stream_infocxx . . $ FLAC__StreamMetadata#$anonymous_type_34#stream_info..max_framesizecxx . . $ $anonymous_type_81a4853959168ec7_21#max_framesize., FLAC__STREAM_METADATA_STREAMINFO_MAX_FRAME_SIZE_LENcxx . . $ FLAC__STREAM_METADATA_STREAMINFO_MAX_FRAME_SIZE_LEN.)) |
| 90 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 91 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(FLAC__format_sample_rate_is_valid(metadata->data.stream_info.sample_rate)); |
| 92 | if(!FLAC__bitwriter_write_raw_uint32cxx . . $ FLAC__bitwriter_write_raw_uint32(33e8736f9674f0cb).(bw, metadata->datacxx . . $ FLAC__StreamMetadata#data..stream_infocxx . . $ FLAC__StreamMetadata#$anonymous_type_34#stream_info..sample_ratecxx . . $ $anonymous_type_81a4853959168ec7_21#sample_rate., FLAC__STREAM_METADATA_STREAMINFO_SAMPLE_RATE_LENcxx . . $ FLAC__STREAM_METADATA_STREAMINFO_SAMPLE_RATE_LEN.)) |
| 93 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 94 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(metadata->data.stream_info.channels > 0); |
| 95 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(metadata->data.stream_info.channels <= (1u << FLAC__STREAM_METADATA_STREAMINFO_CHANNELS_LEN)); |
| 96 | if(!FLAC__bitwriter_write_raw_uint32cxx . . $ FLAC__bitwriter_write_raw_uint32(33e8736f9674f0cb).(bw, metadata->datacxx . . $ FLAC__StreamMetadata#data..stream_infocxx . . $ FLAC__StreamMetadata#$anonymous_type_34#stream_info..channelscxx . . $ $anonymous_type_81a4853959168ec7_21#channels.-1, FLAC__STREAM_METADATA_STREAMINFO_CHANNELS_LENcxx . . $ FLAC__STREAM_METADATA_STREAMINFO_CHANNELS_LEN.)) |
| 97 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 98 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(metadata->data.stream_info.bits_per_sample > 0); |
| 99 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(metadata->data.stream_info.bits_per_sample <= (1u << FLAC__STREAM_METADATA_STREAMINFO_BITS_PER_SAMPLE_LEN)); |
| 100 | if(!FLAC__bitwriter_write_raw_uint32cxx . . $ FLAC__bitwriter_write_raw_uint32(33e8736f9674f0cb).(bw, metadata->datacxx . . $ FLAC__StreamMetadata#data..stream_infocxx . . $ FLAC__StreamMetadata#$anonymous_type_34#stream_info..bits_per_samplecxx . . $ $anonymous_type_81a4853959168ec7_21#bits_per_sample.-1, FLAC__STREAM_METADATA_STREAMINFO_BITS_PER_SAMPLE_LENcxx . . $ FLAC__STREAM_METADATA_STREAMINFO_BITS_PER_SAMPLE_LEN.)) |
| 101 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 102 | if(metadata->datacxx . . $ FLAC__StreamMetadata#data..stream_infocxx . . $ FLAC__StreamMetadata#$anonymous_type_34#stream_info..total_samplescxx . . $ $anonymous_type_81a4853959168ec7_21#total_samples. >= (FLAC__U64Lcxx . . $ `external/flac/flac_share_compat.h:102:9`!(1) << FLAC__STREAM_METADATA_STREAMINFO_TOTAL_SAMPLES_LENcxx . . $ FLAC__STREAM_METADATA_STREAMINFO_TOTAL_SAMPLES_LEN.)){ |
| 103 | if(!FLAC__bitwriter_write_raw_uint64cxx . . $ FLAC__bitwriter_write_raw_uint64(977811ccf2c01f47).(bw, 0, FLAC__STREAM_METADATA_STREAMINFO_TOTAL_SAMPLES_LENcxx . . $ FLAC__STREAM_METADATA_STREAMINFO_TOTAL_SAMPLES_LEN.)) |
| 104 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 105 | }else{ |
| 106 | if(!FLAC__bitwriter_write_raw_uint64cxx . . $ FLAC__bitwriter_write_raw_uint64(977811ccf2c01f47).(bw, metadata->datacxx . . $ FLAC__StreamMetadata#data..stream_infocxx . . $ FLAC__StreamMetadata#$anonymous_type_34#stream_info..total_samplescxx . . $ $anonymous_type_81a4853959168ec7_21#total_samples., FLAC__STREAM_METADATA_STREAMINFO_TOTAL_SAMPLES_LENcxx . . $ FLAC__STREAM_METADATA_STREAMINFO_TOTAL_SAMPLES_LEN.)) |
| 107 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 108 | } |
| 109 | if(!FLAC__bitwriter_write_byte_blockcxx . . $ FLAC__bitwriter_write_byte_block(1e830db26c8bfe86).(bw, metadata->datacxx . . $ FLAC__StreamMetadata#data..stream_infocxx . . $ FLAC__StreamMetadata#$anonymous_type_34#stream_info..md5sumcxx . . $ $anonymous_type_81a4853959168ec7_21#md5sum., 16)) |
| 110 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 111 | break; |
| 112 | case FLAC__METADATA_TYPE_PADDINGcxx . . $ FLAC__METADATA_TYPE_PADDING.: |
| 113 | if(!FLAC__bitwriter_write_zeroescxx . . $ FLAC__bitwriter_write_zeroes(40f5a9d2c07215ed).(bw, metadata->lengthcxx . . $ FLAC__StreamMetadata#length. * 8)) |
| 114 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 115 | break; |
| 116 | case FLAC__METADATA_TYPE_APPLICATIONcxx . . $ FLAC__METADATA_TYPE_APPLICATION.: |
| 117 | if(!FLAC__bitwriter_write_byte_blockcxx . . $ FLAC__bitwriter_write_byte_block(1e830db26c8bfe86).(bw, metadata->datacxx . . $ FLAC__StreamMetadata#data..applicationcxx . . $ FLAC__StreamMetadata#$anonymous_type_34#application..idcxx . . $ $anonymous_type_81a4853959168ec7_23#id., FLAC__STREAM_METADATA_APPLICATION_ID_LENcxx . . $ FLAC__STREAM_METADATA_APPLICATION_ID_LEN. / 8)) |
| 118 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 119 | if(!FLAC__bitwriter_write_byte_blockcxx . . $ FLAC__bitwriter_write_byte_block(1e830db26c8bfe86).(bw, metadata->datacxx . . $ FLAC__StreamMetadata#data..applicationcxx . . $ FLAC__StreamMetadata#$anonymous_type_34#application..datacxx . . $ $anonymous_type_81a4853959168ec7_23#data., metadata->lengthcxx . . $ FLAC__StreamMetadata#length. - (FLAC__STREAM_METADATA_APPLICATION_ID_LENcxx . . $ FLAC__STREAM_METADATA_APPLICATION_ID_LEN. / 8))) |
| 120 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 121 | break; |
| 122 | case FLAC__METADATA_TYPE_SEEKTABLEcxx . . $ FLAC__METADATA_TYPE_SEEKTABLE.: |
| 123 | for(i = 0; i < metadata->datacxx . . $ FLAC__StreamMetadata#data..seek_tablecxx . . $ FLAC__StreamMetadata#$anonymous_type_34#seek_table..num_pointscxx . . $ $anonymous_type_81a4853959168ec7_25#num_points.; i++) { |
| 124 | if(!FLAC__bitwriter_write_raw_uint64cxx . . $ FLAC__bitwriter_write_raw_uint64(977811ccf2c01f47).(bw, metadata->datacxx . . $ FLAC__StreamMetadata#data..seek_tablecxx . . $ FLAC__StreamMetadata#$anonymous_type_34#seek_table..pointscxx . . $ $anonymous_type_81a4853959168ec7_25#points.[i].sample_numbercxx . . $ $anonymous_type_81a4853959168ec7_24#sample_number., FLAC__STREAM_METADATA_SEEKPOINT_SAMPLE_NUMBER_LENcxx . . $ FLAC__STREAM_METADATA_SEEKPOINT_SAMPLE_NUMBER_LEN.)) |
| 125 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 126 | if(!FLAC__bitwriter_write_raw_uint64cxx . . $ FLAC__bitwriter_write_raw_uint64(977811ccf2c01f47).(bw, metadata->datacxx . . $ FLAC__StreamMetadata#data..seek_tablecxx . . $ FLAC__StreamMetadata#$anonymous_type_34#seek_table..pointscxx . . $ $anonymous_type_81a4853959168ec7_25#points.[i].stream_offsetcxx . . $ $anonymous_type_81a4853959168ec7_24#stream_offset., FLAC__STREAM_METADATA_SEEKPOINT_STREAM_OFFSET_LENcxx . . $ FLAC__STREAM_METADATA_SEEKPOINT_STREAM_OFFSET_LEN.)) |
| 127 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 128 | if(!FLAC__bitwriter_write_raw_uint32cxx . . $ FLAC__bitwriter_write_raw_uint32(33e8736f9674f0cb).(bw, metadata->datacxx . . $ FLAC__StreamMetadata#data..seek_tablecxx . . $ FLAC__StreamMetadata#$anonymous_type_34#seek_table..pointscxx . . $ $anonymous_type_81a4853959168ec7_25#points.[i].frame_samplescxx . . $ $anonymous_type_81a4853959168ec7_24#frame_samples., FLAC__STREAM_METADATA_SEEKPOINT_FRAME_SAMPLES_LENcxx . . $ FLAC__STREAM_METADATA_SEEKPOINT_FRAME_SAMPLES_LEN.)) |
| 129 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 130 | } |
| 131 | break; |
| 132 | case FLAC__METADATA_TYPE_VORBIS_COMMENTcxx . . $ FLAC__METADATA_TYPE_VORBIS_COMMENT.: |
| 133 | if(update_vendor_string) { |
| 134 | if(!FLAC__bitwriter_write_raw_uint32_little_endiancxx . . $ FLAC__bitwriter_write_raw_uint32_little_endian(40f5a9d2c07215ed).(bw, vendor_string_length)) |
| 135 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 136 | if(!FLAC__bitwriter_write_byte_blockcxx . . $ FLAC__bitwriter_write_byte_block(1e830db26c8bfe86).(bw, (const FLAC__bytecxx . . $ FLAC__byte#*)FLAC__VENDOR_STRINGcxx . . $ FLAC__VENDOR_STRING., vendor_string_length)) |
| 137 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 138 | } |
| 139 | else { |
| 140 | if(!FLAC__bitwriter_write_raw_uint32_little_endiancxx . . $ FLAC__bitwriter_write_raw_uint32_little_endian(40f5a9d2c07215ed).(bw, metadata->datacxx . . $ FLAC__StreamMetadata#data..vorbis_commentcxx . . $ FLAC__StreamMetadata#$anonymous_type_34#vorbis_comment..vendor_stringcxx . . $ $anonymous_type_81a4853959168ec7_27#vendor_string..lengthcxx . . $ $anonymous_type_81a4853959168ec7_26#length.)) |
| 141 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 142 | if(!FLAC__bitwriter_write_byte_blockcxx . . $ FLAC__bitwriter_write_byte_block(1e830db26c8bfe86).(bw, metadata->datacxx . . $ FLAC__StreamMetadata#data..vorbis_commentcxx . . $ FLAC__StreamMetadata#$anonymous_type_34#vorbis_comment..vendor_stringcxx . . $ $anonymous_type_81a4853959168ec7_27#vendor_string..entrycxx . . $ $anonymous_type_81a4853959168ec7_26#entry., metadata->datacxx . . $ FLAC__StreamMetadata#data..vorbis_commentcxx . . $ FLAC__StreamMetadata#$anonymous_type_34#vorbis_comment..vendor_stringcxx . . $ $anonymous_type_81a4853959168ec7_27#vendor_string..lengthcxx . . $ $anonymous_type_81a4853959168ec7_26#length.)) |
| 143 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 144 | } |
| 145 | if(!FLAC__bitwriter_write_raw_uint32_little_endiancxx . . $ FLAC__bitwriter_write_raw_uint32_little_endian(40f5a9d2c07215ed).(bw, metadata->datacxx . . $ FLAC__StreamMetadata#data..vorbis_commentcxx . . $ FLAC__StreamMetadata#$anonymous_type_34#vorbis_comment..num_commentscxx . . $ $anonymous_type_81a4853959168ec7_27#num_comments.)) |
| 146 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 147 | for(i = 0; i < metadata->datacxx . . $ FLAC__StreamMetadata#data..vorbis_commentcxx . . $ FLAC__StreamMetadata#$anonymous_type_34#vorbis_comment..num_commentscxx . . $ $anonymous_type_81a4853959168ec7_27#num_comments.; i++) { |
| 148 | if(!FLAC__bitwriter_write_raw_uint32_little_endiancxx . . $ FLAC__bitwriter_write_raw_uint32_little_endian(40f5a9d2c07215ed).(bw, metadata->datacxx . . $ FLAC__StreamMetadata#data..vorbis_commentcxx . . $ FLAC__StreamMetadata#$anonymous_type_34#vorbis_comment..commentscxx . . $ $anonymous_type_81a4853959168ec7_27#comments.[i].lengthcxx . . $ $anonymous_type_81a4853959168ec7_26#length.)) |
| 149 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 150 | if(!FLAC__bitwriter_write_byte_blockcxx . . $ FLAC__bitwriter_write_byte_block(1e830db26c8bfe86).(bw, metadata->datacxx . . $ FLAC__StreamMetadata#data..vorbis_commentcxx . . $ FLAC__StreamMetadata#$anonymous_type_34#vorbis_comment..commentscxx . . $ $anonymous_type_81a4853959168ec7_27#comments.[i].entrycxx . . $ $anonymous_type_81a4853959168ec7_26#entry., metadata->datacxx . . $ FLAC__StreamMetadata#data..vorbis_commentcxx . . $ FLAC__StreamMetadata#$anonymous_type_34#vorbis_comment..commentscxx . . $ $anonymous_type_81a4853959168ec7_27#comments.[i].lengthcxx . . $ $anonymous_type_81a4853959168ec7_26#length.)) |
| 151 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 152 | } |
| 153 | break; |
| 154 | case FLAC__METADATA_TYPE_CUESHEETcxx . . $ FLAC__METADATA_TYPE_CUESHEET.: |
| 155 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(FLAC__STREAM_METADATA_CUESHEET_MEDIA_CATALOG_NUMBER_LEN % 8 == 0); |
| 156 | if(!FLAC__bitwriter_write_byte_blockcxx . . $ FLAC__bitwriter_write_byte_block(1e830db26c8bfe86).(bw, (const FLAC__bytecxx . . $ FLAC__byte#*)metadata->datacxx . . $ FLAC__StreamMetadata#data..cue_sheetcxx . . $ FLAC__StreamMetadata#$anonymous_type_34#cue_sheet..media_catalog_numbercxx . . $ $anonymous_type_81a4853959168ec7_30#media_catalog_number., FLAC__STREAM_METADATA_CUESHEET_MEDIA_CATALOG_NUMBER_LENcxx . . $ FLAC__STREAM_METADATA_CUESHEET_MEDIA_CATALOG_NUMBER_LEN./8)) |
| 157 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 158 | if(!FLAC__bitwriter_write_raw_uint64cxx . . $ FLAC__bitwriter_write_raw_uint64(977811ccf2c01f47).(bw, metadata->datacxx . . $ FLAC__StreamMetadata#data..cue_sheetcxx . . $ FLAC__StreamMetadata#$anonymous_type_34#cue_sheet..lead_incxx . . $ $anonymous_type_81a4853959168ec7_30#lead_in., FLAC__STREAM_METADATA_CUESHEET_LEAD_IN_LENcxx . . $ FLAC__STREAM_METADATA_CUESHEET_LEAD_IN_LEN.)) |
| 159 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 160 | if(!FLAC__bitwriter_write_raw_uint32cxx . . $ FLAC__bitwriter_write_raw_uint32(33e8736f9674f0cb).(bw, metadata->datacxx . . $ FLAC__StreamMetadata#data..cue_sheetcxx . . $ FLAC__StreamMetadata#$anonymous_type_34#cue_sheet..is_cdcxx . . $ $anonymous_type_81a4853959168ec7_30#is_cd.? 1 : 0, FLAC__STREAM_METADATA_CUESHEET_IS_CD_LENcxx . . $ FLAC__STREAM_METADATA_CUESHEET_IS_CD_LEN.)) |
| 161 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 162 | if(!FLAC__bitwriter_write_zeroescxx . . $ FLAC__bitwriter_write_zeroes(40f5a9d2c07215ed).(bw, FLAC__STREAM_METADATA_CUESHEET_RESERVED_LENcxx . . $ FLAC__STREAM_METADATA_CUESHEET_RESERVED_LEN.)) |
| 163 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 164 | if(!FLAC__bitwriter_write_raw_uint32cxx . . $ FLAC__bitwriter_write_raw_uint32(33e8736f9674f0cb).(bw, metadata->datacxx . . $ FLAC__StreamMetadata#data..cue_sheetcxx . . $ FLAC__StreamMetadata#$anonymous_type_34#cue_sheet..num_trackscxx . . $ $anonymous_type_81a4853959168ec7_30#num_tracks., FLAC__STREAM_METADATA_CUESHEET_NUM_TRACKS_LENcxx . . $ FLAC__STREAM_METADATA_CUESHEET_NUM_TRACKS_LEN.)) |
| 165 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 166 | for(i = 0; i < metadata->datacxx . . $ FLAC__StreamMetadata#data..cue_sheetcxx . . $ FLAC__StreamMetadata#$anonymous_type_34#cue_sheet..num_trackscxx . . $ $anonymous_type_81a4853959168ec7_30#num_tracks.; i++) { |
| 167 | const FLAC__StreamMetadata_CueSheet_Trackcxx . . $ FLAC__StreamMetadata_CueSheet_Track# *track = metadata->datacxx . . $ FLAC__StreamMetadata#data..cue_sheetcxx . . $ FLAC__StreamMetadata#$anonymous_type_34#cue_sheet..trackscxx . . $ $anonymous_type_81a4853959168ec7_30#tracks. + i; |
| 168 | |
| 169 | if(!FLAC__bitwriter_write_raw_uint64cxx . . $ FLAC__bitwriter_write_raw_uint64(977811ccf2c01f47).(bw, track->offsetcxx . . $ $anonymous_type_81a4853959168ec7_29#offset., FLAC__STREAM_METADATA_CUESHEET_TRACK_OFFSET_LENcxx . . $ FLAC__STREAM_METADATA_CUESHEET_TRACK_OFFSET_LEN.)) |
| 170 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 171 | if(!FLAC__bitwriter_write_raw_uint32cxx . . $ FLAC__bitwriter_write_raw_uint32(33e8736f9674f0cb).(bw, track->numbercxx . . $ $anonymous_type_81a4853959168ec7_29#number., FLAC__STREAM_METADATA_CUESHEET_TRACK_NUMBER_LENcxx . . $ FLAC__STREAM_METADATA_CUESHEET_TRACK_NUMBER_LEN.)) |
| 172 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 173 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(FLAC__STREAM_METADATA_CUESHEET_TRACK_ISRC_LEN % 8 == 0); |
| 174 | if(!FLAC__bitwriter_write_byte_blockcxx . . $ FLAC__bitwriter_write_byte_block(1e830db26c8bfe86).(bw, (const FLAC__bytecxx . . $ FLAC__byte#*)track->isrccxx . . $ $anonymous_type_81a4853959168ec7_29#isrc., FLAC__STREAM_METADATA_CUESHEET_TRACK_ISRC_LENcxx . . $ FLAC__STREAM_METADATA_CUESHEET_TRACK_ISRC_LEN./8)) |
| 175 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 176 | if(!FLAC__bitwriter_write_raw_uint32cxx . . $ FLAC__bitwriter_write_raw_uint32(33e8736f9674f0cb).(bw, track->typecxx . . $ $anonymous_type_81a4853959168ec7_29#type., FLAC__STREAM_METADATA_CUESHEET_TRACK_TYPE_LENcxx . . $ FLAC__STREAM_METADATA_CUESHEET_TRACK_TYPE_LEN.)) |
| 177 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 178 | if(!FLAC__bitwriter_write_raw_uint32cxx . . $ FLAC__bitwriter_write_raw_uint32(33e8736f9674f0cb).(bw, track->pre_emphasiscxx . . $ $anonymous_type_81a4853959168ec7_29#pre_emphasis., FLAC__STREAM_METADATA_CUESHEET_TRACK_PRE_EMPHASIS_LENcxx . . $ FLAC__STREAM_METADATA_CUESHEET_TRACK_PRE_EMPHASIS_LEN.)) |
| 179 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 180 | if(!FLAC__bitwriter_write_zeroescxx . . $ FLAC__bitwriter_write_zeroes(40f5a9d2c07215ed).(bw, FLAC__STREAM_METADATA_CUESHEET_TRACK_RESERVED_LENcxx . . $ FLAC__STREAM_METADATA_CUESHEET_TRACK_RESERVED_LEN.)) |
| 181 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 182 | if(!FLAC__bitwriter_write_raw_uint32cxx . . $ FLAC__bitwriter_write_raw_uint32(33e8736f9674f0cb).(bw, track->num_indicescxx . . $ $anonymous_type_81a4853959168ec7_29#num_indices., FLAC__STREAM_METADATA_CUESHEET_TRACK_NUM_INDICES_LENcxx . . $ FLAC__STREAM_METADATA_CUESHEET_TRACK_NUM_INDICES_LEN.)) |
| 183 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 184 | for(j = 0; j < track->num_indicescxx . . $ $anonymous_type_81a4853959168ec7_29#num_indices.; j++) { |
| 185 | const FLAC__StreamMetadata_CueSheet_Indexcxx . . $ FLAC__StreamMetadata_CueSheet_Index# *indx = track->indicescxx . . $ $anonymous_type_81a4853959168ec7_29#indices. + j; |
| 186 | |
| 187 | if(!FLAC__bitwriter_write_raw_uint64cxx . . $ FLAC__bitwriter_write_raw_uint64(977811ccf2c01f47).(bw, indx->offsetcxx . . $ $anonymous_type_81a4853959168ec7_28#offset., FLAC__STREAM_METADATA_CUESHEET_INDEX_OFFSET_LENcxx . . $ FLAC__STREAM_METADATA_CUESHEET_INDEX_OFFSET_LEN.)) |
| 188 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 189 | if(!FLAC__bitwriter_write_raw_uint32cxx . . $ FLAC__bitwriter_write_raw_uint32(33e8736f9674f0cb).(bw, indx->numbercxx . . $ $anonymous_type_81a4853959168ec7_28#number., FLAC__STREAM_METADATA_CUESHEET_INDEX_NUMBER_LENcxx . . $ FLAC__STREAM_METADATA_CUESHEET_INDEX_NUMBER_LEN.)) |
| 190 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 191 | if(!FLAC__bitwriter_write_zeroescxx . . $ FLAC__bitwriter_write_zeroes(40f5a9d2c07215ed).(bw, FLAC__STREAM_METADATA_CUESHEET_INDEX_RESERVED_LENcxx . . $ FLAC__STREAM_METADATA_CUESHEET_INDEX_RESERVED_LEN.)) |
| 192 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 193 | } |
| 194 | } |
| 195 | break; |
| 196 | case FLAC__METADATA_TYPE_PICTUREcxx . . $ FLAC__METADATA_TYPE_PICTURE.: |
| 197 | { |
| 198 | size_t len; |
| 199 | if(!FLAC__bitwriter_write_raw_uint32cxx . . $ FLAC__bitwriter_write_raw_uint32(33e8736f9674f0cb).(bw, metadata->datacxx . . $ FLAC__StreamMetadata#data..picturecxx . . $ FLAC__StreamMetadata#$anonymous_type_34#picture..typecxx . . $ $anonymous_type_81a4853959168ec7_32#type., FLAC__STREAM_METADATA_PICTURE_TYPE_LENcxx . . $ FLAC__STREAM_METADATA_PICTURE_TYPE_LEN.)) |
| 200 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 201 | len = strlencxx . . $ strlen(751346f8406fd082).(metadata->datacxx . . $ FLAC__StreamMetadata#data..picturecxx . . $ FLAC__StreamMetadata#$anonymous_type_34#picture..mime_typecxx . . $ $anonymous_type_81a4853959168ec7_32#mime_type.); |
| 202 | if(!FLAC__bitwriter_write_raw_uint32cxx . . $ FLAC__bitwriter_write_raw_uint32(33e8736f9674f0cb).(bw, len, FLAC__STREAM_METADATA_PICTURE_MIME_TYPE_LENGTH_LENcxx . . $ FLAC__STREAM_METADATA_PICTURE_MIME_TYPE_LENGTH_LEN.)) |
| 203 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 204 | if(!FLAC__bitwriter_write_byte_blockcxx . . $ FLAC__bitwriter_write_byte_block(1e830db26c8bfe86).(bw, (const FLAC__bytecxx . . $ FLAC__byte#*)metadata->datacxx . . $ FLAC__StreamMetadata#data..picturecxx . . $ FLAC__StreamMetadata#$anonymous_type_34#picture..mime_typecxx . . $ $anonymous_type_81a4853959168ec7_32#mime_type., len)) |
| 205 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 206 | len = strlencxx . . $ strlen(751346f8406fd082).((const char *)metadata->datacxx . . $ FLAC__StreamMetadata#data..picturecxx . . $ FLAC__StreamMetadata#$anonymous_type_34#picture..descriptioncxx . . $ $anonymous_type_81a4853959168ec7_32#description.); |
| 207 | if(!FLAC__bitwriter_write_raw_uint32cxx . . $ FLAC__bitwriter_write_raw_uint32(33e8736f9674f0cb).(bw, len, FLAC__STREAM_METADATA_PICTURE_DESCRIPTION_LENGTH_LENcxx . . $ FLAC__STREAM_METADATA_PICTURE_DESCRIPTION_LENGTH_LEN.)) |
| 208 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 209 | if(!FLAC__bitwriter_write_byte_blockcxx . . $ FLAC__bitwriter_write_byte_block(1e830db26c8bfe86).(bw, metadata->datacxx . . $ FLAC__StreamMetadata#data..picturecxx . . $ FLAC__StreamMetadata#$anonymous_type_34#picture..descriptioncxx . . $ $anonymous_type_81a4853959168ec7_32#description., len)) |
| 210 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 211 | if(!FLAC__bitwriter_write_raw_uint32cxx . . $ FLAC__bitwriter_write_raw_uint32(33e8736f9674f0cb).(bw, metadata->datacxx . . $ FLAC__StreamMetadata#data..picturecxx . . $ FLAC__StreamMetadata#$anonymous_type_34#picture..widthcxx . . $ $anonymous_type_81a4853959168ec7_32#width., FLAC__STREAM_METADATA_PICTURE_WIDTH_LENcxx . . $ FLAC__STREAM_METADATA_PICTURE_WIDTH_LEN.)) |
| 212 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 213 | if(!FLAC__bitwriter_write_raw_uint32cxx . . $ FLAC__bitwriter_write_raw_uint32(33e8736f9674f0cb).(bw, metadata->datacxx . . $ FLAC__StreamMetadata#data..picturecxx . . $ FLAC__StreamMetadata#$anonymous_type_34#picture..heightcxx . . $ $anonymous_type_81a4853959168ec7_32#height., FLAC__STREAM_METADATA_PICTURE_HEIGHT_LENcxx . . $ FLAC__STREAM_METADATA_PICTURE_HEIGHT_LEN.)) |
| 214 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 215 | if(!FLAC__bitwriter_write_raw_uint32cxx . . $ FLAC__bitwriter_write_raw_uint32(33e8736f9674f0cb).(bw, metadata->datacxx . . $ FLAC__StreamMetadata#data..picturecxx . . $ FLAC__StreamMetadata#$anonymous_type_34#picture..depthcxx . . $ $anonymous_type_81a4853959168ec7_32#depth., FLAC__STREAM_METADATA_PICTURE_DEPTH_LENcxx . . $ FLAC__STREAM_METADATA_PICTURE_DEPTH_LEN.)) |
| 216 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 217 | if(!FLAC__bitwriter_write_raw_uint32cxx . . $ FLAC__bitwriter_write_raw_uint32(33e8736f9674f0cb).(bw, metadata->datacxx . . $ FLAC__StreamMetadata#data..picturecxx . . $ FLAC__StreamMetadata#$anonymous_type_34#picture..colorscxx . . $ $anonymous_type_81a4853959168ec7_32#colors., FLAC__STREAM_METADATA_PICTURE_COLORS_LENcxx . . $ FLAC__STREAM_METADATA_PICTURE_COLORS_LEN.)) |
| 218 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 219 | if(!FLAC__bitwriter_write_raw_uint32cxx . . $ FLAC__bitwriter_write_raw_uint32(33e8736f9674f0cb).(bw, metadata->datacxx . . $ FLAC__StreamMetadata#data..picturecxx . . $ FLAC__StreamMetadata#$anonymous_type_34#picture..data_lengthcxx . . $ $anonymous_type_81a4853959168ec7_32#data_length., FLAC__STREAM_METADATA_PICTURE_DATA_LENGTH_LENcxx . . $ FLAC__STREAM_METADATA_PICTURE_DATA_LENGTH_LEN.)) |
| 220 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 221 | if(!FLAC__bitwriter_write_byte_blockcxx . . $ FLAC__bitwriter_write_byte_block(1e830db26c8bfe86).(bw, metadata->datacxx . . $ FLAC__StreamMetadata#data..picturecxx . . $ FLAC__StreamMetadata#$anonymous_type_34#picture..datacxx . . $ $anonymous_type_81a4853959168ec7_32#data., metadata->datacxx . . $ FLAC__StreamMetadata#data..picturecxx . . $ FLAC__StreamMetadata#$anonymous_type_34#picture..data_lengthcxx . . $ $anonymous_type_81a4853959168ec7_32#data_length.)) |
| 222 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 223 | } |
| 224 | break; |
| 225 | default: |
| 226 | if(!FLAC__bitwriter_write_byte_blockcxx . . $ FLAC__bitwriter_write_byte_block(1e830db26c8bfe86).(bw, metadata->datacxx . . $ FLAC__StreamMetadata#data..unknowncxx . . $ FLAC__StreamMetadata#$anonymous_type_34#unknown..datacxx . . $ $anonymous_type_81a4853959168ec7_33#data., metadata->lengthcxx . . $ FLAC__StreamMetadata#length.)) |
| 227 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 228 | break; |
| 229 | } |
| 230 | |
| 231 | /* Now check whether metadata block length was correct */ |
| 232 | { |
| 233 | uint32_tcxx . . $ uint32_t# length_in_bits = FLAC__bitwriter_get_input_bits_unconsumedcxx . . $ FLAC__bitwriter_get_input_bits_unconsumed(a85bce63af5da0e3).(bw); |
| 234 | if(length_in_bits < start_bits) |
| 235 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 236 | length_in_bits -= start_bits; |
| 237 | if(length_in_bits % 8 != 0 || length_in_bits != (metadata_length*8+32)) |
| 238 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 239 | } |
| 240 | |
| 241 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(FLAC__bitwriter_is_byte_aligned(bw)); |
| 242 | return truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!; |
| 243 | } |
| 244 | |
| 245 | FLAC__boolcxx . . $ FLAC__bool# FLAC__frame_add_headercxx . . $ FLAC__frame_add_header(e3dadb56cba9a01e).(const FLAC__FrameHeadercxx . . $ FLAC__FrameHeader# *header, FLAC__BitWritercxx . . $ FLAC__BitWriter# *bw) |
| 246 | { |
| 247 | uint32_tcxx . . $ uint32_t# u, blocksize_hint, sample_rate_hint; |
| 248 | FLAC__bytecxx . . $ FLAC__byte# crc; |
| 249 | |
| 250 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(FLAC__bitwriter_is_byte_aligned(bw)); |
| 251 | |
| 252 | if(!FLAC__bitwriter_write_raw_uint32cxx . . $ FLAC__bitwriter_write_raw_uint32(33e8736f9674f0cb).(bw, FLAC__FRAME_HEADER_SYNCcxx . . $ FLAC__FRAME_HEADER_SYNC., FLAC__FRAME_HEADER_SYNC_LENcxx . . $ FLAC__FRAME_HEADER_SYNC_LEN.)) |
| 253 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 254 | |
| 255 | if(!FLAC__bitwriter_write_raw_uint32cxx . . $ FLAC__bitwriter_write_raw_uint32(33e8736f9674f0cb).(bw, 0, FLAC__FRAME_HEADER_RESERVED_LENcxx . . $ FLAC__FRAME_HEADER_RESERVED_LEN.)) |
| 256 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 257 | |
| 258 | if(!FLAC__bitwriter_write_raw_uint32cxx . . $ FLAC__bitwriter_write_raw_uint32(33e8736f9674f0cb).(bw, (header->number_typecxx . . $ $anonymous_type_81a4853959168ec7_16#number_type. == FLAC__FRAME_NUMBER_TYPE_FRAME_NUMBERcxx . . $ FLAC__FRAME_NUMBER_TYPE_FRAME_NUMBER.)? 0 : 1, FLAC__FRAME_HEADER_BLOCKING_STRATEGY_LENcxx . . $ FLAC__FRAME_HEADER_BLOCKING_STRATEGY_LEN.)) |
| 259 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 260 | |
| 261 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(header->blocksize > 0 && header->blocksize <= FLAC__MAX_BLOCK_SIZEcxx . . $ `external/flac/flac_FLAC_format.h:99:9`!); |
| 262 | /* when this assertion holds true, any legal blocksize can be expressed in the frame header */ |
| 263 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(FLAC__MAX_BLOCK_SIZEcxx . . $ `external/flac/flac_FLAC_format.h:99:9`! <= 65535u); |
| 264 | blocksize_hint = 0; |
| 265 | switch(header->blocksizecxx . . $ $anonymous_type_81a4853959168ec7_16#blocksize.) { |
| 266 | case 192: u = 1; break; |
| 267 | case 576: u = 2; break; |
| 268 | case 1152: u = 3; break; |
| 269 | case 2304: u = 4; break; |
| 270 | case 4608: u = 5; break; |
| 271 | case 256: u = 8; break; |
| 272 | case 512: u = 9; break; |
| 273 | case 1024: u = 10; break; |
| 274 | case 2048: u = 11; break; |
| 275 | case 4096: u = 12; break; |
| 276 | case 8192: u = 13; break; |
| 277 | case 16384: u = 14; break; |
| 278 | case 32768: u = 15; break; |
| 279 | default: |
| 280 | if(header->blocksizecxx . . $ $anonymous_type_81a4853959168ec7_16#blocksize. <= 0x100) |
| 281 | blocksize_hint = u = 6; |
| 282 | else |
| 283 | blocksize_hint = u = 7; |
| 284 | break; |
| 285 | } |
| 286 | if(!FLAC__bitwriter_write_raw_uint32cxx . . $ FLAC__bitwriter_write_raw_uint32(33e8736f9674f0cb).(bw, u, FLAC__FRAME_HEADER_BLOCK_SIZE_LENcxx . . $ FLAC__FRAME_HEADER_BLOCK_SIZE_LEN.)) |
| 287 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 288 | |
| 289 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(FLAC__format_sample_rate_is_valid(header->sample_rate)); |
| 290 | sample_rate_hint = 0; |
| 291 | switch(header->sample_ratecxx . . $ $anonymous_type_81a4853959168ec7_16#sample_rate.) { |
| 292 | case 88200: u = 1; break; |
| 293 | case 176400: u = 2; break; |
| 294 | case 192000: u = 3; break; |
| 295 | case 8000: u = 4; break; |
| 296 | case 16000: u = 5; break; |
| 297 | case 22050: u = 6; break; |
| 298 | case 24000: u = 7; break; |
| 299 | case 32000: u = 8; break; |
| 300 | case 44100: u = 9; break; |
| 301 | case 48000: u = 10; break; |
| 302 | case 96000: u = 11; break; |
| 303 | default: |
| 304 | if(header->sample_ratecxx . . $ $anonymous_type_81a4853959168ec7_16#sample_rate. <= 255000 && header->sample_ratecxx . . $ $anonymous_type_81a4853959168ec7_16#sample_rate. % 1000 == 0) |
| 305 | sample_rate_hint = u = 12; |
| 306 | else if(header->sample_ratecxx . . $ $anonymous_type_81a4853959168ec7_16#sample_rate. <= 655350 && header->sample_ratecxx . . $ $anonymous_type_81a4853959168ec7_16#sample_rate. % 10 == 0) |
| 307 | sample_rate_hint = u = 14; |
| 308 | else if(header->sample_ratecxx . . $ $anonymous_type_81a4853959168ec7_16#sample_rate. <= 0xffff) |
| 309 | sample_rate_hint = u = 13; |
| 310 | else |
| 311 | u = 0; |
| 312 | break; |
| 313 | } |
| 314 | if(!FLAC__bitwriter_write_raw_uint32cxx . . $ FLAC__bitwriter_write_raw_uint32(33e8736f9674f0cb).(bw, u, FLAC__FRAME_HEADER_SAMPLE_RATE_LENcxx . . $ FLAC__FRAME_HEADER_SAMPLE_RATE_LEN.)) |
| 315 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 316 | |
| 317 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(header->channels > 0 && header->channels <= (1u << FLAC__STREAM_METADATA_STREAMINFO_CHANNELS_LEN) && header->channels <= FLAC__MAX_CHANNELScxx . . $ `external/flac/flac_FLAC_format.h:106:9`!); |
| 318 | switch(header->channel_assignmentcxx . . $ $anonymous_type_81a4853959168ec7_16#channel_assignment.) { |
| 319 | case FLAC__CHANNEL_ASSIGNMENT_INDEPENDENTcxx . . $ FLAC__CHANNEL_ASSIGNMENT_INDEPENDENT.: |
| 320 | u = header->channelscxx . . $ $anonymous_type_81a4853959168ec7_16#channels. - 1; |
| 321 | break; |
| 322 | case FLAC__CHANNEL_ASSIGNMENT_LEFT_SIDEcxx . . $ FLAC__CHANNEL_ASSIGNMENT_LEFT_SIDE.: |
| 323 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(header->channels == 2); |
| 324 | u = 8; |
| 325 | break; |
| 326 | case FLAC__CHANNEL_ASSIGNMENT_RIGHT_SIDEcxx . . $ FLAC__CHANNEL_ASSIGNMENT_RIGHT_SIDE.: |
| 327 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(header->channels == 2); |
| 328 | u = 9; |
| 329 | break; |
| 330 | case FLAC__CHANNEL_ASSIGNMENT_MID_SIDEcxx . . $ FLAC__CHANNEL_ASSIGNMENT_MID_SIDE.: |
| 331 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(header->channels == 2); |
| 332 | u = 10; |
| 333 | break; |
| 334 | default: |
| 335 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(0); |
| 336 | } |
| 337 | if(!FLAC__bitwriter_write_raw_uint32cxx . . $ FLAC__bitwriter_write_raw_uint32(33e8736f9674f0cb).(bw, u, FLAC__FRAME_HEADER_CHANNEL_ASSIGNMENT_LENcxx . . $ FLAC__FRAME_HEADER_CHANNEL_ASSIGNMENT_LEN.)) |
| 338 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 339 | |
| 340 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(header->bits_per_sample > 0 && header->bits_per_sample <= (1u << FLAC__STREAM_METADATA_STREAMINFO_BITS_PER_SAMPLE_LEN)); |
| 341 | switch(header->bits_per_samplecxx . . $ $anonymous_type_81a4853959168ec7_16#bits_per_sample.) { |
| 342 | case 8 : u = 1; break; |
| 343 | case 12: u = 2; break; |
| 344 | case 16: u = 4; break; |
| 345 | case 20: u = 5; break; |
| 346 | case 24: u = 6; break; |
| 347 | case 32: u = 7; break; |
| 348 | default: u = 0; break; |
| 349 | } |
| 350 | if(!FLAC__bitwriter_write_raw_uint32cxx . . $ FLAC__bitwriter_write_raw_uint32(33e8736f9674f0cb).(bw, u, FLAC__FRAME_HEADER_BITS_PER_SAMPLE_LENcxx . . $ FLAC__FRAME_HEADER_BITS_PER_SAMPLE_LEN.)) |
| 351 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 352 | |
| 353 | if(!FLAC__bitwriter_write_raw_uint32cxx . . $ FLAC__bitwriter_write_raw_uint32(33e8736f9674f0cb).(bw, 0, FLAC__FRAME_HEADER_ZERO_PAD_LENcxx . . $ FLAC__FRAME_HEADER_ZERO_PAD_LEN.)) |
| 354 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 355 | |
| 356 | if(header->number_typecxx . . $ $anonymous_type_81a4853959168ec7_16#number_type. == FLAC__FRAME_NUMBER_TYPE_FRAME_NUMBERcxx . . $ FLAC__FRAME_NUMBER_TYPE_FRAME_NUMBER.) { |
| 357 | if(!FLAC__bitwriter_write_utf8_uint32cxx . . $ FLAC__bitwriter_write_utf8_uint32(40f5a9d2c07215ed).(bw, header->numbercxx . . $ $anonymous_type_81a4853959168ec7_16#number..frame_numbercxx . . $ $anonymous_type_81a4853959168ec7_16#$anonymous_type_17#frame_number.)) |
| 358 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 359 | } |
| 360 | else { |
| 361 | if(!FLAC__bitwriter_write_utf8_uint64cxx . . $ FLAC__bitwriter_write_utf8_uint64(ccc3c33ea6abe49f).(bw, header->numbercxx . . $ $anonymous_type_81a4853959168ec7_16#number..sample_numbercxx . . $ $anonymous_type_81a4853959168ec7_16#$anonymous_type_17#sample_number.)) |
| 362 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 363 | } |
| 364 | |
| 365 | if(blocksize_hint) |
| 366 | if(!FLAC__bitwriter_write_raw_uint32cxx . . $ FLAC__bitwriter_write_raw_uint32(33e8736f9674f0cb).(bw, header->blocksizecxx . . $ $anonymous_type_81a4853959168ec7_16#blocksize.-1, (blocksize_hint==6)? 8:16)) |
| 367 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 368 | |
| 369 | switch(sample_rate_hint) { |
| 370 | case 12: |
| 371 | if(!FLAC__bitwriter_write_raw_uint32cxx . . $ FLAC__bitwriter_write_raw_uint32(33e8736f9674f0cb).(bw, header->sample_ratecxx . . $ $anonymous_type_81a4853959168ec7_16#sample_rate. / 1000, 8)) |
| 372 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 373 | break; |
| 374 | case 13: |
| 375 | if(!FLAC__bitwriter_write_raw_uint32cxx . . $ FLAC__bitwriter_write_raw_uint32(33e8736f9674f0cb).(bw, header->sample_ratecxx . . $ $anonymous_type_81a4853959168ec7_16#sample_rate., 16)) |
| 376 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 377 | break; |
| 378 | case 14: |
| 379 | if(!FLAC__bitwriter_write_raw_uint32cxx . . $ FLAC__bitwriter_write_raw_uint32(33e8736f9674f0cb).(bw, header->sample_ratecxx . . $ $anonymous_type_81a4853959168ec7_16#sample_rate. / 10, 16)) |
| 380 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 381 | break; |
| 382 | } |
| 383 | |
| 384 | /* write the CRC */ |
| 385 | if(!FLAC__bitwriter_get_write_crc8cxx . . $ FLAC__bitwriter_get_write_crc8(8bb2cc255f5b18a6).(bw, &crc)) |
| 386 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 387 | if(!FLAC__bitwriter_write_raw_uint32cxx . . $ FLAC__bitwriter_write_raw_uint32(33e8736f9674f0cb).(bw, crc, FLAC__FRAME_HEADER_CRC_LENcxx . . $ FLAC__FRAME_HEADER_CRC_LEN.)) |
| 388 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 389 | |
| 390 | return truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!; |
| 391 | } |
| 392 | |
| 393 | FLAC__boolcxx . . $ FLAC__bool# FLAC__subframe_add_constantcxx . . $ FLAC__subframe_add_constant(a7d06ee304c688e7).(const FLAC__Subframe_Constantcxx . . $ FLAC__Subframe_Constant# *subframe, uint32_tcxx . . $ uint32_t# subframe_bps, uint32_tcxx . . $ uint32_t# wasted_bits, FLAC__BitWritercxx . . $ FLAC__BitWriter# *bw) |
| 394 | { |
| 395 | FLAC__boolcxx . . $ FLAC__bool# ok; |
| 396 | |
| 397 | ok = |
| 398 | FLAC__bitwriter_write_raw_uint32cxx . . $ FLAC__bitwriter_write_raw_uint32(33e8736f9674f0cb).(bw, FLAC__SUBFRAME_TYPE_CONSTANT_BYTE_ALIGNED_MASKcxx . . $ FLAC__SUBFRAME_TYPE_CONSTANT_BYTE_ALIGNED_MASK. | (wasted_bits? 1:0), FLAC__SUBFRAME_ZERO_PAD_LENcxx . . $ FLAC__SUBFRAME_ZERO_PAD_LEN. + FLAC__SUBFRAME_TYPE_LENcxx . . $ FLAC__SUBFRAME_TYPE_LEN. + FLAC__SUBFRAME_WASTED_BITS_FLAG_LENcxx . . $ FLAC__SUBFRAME_WASTED_BITS_FLAG_LEN.) && |
| 399 | (wasted_bits? FLAC__bitwriter_write_unary_unsignedcxx . . $ FLAC__bitwriter_write_unary_unsigned(40f5a9d2c07215ed).(bw, wasted_bits-1) : truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!) && |
| 400 | FLAC__bitwriter_write_raw_int64cxx . . $ FLAC__bitwriter_write_raw_int64(19e8c2443226c8fa).(bw, subframe->valuecxx . . $ $anonymous_type_81a4853959168ec7_6#value., subframe_bps) |
| 401 | ; |
| 402 | |
| 403 | return ok; |
| 404 | } |
| 405 | |
| 406 | FLAC__boolcxx . . $ FLAC__bool# FLAC__subframe_add_fixedcxx . . $ FLAC__subframe_add_fixed(c118be1e6e17e28a).(const FLAC__Subframe_Fixedcxx . . $ FLAC__Subframe_Fixed# *subframe, uint32_tcxx . . $ uint32_t# residual_samples, uint32_tcxx . . $ uint32_t# subframe_bps, uint32_tcxx . . $ uint32_t# wasted_bits, FLAC__BitWritercxx . . $ FLAC__BitWriter# *bw) |
| 407 | { |
| 408 | uint32_tcxx . . $ uint32_t# i; |
| 409 | |
| 410 | if(!FLAC__bitwriter_write_raw_uint32cxx . . $ FLAC__bitwriter_write_raw_uint32(33e8736f9674f0cb).(bw, FLAC__SUBFRAME_TYPE_FIXED_BYTE_ALIGNED_MASKcxx . . $ FLAC__SUBFRAME_TYPE_FIXED_BYTE_ALIGNED_MASK. | (subframe->ordercxx . . $ $anonymous_type_81a4853959168ec7_10#order.<<1) | (wasted_bits? 1:0), FLAC__SUBFRAME_ZERO_PAD_LENcxx . . $ FLAC__SUBFRAME_ZERO_PAD_LEN. + FLAC__SUBFRAME_TYPE_LENcxx . . $ FLAC__SUBFRAME_TYPE_LEN. + FLAC__SUBFRAME_WASTED_BITS_FLAG_LENcxx . . $ FLAC__SUBFRAME_WASTED_BITS_FLAG_LEN.)) |
| 411 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 412 | if(wasted_bits) |
| 413 | if(!FLAC__bitwriter_write_unary_unsignedcxx . . $ FLAC__bitwriter_write_unary_unsigned(40f5a9d2c07215ed).(bw, wasted_bits-1)) |
| 414 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 415 | |
| 416 | for(i = 0; i < subframe->ordercxx . . $ $anonymous_type_81a4853959168ec7_10#order.; i++) |
| 417 | if(!FLAC__bitwriter_write_raw_int64cxx . . $ FLAC__bitwriter_write_raw_int64(19e8c2443226c8fa).(bw, subframe->warmupcxx . . $ $anonymous_type_81a4853959168ec7_10#warmup.[i], subframe_bps)) |
| 418 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 419 | |
| 420 | if(!add_entropy_coding_method_cxx . . $ add_entropy_coding_method_(5beee8f521febf58).(bw, &subframe->entropy_coding_methodcxx . . $ $anonymous_type_81a4853959168ec7_10#entropy_coding_method.)) |
| 421 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 422 | switch(subframe->entropy_coding_methodcxx . . $ $anonymous_type_81a4853959168ec7_10#entropy_coding_method..typecxx . . $ $anonymous_type_81a4853959168ec7_3#type.) { |
| 423 | case FLAC__ENTROPY_CODING_METHOD_PARTITIONED_RICEcxx . . $ FLAC__ENTROPY_CODING_METHOD_PARTITIONED_RICE.: |
| 424 | case FLAC__ENTROPY_CODING_METHOD_PARTITIONED_RICE2cxx . . $ FLAC__ENTROPY_CODING_METHOD_PARTITIONED_RICE2.: |
| 425 | if(!add_residual_partitioned_rice_cxx . . $ add_residual_partitioned_rice_(fee1f9afe59d864c).( |
| 426 | bw, |
| 427 | subframe->residualcxx . . $ $anonymous_type_81a4853959168ec7_10#residual., |
| 428 | residual_samples, |
| 429 | subframe->ordercxx . . $ $anonymous_type_81a4853959168ec7_10#order., |
| 430 | subframe->entropy_coding_methodcxx . . $ $anonymous_type_81a4853959168ec7_10#entropy_coding_method..datacxx . . $ $anonymous_type_81a4853959168ec7_3#data..partitioned_ricecxx . . $ $anonymous_type_81a4853959168ec7_3#$anonymous_type_4#partitioned_rice..contentscxx . . $ $anonymous_type_81a4853959168ec7_2#contents.->parameterscxx . . $ $anonymous_type_81a4853959168ec7_1#parameters., |
| 431 | subframe->entropy_coding_methodcxx . . $ $anonymous_type_81a4853959168ec7_10#entropy_coding_method..datacxx . . $ $anonymous_type_81a4853959168ec7_3#data..partitioned_ricecxx . . $ $anonymous_type_81a4853959168ec7_3#$anonymous_type_4#partitioned_rice..contentscxx . . $ $anonymous_type_81a4853959168ec7_2#contents.->raw_bitscxx . . $ $anonymous_type_81a4853959168ec7_1#raw_bits., |
| 432 | subframe->entropy_coding_methodcxx . . $ $anonymous_type_81a4853959168ec7_10#entropy_coding_method..datacxx . . $ $anonymous_type_81a4853959168ec7_3#data..partitioned_ricecxx . . $ $anonymous_type_81a4853959168ec7_3#$anonymous_type_4#partitioned_rice..ordercxx . . $ $anonymous_type_81a4853959168ec7_2#order., |
| 433 | /*is_extended=*/subframe->entropy_coding_methodcxx . . $ $anonymous_type_81a4853959168ec7_10#entropy_coding_method..typecxx . . $ $anonymous_type_81a4853959168ec7_3#type. == FLAC__ENTROPY_CODING_METHOD_PARTITIONED_RICE2cxx . . $ FLAC__ENTROPY_CODING_METHOD_PARTITIONED_RICE2. |
| 434 | )) |
| 435 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 436 | break; |
| 437 | default: |
| 438 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(0); |
| 439 | } |
| 440 | |
| 441 | return truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!; |
| 442 | } |
| 443 | |
| 444 | FLAC__boolcxx . . $ FLAC__bool# FLAC__subframe_add_lpccxx . . $ FLAC__subframe_add_lpc(e89718fb67b55f54).(const FLAC__Subframe_LPCcxx . . $ FLAC__Subframe_LPC# *subframe, uint32_tcxx . . $ uint32_t# residual_samples, uint32_tcxx . . $ uint32_t# subframe_bps, uint32_tcxx . . $ uint32_t# wasted_bits, FLAC__BitWritercxx . . $ FLAC__BitWriter# *bw) |
| 445 | { |
| 446 | uint32_tcxx . . $ uint32_t# i; |
| 447 | |
| 448 | if(!FLAC__bitwriter_write_raw_uint32cxx . . $ FLAC__bitwriter_write_raw_uint32(33e8736f9674f0cb).(bw, FLAC__SUBFRAME_TYPE_LPC_BYTE_ALIGNED_MASKcxx . . $ FLAC__SUBFRAME_TYPE_LPC_BYTE_ALIGNED_MASK. | ((subframe->ordercxx . . $ $anonymous_type_81a4853959168ec7_11#order.-1)<<1) | (wasted_bits? 1:0), FLAC__SUBFRAME_ZERO_PAD_LENcxx . . $ FLAC__SUBFRAME_ZERO_PAD_LEN. + FLAC__SUBFRAME_TYPE_LENcxx . . $ FLAC__SUBFRAME_TYPE_LEN. + FLAC__SUBFRAME_WASTED_BITS_FLAG_LENcxx . . $ FLAC__SUBFRAME_WASTED_BITS_FLAG_LEN.)) |
| 449 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 450 | if(wasted_bits) |
| 451 | if(!FLAC__bitwriter_write_unary_unsignedcxx . . $ FLAC__bitwriter_write_unary_unsigned(40f5a9d2c07215ed).(bw, wasted_bits-1)) |
| 452 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 453 | |
| 454 | for(i = 0; i < subframe->ordercxx . . $ $anonymous_type_81a4853959168ec7_11#order.; i++) |
| 455 | if(!FLAC__bitwriter_write_raw_int64cxx . . $ FLAC__bitwriter_write_raw_int64(19e8c2443226c8fa).(bw, subframe->warmupcxx . . $ $anonymous_type_81a4853959168ec7_11#warmup.[i], subframe_bps)) |
| 456 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 457 | |
| 458 | if(!FLAC__bitwriter_write_raw_uint32cxx . . $ FLAC__bitwriter_write_raw_uint32(33e8736f9674f0cb).(bw, subframe->qlp_coeff_precisioncxx . . $ $anonymous_type_81a4853959168ec7_11#qlp_coeff_precision.-1, FLAC__SUBFRAME_LPC_QLP_COEFF_PRECISION_LENcxx . . $ FLAC__SUBFRAME_LPC_QLP_COEFF_PRECISION_LEN.)) |
| 459 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 460 | if(!FLAC__bitwriter_write_raw_int32cxx . . $ FLAC__bitwriter_write_raw_int32(5caf381933d64f7c).(bw, subframe->quantization_levelcxx . . $ $anonymous_type_81a4853959168ec7_11#quantization_level., FLAC__SUBFRAME_LPC_QLP_SHIFT_LENcxx . . $ FLAC__SUBFRAME_LPC_QLP_SHIFT_LEN.)) |
| 461 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 462 | for(i = 0; i < subframe->ordercxx . . $ $anonymous_type_81a4853959168ec7_11#order.; i++) |
| 463 | if(!FLAC__bitwriter_write_raw_int32cxx . . $ FLAC__bitwriter_write_raw_int32(5caf381933d64f7c).(bw, subframe->qlp_coeffcxx . . $ $anonymous_type_81a4853959168ec7_11#qlp_coeff.[i], subframe->qlp_coeff_precisioncxx . . $ $anonymous_type_81a4853959168ec7_11#qlp_coeff_precision.)) |
| 464 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 465 | |
| 466 | if(!add_entropy_coding_method_cxx . . $ add_entropy_coding_method_(5beee8f521febf58).(bw, &subframe->entropy_coding_methodcxx . . $ $anonymous_type_81a4853959168ec7_11#entropy_coding_method.)) |
| 467 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 468 | switch(subframe->entropy_coding_methodcxx . . $ $anonymous_type_81a4853959168ec7_11#entropy_coding_method..typecxx . . $ $anonymous_type_81a4853959168ec7_3#type.) { |
| 469 | case FLAC__ENTROPY_CODING_METHOD_PARTITIONED_RICEcxx . . $ FLAC__ENTROPY_CODING_METHOD_PARTITIONED_RICE.: |
| 470 | case FLAC__ENTROPY_CODING_METHOD_PARTITIONED_RICE2cxx . . $ FLAC__ENTROPY_CODING_METHOD_PARTITIONED_RICE2.: |
| 471 | if(!add_residual_partitioned_rice_cxx . . $ add_residual_partitioned_rice_(fee1f9afe59d864c).( |
| 472 | bw, |
| 473 | subframe->residualcxx . . $ $anonymous_type_81a4853959168ec7_11#residual., |
| 474 | residual_samples, |
| 475 | subframe->ordercxx . . $ $anonymous_type_81a4853959168ec7_11#order., |
| 476 | subframe->entropy_coding_methodcxx . . $ $anonymous_type_81a4853959168ec7_11#entropy_coding_method..datacxx . . $ $anonymous_type_81a4853959168ec7_3#data..partitioned_ricecxx . . $ $anonymous_type_81a4853959168ec7_3#$anonymous_type_4#partitioned_rice..contentscxx . . $ $anonymous_type_81a4853959168ec7_2#contents.->parameterscxx . . $ $anonymous_type_81a4853959168ec7_1#parameters., |
| 477 | subframe->entropy_coding_methodcxx . . $ $anonymous_type_81a4853959168ec7_11#entropy_coding_method..datacxx . . $ $anonymous_type_81a4853959168ec7_3#data..partitioned_ricecxx . . $ $anonymous_type_81a4853959168ec7_3#$anonymous_type_4#partitioned_rice..contentscxx . . $ $anonymous_type_81a4853959168ec7_2#contents.->raw_bitscxx . . $ $anonymous_type_81a4853959168ec7_1#raw_bits., |
| 478 | subframe->entropy_coding_methodcxx . . $ $anonymous_type_81a4853959168ec7_11#entropy_coding_method..datacxx . . $ $anonymous_type_81a4853959168ec7_3#data..partitioned_ricecxx . . $ $anonymous_type_81a4853959168ec7_3#$anonymous_type_4#partitioned_rice..ordercxx . . $ $anonymous_type_81a4853959168ec7_2#order., |
| 479 | /*is_extended=*/subframe->entropy_coding_methodcxx . . $ $anonymous_type_81a4853959168ec7_11#entropy_coding_method..typecxx . . $ $anonymous_type_81a4853959168ec7_3#type. == FLAC__ENTROPY_CODING_METHOD_PARTITIONED_RICE2cxx . . $ FLAC__ENTROPY_CODING_METHOD_PARTITIONED_RICE2. |
| 480 | )) |
| 481 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 482 | break; |
| 483 | default: |
| 484 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(0); |
| 485 | } |
| 486 | |
| 487 | return truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!; |
| 488 | } |
| 489 | |
| 490 | FLAC__boolcxx . . $ FLAC__bool# FLAC__subframe_add_verbatimcxx . . $ FLAC__subframe_add_verbatim(490a06346444acc8).(const FLAC__Subframe_Verbatimcxx . . $ FLAC__Subframe_Verbatim# *subframe, uint32_tcxx . . $ uint32_t# samples, uint32_tcxx . . $ uint32_t# subframe_bps, uint32_tcxx . . $ uint32_t# wasted_bits, FLAC__BitWritercxx . . $ FLAC__BitWriter# *bw) |
| 491 | { |
| 492 | uint32_tcxx . . $ uint32_t# i; |
| 493 | |
| 494 | if(!FLAC__bitwriter_write_raw_uint32cxx . . $ FLAC__bitwriter_write_raw_uint32(33e8736f9674f0cb).(bw, FLAC__SUBFRAME_TYPE_VERBATIM_BYTE_ALIGNED_MASKcxx . . $ FLAC__SUBFRAME_TYPE_VERBATIM_BYTE_ALIGNED_MASK. | (wasted_bits? 1:0), FLAC__SUBFRAME_ZERO_PAD_LENcxx . . $ FLAC__SUBFRAME_ZERO_PAD_LEN. + FLAC__SUBFRAME_TYPE_LENcxx . . $ FLAC__SUBFRAME_TYPE_LEN. + FLAC__SUBFRAME_WASTED_BITS_FLAG_LENcxx . . $ FLAC__SUBFRAME_WASTED_BITS_FLAG_LEN.)) |
| 495 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 496 | if(wasted_bits) |
| 497 | if(!FLAC__bitwriter_write_unary_unsignedcxx . . $ FLAC__bitwriter_write_unary_unsigned(40f5a9d2c07215ed).(bw, wasted_bits-1)) |
| 498 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 499 | |
| 500 | if(subframe->data_typecxx . . $ $anonymous_type_81a4853959168ec7_8#data_type. == FLAC__VERBATIM_SUBFRAME_DATA_TYPE_INT32cxx . . $ FLAC__VERBATIM_SUBFRAME_DATA_TYPE_INT32.) { |
| 501 | const FLAC__int32cxx . . $ FLAC__int32# *signal = subframe->datacxx . . $ $anonymous_type_81a4853959168ec7_8#data..int32cxx . . $ $anonymous_type_81a4853959168ec7_8#$anonymous_type_9#int32.; |
| 502 | |
| 503 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(subframe_bps < 33); |
| 504 | |
| 505 | for(i = 0; i < samples; i++) |
| 506 | if(!FLAC__bitwriter_write_raw_int32cxx . . $ FLAC__bitwriter_write_raw_int32(5caf381933d64f7c).(bw, signal[i], subframe_bps)) |
| 507 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 508 | } |
| 509 | else { |
| 510 | const FLAC__int64cxx . . $ FLAC__int64# *signal = subframe->datacxx . . $ $anonymous_type_81a4853959168ec7_8#data..int64cxx . . $ $anonymous_type_81a4853959168ec7_8#$anonymous_type_9#int64.; |
| 511 | |
| 512 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(subframe_bps == 33); |
| 513 | |
| 514 | for(i = 0; i < samples; i++) |
| 515 | if(!FLAC__bitwriter_write_raw_int64cxx . . $ FLAC__bitwriter_write_raw_int64(19e8c2443226c8fa).(bw, (FLAC__int64cxx . . $ FLAC__int64#)signal[i], subframe_bps)) |
| 516 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 517 | } |
| 518 | |
| 519 | return truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!; |
| 520 | } |
| 521 | |
| 522 | FLAC__boolcxx . . $ FLAC__bool# add_entropy_coding_method_cxx . . $ add_entropy_coding_method_(5beee8f521febf58).(FLAC__BitWritercxx . . $ FLAC__BitWriter# *bw, const FLAC__EntropyCodingMethodcxx . . $ FLAC__EntropyCodingMethod# *method) |
| 523 | { |
| 524 | if(!FLAC__bitwriter_write_raw_uint32cxx . . $ FLAC__bitwriter_write_raw_uint32(33e8736f9674f0cb).(bw, method->typecxx . . $ $anonymous_type_81a4853959168ec7_3#type., FLAC__ENTROPY_CODING_METHOD_TYPE_LENcxx . . $ FLAC__ENTROPY_CODING_METHOD_TYPE_LEN.)) |
| 525 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 526 | switch(method->typecxx . . $ $anonymous_type_81a4853959168ec7_3#type.) { |
| 527 | case FLAC__ENTROPY_CODING_METHOD_PARTITIONED_RICEcxx . . $ FLAC__ENTROPY_CODING_METHOD_PARTITIONED_RICE.: |
| 528 | case FLAC__ENTROPY_CODING_METHOD_PARTITIONED_RICE2cxx . . $ FLAC__ENTROPY_CODING_METHOD_PARTITIONED_RICE2.: |
| 529 | if(!FLAC__bitwriter_write_raw_uint32cxx . . $ FLAC__bitwriter_write_raw_uint32(33e8736f9674f0cb).(bw, method->datacxx . . $ $anonymous_type_81a4853959168ec7_3#data..partitioned_ricecxx . . $ $anonymous_type_81a4853959168ec7_3#$anonymous_type_4#partitioned_rice..ordercxx . . $ $anonymous_type_81a4853959168ec7_2#order., FLAC__ENTROPY_CODING_METHOD_PARTITIONED_RICE_ORDER_LENcxx . . $ FLAC__ENTROPY_CODING_METHOD_PARTITIONED_RICE_ORDER_LEN.)) |
| 530 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 531 | break; |
| 532 | default: |
| 533 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(0); |
| 534 | } |
| 535 | return truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!; |
| 536 | } |
| 537 | |
| 538 | FLAC__boolcxx . . $ FLAC__bool# add_residual_partitioned_rice_cxx . . $ add_residual_partitioned_rice_(fee1f9afe59d864c).(FLAC__BitWritercxx . . $ FLAC__BitWriter# *bw, const FLAC__int32cxx . . $ FLAC__int32# residual[], const uint32_tcxx . . $ uint32_t# residual_samples, const uint32_tcxx . . $ uint32_t# predictor_order, const uint32_tcxx . . $ uint32_t# rice_parameters[], const uint32_tcxx . . $ uint32_t# raw_bits[], const uint32_tcxx . . $ uint32_t# partition_order, const FLAC__boolcxx . . $ FLAC__bool# is_extended) |
| 539 | { |
| 540 | const uint32_tcxx . . $ uint32_t# plen = is_extended? FLAC__ENTROPY_CODING_METHOD_PARTITIONED_RICE2_PARAMETER_LENcxx . . $ FLAC__ENTROPY_CODING_METHOD_PARTITIONED_RICE2_PARAMETER_LEN. : FLAC__ENTROPY_CODING_METHOD_PARTITIONED_RICE_PARAMETER_LENcxx . . $ FLAC__ENTROPY_CODING_METHOD_PARTITIONED_RICE_PARAMETER_LEN.; |
| 541 | const uint32_tcxx . . $ uint32_t# pesc = is_extended? FLAC__ENTROPY_CODING_METHOD_PARTITIONED_RICE2_ESCAPE_PARAMETERcxx . . $ FLAC__ENTROPY_CODING_METHOD_PARTITIONED_RICE2_ESCAPE_PARAMETER. : FLAC__ENTROPY_CODING_METHOD_PARTITIONED_RICE_ESCAPE_PARAMETERcxx . . $ FLAC__ENTROPY_CODING_METHOD_PARTITIONED_RICE_ESCAPE_PARAMETER.; |
| 542 | |
| 543 | if(partition_order == 0) { |
| 544 | uint32_tcxx . . $ uint32_t# i; |
| 545 | |
| 546 | if(raw_bits[0] == 0) { |
| 547 | if(!FLAC__bitwriter_write_raw_uint32cxx . . $ FLAC__bitwriter_write_raw_uint32(33e8736f9674f0cb).(bw, rice_parameters[0], plen)) |
| 548 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 549 | if(!FLAC__bitwriter_write_rice_signed_blockcxx . . $ FLAC__bitwriter_write_rice_signed_block(e3774ed2d39e4fe4).(bw, residual, residual_samples, rice_parameters[0])) |
| 550 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 551 | } |
| 552 | else { |
| 553 | FLAC__ASSERTcxx . . $ `external/flac/flac_FLAC_assert.h:43:9`!(rice_parameters[0] == 0); |
| 554 | if(!FLAC__bitwriter_write_raw_uint32cxx . . $ FLAC__bitwriter_write_raw_uint32(33e8736f9674f0cb).(bw, pesc, plen)) |
| 555 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 556 | if(!FLAC__bitwriter_write_raw_uint32cxx . . $ FLAC__bitwriter_write_raw_uint32(33e8736f9674f0cb).(bw, raw_bits[0], FLAC__ENTROPY_CODING_METHOD_PARTITIONED_RICE_RAW_LENcxx . . $ FLAC__ENTROPY_CODING_METHOD_PARTITIONED_RICE_RAW_LEN.)) |
| 557 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 558 | for(i = 0; i < residual_samples; i++) { |
| 559 | if(!FLAC__bitwriter_write_raw_int32cxx . . $ FLAC__bitwriter_write_raw_int32(5caf381933d64f7c).(bw, residual[i], raw_bits[0])) |
| 560 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 561 | } |
| 562 | } |
| 563 | return truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!; |
| 564 | } |
| 565 | else { |
| 566 | uint32_tcxx . . $ uint32_t# i, j, k = 0, k_last = 0; |
| 567 | uint32_tcxx . . $ uint32_t# partition_samples; |
| 568 | const uint32_tcxx . . $ uint32_t# default_partition_samples = (residual_samples+predictor_order) >> partition_order; |
| 569 | for(i = 0; i < (1u<<partition_order); i++) { |
| 570 | partition_samples = default_partition_samples; |
| 571 | if(i == 0) |
| 572 | partition_samples -= predictor_order; |
| 573 | k += partition_samples; |
| 574 | if(raw_bits[i] == 0) { |
| 575 | if(!FLAC__bitwriter_write_raw_uint32cxx . . $ FLAC__bitwriter_write_raw_uint32(33e8736f9674f0cb).(bw, rice_parameters[i], plen)) |
| 576 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 577 | if(!FLAC__bitwriter_write_rice_signed_blockcxx . . $ FLAC__bitwriter_write_rice_signed_block(e3774ed2d39e4fe4).(bw, residual+k_last, k-k_last, rice_parameters[i])) |
| 578 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 579 | } |
| 580 | else { |
| 581 | if(!FLAC__bitwriter_write_raw_uint32cxx . . $ FLAC__bitwriter_write_raw_uint32(33e8736f9674f0cb).(bw, pesc, plen)) |
| 582 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 583 | if(!FLAC__bitwriter_write_raw_uint32cxx . . $ FLAC__bitwriter_write_raw_uint32(33e8736f9674f0cb).(bw, raw_bits[i], FLAC__ENTROPY_CODING_METHOD_PARTITIONED_RICE_RAW_LENcxx . . $ FLAC__ENTROPY_CODING_METHOD_PARTITIONED_RICE_RAW_LEN.)) |
| 584 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 585 | for(j = k_last; j < k; j++) { |
| 586 | if(!FLAC__bitwriter_write_raw_int32cxx . . $ FLAC__bitwriter_write_raw_int32(5caf381933d64f7c).(bw, residual[j], raw_bits[i])) |
| 587 | return falsecxx . . $ `<external>/14268322491693841775/stdbool.h:38:9`!; |
| 588 | } |
| 589 | } |
| 590 | k_last = k; |
| 591 | } |
| 592 | return truecxx . . $ `<external>/14268322491693841775/stdbool.h:37:9`!; |
| 593 | } |
| 594 | } |