Lines Matching refs:ea
113 EaDemuxContext *ea = s->priv_data;
118 ea->bytes = 2;
119 ea->sample_rate = -1;
120 ea->num_channels = 1;
142 ea->num_channels = read_arbitrary(pb);
145 ea->num_channels);
154 ea->sample_rate = read_arbitrary(pb);
157 ea->sample_rate);
160 ea->num_samples = read_arbitrary(pb);
163 ea->num_samples);
206 ea->audio_codec = AV_CODEC_ID_PCM_S16LE;
209 ea->audio_codec = AV_CODEC_ID_ADPCM_EA;
214 ea->audio_codec = AV_CODEC_ID_ADPCM_EA_R1;
217 ea->audio_codec = AV_CODEC_ID_ADPCM_EA_R2;
220 ea->audio_codec = AV_CODEC_ID_ADPCM_EA_R3;
230 ea->audio_codec = AV_CODEC_ID_PCM_S16LE_PLANAR;
235 case 2: ea->audio_codec = AV_CODEC_ID_ADPCM_EA_R1; break;
236 case 3: ea->audio_codec = AV_CODEC_ID_ADPCM_EA_R2; break;
244 ea->audio_codec = AV_CODEC_ID_MP3;
249 ea->audio_codec = AV_CODEC_ID_NONE;
261 if (ea->audio_codec == AV_CODEC_ID_NONE && ea->platform == 0x01)
262 ea->audio_codec = AV_CODEC_ID_ADPCM_PSX;
263 if (ea->sample_rate == -1)
264 ea->sample_rate = revision == 3 ? 48000 : 22050;
271 EaDemuxContext *ea = s->priv_data;
275 ea->sample_rate = ea->big_endian ? avio_rb32(pb) : avio_rl32(pb);
276 ea->bytes = avio_r8(pb); /* 1=8-bit, 2=16-bit */
277 ea->num_channels = avio_r8(pb);
283 switch (ea->bytes) {
285 ea->audio_codec = AV_CODEC_ID_PCM_S8;
288 ea->audio_codec = AV_CODEC_ID_PCM_S16LE;
293 ea->audio_codec = AV_CODEC_ID_PCM_MULAW;
294 ea->bytes = 1;
297 ea->audio_codec = AV_CODEC_ID_ADPCM_IMA_EA_EACS;
308 EaDemuxContext *ea = s->priv_data;
311 ea->sample_rate = avio_rl32(pb);
312 ea->bytes = avio_rl32(pb); /* 1=8-bit, 2=16-bit */
313 ea->num_channels = avio_rl32(pb);
314 ea->audio_codec = AV_CODEC_ID_ADPCM_IMA_EA_SEAD;
361 EaDemuxContext *ea = s->priv_data;
365 for (i = 0; i < 5 && (!ea->audio_codec || !ea->video.codec); i++) {
372 ea->big_endian = size > av_bswap32(size);
373 if (ea->big_endian)
398 ea->platform = (blockid >> 16) & 0xFF;
407 process_video_header_cmv(s, &ea->video);
411 ea->video.codec = AV_CODEC_ID_TGV;
415 process_video_header_mdec(s, &ea->video);
419 ea->video.codec = AV_CODEC_ID_MPEG2VIDEO;
424 ea->video.codec = AV_CODEC_ID_TGQ;
425 ea->video.time_base = (AVRational) { 1, 15 };
429 ea->video.codec = AV_CODEC_ID_TQI;
430 ea->video.time_base = (AVRational) { 1, 15 };
434 ea->video.codec = AV_CODEC_ID_MAD;
436 ea->video.time_base = (AVRational) { avio_rl16(pb), 1000 };
440 err = process_video_header_vp6(s, &ea->video);
444 err = process_video_header_vp6(s, &ea->alpha);
520 EaDemuxContext *ea = s->priv_data;
526 if (init_video_stream(s, &ea->video) || init_video_stream(s, &ea->alpha))
529 if (ea->audio_codec) {
530 if (ea->num_channels <= 0 || ea->num_channels > 2) {
532 "Unsupported number of channels: %d\n", ea->num_channels);
535 if (ea->sample_rate <= 0) {
537 "Unsupported sample rate: %d\n", ea->sample_rate);
540 if (ea->bytes <= 0 || ea->bytes > 2) {
542 "Invalid number of bytes per sample: %d\n", ea->bytes);
550 avpriv_set_pts_info(st, 33, 1, ea->sample_rate);
552 st->codecpar->codec_id = ea->audio_codec;
554 st->codecpar->ch_layout.nb_channels = ea->num_channels;
555 st->codecpar->sample_rate = ea->sample_rate;
556 st->codecpar->bits_per_coded_sample = ea->bytes * 8;
557 st->codecpar->bit_rate = (int64_t)ea->num_channels *
560 st->codecpar->block_align = ea->num_channels *
562 ea->audio_stream_index = st->index;
567 ea->audio_codec = AV_CODEC_ID_NONE;
569 if (!ea->video.codec)
576 EaDemuxContext *ea = s->priv_data;
588 chunk_size = ea->big_endian ? avio_rb32(pb) : avio_rl32(pb);
605 if (!ea->audio_codec) {
608 } else if (ea->audio_codec == AV_CODEC_ID_PCM_S16LE_PLANAR ||
609 ea->audio_codec == AV_CODEC_ID_MP3) {
615 } else if (ea->audio_codec == AV_CODEC_ID_ADPCM_PSX) {
634 pkt->stream_index = ea->audio_stream_index;
636 switch (ea->audio_codec) {
646 if (ea->audio_codec == AV_CODEC_ID_ADPCM_EA_R3)
652 pkt->duration = ret * 2 / ea->num_channels;
659 pkt->duration = chunk_size / (16 * ea->num_channels) * 28;
662 pkt->duration = chunk_size / (ea->bytes * ea->num_channels);
710 avio_skip(pb, 8); // skip ea DCT header
736 pkt->stream_index = ea->alpha.stream_index;
738 pkt->stream_index = ea->video.stream_index;
756 .name = "ea",