Lines Matching defs:mode
44 int mode;
67 static int codec2_mode_frame_size(AVFormatContext *s, int mode)
81 if (mode < 0 || mode > CODEC2_MODE_MAX) {
82 av_log(s, AV_LOG_ERROR, "unknown codec2 mode %i, can't find frame_size\n", mode);
85 return frame_size_table[mode];
90 static int codec2_mode_block_align(AVFormatContext *s, int mode)
104 if (mode < 0 || mode > CODEC2_MODE_MAX) {
105 av_log(s, AV_LOG_ERROR, "unknown codec2 mode %i, can't find block_align\n", mode);
108 return block_align_table[mode];
112 //Computes bitrate from mode, with frames rounded up to the nearest octet.
114 static int codec2_mode_bit_rate(AVFormatContext *s, int mode)
116 int frame_size = codec2_mode_frame_size(s, mode);
117 int block_align = codec2_mode_block_align(s, mode);
128 int mode = codec2_mode_from_extradata(st->codecpar->extradata);
135 st->codecpar->bit_rate = codec2_mode_bit_rate(s, mode);
136 st->codecpar->frame_size = codec2_mode_frame_size(s, mode);
137 st->codecpar->block_align = codec2_mode_block_align(s, mode);
242 if (c2->mode < 0) {
244 av_log(s, AV_LOG_ERROR, "-mode must be set in order to make sense of raw codec2 files\n");
258 codec2_make_extradata(st->codecpar->extradata, c2->mode);
274 CODEC2_AVOPTIONS("codec2 mode [mandatory]", Codec2Context, -1, -1, AV_OPT_FLAG_DECODING_PARAM),