Home
last modified time | relevance | path

Searched refs:block_align (Results 1 – 25 of 162) sorted by relevance

1234567

/third_party/ffmpeg/libavformat/
Dpcm.c34 if (par->block_align <= 0) in ff_pcm_read_packet()
42 if (par->block_align <= INT_MAX / RAW_SAMPLES) { in ff_pcm_read_packet()
43 size = FFMIN(size, RAW_SAMPLES) * par->block_align; in ff_pcm_read_packet()
45 size = par->block_align; in ff_pcm_read_packet()
60 int block_align, byte_rate; in ff_pcm_read_seek() local
65 block_align = st->codecpar->block_align ? st->codecpar->block_align : in ff_pcm_read_seek()
68 block_align * st->codecpar->sample_rate; in ff_pcm_read_seek()
70 if (block_align <= 0 || byte_rate <= 0) in ff_pcm_read_seek()
77 st->time_base.den * (int64_t)block_align, in ff_pcm_read_seek()
79 pos *= block_align; in ff_pcm_read_seek()
Daiffdec.c153 par->block_align = 34 * par->channels; in get_aiff_header()
156 par->block_align = 2 * par->channels; in get_aiff_header()
164 par->block_align = 1 * par->channels; in get_aiff_header()
167 par->block_align = 33; in get_aiff_header()
173 if (par->block_align > 0) in get_aiff_header()
175 par->block_align); in get_aiff_header()
180 if (!par->block_align) in get_aiff_header()
181 par->block_align = (av_get_bits_per_sample(par->codec_id) * par->channels) >> 3; in get_aiff_header()
184 par->bit_rate = (int64_t)par->sample_rate * (par->block_align << 3) / in get_aiff_header()
241 if (size == AVERROR_EOF && offset > 0 && st->codecpar->block_align) { in aiff_read_header()
[all …]
Dilbc.c45 if (par->block_align == 50) { in ilbc_write_header()
47 } else if (par->block_align == 38) { in ilbc_write_header()
83 st->codecpar->block_align = 38; in ilbc_read_header()
86 st->codecpar->block_align = 50; in ilbc_read_header()
102 if ((ret = av_new_packet(pkt, par->block_align)) < 0) in ilbc_read_packet()
107 pkt->duration = par->block_align == 38 ? 160 : 240; in ilbc_read_packet()
108 if ((ret = avio_read(s->pb, pkt->data, par->block_align)) != par->block_align) { in ilbc_read_packet()
Dmusx.c62 st->codecpar->block_align = 0x80 * st->codecpar->channels; in musx_read_header()
83 st->codecpar->block_align = 0x20 * st->codecpar->channels; in musx_read_header()
100 st->codecpar->block_align = 0x20 * st->codecpar->channels; in musx_read_header()
106 st->codecpar->block_align = 0x20 * st->codecpar->channels; in musx_read_header()
112 st->codecpar->block_align = 0x80 * st->codecpar->channels; in musx_read_header()
118 st->codecpar->block_align = 0x80 * st->codecpar->channels; in musx_read_header()
132 st->codecpar->block_align = 0x20 * st->codecpar->channels; in musx_read_header()
138 st->codecpar->block_align = 0x80 * st->codecpar->channels; in musx_read_header()
144 st->codecpar->block_align = 0x20 * st->codecpar->channels; in musx_read_header()
167 return av_get_packet(s->pb, pkt, par->block_align); in musx_read_packet()
Dgenh.c68 st->codecpar->block_align = align * st->codecpar->channels; in genh_read_header()
78 st->codecpar->block_align = 36 * st->codecpar->channels; in genh_read_header()
81 case 3: st->codecpar->codec_id = st->codecpar->block_align > 0 ? in genh_read_header()
84 case 4: st->codecpar->codec_id = st->codecpar->block_align > 0 ? in genh_read_header()
87 case 5: st->codecpar->codec_id = st->codecpar->block_align > 0 ? in genh_read_header()
90 case 6: if (st->codecpar->block_align > INT_MAX/1024) in genh_read_header()
141 st->codecpar->block_align = 8 * st->codecpar->channels; in genh_read_header()
149 if (st->codecpar->block_align <= 0) in genh_read_header()
182 ret = av_get_packet(s->pb, pkt, par->block_align * 1024); in genh_read_packet()
185 ret = av_get_packet(s->pb, pkt, par->block_align ? par->block_align : 1024 * par->channels); in genh_read_packet()
Dboadec.c61 st->codecpar->block_align = avio_rl32(s->pb); in read_header()
62 if (st->codecpar->block_align > INT_MAX / FF_SANE_NB_CHANNELS || st->codecpar->block_align <= 0) in read_header()
64 st->codecpar->block_align *= st->codecpar->channels; in read_header()
75 return av_get_packet(s->pb, pkt, st->codecpar->block_align); in read_packet()
Dfsb.c77 par->block_align = 4096 * par->channels; in fsb_read_header()
81 par->block_align = 36 * par->channels; in fsb_read_header()
84 par->block_align = 16 * par->channels; in fsb_read_header()
87 par->block_align = 8 * par->channels; in fsb_read_header()
138 par->block_align = 2048; in fsb_read_header()
151 par->block_align = 8 * par->channels; in fsb_read_header()
180 ret = av_new_packet(pkt, par->block_align); in fsb_read_packet()
191 ret = av_get_packet(s->pb, pkt, par->block_align); in fsb_read_packet()
Dvpk.c58 st->codecpar->block_align = avio_rl32(s->pb); in vpk_read_header()
60 if (st->codecpar->sample_rate <= 0 || st->codecpar->block_align <= 0) in vpk_read_header()
65 samples_per_block = ((st->codecpar->block_align / st->codecpar->channels) * 28LL) / 16; in vpk_read_header()
89 unsigned skip = (par->block_align - vpk->last_block_size) / par->channels; in vpk_read_packet()
105 ret = av_get_packet(s->pb, pkt, par->block_align); in vpk_read_packet()
123 samples_per_block = av_get_audio_frame_duration2(par, par->block_align); in vpk_read_seek()
125 ret = avio_seek(s->pb, vpk->data_start + timestamp * par->block_align, SEEK_SET); in vpk_read_seek()
Dcafenc.c54 static uint32_t samples_per_packet(enum AVCodecID codec_id, int channels, int block_align) { in samples_per_packet() argument
97 return (block_align - 4 * channels) * 8 / (4 * channels) + 1; in samples_per_packet()
99 return (block_align - 7 * channels) * 2 / channels + 2; in samples_per_packet()
136 if (!par->block_align && !(pb->seekable & AVIO_SEEKABLE_NORMAL)) { in caf_write_header()
142 frame_size = samples_per_packet(par->codec_id, par->channels, par->block_align); in caf_write_header()
153 avio_wb32(pb, par->block_align); //< mBytesPerPacket in caf_write_header()
214 if (!s->streams[0]->codecpar->block_align) { in caf_write_packet()
251 if (!par->block_align) { in caf_write_trailer()
255 …, caf->packets * samples_per_packet(par->codec_id, par->channels, par->block_align)); ///< mNumber… in caf_write_trailer()
Dcodec2.c76 st->codecpar->block_align = avpriv_codec2_mode_block_align(s, mode); in codec2_read_header_common()
80 st->codecpar->block_align <= 0) { in codec2_read_header_common()
128 int ret, size, n, block_align, frame_size; in codec2_read_packet() local
130 block_align = st->codecpar->block_align; in codec2_read_packet()
133 if (block_align <= 0 || frame_size <= 0 || c2->frames_per_packet <= 0) { in codec2_read_packet()
138 size = c2->frames_per_packet * block_align; in codec2_read_packet()
146 n = ret / block_align; in codec2_read_packet()
Drsd.c99 par->block_align = 2048; in rsd_read_header()
105 par->block_align = 16 * par->channels; in rsd_read_header()
108 par->block_align = 20 * par->channels; in rsd_read_header()
115 par->block_align = 36 * par->channels; in rsd_read_header()
127 par->block_align = 8 * par->channels; in rsd_read_header()
195 ret = av_get_packet(s->pb, pkt, par->block_align); in rsd_read_packet()
200 ret = av_new_packet(pkt, par->block_align); in rsd_read_packet()
Ddsfdec.c126 st->codecpar->block_align = avio_rl32(pb); in dsf_read_header()
127 …if (st->codecpar->block_align > INT_MAX / st->codecpar->channels || st->codecpar->block_align <= 0… in dsf_read_header()
131 st->codecpar->block_align *= st->codecpar->channels; in dsf_read_header()
160 int last_packet = pos == (dsf->data_end - st->codecpar->block_align); in dsf_read_packet()
191 ret = av_get_packet(pb, pkt, FFMIN(dsf->data_end - pos, st->codecpar->block_align)); in dsf_read_packet()
197 pkt->duration = st->codecpar->block_align / st->codecpar->channels; in dsf_read_packet()
Dg729dec.c53 st->codecpar->block_align = 8; in g729_read_header()
56 st->codecpar->block_align = 10; in g729_read_header()
72 int ret = av_get_packet(s->pb, pkt, st->codecpar->block_align); in g729_read_packet()
77 pkt->dts = pkt->pts = pkt->pos / st->codecpar->block_align; in g729_read_packet()
Drtpdec_ilbc.c34 stream->codecpar->block_align = 38; in ilbc_parse_fmtp()
37 stream->codecpar->block_align = 50; in ilbc_parse_fmtp()
61 if (!st->codecpar->block_align) { in ilbc_parse_sdp_line()
Dmsf.c68 case 3: st->codecpar->block_align = 16 * st->codecpar->channels; in msf_read_header()
72 …case 6: st->codecpar->block_align = (codec == 4 ? 96 : codec == 5 ? 152 : 192) * st->codecpar->cha… in msf_read_header()
100 return av_get_packet(s->pb, pkt, par->block_align ? par->block_align : 1024 * par->channels); in msf_read_packet()
/third_party/ffmpeg/libavcodec/
Dgsmdec.c46 avctx->block_align = GSM_BLOCK_SIZE; in gsm_init()
50 if (!avctx->block_align) in gsm_init()
51 avctx->block_align = GSM_MS_BLOCK_SIZE; in gsm_init()
53 if (avctx->block_align < MSN_MIN_BLOCK_SIZE || in gsm_init()
54 avctx->block_align > GSM_MS_BLOCK_SIZE || in gsm_init()
55 (avctx->block_align - MSN_MIN_BLOCK_SIZE) % 3) { in gsm_init()
57 avctx->block_align); in gsm_init()
75 if (buf_size < avctx->block_align) { in gsm_decode_frame()
97 (GSM_MS_BLOCK_SIZE - avctx->block_align) / 3); in gsm_decode_frame()
104 return avctx->block_align; in gsm_decode_frame()
Dvmdaudio.c79 if (avctx->block_align < 1 || avctx->block_align % avctx->channels || in vmdaudio_decode_init()
80 avctx->block_align > INT_MAX - avctx->channels in vmdaudio_decode_init()
95 s->chunk_size = avctx->block_align + avctx->channels * (s->out_bps == 2); in vmdaudio_decode_init()
99 avctx->channels, avctx->bits_per_coded_sample, avctx->block_align, in vmdaudio_decode_init()
184 if (silent_chunks + audio_chunks >= INT_MAX / avctx->block_align) in vmdaudio_decode_frame()
188 frame->nb_samples = ((silent_chunks + audio_chunks) * avctx->block_align) / in vmdaudio_decode_frame()
197 int silent_size = avctx->block_align * silent_chunks; in vmdaudio_decode_frame()
198 av_assert0(avctx->block_align * silent_chunks <= frame->nb_samples * avctx->channels); in vmdaudio_decode_frame()
217 output_samples_s16 += avctx->block_align; in vmdaudio_decode_frame()
220 output_samples_u8 += avctx->block_align; in vmdaudio_decode_frame()
Dcodec2utils.c29 int block_align = avpriv_codec2_mode_block_align(logctx, mode); in avpriv_codec2_mode_bit_rate() local
31 if (frame_size <= 0 || block_align <= 0) { in avpriv_codec2_mode_bit_rate()
35 return 8 * 8000 * block_align / frame_size; in avpriv_codec2_mode_bit_rate()
Dlibcodec2.c68 avctx->block_align = (codec2_bits_per_frame(c2->codec) + 7) / 8; in libcodec2_init_common()
70 if (avctx->frame_size <= 0 || avctx->block_align <= 0) { in libcodec2_init_common()
145 nframes = pkt->size / avctx->block_align; in libcodec2_decode()
158 input += avctx->block_align; in libcodec2_decode()
163 return nframes * avctx->block_align; in libcodec2_decode()
172 int ret = ff_alloc_packet2(avctx, avpkt, avctx->block_align, 0); in libcodec2_encode()
Dlibgsmdec.c62 avctx->block_align = GSM_BLOCK_SIZE; in libgsm_decode_init()
68 avctx->block_align = GSM_MS_BLOCK_SIZE; in libgsm_decode_init()
93 if (buf_size < avctx->block_align) { in libgsm_decode_frame()
113 return avctx->block_align; in libgsm_decode_frame()
Dwmaenc.c34 int i, flags1, flags2, block_align; in encode_init() local
94 block_align = avctx->bit_rate * (int64_t) s->frame_len / in encode_init()
96 block_align = FFMIN(block_align, MAX_CODED_SUPERFRAME_SIZE); in encode_init()
97 avctx->block_align = block_align; in encode_init()
363 return put_bits_count(&s->pb) / 8 - s->avctx->block_align; in encode_frame()
411 i= avctx->block_align - (put_bits_count(&s->pb)+7)/8; in encode_superframe()
417 av_assert0(put_bits_ptr(&s->pb) - s->pb.buf == avctx->block_align); in encode_superframe()
422 avpkt->size = avctx->block_align; in encode_superframe()
Dra288.c80 if (avctx->block_align != 38) { in ra288_decode_init()
204 if (buf_size < avctx->block_align) { in ra288_decode_frame()
207 buf_size, avctx->block_align); in ra288_decode_frame()
211 ret = init_get_bits8(&gb, buf, avctx->block_align); in ra288_decode_frame()
241 return avctx->block_align; in ra288_decode_frame()
/third_party/gstreamer/gstplugins_bad/gst/mxf/
Dmxfaes-bwf.c63 guint16 block_align; member
140 self->block_align = GST_READ_UINT16_BE (tag_data); in mxf_metadata_wave_audio_essence_descriptor_handle_tag()
141 GST_DEBUG (" block align = %u", self->block_align); in mxf_metadata_wave_audio_essence_descriptor_handle_tag()
250 self->block_align, NULL); in mxf_metadata_wave_audio_essence_descriptor_to_structure()
383 GST_WRITE_UINT16_BE (t->data, self->block_align); in mxf_metadata_wave_audio_essence_descriptor_write_tags()
1258 guint block_align; in mxf_bwf_create_caps() local
1268 if (wa_descriptor && wa_descriptor->block_align != 0) in mxf_bwf_create_caps()
1269 block_align = wa_descriptor->block_align; in mxf_bwf_create_caps()
1271 block_align = in mxf_bwf_create_caps()
1276 gst_audio_format_build_integer (block_align != in mxf_bwf_create_caps()
[all …]
/third_party/ffmpeg/libavutil/
Dsamplefmt.c219 int block_align = av_get_bytes_per_sample(sample_fmt) * (planar ? 1 : nb_channels); in av_samples_copy() local
220 int data_size = nb_samples * block_align; in av_samples_copy()
223 dst_offset *= block_align; in av_samples_copy()
224 src_offset *= block_align; in av_samples_copy()
242 int block_align = av_get_bytes_per_sample(sample_fmt) * (planar ? 1 : nb_channels); in av_samples_set_silence() local
243 int data_size = nb_samples * block_align; in av_samples_set_silence()
248 offset *= block_align; in av_samples_set_silence()
/third_party/gstreamer/gstplugins_good/gst/rtp/
Dgstrtpg726depay.c165 depay->block_align = DEFAULT_BLOCK_ALIGN; in gst_rtp_g726_depay_setcaps()
173 depay->block_align = 2; in gst_rtp_g726_depay_setcaps()
176 depay->block_align = 3; in gst_rtp_g726_depay_setcaps()
179 depay->block_align = 4; in gst_rtp_g726_depay_setcaps()
182 depay->block_align = 5; in gst_rtp_g726_depay_setcaps()
193 "block_align", G_TYPE_INT, depay->block_align, in gst_rtp_g726_depay_setcaps()

1234567