Lines Matching refs:frame_bytes
617 uint8_t * extradata, int frame_size, int frame_bytes)
620 int framecount = (ba > 0 && frame_bytes / ba > 0) ? frame_bytes / ba : 1;
623 if (bps > 0 && ch > 0 && frame_bytes > 0 && ch < 32768 && bps < 32768)
624 return (frame_bytes * 8LL) / (bps * ch);
686 if (frame_bytes > 0) {
687 /* calc from frame_bytes only */
689 return 240 * (frame_bytes / 32);
691 return 256 * (frame_bytes / 64);
693 return 160 * (frame_bytes / 20);
696 /* calc from frame_bytes and bits_per_coded_sample */
698 return frame_bytes * 8 / bps;
702 /* calc from frame_bytes and channels */
705 return frame_bytes / (40 * ch) * 256;
707 return (frame_bytes - 4 * ch) / (128 * ch) * 256;
709 return frame_bytes / (9 * ch) * 16;
712 frame_bytes /= 16 * ch;
713 if (frame_bytes > INT_MAX / 28)
715 return frame_bytes * 28;
720 return (frame_bytes - 4 * ch) * 2 / ch;
722 return (frame_bytes - 4) * 2 / ch;
724 return (frame_bytes - 8) * 2;
728 return frame_bytes * 14LL / (8 * ch);
731 return (frame_bytes / 128) * 224 / ch;
733 return (frame_bytes - 6 - ch) / ch;
735 return (frame_bytes - 8) / ch;
737 return (frame_bytes - 2 * ch) / ch;
739 return 3 * frame_bytes / ch;
741 return 6 * frame_bytes / ch;
743 return 2 * (frame_bytes / (5 * ch));
746 return 4 * frame_bytes / ch;
750 /* calc from frame_bytes, channels, and codec_tag */
753 return frame_bytes / ch;
755 return frame_bytes * 2 / ch;
760 /* calc from frame_bytes, channels, and block_align */
761 int blocks = frame_bytes / ba;
793 /* calc from frame_bytes, channels, and bits_per_coded_sample */
796 if(bps<4 || frame_bytes<3)
798 return 2 * ((frame_bytes - 3) / ((bps * 2 / 8) * ch));
800 if(bps<4 || frame_bytes<4)
802 return (frame_bytes - 4) / ((FFALIGN(ch, 2) * bps) / 8);
804 return 2 * (frame_bytes / ((bps + 4) / 4)) / ch;
811 if (frame_size > 1 && frame_bytes)
816 if (bitrate > 0 && frame_bytes > 0 && sr > 0 && ba > 1) {
818 return (frame_bytes * 8LL * sr) / bitrate;
824 int av_get_audio_frame_duration(AVCodecContext *avctx, int frame_bytes)
838 frame_bytes);
842 int av_get_audio_frame_duration2(AVCodecParameters *par, int frame_bytes)
856 frame_bytes);