f 112 doc/examples/decode_audio.c FILE *f, *outfile; f 156 doc/examples/decode_audio.c f = fopen(filename, "rb"); f 157 doc/examples/decode_audio.c if (!f) { f 169 doc/examples/decode_audio.c data_size = fread(inbuf, 1, AUDIO_INBUF_SIZE, f); f 196 doc/examples/decode_audio.c AUDIO_INBUF_SIZE - data_size, f); f 228 doc/examples/decode_audio.c fclose(f); f 41 doc/examples/decode_video.c FILE *f; f 44 doc/examples/decode_video.c f = fopen(filename,"w"); f 45 doc/examples/decode_video.c fprintf(f, "P5\n%d %d\n%d\n", xsize, ysize, 255); f 47 doc/examples/decode_video.c fwrite(buf + i * wrap, 1, xsize, f); f 48 doc/examples/decode_video.c fclose(f); f 89 doc/examples/decode_video.c FILE *f; f 141 doc/examples/decode_video.c f = fopen(filename, "rb"); f 142 doc/examples/decode_video.c if (!f) { f 153 doc/examples/decode_video.c while (!feof(f)) { f 155 doc/examples/decode_video.c data_size = fread(inbuf, 1, INBUF_SIZE, f); f 179 doc/examples/decode_video.c fclose(f); f 131 doc/examples/encode_audio.c FILE *f; f 176 doc/examples/encode_audio.c f = fopen(filename, "wb"); f 177 doc/examples/encode_audio.c if (!f) { f 225 doc/examples/encode_audio.c encode(c, frame, pkt, f); f 229 doc/examples/encode_audio.c encode(c, NULL, pkt, f); f 231 doc/examples/encode_audio.c fclose(f); f 75 doc/examples/encode_video.c FILE *f; f 133 doc/examples/encode_video.c f = fopen(filename, "wb"); f 134 doc/examples/encode_video.c if (!f) { f 182 doc/examples/encode_video.c encode(c, frame, pkt, f); f 186 doc/examples/encode_video.c encode(c, NULL, pkt, f); f 190 doc/examples/encode_video.c fwrite(endcode, 1, sizeof(endcode), f); f 191 doc/examples/encode_video.c fclose(f); f 1926 fftools/cmdutils.c const AVFilter *f = avfilter_get_by_name(name); f 1932 fftools/cmdutils.c } else if (!f) { f 1937 fftools/cmdutils.c printf("Filter %s\n", f->name); f 1938 fftools/cmdutils.c if (f->description) f 1939 fftools/cmdutils.c printf(" %s\n", f->description); f 1941 fftools/cmdutils.c if (f->flags & AVFILTER_FLAG_SLICE_THREADS) f 1945 fftools/cmdutils.c count = avfilter_pad_count(f->inputs); f 1947 fftools/cmdutils.c printf(" #%d: %s (%s)\n", i, avfilter_pad_get_name(f->inputs, i), f 1948 fftools/cmdutils.c media_type_string(avfilter_pad_get_type(f->inputs, i))); f 1950 fftools/cmdutils.c if (f->flags & AVFILTER_FLAG_DYNAMIC_INPUTS) f 1956 fftools/cmdutils.c count = avfilter_pad_count(f->outputs); f 1958 fftools/cmdutils.c printf(" #%d: %s (%s)\n", i, avfilter_pad_get_name(f->outputs, i), f 1959 fftools/cmdutils.c media_type_string(avfilter_pad_get_type(f->outputs, i))); f 1961 fftools/cmdutils.c if (f->flags & AVFILTER_FLAG_DYNAMIC_OUTPUTS) f 1966 fftools/cmdutils.c if (f->priv_class) f 1967 fftools/cmdutils.c show_help_children(f->priv_class, AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_FILTERING_PARAM | f 1969 fftools/cmdutils.c if (f->flags & AVFILTER_FLAG_SUPPORT_TIMELINE) f 2050 fftools/cmdutils.c FILE *f = NULL; f 2058 fftools/cmdutils.c f = fopen(filename, "r"); f 2077 fftools/cmdutils.c for (i = 0; i < 3 && !f; i++) { f 2082 fftools/cmdutils.c f = fopen(filename, "r"); f 2083 fftools/cmdutils.c if (!f && codec_name) { f 2088 fftools/cmdutils.c f = fopen(filename, "r"); f 2093 fftools/cmdutils.c return f; f 153 fftools/cmdutils.h float f; f 1558 fftools/ffmpeg.c InputFile *f = input_files[i]; f 1562 fftools/ffmpeg.c i, f->ctx->url); f 1564 fftools/ffmpeg.c for (j = 0; j < f->nb_streams; j++) { f 1565 fftools/ffmpeg.c InputStream *ist = input_streams[f->ist_index + j]; f 1982 fftools/ffmpeg.c InputFile *f = input_files [ist->file_index]; f 2002 fftools/ffmpeg.c if (copy_ts && f->start_time != AV_NOPTS_VALUE) f 2003 fftools/ffmpeg.c comp_start = FFMAX(start_time, f->start_time + f->ts_offset); f 2016 fftools/ffmpeg.c if (f->recording_time != INT64_MAX) { f 2017 fftools/ffmpeg.c start_time = f->ctx->start_time; f 2018 fftools/ffmpeg.c if (f->start_time != AV_NOPTS_VALUE && copy_ts) f 2019 fftools/ffmpeg.c start_time += f->start_time; f 2020 fftools/ffmpeg.c if (ist->pts >= f->recording_time + start_time) { f 2236 fftools/ffmpeg.c AVFrame *f; f 2241 fftools/ffmpeg.c f = ist->filter_frame; f 2242 fftools/ffmpeg.c ret = av_frame_ref(f, decoded_frame); f 2246 fftools/ffmpeg.c f = decoded_frame; f 2247 fftools/ffmpeg.c ret = ifilter_send_frame(ist->filters[i], f); f 3986 fftools/ffmpeg.c InputFile *f = arg; f 3987 fftools/ffmpeg.c unsigned flags = f->non_blocking ? AV_THREAD_MESSAGE_NONBLOCK : 0; f 3992 fftools/ffmpeg.c ret = av_read_frame(f->ctx, &pkt); f 3999 fftools/ffmpeg.c av_thread_message_queue_set_err_recv(f->in_thread_queue, ret); f 4002 fftools/ffmpeg.c ret = av_thread_message_queue_send(f->in_thread_queue, &pkt, flags); f 4005 fftools/ffmpeg.c ret = av_thread_message_queue_send(f->in_thread_queue, &pkt, flags); f 4006 fftools/ffmpeg.c av_log(f->ctx, AV_LOG_WARNING, f 4009 fftools/ffmpeg.c f->thread_queue_size); f 4013 fftools/ffmpeg.c av_log(f->ctx, AV_LOG_ERROR, f 4017 fftools/ffmpeg.c av_thread_message_queue_set_err_recv(f->in_thread_queue, ret); f 4027 fftools/ffmpeg.c InputFile *f = input_files[i]; f 4030 fftools/ffmpeg.c if (!f || !f->in_thread_queue) f 4032 fftools/ffmpeg.c av_thread_message_queue_set_err_send(f->in_thread_queue, AVERROR_EOF); f 4033 fftools/ffmpeg.c while (av_thread_message_queue_recv(f->in_thread_queue, &pkt, 0) >= 0) f 4036 fftools/ffmpeg.c pthread_join(f->thread, NULL); f 4037 fftools/ffmpeg.c f->joined = 1; f 4038 fftools/ffmpeg.c av_thread_message_queue_free(&f->in_thread_queue); f 4052 fftools/ffmpeg.c InputFile *f = input_files[i]; f 4057 fftools/ffmpeg.c if (f->ctx->pb ? !f->ctx->pb->seekable : f 4058 fftools/ffmpeg.c strcmp(f->ctx->iformat->name, "lavfi")) f 4059 fftools/ffmpeg.c f->non_blocking = 1; f 4060 fftools/ffmpeg.c ret = av_thread_message_queue_alloc(&f->in_thread_queue, f 4061 fftools/ffmpeg.c f->thread_queue_size, sizeof(AVPacket)); f 4065 fftools/ffmpeg.c if ((ret = pthread_create(&f->thread, NULL, input_thread, f))) { f 4067 fftools/ffmpeg.c av_thread_message_queue_free(&f->in_thread_queue); f 4086 fftools/ffmpeg.c static int get_input_packet_mt(InputFile *f, AVPacket *pkt) f 4088 fftools/ffmpeg.c return av_thread_message_queue_recv(f->in_thread_queue, pkt, f 4089 fftools/ffmpeg.c f->non_blocking ? f 4094 fftools/ffmpeg.c static int get_input_packet(InputFile *f, AVPacket *pkt) f 4096 fftools/ffmpeg.c if (f->rate_emu) { f 4098 fftools/ffmpeg.c for (i = 0; i < f->nb_streams; i++) { f 4099 fftools/ffmpeg.c InputStream *ist = input_streams[f->ist_index + i]; f 4109 fftools/ffmpeg.c return get_input_packet_mt(f, pkt); f 4111 fftools/ffmpeg.c return av_read_frame(f->ctx, pkt); f 759 fftools/ffmpeg_filter.c InputFile *f = input_files[ist->file_index]; f 856 fftools/ffmpeg_filter.c tsoffset = f->start_time == AV_NOPTS_VALUE ? 0 : f->start_time; f 857 fftools/ffmpeg_filter.c if (!start_at_zero && f->ctx->start_time != AV_NOPTS_VALUE) f 858 fftools/ffmpeg_filter.c tsoffset += f->ctx->start_time; f 860 fftools/ffmpeg_filter.c ret = insert_trim(((f->start_time == AV_NOPTS_VALUE) || !f->accurate_seek) ? f 861 fftools/ffmpeg_filter.c AV_NOPTS_VALUE : tsoffset, f->recording_time, f 881 fftools/ffmpeg_filter.c InputFile *f = input_files[ist->file_index]; f 969 fftools/ffmpeg_filter.c tsoffset = f->start_time == AV_NOPTS_VALUE ? 0 : f->start_time; f 970 fftools/ffmpeg_filter.c if (!start_at_zero && f->ctx->start_time != AV_NOPTS_VALUE) f 971 fftools/ffmpeg_filter.c tsoffset += f->ctx->start_time; f 973 fftools/ffmpeg_filter.c ret = insert_trim(((f->start_time == AV_NOPTS_VALUE) || !f->accurate_seek) ? f 974 fftools/ffmpeg_filter.c AV_NOPTS_VALUE : tsoffset, f->recording_time, f 1057 fftools/ffmpeg_opt.c InputFile *f; f 1254 fftools/ffmpeg_opt.c f = av_mallocz(sizeof(*f)); f 1255 fftools/ffmpeg_opt.c if (!f) f 1257 fftools/ffmpeg_opt.c input_files[nb_input_files - 1] = f; f 1259 fftools/ffmpeg_opt.c f->ctx = ic; f 1260 fftools/ffmpeg_opt.c f->ist_index = nb_input_streams - ic->nb_streams; f 1261 fftools/ffmpeg_opt.c f->start_time = o->start_time; f 1262 fftools/ffmpeg_opt.c f->recording_time = o->recording_time; f 1263 fftools/ffmpeg_opt.c f->input_ts_offset = o->input_ts_offset; f 1264 fftools/ffmpeg_opt.c f->ts_offset = o->input_ts_offset - (copy_ts ? (start_at_zero && ic->start_time != AV_NOPTS_VALUE ? ic->start_time : 0) : timestamp); f 1265 fftools/ffmpeg_opt.c f->nb_streams = ic->nb_streams; f 1266 fftools/ffmpeg_opt.c f->rate_emu = o->rate_emu; f 1267 fftools/ffmpeg_opt.c f->accurate_seek = o->accurate_seek; f 1268 fftools/ffmpeg_opt.c f->loop = o->loop; f 1269 fftools/ffmpeg_opt.c f->duration = 0; f 1270 fftools/ffmpeg_opt.c f->time_base = (AVRational){ 1, 1 }; f 1272 fftools/ffmpeg_opt.c f->thread_queue_size = o->thread_queue_size > 0 ? o->thread_queue_size : 8; f 1277 fftools/ffmpeg_opt.c for (i = f->ist_index; i < nb_input_streams; i++) { f 1811 fftools/ffmpeg_opt.c FILE *f; f 1831 fftools/ffmpeg_opt.c f = av_fopen_utf8(logfilename, "wb"); f 1832 fftools/ffmpeg_opt.c if (!f) { f 1838 fftools/ffmpeg_opt.c ost->logfile = f; f 2491 fftools/ffmpeg_opt.c OutputFilter *f = ost->filter; f 2495 fftools/ffmpeg_opt.c f->frame_rate = ost->frame_rate; f 2496 fftools/ffmpeg_opt.c f->width = ost->enc_ctx->width; f 2497 fftools/ffmpeg_opt.c f->height = ost->enc_ctx->height; f 2499 fftools/ffmpeg_opt.c f->format = ost->enc_ctx->pix_fmt; f 2504 fftools/ffmpeg_opt.c f->formats = av_mallocz_array(count + 1, sizeof(*f->formats)); f 2505 fftools/ffmpeg_opt.c if (!f->formats) f 2507 fftools/ffmpeg_opt.c memcpy(f->formats, ost->enc->pix_fmts, (count + 1) * sizeof(*f->formats)); f 2512 fftools/ffmpeg_opt.c f->format = ost->enc_ctx->sample_fmt; f 2517 fftools/ffmpeg_opt.c f->formats = av_mallocz_array(count + 1, sizeof(*f->formats)); f 2518 fftools/ffmpeg_opt.c if (!f->formats) f 2520 fftools/ffmpeg_opt.c memcpy(f->formats, ost->enc->sample_fmts, (count + 1) * sizeof(*f->formats)); f 2523 fftools/ffmpeg_opt.c f->sample_rate = ost->enc_ctx->sample_rate; f 2528 fftools/ffmpeg_opt.c f->sample_rates = av_mallocz_array(count + 1, sizeof(*f->sample_rates)); f 2529 fftools/ffmpeg_opt.c if (!f->sample_rates) f 2531 fftools/ffmpeg_opt.c memcpy(f->sample_rates, ost->enc->supported_samplerates, f 2532 fftools/ffmpeg_opt.c (count + 1) * sizeof(*f->sample_rates)); f 2535 fftools/ffmpeg_opt.c f->channel_layout = av_get_default_channel_layout(ost->enc_ctx->channels); f 2540 fftools/ffmpeg_opt.c f->channel_layouts = av_mallocz_array(count + 1, sizeof(*f->channel_layouts)); f 2541 fftools/ffmpeg_opt.c if (!f->channel_layouts) f 2543 fftools/ffmpeg_opt.c memcpy(f->channel_layouts, ost->enc->channel_layouts, f 2544 fftools/ffmpeg_opt.c (count + 1) * sizeof(*f->channel_layouts)); f 2975 fftools/ffmpeg_opt.c FILE *f=NULL; f 2983 fftools/ffmpeg_opt.c if (!(f = get_preset_file(filename, sizeof(filename), arg, *opt == 'f', codec_name))) { f 2991 fftools/ffmpeg_opt.c while (fgets(line, sizeof(line), f)) { f 3015 fftools/ffmpeg_opt.c fclose(f); f 694 fftools/ffplay.c static int frame_queue_init(FrameQueue *f, PacketQueue *pktq, int max_size, int keep_last) f 697 fftools/ffplay.c memset(f, 0, sizeof(FrameQueue)); f 698 fftools/ffplay.c if (!(f->mutex = SDL_CreateMutex())) { f 702 fftools/ffplay.c if (!(f->cond = SDL_CreateCond())) { f 706 fftools/ffplay.c f->pktq = pktq; f 707 fftools/ffplay.c f->max_size = FFMIN(max_size, FRAME_QUEUE_SIZE); f 708 fftools/ffplay.c f->keep_last = !!keep_last; f 709 fftools/ffplay.c for (i = 0; i < f->max_size; i++) f 710 fftools/ffplay.c if (!(f->queue[i].frame = av_frame_alloc())) f 715 fftools/ffplay.c static void frame_queue_destory(FrameQueue *f) f 718 fftools/ffplay.c for (i = 0; i < f->max_size; i++) { f 719 fftools/ffplay.c Frame *vp = &f->queue[i]; f 723 fftools/ffplay.c SDL_DestroyMutex(f->mutex); f 724 fftools/ffplay.c SDL_DestroyCond(f->cond); f 727 fftools/ffplay.c static void frame_queue_signal(FrameQueue *f) f 729 fftools/ffplay.c SDL_LockMutex(f->mutex); f 730 fftools/ffplay.c SDL_CondSignal(f->cond); f 731 fftools/ffplay.c SDL_UnlockMutex(f->mutex); f 734 fftools/ffplay.c static Frame *frame_queue_peek(FrameQueue *f) f 736 fftools/ffplay.c return &f->queue[(f->rindex + f->rindex_shown) % f->max_size]; f 739 fftools/ffplay.c static Frame *frame_queue_peek_next(FrameQueue *f) f 741 fftools/ffplay.c return &f->queue[(f->rindex + f->rindex_shown + 1) % f->max_size]; f 744 fftools/ffplay.c static Frame *frame_queue_peek_last(FrameQueue *f) f 746 fftools/ffplay.c return &f->queue[f->rindex]; f 749 fftools/ffplay.c static Frame *frame_queue_peek_writable(FrameQueue *f) f 752 fftools/ffplay.c SDL_LockMutex(f->mutex); f 753 fftools/ffplay.c while (f->size >= f->max_size && f 754 fftools/ffplay.c !f->pktq->abort_request) { f 755 fftools/ffplay.c SDL_CondWait(f->cond, f->mutex); f 757 fftools/ffplay.c SDL_UnlockMutex(f->mutex); f 759 fftools/ffplay.c if (f->pktq->abort_request) f 762 fftools/ffplay.c return &f->queue[f->windex]; f 765 fftools/ffplay.c static Frame *frame_queue_peek_readable(FrameQueue *f) f 768 fftools/ffplay.c SDL_LockMutex(f->mutex); f 769 fftools/ffplay.c while (f->size - f->rindex_shown <= 0 && f 770 fftools/ffplay.c !f->pktq->abort_request) { f 771 fftools/ffplay.c SDL_CondWait(f->cond, f->mutex); f 773 fftools/ffplay.c SDL_UnlockMutex(f->mutex); f 775 fftools/ffplay.c if (f->pktq->abort_request) f 778 fftools/ffplay.c return &f->queue[(f->rindex + f->rindex_shown) % f->max_size]; f 781 fftools/ffplay.c static void frame_queue_push(FrameQueue *f) f 783 fftools/ffplay.c if (++f->windex == f->max_size) f 784 fftools/ffplay.c f->windex = 0; f 785 fftools/ffplay.c SDL_LockMutex(f->mutex); f 786 fftools/ffplay.c f->size++; f 787 fftools/ffplay.c SDL_CondSignal(f->cond); f 788 fftools/ffplay.c SDL_UnlockMutex(f->mutex); f 791 fftools/ffplay.c static void frame_queue_next(FrameQueue *f) f 793 fftools/ffplay.c if (f->keep_last && !f->rindex_shown) { f 794 fftools/ffplay.c f->rindex_shown = 1; f 797 fftools/ffplay.c frame_queue_unref_item(&f->queue[f->rindex]); f 798 fftools/ffplay.c if (++f->rindex == f->max_size) f 799 fftools/ffplay.c f->rindex = 0; f 800 fftools/ffplay.c SDL_LockMutex(f->mutex); f 801 fftools/ffplay.c f->size--; f 802 fftools/ffplay.c SDL_CondSignal(f->cond); f 803 fftools/ffplay.c SDL_UnlockMutex(f->mutex); f 807 fftools/ffplay.c static int frame_queue_nb_remaining(FrameQueue *f) f 809 fftools/ffplay.c return f->size - f->rindex_shown; f 813 fftools/ffplay.c static int64_t frame_queue_last_pos(FrameQueue *f) f 815 fftools/ffplay.c Frame *fp = &f->queue[f->rindex]; f 816 fftools/ffplay.c if (f->rindex_shown && fp->serial == f->pktq->serial) f 1812 fftools/ffprobe.c #define print_fmt(k, f, ...) do { \ f 1814 fftools/ffprobe.c av_bprintf(&pbuf, f, __VA_ARGS__); \ f 248 libavcodec/4xm.c static av_cold void init_vlcs(FourXContext *f) f 265 libavcodec/4xm.c static void init_mv(FourXContext *f, int linesize) f 270 libavcodec/4xm.c if (f->version > 1) f 271 libavcodec/4xm.c f->mv[i] = mv[i][0] + mv[i][1] * linesize / 2; f 273 libavcodec/4xm.c f->mv[i] = (i & 15) - 8 + ((i >> 4) - 8) * linesize / 2; f 342 libavcodec/4xm.c static int decode_p_block(FourXContext *f, uint16_t *dst, const uint16_t *src, f 354 libavcodec/4xm.c if (get_bits_left(&f->gb) < 1) f 357 libavcodec/4xm.c code = get_vlc2(&f->gb, block_type_vlc[1 - (f->version > 1)][index].table, f 361 libavcodec/4xm.c start = f->last_frame_buffer; f 362 libavcodec/4xm.c end = start + stride * (f->avctx->height - h + 1) - (1 << log2w); f 366 libavcodec/4xm.c if ((ret = decode_p_block(f, dst, src, log2w, log2h, stride)) < 0) f 368 libavcodec/4xm.c return decode_p_block(f, dst + (stride << log2h), f 373 libavcodec/4xm.c if ((ret = decode_p_block(f, dst , src, log2w, log2h, stride)) < 0) f 375 libavcodec/4xm.c return decode_p_block(f, dst + (1 << log2w), f 379 libavcodec/4xm.c if (bytestream2_get_bytes_left(&f->g2) < 4) { f 380 libavcodec/4xm.c av_log(f->avctx, AV_LOG_ERROR, "wordstream overread\n"); f 384 libavcodec/4xm.c dst[0] = bytestream2_get_le16u(&f->g2); f 385 libavcodec/4xm.c dst[1] = bytestream2_get_le16u(&f->g2); f 387 libavcodec/4xm.c dst[0] = bytestream2_get_le16u(&f->g2); f 388 libavcodec/4xm.c dst[stride] = bytestream2_get_le16u(&f->g2); f 393 libavcodec/4xm.c if ((code&3)==0 && bytestream2_get_bytes_left(&f->g) < 1) { f 394 libavcodec/4xm.c av_log(f->avctx, AV_LOG_ERROR, "bytestream overread\n"); f 399 libavcodec/4xm.c src += f->mv[bytestream2_get_byte(&f->g)]; f 400 libavcodec/4xm.c } else if (code == 3 && f->version >= 2) { f 403 libavcodec/4xm.c src += f->mv[bytestream2_get_byte(&f->g)]; f 404 libavcodec/4xm.c if (bytestream2_get_bytes_left(&f->g2) < 2){ f 405 libavcodec/4xm.c av_log(f->avctx, AV_LOG_ERROR, "wordstream overread\n"); f 408 libavcodec/4xm.c dc = bytestream2_get_le16(&f->g2); f 410 libavcodec/4xm.c if (bytestream2_get_bytes_left(&f->g2) < 2){ f 411 libavcodec/4xm.c av_log(f->avctx, AV_LOG_ERROR, "wordstream overread\n"); f 416 libavcodec/4xm.c dc = bytestream2_get_le16(&f->g2); f 420 libavcodec/4xm.c av_log(f->avctx, AV_LOG_ERROR, "mv out of pic\n"); f 429 libavcodec/4xm.c static int decode_p_frame(FourXContext *f, const uint8_t *buf, int length) f 432 libavcodec/4xm.c const int width = f->avctx->width; f 433 libavcodec/4xm.c const int height = f->avctx->height; f 434 libavcodec/4xm.c uint16_t *dst = f->frame_buffer; f 440 libavcodec/4xm.c src = f->last_frame_buffer; f 442 libavcodec/4xm.c if (f->version > 1) { f 460 libavcodec/4xm.c av_log(f->avctx, AV_LOG_ERROR, "lengths %d %d %d %d\n", bitstream_size, bytestream_size, wordstream_size, f 465 libavcodec/4xm.c av_fast_padded_malloc(&f->bitstream_buffer, &f->bitstream_buffer_size, f 467 libavcodec/4xm.c if (!f->bitstream_buffer) f 469 libavcodec/4xm.c f->bbdsp.bswap_buf(f->bitstream_buffer, (const uint32_t *) (buf + extra), f 471 libavcodec/4xm.c init_get_bits(&f->gb, f->bitstream_buffer, 8 * bitstream_size); f 475 libavcodec/4xm.c bytestream2_init(&f->g2, buf + wordstream_offset, f 477 libavcodec/4xm.c bytestream2_init(&f->g, buf + bytestream_offset, f 480 libavcodec/4xm.c init_mv(f, width * 2); f 484 libavcodec/4xm.c if ((ret = decode_p_block(f, dst + x, src + x, 3, 3, width)) < 0) f 497 libavcodec/4xm.c static int decode_i_block(FourXContext *f, int16_t *block) f 501 libavcodec/4xm.c if (get_bits_left(&f->gb) < 2){ f 502 libavcodec/4xm.c av_log(f->avctx, AV_LOG_ERROR, "%d bits left before decode_i_block()\n", get_bits_left(&f->gb)); f 507 libavcodec/4xm.c val = get_vlc2(&f->pre_gb, f->pre_vlc.table, ACDC_VLC_BITS, 3); f 509 libavcodec/4xm.c av_log(f->avctx, AV_LOG_ERROR, "error dc run != 0\n"); f 514 libavcodec/4xm.c val = get_xbits(&f->gb, val); f 516 libavcodec/4xm.c val = val * dequant_table[0] + f->last_dc; f 517 libavcodec/4xm.c f->last_dc = block[0] = val; f 521 libavcodec/4xm.c code = get_vlc2(&f->pre_gb, f->pre_vlc.table, ACDC_VLC_BITS, 3); f 529 libavcodec/4xm.c av_log(f->avctx, AV_LOG_ERROR, "run %d overflow\n", i); f 534 libavcodec/4xm.c level = get_xbits(&f->gb, code & 0xf); f 536 libavcodec/4xm.c av_log(f->avctx, AV_LOG_ERROR, "0 coeff\n"); f 541 libavcodec/4xm.c av_log(f->avctx, AV_LOG_ERROR, "run %d overflow\n", i); f 556 libavcodec/4xm.c static inline void idct_put(FourXContext *f, int x, int y) f 558 libavcodec/4xm.c int16_t (*block)[64] = f->block; f 559 libavcodec/4xm.c int stride = f->avctx->width; f 561 libavcodec/4xm.c uint16_t *dst = f->frame_buffer + y * stride + x; f 568 libavcodec/4xm.c if (!(f->avctx->flags & AV_CODEC_FLAG_GRAY)) { f 602 libavcodec/4xm.c static int decode_i_mb(FourXContext *f) f 607 libavcodec/4xm.c f->bdsp.clear_blocks(f->block[0]); f 610 libavcodec/4xm.c if ((ret = decode_i_block(f, f->block[i])) < 0) f 616 libavcodec/4xm.c static const uint8_t *read_huffman_tables(FourXContext *f, f 638 libavcodec/4xm.c av_log(f->avctx, AV_LOG_ERROR, "invalid data in read_huffman_tables\n"); f 656 libavcodec/4xm.c av_log(f->avctx, AV_LOG_ERROR, "ptr overflow in read_huffman_tables\n"); f 698 libavcodec/4xm.c av_log(f->avctx, AV_LOG_ERROR, f 706 libavcodec/4xm.c ff_free_vlc(&f->pre_vlc); f 707 libavcodec/4xm.c if (init_vlc(&f->pre_vlc, ACDC_VLC_BITS, 257, len_tab, 1, 1, f 722 libavcodec/4xm.c static int decode_i2_frame(FourXContext *f, const uint8_t *buf, int length) f 725 libavcodec/4xm.c const int width = f->avctx->width; f 726 libavcodec/4xm.c const int height = f->avctx->height; f 728 libavcodec/4xm.c uint16_t *dst = f->frame_buffer; f 733 libavcodec/4xm.c av_log(f->avctx, AV_LOG_ERROR, "packet size too small\n"); f 748 libavcodec/4xm.c av_log(f->avctx, AV_LOG_ERROR, "unk bit 1\n"); f 750 libavcodec/4xm.c av_log(f->avctx, AV_LOG_ERROR, "unk bit 2\n"); f 770 libavcodec/4xm.c static int decode_i_frame(FourXContext *f, const uint8_t *buf, int length) f 773 libavcodec/4xm.c const int width = f->avctx->width; f 774 libavcodec/4xm.c const int height = f->avctx->height; f 783 libavcodec/4xm.c av_log(f->avctx, AV_LOG_ERROR, "packet size too small\n"); f 792 libavcodec/4xm.c av_log(f->avctx, AV_LOG_ERROR, "size mismatch %d %d %d\n", f 797 libavcodec/4xm.c prestream = read_huffman_tables(f, prestream, prestream_size); f 799 libavcodec/4xm.c av_log(f->avctx, AV_LOG_ERROR, "Error reading Huffman tables.\n"); f 805 libavcodec/4xm.c init_get_bits(&f->gb, buf + 4, 8 * bitstream_size); f 809 libavcodec/4xm.c av_fast_padded_malloc(&f->bitstream_buffer, &f->bitstream_buffer_size, f 811 libavcodec/4xm.c if (!f->bitstream_buffer) f 813 libavcodec/4xm.c f->bbdsp.bswap_buf(f->bitstream_buffer, (const uint32_t *) prestream, f 815 libavcodec/4xm.c init_get_bits(&f->pre_gb, f->bitstream_buffer, 8 * prestream_size); f 817 libavcodec/4xm.c f->last_dc = 0 * 128 * 8 * 8; f 821 libavcodec/4xm.c if ((ret = decode_i_mb(f)) < 0) f 824 libavcodec/4xm.c idct_put(f, x, y); f 828 libavcodec/4xm.c if (get_vlc2(&f->pre_gb, f->pre_vlc.table, ACDC_VLC_BITS, 3) != 256) f 829 libavcodec/4xm.c av_log(f->avctx, AV_LOG_ERROR, "end mismatch\n"); f 839 libavcodec/4xm.c FourXContext *const f = avctx->priv_data; f 849 libavcodec/4xm.c av_log(f->avctx, AV_LOG_ERROR, "size mismatch %d %"PRIu32"\n", f 862 libavcodec/4xm.c if (f->version <= 1) { f 863 libavcodec/4xm.c av_log(f->avctx, AV_LOG_ERROR, "cfrm in version %d\n", f->version); f 871 libavcodec/4xm.c av_log(f->avctx, AV_LOG_ERROR, "sizes invalid\n"); f 876 libavcodec/4xm.c if (f->cfrm[i].id && f->cfrm[i].id < avctx->frame_number) f 877 libavcodec/4xm.c av_log(f->avctx, AV_LOG_ERROR, "lost c frame %d\n", f 878 libavcodec/4xm.c f->cfrm[i].id); f 881 libavcodec/4xm.c if (f->cfrm[i].id == id) f 883 libavcodec/4xm.c if (f->cfrm[i].size == 0) f 889 libavcodec/4xm.c f->cfrm[i].id = id; f 891 libavcodec/4xm.c cfrm = &f->cfrm[i]; f 900 libavcodec/4xm.c av_log(f->avctx, AV_LOG_ERROR, "realloc failure\n"); f 912 libavcodec/4xm.c av_log(f->avctx, AV_LOG_ERROR, "cframe id mismatch %d %d\n", f 915 libavcodec/4xm.c if (f->version <= 1) f 932 libavcodec/4xm.c if ((ret = decode_i2_frame(f, buf - 4, frame_size + 4)) < 0) { f 933 libavcodec/4xm.c av_log(f->avctx, AV_LOG_ERROR, "decode i2 frame failed\n"); f 938 libavcodec/4xm.c if ((ret = decode_i_frame(f, buf, frame_size)) < 0) { f 939 libavcodec/4xm.c av_log(f->avctx, AV_LOG_ERROR, "decode i frame failed\n"); f 944 libavcodec/4xm.c if ((ret = decode_p_frame(f, buf, frame_size)) < 0) { f 945 libavcodec/4xm.c av_log(f->avctx, AV_LOG_ERROR, "decode p frame failed\n"); f 959 libavcodec/4xm.c (const uint8_t*)f->frame_buffer, avctx->width * 2, f 961 libavcodec/4xm.c FFSWAP(uint16_t *, f->frame_buffer, f->last_frame_buffer); f 972 libavcodec/4xm.c FourXContext * const f = avctx->priv_data; f 975 libavcodec/4xm.c av_freep(&f->frame_buffer); f 976 libavcodec/4xm.c av_freep(&f->last_frame_buffer); f 977 libavcodec/4xm.c av_freep(&f->bitstream_buffer); f 978 libavcodec/4xm.c f->bitstream_buffer_size = 0; f 980 libavcodec/4xm.c av_freep(&f->cfrm[i].data); f 981 libavcodec/4xm.c f->cfrm[i].allocated_size = 0; f 983 libavcodec/4xm.c ff_free_vlc(&f->pre_vlc); f 990 libavcodec/4xm.c FourXContext * const f = avctx->priv_data; f 1006 libavcodec/4xm.c f->frame_buffer = av_mallocz(avctx->width * avctx->height * 2); f 1007 libavcodec/4xm.c f->last_frame_buffer = av_mallocz(avctx->width * avctx->height * 2); f 1008 libavcodec/4xm.c if (!f->frame_buffer || !f->last_frame_buffer) { f 1013 libavcodec/4xm.c f->version = AV_RL32(avctx->extradata) >> 16; f 1014 libavcodec/4xm.c ff_blockdsp_init(&f->bdsp, avctx); f 1015 libavcodec/4xm.c ff_bswapdsp_init(&f->bbdsp); f 1016 libavcodec/4xm.c f->avctx = avctx; f 1017 libavcodec/4xm.c init_vlcs(f); f 1019 libavcodec/4xm.c if (f->version > 2) f 60 libavcodec/aac_defines.h #define AAC_MADD30_V8(x, y, a, b, c, d, e, f) (int)((((int64_t)(x) * (y)) + \ f 63 libavcodec/aac_defines.h ((int64_t)(e) * (f)) + \ f 68 libavcodec/aac_defines.h #define AAC_MSUB30_V8(x, y, a, b, c, d, e, f) (int)((((int64_t)(x) * (y)) + \ f 71 libavcodec/aac_defines.h ((int64_t)(e) * (f)) + \ f 105 libavcodec/aac_defines.h #define AAC_MADD30_V8(x, y, a, b, c, d, e, f) ((x) * (y) + (a) * (b) + \ f 106 libavcodec/aac_defines.h (c) * (d) + (e) * (f)) f 108 libavcodec/aac_defines.h #define AAC_MSUB30_V8(x, y, a, b, c, d, e, f) ((x) * (y) + (a) * (b) - \ f 109 libavcodec/aac_defines.h (c) * (d) - (e) * (f)) f 112 libavcodec/aacdec.c s0.f = s1.f = *scale; f 116 libavcodec/aacdec.c *dst++ = v[idx & 15] * s0.f; f 117 libavcodec/aacdec.c *dst++ = v[idx>>4 & 15] * s1.f; f 128 libavcodec/aacdec.c union av_intfloat32 s = { .f = *scale }; f 132 libavcodec/aacdec.c *dst++ = v[idx & 3] * t.f; f 136 libavcodec/aacdec.c *dst++ = v[idx>>2 & 3] * t.f; f 140 libavcodec/aacdec.c *dst++ = v[idx>>4 & 3] * t.f; f 144 libavcodec/aacdec.c *dst++ = v[idx>>6 & 3] * t.f; f 153 libavcodec/aacdec.c tmp.f = pf; f 155 libavcodec/aacdec.c return tmp.f; f 161 libavcodec/aacdec.c tmp.f = pf; f 163 libavcodec/aacdec.c return tmp.f; f 169 libavcodec/aacdec.c pun.f = pf; f 171 libavcodec/aacdec.c return pun.f; f 43 libavcodec/aacenc_pred.c tmp.f = pf; f 45 libavcodec/aacenc_pred.c return tmp.f; f 51 libavcodec/aacenc_pred.c tmp.f = pf; f 53 libavcodec/aacenc_pred.c return tmp.f; f 59 libavcodec/aacenc_pred.c pun.f = pf; f 61 libavcodec/aacenc_pred.c return pun.f; f 45 libavcodec/aacps_tablegen_template.c const INT32FLOAT *f = p; f 48 libavcodec/aacps_tablegen_template.c ARRAY_URENAME(2d_array)(f, c, d); f 50 libavcodec/aacps_tablegen_template.c f += c * d; f 57 libavcodec/aacps_tablegen_template.c const INT32FLOAT *f = p; f 60 libavcodec/aacps_tablegen_template.c ARRAY_RENAME(3d_array)(f, b, c, d); f 62 libavcodec/aacps_tablegen_template.c f += b * c * d; f 282 libavcodec/aacpsy.c static av_cold float calc_bark(float f) f 284 libavcodec/aacpsy.c return 13.3f * atanf(0.00076f * f) + 3.5f * atanf((f / 7500.0f) * (f / 7500.0f)); f 292 libavcodec/aacpsy.c static av_cold float ath(float f, float add) f 294 libavcodec/aacpsy.c f /= 1000.0f; f 295 libavcodec/aacpsy.c return 3.64 * pow(f, -0.8) f 296 libavcodec/aacpsy.c - 6.8 * exp(-0.6 * (f - 3.4) * (f - 3.4)) f 297 libavcodec/aacpsy.c + 6.0 * exp(-0.15 * (f - 8.7) * (f - 8.7)) f 298 libavcodec/aacpsy.c + (0.6 + 0.04 * add) * 0.001 * f * f * f * f; f 535 libavcodec/agm.c double f = 1.0 - fabs(qscale); f 540 libavcodec/agm.c luma[i] = FFMAX(1, 16 * f); f 541 libavcodec/agm.c chroma[i] = FFMAX(1, 16 * f); f 552 libavcodec/agm.c luma[i] = FFMAX(1, unscaled_luma [(i & 7) * 8 + (i >> 3)] * f); f 553 libavcodec/agm.c chroma[i] = FFMAX(1, unscaled_chroma[(i & 7) * 8 + (i >> 3)] * f); f 557 libavcodec/agm.c luma[i] = FFMAX(1, 255.0 - (255 - unscaled_luma [(i & 7) * 8 + (i >> 3)]) * f); f 558 libavcodec/agm.c chroma[i] = FFMAX(1, 255.0 - (255 - unscaled_chroma[(i & 7) * 8 + (i >> 3)]) * f); f 392 libavcodec/aic.c ThreadFrame frame = { .f = data }; f 273 libavcodec/alac.c ThreadFrame tframe = { .f = frame }; f 33 libavcodec/aliaspixdec.c AVFrame *f = data; f 68 libavcodec/aliaspixdec.c ret = ff_get_buffer(avctx, f, 0); f 72 libavcodec/aliaspixdec.c f->pict_type = AV_PICTURE_TYPE_I; f 73 libavcodec/aliaspixdec.c f->key_frame = 1; f 77 libavcodec/aliaspixdec.c out_buf = f->data[0]; f 84 libavcodec/aliaspixdec.c out_buf = f->data[0] + f->linesize[0] * y++; f 1263 libavcodec/apedec.c static void do_init_filter(APEFilter *f, int16_t *buf, int order) f 1265 libavcodec/apedec.c f->coeffs = buf; f 1266 libavcodec/apedec.c f->historybuffer = buf + order; f 1267 libavcodec/apedec.c f->delay = f->historybuffer + order * 2; f 1268 libavcodec/apedec.c f->adaptcoeffs = f->historybuffer + order; f 1270 libavcodec/apedec.c memset(f->historybuffer, 0, (order * 2) * sizeof(*f->historybuffer)); f 1271 libavcodec/apedec.c memset(f->coeffs, 0, order * sizeof(*f->coeffs)); f 1272 libavcodec/apedec.c f->avg = 0; f 1275 libavcodec/apedec.c static void init_filter(APEContext *ctx, APEFilter *f, int16_t *buf, int order) f 1277 libavcodec/apedec.c do_init_filter(&f[0], buf, order); f 1278 libavcodec/apedec.c do_init_filter(&f[1], buf + order * 3 + HISTORY_SIZE, order); f 1281 libavcodec/apedec.c static void do_apply_filter(APEContext *ctx, int version, APEFilter *f, f 1289 libavcodec/apedec.c res = ctx->adsp.scalarproduct_and_madd_int16(f->coeffs, f 1290 libavcodec/apedec.c f->delay - order, f 1291 libavcodec/apedec.c f->adaptcoeffs - order, f 1298 libavcodec/apedec.c *f->delay++ = av_clip_int16(res); f 1302 libavcodec/apedec.c f->adaptcoeffs[0] = (res == 0) ? 0 : ((res >> 28) & 8) - 4; f 1303 libavcodec/apedec.c f->adaptcoeffs[-4] >>= 1; f 1304 libavcodec/apedec.c f->adaptcoeffs[-8] >>= 1; f 1311 libavcodec/apedec.c *f->adaptcoeffs = APESIGN(res) * f 1312 libavcodec/apedec.c (8 << ((absres > f->avg * 3) + (absres > f->avg * 4 / 3))); f 1322 libavcodec/apedec.c *f->adaptcoeffs = 0; f 1324 libavcodec/apedec.c f->avg += (int)(absres - (unsigned)f->avg) / 16; f 1326 libavcodec/apedec.c f->adaptcoeffs[-1] >>= 1; f 1327 libavcodec/apedec.c f->adaptcoeffs[-2] >>= 1; f 1328 libavcodec/apedec.c f->adaptcoeffs[-8] >>= 1; f 1331 libavcodec/apedec.c f->adaptcoeffs++; f 1334 libavcodec/apedec.c if (f->delay == f->historybuffer + HISTORY_SIZE + (order * 2)) { f 1335 libavcodec/apedec.c memmove(f->historybuffer, f->delay - (order * 2), f 1336 libavcodec/apedec.c (order * 2) * sizeof(*f->historybuffer)); f 1337 libavcodec/apedec.c f->delay = f->historybuffer + order * 2; f 1338 libavcodec/apedec.c f->adaptcoeffs = f->historybuffer + order; f 1343 libavcodec/apedec.c static void apply_filter(APEContext *ctx, APEFilter *f, f 1347 libavcodec/apedec.c do_apply_filter(ctx, ctx->fileversion, &f[0], data0, count, order, fracbits); f 1349 libavcodec/apedec.c do_apply_filter(ctx, ctx->fileversion, &f[1], data1, count, order, fracbits); f 44 libavcodec/audio_frame_queue.c int ff_af_queue_add(AudioFrameQueue *afq, const AVFrame *f) f 53 libavcodec/audio_frame_queue.c new->duration = f->nb_samples; f 55 libavcodec/audio_frame_queue.c if (f->pts != AV_NOPTS_VALUE) { f 56 libavcodec/audio_frame_queue.c new->pts = av_rescale_q(f->pts, f 68 libavcodec/audio_frame_queue.c afq->remaining_samples += f->nb_samples; f 64 libavcodec/audio_frame_queue.h int ff_af_queue_add(AudioFrameQueue *afq, const AVFrame *f); f 4023 libavcodec/avcodec.h const AVBitStreamFilter *av_bitstream_filter_next(const AVBitStreamFilter *f); f 156 libavcodec/binkaudio.c float f = ldexpf(get_bits(gb, 23), power - 23); f 158 libavcodec/binkaudio.c f = -f; f 159 libavcodec/binkaudio.c return f; f 31 libavcodec/bitstream_filter.c const AVBitStreamFilter *av_bitstream_filter_next(const AVBitStreamFilter *f) f 36 libavcodec/bitstream_filter.c while (filter != f) f 69 libavcodec/bitstream_filters.c const AVBitStreamFilter *f = bitstream_filters[i]; f 71 libavcodec/bitstream_filters.c if (f) f 74 libavcodec/bitstream_filters.c return f; f 85 libavcodec/bitstream_filters.c const AVBitStreamFilter *f = NULL; f 91 libavcodec/bitstream_filters.c while ((f = av_bsf_iterate(&i))) { f 92 libavcodec/bitstream_filters.c if (!strcmp(f->name, name)) f 93 libavcodec/bitstream_filters.c return f; f 101 libavcodec/bitstream_filters.c const AVBitStreamFilter *f = NULL; f 105 libavcodec/bitstream_filters.c while (prev && (f = av_bsf_iterate(&i))) { f 106 libavcodec/bitstream_filters.c if (f->priv_class == prev) { f 112 libavcodec/bitstream_filters.c while ((f = av_bsf_iterate(&i))) { f 113 libavcodec/bitstream_filters.c if (f->priv_class) f 114 libavcodec/bitstream_filters.c return f->priv_class; f 477 libavcodec/cavs.c AVFrame *ref = h->DPB[mv->ref].f; f 487 libavcodec/cavs.c AVFrame *ref = h->DPB[0].f; f 707 libavcodec/cavs.c h->cy = h->cur.f->data[0] + h->mby * 16 * h->l_stride; f 708 libavcodec/cavs.c h->cu = h->cur.f->data[1] + h->mby * 8 * h->c_stride; f 709 libavcodec/cavs.c h->cv = h->cur.f->data[2] + h->mby * 8 * h->c_stride; f 735 libavcodec/cavs.c h->cy = h->cur.f->data[0]; f 736 libavcodec/cavs.c h->cu = h->cur.f->data[1]; f 737 libavcodec/cavs.c h->cv = h->cur.f->data[2]; f 738 libavcodec/cavs.c h->l_stride = h->cur.f->linesize[0]; f 739 libavcodec/cavs.c h->c_stride = h->cur.f->linesize[1]; f 810 libavcodec/cavs.c h->cur.f = av_frame_alloc(); f 811 libavcodec/cavs.c h->DPB[0].f = av_frame_alloc(); f 812 libavcodec/cavs.c h->DPB[1].f = av_frame_alloc(); f 813 libavcodec/cavs.c if (!h->cur.f || !h->DPB[0].f || !h->DPB[1].f) { f 844 libavcodec/cavs.c av_frame_free(&h->cur.f); f 845 libavcodec/cavs.c av_frame_free(&h->DPB[0].f); f 846 libavcodec/cavs.c av_frame_free(&h->DPB[1].f); f 159 libavcodec/cavs.h AVFrame *f; f 647 libavcodec/cavsdec.c if (h->cur.f->pict_type != AV_PICTURE_TYPE_B) f 687 libavcodec/cavsdec.c if (h->cur.f->pict_type == AV_PICTURE_TYPE_I) f 944 libavcodec/cavsdec.c if ((h->cur.f->pict_type != AV_PICTURE_TYPE_I) || f 992 libavcodec/cavsdec.c av_frame_unref(h->cur.f); f 996 libavcodec/cavsdec.c h->cur.f->pict_type = get_bits(&h->gb, 2) + AV_PICTURE_TYPE_I; f 997 libavcodec/cavsdec.c if (h->cur.f->pict_type > AV_PICTURE_TYPE_B) { f 1002 libavcodec/cavsdec.c if (!h->DPB[0].f->data[0] || f 1003 libavcodec/cavsdec.c (!h->DPB[1].f->data[0] && h->cur.f->pict_type == AV_PICTURE_TYPE_B)) f 1006 libavcodec/cavsdec.c h->cur.f->pict_type = AV_PICTURE_TYPE_I; f 1020 libavcodec/cavsdec.c ret = ff_get_buffer(h->avctx, h->cur.f, h->cur.f->pict_type == AV_PICTURE_TYPE_B ? f 1026 libavcodec/cavsdec.c int alloc_size = FFALIGN(FFABS(h->cur.f->linesize[0]) + 32, 32); f 1037 libavcodec/cavsdec.c if (h->cur.f->pict_type != AV_PICTURE_TYPE_B) { f 1045 libavcodec/cavsdec.c if (h->cur.f->pict_type == AV_PICTURE_TYPE_B) { f 1069 libavcodec/cavsdec.c if (h->cur.f->pict_type == AV_PICTURE_TYPE_I) { f 1074 libavcodec/cavsdec.c if (!(h->cur.f->pict_type == AV_PICTURE_TYPE_B && h->pic_structure == 1)) f 1093 libavcodec/cavsdec.c if (h->cur.f->pict_type == AV_PICTURE_TYPE_I) { f 1100 libavcodec/cavsdec.c } else if (h->cur.f->pict_type == AV_PICTURE_TYPE_P) { f 1156 libavcodec/cavsdec.c if (ret >= 0 && h->cur.f->pict_type != AV_PICTURE_TYPE_B) { f 1157 libavcodec/cavsdec.c av_frame_unref(h->DPB[1].f); f 1239 libavcodec/cavsdec.c if (!h->low_delay && h->DPB[0].f->data[0]) { f 1241 libavcodec/cavsdec.c av_frame_move_ref(data, h->DPB[0].f); f 1265 libavcodec/cavsdec.c av_frame_unref(h->DPB[0].f); f 1266 libavcodec/cavsdec.c av_frame_unref(h->DPB[1].f); f 1283 libavcodec/cavsdec.c if (h->cur.f->pict_type != AV_PICTURE_TYPE_B) { f 1284 libavcodec/cavsdec.c if (h->DPB[!h->low_delay].f->data[0]) { f 1285 libavcodec/cavsdec.c if ((ret = av_frame_ref(data, h->DPB[!h->low_delay].f)) < 0) f 1291 libavcodec/cavsdec.c av_frame_move_ref(data, h->cur.f); f 38 libavcodec/cbs_vp9_syntax_template.c f(1, ten_or_twelve_bit); f 43 libavcodec/cbs_vp9_syntax_template.c f(3, color_space); f 46 libavcodec/cbs_vp9_syntax_template.c f(1, color_range); f 48 libavcodec/cbs_vp9_syntax_template.c f(1, subsampling_x); f 49 libavcodec/cbs_vp9_syntax_template.c f(1, subsampling_y); f 76 libavcodec/cbs_vp9_syntax_template.c f(16, frame_width_minus_1); f 77 libavcodec/cbs_vp9_syntax_template.c f(16, frame_height_minus_1); f 95 libavcodec/cbs_vp9_syntax_template.c f(1, render_and_frame_size_different); f 98 libavcodec/cbs_vp9_syntax_template.c f(16, render_width_minus_1); f 99 libavcodec/cbs_vp9_syntax_template.c f(16, render_height_minus_1); f 145 libavcodec/cbs_vp9_syntax_template.c f(1, is_filter_switchable); f 147 libavcodec/cbs_vp9_syntax_template.c f(2, raw_interpolation_filter_type); f 157 libavcodec/cbs_vp9_syntax_template.c f(6, loop_filter_level); f 158 libavcodec/cbs_vp9_syntax_template.c f(3, loop_filter_sharpness); f 160 libavcodec/cbs_vp9_syntax_template.c f(1, loop_filter_delta_enabled); f 162 libavcodec/cbs_vp9_syntax_template.c f(1, loop_filter_delta_update); f 185 libavcodec/cbs_vp9_syntax_template.c f(8, base_q_idx); f 202 libavcodec/cbs_vp9_syntax_template.c f(1, segmentation_enabled); f 205 libavcodec/cbs_vp9_syntax_template.c f(1, segmentation_update_map); f 209 libavcodec/cbs_vp9_syntax_template.c f(1, segmentation_temporal_update); f 218 libavcodec/cbs_vp9_syntax_template.c f(1, segmentation_update_data); f 220 libavcodec/cbs_vp9_syntax_template.c f(1, segmentation_abs_or_delta_update); f 271 libavcodec/cbs_vp9_syntax_template.c f(2, frame_marker); f 273 libavcodec/cbs_vp9_syntax_template.c f(1, profile_low_bit); f 274 libavcodec/cbs_vp9_syntax_template.c f(1, profile_high_bit); f 279 libavcodec/cbs_vp9_syntax_template.c f(1, show_existing_frame); f 281 libavcodec/cbs_vp9_syntax_template.c f(3, frame_to_show_map_idx); f 288 libavcodec/cbs_vp9_syntax_template.c f(1, frame_type); f 289 libavcodec/cbs_vp9_syntax_template.c f(1, show_frame); f 290 libavcodec/cbs_vp9_syntax_template.c f(1, error_resilient_mode); f 302 libavcodec/cbs_vp9_syntax_template.c f(1, intra_only); f 307 libavcodec/cbs_vp9_syntax_template.c f(2, reset_frame_context); f 326 libavcodec/cbs_vp9_syntax_template.c f(8, refresh_frame_flags); f 331 libavcodec/cbs_vp9_syntax_template.c f(8, refresh_frame_flags); f 340 libavcodec/cbs_vp9_syntax_template.c f(1, allow_high_precision_mv); f 346 libavcodec/cbs_vp9_syntax_template.c f(1, refresh_frame_context); f 347 libavcodec/cbs_vp9_syntax_template.c f(1, frame_parallel_decoding_mode); f 353 libavcodec/cbs_vp9_syntax_template.c f(2, frame_context_idx); f 360 libavcodec/cbs_vp9_syntax_template.c f(16, header_size_in_bytes); f 414 libavcodec/cbs_vp9_syntax_template.c f(3, superframe_marker); f 415 libavcodec/cbs_vp9_syntax_template.c f(2, bytes_per_framesize_minus_1); f 416 libavcodec/cbs_vp9_syntax_template.c f(3, frames_in_superframe_minus_1); f 424 libavcodec/cbs_vp9_syntax_template.c f(3, superframe_marker); f 425 libavcodec/cbs_vp9_syntax_template.c f(2, bytes_per_framesize_minus_1); f 426 libavcodec/cbs_vp9_syntax_template.c f(3, frames_in_superframe_minus_1); f 387 libavcodec/cfhd.c ThreadFrame frame = { .f = data }; f 634 libavcodec/cfhd.c frame.f->width = f 635 libavcodec/cfhd.c frame.f->height = 0; f 376 libavcodec/cllc.c ThreadFrame frame = { .f = data }; f 40 libavcodec/cscd.c static void copy_frame_default(AVFrame *f, const uint8_t *src, f 44 libavcodec/cscd.c uint8_t *dst = f->data[0]; f 45 libavcodec/cscd.c dst += (height - 1) * f->linesize[0]; f 49 libavcodec/cscd.c dst -= f->linesize[0]; f 53 libavcodec/cscd.c static void add_frame_default(AVFrame *f, const uint8_t *src, f 57 libavcodec/cscd.c uint8_t *dst = f->data[0]; f 58 libavcodec/cscd.c dst += (height - 1) * f->linesize[0]; f 63 libavcodec/cscd.c dst -= f->linesize[0] + linelen; f 789 libavcodec/dca_lbr.c int f = s->framenum & 1; f 801 libavcodec/dca_lbr.c convert_lpc(s->lpc_coeff[f][ch][sb][i], &codes[i * 8]); f 831 libavcodec/dca_lbr.c int f = sb * s->limited_rate / s->nsubbands; f 832 libavcodec/dca_lbr.c int a = 18000 / (12 * f / 1000 + 100 + 40 * st) + 20 * ol; f 1491 libavcodec/dca_lbr.c int f = s->framenum & 1; f 1501 libavcodec/dca_lbr.c predict(samples, s->lpc_coeff[f^1][ch][sb][1], 16); f 1502 libavcodec/dca_lbr.c predict(samples + 16, s->lpc_coeff[f ][ch][sb][0], 64); f 1503 libavcodec/dca_lbr.c predict(samples + 80, s->lpc_coeff[f ][ch][sb][1], 48); f 1505 libavcodec/dca_lbr.c predict(samples, s->lpc_coeff[f^1][ch][sb][0], 16); f 1506 libavcodec/dca_lbr.c predict(samples + 16, s->lpc_coeff[f ][ch][sb][0], 112); f 113 libavcodec/dcaenc.c static double hom(double f) f 115 libavcodec/dcaenc.c double f1 = f / 1000; f 123 libavcodec/dcaenc.c static double gammafilter(int i, double f) f 125 libavcodec/dcaenc.c double h = (f - fc[i]) / erb[i]; f 466 libavcodec/dcaenc.c typedef void (*walk_band_t)(DCAEncContext *c, int band1, int band2, int f, f 473 libavcodec/dcaenc.c int f; f 476 libavcodec/dcaenc.c for (f = 0; f < 4; f++) f 477 libavcodec/dcaenc.c walk(c, 0, 0, f, 0, -2047, channel, arg); f 479 libavcodec/dcaenc.c for (f = 0; f < 8; f++) f 480 libavcodec/dcaenc.c walk(c, band, band - 1, 8 * band - 4 + f, f 481 libavcodec/dcaenc.c c->band_spectrum[7 - f], c->band_spectrum[f], channel, arg); f 488 libavcodec/dcaenc.c int f; f 491 libavcodec/dcaenc.c for (f = 0; f < 4; f++) f 492 libavcodec/dcaenc.c walk(c, 31, 31, 256 - 4 + f, 0, -2047, channel, arg); f 494 libavcodec/dcaenc.c for (f = 0; f < 8; f++) f 495 libavcodec/dcaenc.c walk(c, band, band + 1, 8 * band + 4 + f, f 496 libavcodec/dcaenc.c c->band_spectrum[f], c->band_spectrum[7 - f], channel, arg); f 501 libavcodec/dcaenc.c int f, int32_t spectrum1, int32_t spectrum2, f 504 libavcodec/dcaenc.c int32_t value = c->eff_masking_curve_cb[f] - spectrum1; f 1966 libavcodec/diracdec.c static int get_buffer_with_edge(AVCodecContext *avctx, AVFrame *f, int flags) f 1975 libavcodec/diracdec.c f->width = avctx->width + 2 * EDGE_WIDTH; f 1976 libavcodec/diracdec.c f->height = avctx->height + 2 * EDGE_WIDTH + 2; f 1977 libavcodec/diracdec.c ret = ff_get_buffer(avctx, f, flags); f 1981 libavcodec/diracdec.c for (i = 0; f->data[i]; i++) { f 1983 libavcodec/diracdec.c f->linesize[i] + 32; f 1984 libavcodec/diracdec.c f->data[i] += offset; f 1986 libavcodec/diracdec.c f->width = avctx->width; f 1987 libavcodec/diracdec.c f->height = avctx->height; f 610 libavcodec/dnxhddec.c ThreadFrame frame = { .f = data }; f 1391 libavcodec/dvbsubdec.c FILE *f; f 1397 libavcodec/dvbsubdec.c f = fopen(fname, "w"); f 1398 libavcodec/dvbsubdec.c if (!f) { f 1402 libavcodec/dvbsubdec.c fprintf(f, "P6\n" f 1409 libavcodec/dvbsubdec.c putc((v >> 16) & 0xff, f); f 1410 libavcodec/dvbsubdec.c putc((v >> 8) & 0xff, f); f 1411 libavcodec/dvbsubdec.c putc((v >> 0) & 0xff, f); f 1414 libavcodec/dvbsubdec.c fclose(f); f 1419 libavcodec/dvbsubdec.c f = fopen(fname2, "w"); f 1420 libavcodec/dvbsubdec.c if (!f) { f 1424 libavcodec/dvbsubdec.c fprintf(f, "P5\n" f 1431 libavcodec/dvbsubdec.c putc((v >> 24) & 0xff, f); f 1434 libavcodec/dvbsubdec.c fclose(f); f 552 libavcodec/dvdec.c ThreadFrame frame = { .f = data }; f 573 libavcodec/dvdec.c s->frame = frame.f; f 574 libavcodec/dvdec.c frame.f->key_frame = 1; f 575 libavcodec/dvdec.c frame.f->pict_type = AV_PICTURE_TYPE_I; f 598 libavcodec/dvdec.c frame.f->interlaced_frame = 0; f 599 libavcodec/dvdec.c frame.f->top_field_first = 0; f 601 libavcodec/dvdec.c frame.f->interlaced_frame = 1; f 602 libavcodec/dvdec.c frame.f->top_field_first = (vsc_pack[3] & 0x40) == 0x40; f 604 libavcodec/dvdec.c frame.f->interlaced_frame = (vsc_pack[3] & 0x10) == 0x10; f 605 libavcodec/dvdec.c frame.f->top_field_first = !(vsc_pack[3] & 0x40); f 527 libavcodec/dvdsubdec.c FILE *f; f 529 libavcodec/dvdsubdec.c f = fopen(filename, "w"); f 530 libavcodec/dvdsubdec.c if (!f) { f 534 libavcodec/dvdsubdec.c fprintf(f, "P6\n" f 542 libavcodec/dvdsubdec.c putc(ALPHA_MIX(alpha, back[0], (v >> 16) & 0xff), f); f 543 libavcodec/dvdsubdec.c putc(ALPHA_MIX(alpha, back[1], (v >> 8) & 0xff), f); f 544 libavcodec/dvdsubdec.c putc(ALPHA_MIX(alpha, back[2], (v >> 0) & 0xff), f); f 547 libavcodec/dvdsubdec.c fclose(f); f 1214 libavcodec/dxv.c tframe.f = data; f 1221 libavcodec/dxv.c tframe.f, NULL, ctx->slice_count); f 1224 libavcodec/dxv.c tframe.f->pict_type = AV_PICTURE_TYPE_I; f 1225 libavcodec/dxv.c tframe.f->key_frame = 1; f 59 libavcodec/dxva2_h264.c ff_dxva2_get_surface_index(avctx, ctx, current_picture->f), f 75 libavcodec/dxva2_h264.c ff_dxva2_get_surface_index(avctx, ctx, r->f), f 253 libavcodec/dxva2_h264.c index = ff_dxva2_get_surface_index(avctx, ctx, r->f); f 255 libavcodec/dxva2_h264.c index = get_refpic_index(pp, ff_dxva2_get_surface_index(avctx, ctx, r->f)); f 507 libavcodec/dxva2_h264.c ret = ff_dxva2_common_end_frame(avctx, h->cur_pic_ptr->f, f 49 libavcodec/dxva2_mpeg2.c pp->wDecodedPictureIndex = ff_dxva2_get_surface_index(avctx, ctx, current_picture->f); f 52 libavcodec/dxva2_mpeg2.c pp->wForwardRefPictureIndex = ff_dxva2_get_surface_index(avctx, ctx, s->last_picture.f); f 56 libavcodec/dxva2_mpeg2.c pp->wBackwardRefPictureIndex = ff_dxva2_get_surface_index(avctx, ctx, s->next_picture.f); f 307 libavcodec/dxva2_mpeg2.c ret = ff_dxva2_common_end_frame(avctx, s->current_picture_ptr->f, f 57 libavcodec/dxva2_vc1.c pp->wDeblockedPictureIndex = ff_dxva2_get_surface_index(avctx, ctx, current_picture->f); f 59 libavcodec/dxva2_vc1.c pp->wForwardRefPictureIndex = ff_dxva2_get_surface_index(avctx, ctx, s->last_picture.f); f 63 libavcodec/dxva2_vc1.c pp->wBackwardRefPictureIndex = ff_dxva2_get_surface_index(avctx, ctx, s->next_picture.f); f 368 libavcodec/dxva2_vc1.c ret = ff_dxva2_common_end_frame(avctx, v->s.current_picture_ptr->f, f 54 libavcodec/dxva2_vp9.c fill_picture_entry(&pp->CurrPic, ff_dxva2_get_surface_index(avctx, ctx, h->frames[CUR_FRAME].tf.f), 0); f 80 libavcodec/dxva2_vp9.c if (h->refs[i].f->buf[0]) { f 81 libavcodec/dxva2_vp9.c fill_picture_entry(&pp->ref_frame_map[i], ff_dxva2_get_surface_index(avctx, ctx, h->refs[i].f), 0); f 82 libavcodec/dxva2_vp9.c pp->ref_frame_coded_width[i] = h->refs[i].f->width; f 83 libavcodec/dxva2_vp9.c pp->ref_frame_coded_height[i] = h->refs[i].f->height; f 90 libavcodec/dxva2_vp9.c if (h->refs[refidx].f->buf[0]) f 91 libavcodec/dxva2_vp9.c fill_picture_entry(&pp->frame_refs[i], ff_dxva2_get_surface_index(avctx, ctx, h->refs[refidx].f), 0); f 300 libavcodec/dxva2_vp9.c ret = ff_dxva2_common_end_frame(avctx, h->frames[CUR_FRAME].tf.f, f 62 libavcodec/error_resilience.c int *linesize = s->cur_pic.f->linesize; f 402 libavcodec/error_resilience.c if (s->last_pic.f && s->last_pic.f->data[0]) f 403 libavcodec/error_resilience.c mb_height = FFMIN(mb_height, (s->last_pic.f->height+15)>>4); f 404 libavcodec/error_resilience.c if (s->next_pic.f && s->next_pic.f->data[0]) f 405 libavcodec/error_resilience.c mb_height = FFMIN(mb_height, (s->next_pic.f->height+15)>>4); f 418 libavcodec/error_resilience.c int f = 0; f 422 libavcodec/error_resilience.c f = MV_FROZEN; // intra // FIXME check f 424 libavcodec/error_resilience.c f = MV_FROZEN; // inter with undamaged MV f 426 libavcodec/error_resilience.c fixed[mb_xy] = f; f 427 libavcodec/error_resilience.c if (f == MV_FROZEN) f 429 libavcodec/error_resilience.c else if(s->last_pic.f->data[0] && s->last_pic.motion_val[0]){ f 444 libavcodec/error_resilience.c int mv_dir = (s->last_pic.f && s->last_pic.f->data[0]) ? MV_DIR_FORWARD : MV_DIR_BACKWARD; f 502 libavcodec/error_resilience.c av_assert1(s->last_pic.f && s->last_pic.f->data[0]); f 626 libavcodec/error_resilience.c int *linesize = s->cur_pic.f->linesize; f 628 libavcodec/error_resilience.c uint8_t *src = s->cur_pic.f->data[0] + f 726 libavcodec/error_resilience.c if (!s->last_pic.f || !s->last_pic.f->data[0]) f 746 libavcodec/error_resilience.c s->cur_pic.f->pict_type == AV_PICTURE_TYPE_I) f 767 libavcodec/error_resilience.c if (s->cur_pic.f->pict_type == AV_PICTURE_TYPE_I) { f 768 libavcodec/error_resilience.c int *linesize = s->cur_pic.f->linesize; f 769 libavcodec/error_resilience.c uint8_t *mb_ptr = s->cur_pic.f->data[0] + f 771 libavcodec/error_resilience.c uint8_t *last_mb_ptr = s->last_pic.f->data[0] + f 816 libavcodec/error_resilience.c !s->cur_pic.f || f 919 libavcodec/error_resilience.c linesize = s->cur_pic.f->linesize; f 935 libavcodec/error_resilience.c if (s->last_pic.f) { f 936 libavcodec/error_resilience.c if (s->last_pic.f->width != s->cur_pic.f->width || f 937 libavcodec/error_resilience.c s->last_pic.f->height != s->cur_pic.f->height || f 938 libavcodec/error_resilience.c s->last_pic.f->format != s->cur_pic.f->format) { f 943 libavcodec/error_resilience.c if (s->next_pic.f) { f 944 libavcodec/error_resilience.c if (s->next_pic.f->width != s->cur_pic.f->width || f 945 libavcodec/error_resilience.c s->next_pic.f->height != s->cur_pic.f->height || f 946 libavcodec/error_resilience.c s->next_pic.f->format != s->cur_pic.f->format) { f 1122 libavcodec/error_resilience.c dc_error, ac_error, mv_error, av_get_picture_type_char(s->cur_pic.f->pict_type)); f 1124 libavcodec/error_resilience.c s->cur_pic.f->decode_error_flags |= FF_DECODE_ERROR_CONCEALMENT_ACTIVE; f 1142 libavcodec/error_resilience.c if (!(s->last_pic.f && s->last_pic.f->data[0]) && f 1143 libavcodec/error_resilience.c !(s->next_pic.f && s->next_pic.f->data[0])) f 1155 libavcodec/error_resilience.c const int dir = !(s->last_pic.f && s->last_pic.f->data[0]); f 1188 libavcodec/error_resilience.c if (s->cur_pic.f->pict_type == AV_PICTURE_TYPE_B) { f 1205 libavcodec/error_resilience.c if (!(s->last_pic.f && s->last_pic.f->data[0])) f 1207 libavcodec/error_resilience.c if (!(s->next_pic.f && s->next_pic.f->data[0])) f 1254 libavcodec/error_resilience.c dest_y = s->cur_pic.f->data[0] + mb_x * 16 + mb_y * 16 * linesize[0]; f 1255 libavcodec/error_resilience.c dest_cb = s->cur_pic.f->data[1] + mb_x * 8 + mb_y * 8 * linesize[1]; f 1256 libavcodec/error_resilience.c dest_cr = s->cur_pic.f->data[2] + mb_x * 8 + mb_y * 8 * linesize[2]; f 1270 libavcodec/error_resilience.c if (!s->cur_pic.f->data[2]) f 1310 libavcodec/error_resilience.c dest_y = s->cur_pic.f->data[0] + mb_x * 16 + mb_y * 16 * linesize[0]; f 1311 libavcodec/error_resilience.c dest_cb = s->cur_pic.f->data[1] + mb_x * 8 + mb_y * 8 * linesize[1]; f 1312 libavcodec/error_resilience.c dest_cr = s->cur_pic.f->data[2] + mb_x * 8 + mb_y * 8 * linesize[2]; f 1313 libavcodec/error_resilience.c if (!s->cur_pic.f->data[2]) f 1323 libavcodec/error_resilience.c h_block_filter(s, s->cur_pic.f->data[0], s->mb_width * 2, f 1327 libavcodec/error_resilience.c v_block_filter(s, s->cur_pic.f->data[0], s->mb_width * 2, f 1330 libavcodec/error_resilience.c if (s->cur_pic.f->data[2]) { f 1331 libavcodec/error_resilience.c h_block_filter(s, s->cur_pic.f->data[1], s->mb_width, f 1333 libavcodec/error_resilience.c h_block_filter(s, s->cur_pic.f->data[2], s->mb_width, f 1335 libavcodec/error_resilience.c v_block_filter(s, s->cur_pic.f->data[1], s->mb_width, f 1337 libavcodec/error_resilience.c v_block_filter(s, s->cur_pic.f->data[2], s->mb_width, f 1348 libavcodec/error_resilience.c if (s->mbskip_table && s->cur_pic.f->pict_type != AV_PICTURE_TYPE_B && f 42 libavcodec/error_resilience.h AVFrame *f; f 378 libavcodec/evrcdec.c float *f; f 390 libavcodec/evrcdec.c f = ex - offset - 8; f 396 libavcodec/evrcdec.c ex[0] += e->interpolation_coeffs[coef_idx + i] * f[i]; f 655 libavcodec/evrcdec.c tmp[SUBFRAME_SIZE + 6], f; f 725 libavcodec/evrcdec.c f = 0.1 * e->avg_fcb_gain; f 727 libavcodec/evrcdec.c e->pitch[ACB_SIZE + j] += f; f 859 libavcodec/evrcdec.c float acb_sum, f; f 861 libavcodec/evrcdec.c f = exp((e->bitrate == RATE_HALF ? 0.5 : 0.25) f 865 libavcodec/evrcdec.c e->avg_fcb_gain += f / NB_SUBFRAMES; f 874 libavcodec/evrcdec.c e->pitch[ACB_SIZE + j] += f * tmp[j]; f 189 libavcodec/exr.c union av_intfloat32 f; f 222 libavcodec/exr.c f.i = (sign << 31) | exp | mantissa; f 224 libavcodec/exr.c return f; f 1166 libavcodec/exr.c t.f = trc_func(t.f); f 1172 libavcodec/exr.c if (t.f > 0.0f && c < 3) /* avoid negative values */ f 1173 libavcodec/exr.c t.f = powf(t.f, one_gamma); f 1653 libavcodec/exr.c ThreadFrame frame = { .f = data }; f 1842 libavcodec/exr.c t.f = trc_func(t.f); f 1854 libavcodec/exr.c if (t.f <= 0.0f) { f 1857 libavcodec/exr.c t.f = powf(t.f, one_gamma); f 51 libavcodec/ffv1.c s->picture.f = av_frame_alloc(); f 52 libavcodec/ffv1.c s->last_picture.f = av_frame_alloc(); f 53 libavcodec/ffv1.c if (!s->picture.f || !s->last_picture.f) f 66 libavcodec/ffv1.c av_cold int ff_ffv1_init_slice_state(FFV1Context *f, FFV1Context *fs) f 70 libavcodec/ffv1.c fs->plane_count = f->plane_count; f 71 libavcodec/ffv1.c fs->transparency = f->transparency; f 72 libavcodec/ffv1.c for (j = 0; j < f->plane_count; j++) { f 97 libavcodec/ffv1.c fs->c. one_state[ j] = f->state_transition[j]; f 105 libavcodec/ffv1.c av_cold int ff_ffv1_init_slices_state(FFV1Context *f) f 108 libavcodec/ffv1.c for (i = 0; i < f->max_slice_count; i++) { f 109 libavcodec/ffv1.c FFV1Context *fs = f->slice_context[i]; f 110 libavcodec/ffv1.c if ((ret = ff_ffv1_init_slice_state(f, fs)) < 0) f 116 libavcodec/ffv1.c av_cold int ff_ffv1_init_slice_contexts(FFV1Context *f) f 120 libavcodec/ffv1.c f->max_slice_count = f->num_h_slices * f->num_v_slices; f 121 libavcodec/ffv1.c av_assert0(f->max_slice_count > 0); f 123 libavcodec/ffv1.c for (i = 0; i < f->max_slice_count; i++) { f 124 libavcodec/ffv1.c int sx = i % f->num_h_slices; f 125 libavcodec/ffv1.c int sy = i / f->num_h_slices; f 126 libavcodec/ffv1.c int sxs = f->avctx->width * sx / f->num_h_slices; f 127 libavcodec/ffv1.c int sxe = f->avctx->width * (sx + 1) / f->num_h_slices; f 128 libavcodec/ffv1.c int sys = f->avctx->height * sy / f->num_v_slices; f 129 libavcodec/ffv1.c int sye = f->avctx->height * (sy + 1) / f->num_v_slices; f 135 libavcodec/ffv1.c f->slice_context[i] = fs; f 136 libavcodec/ffv1.c memcpy(fs, f, sizeof(*fs)); f 151 libavcodec/ffv1.c av_freep(&f->slice_context[i]); f 159 libavcodec/ffv1.c av_freep(&f->slice_context[i]->sample_buffer); f 160 libavcodec/ffv1.c av_freep(&f->slice_context[i]->sample_buffer32); f 161 libavcodec/ffv1.c av_freep(&f->slice_context[i]); f 166 libavcodec/ffv1.c int ff_ffv1_allocate_initial_states(FFV1Context *f) f 170 libavcodec/ffv1.c for (i = 0; i < f->quant_table_count; i++) { f 171 libavcodec/ffv1.c f->initial_states[i] = av_malloc_array(f->context_count[i], f 172 libavcodec/ffv1.c sizeof(*f->initial_states[i])); f 173 libavcodec/ffv1.c if (!f->initial_states[i]) f 175 libavcodec/ffv1.c memset(f->initial_states[i], 128, f 176 libavcodec/ffv1.c f->context_count[i] * sizeof(*f->initial_states[i])); f 181 libavcodec/ffv1.c void ff_ffv1_clear_slice_state(FFV1Context *f, FFV1Context *fs) f 185 libavcodec/ffv1.c for (i = 0; i < f->plane_count; i++) { f 192 libavcodec/ffv1.c if (f->initial_states[p->quant_table_index]) { f 193 libavcodec/ffv1.c memcpy(p->state, f->initial_states[p->quant_table_index], f 214 libavcodec/ffv1.c if (s->picture.f) f 216 libavcodec/ffv1.c av_frame_free(&s->picture.f); f 218 libavcodec/ffv1.c if (s->last_picture.f) f 220 libavcodec/ffv1.c av_frame_free(&s->last_picture.f); f 143 libavcodec/ffv1.h int ff_ffv1_init_slice_state(FFV1Context *f, FFV1Context *fs); f 144 libavcodec/ffv1.h int ff_ffv1_init_slices_state(FFV1Context *f); f 145 libavcodec/ffv1.h int ff_ffv1_init_slice_contexts(FFV1Context *f); f 146 libavcodec/ffv1.h int ff_ffv1_allocate_initial_states(FFV1Context *f); f 147 libavcodec/ffv1.h void ff_ffv1_clear_slice_state(FFV1Context *f, FFV1Context *fs); f 164 libavcodec/ffv1dec.c static int decode_slice_header(FFV1Context *f, FFV1Context *fs) f 171 libavcodec/ffv1dec.c av_assert0(f->version > 2); f 173 libavcodec/ffv1dec.c fs->slice_x = get_symbol(c, state, 0) * f->width ; f 174 libavcodec/ffv1dec.c fs->slice_y = get_symbol(c, state, 0) * f->height; f 175 libavcodec/ffv1dec.c fs->slice_width = (get_symbol(c, state, 0) + 1) * f->width + fs->slice_x; f 176 libavcodec/ffv1dec.c fs->slice_height = (get_symbol(c, state, 0) + 1) * f->height + fs->slice_y; f 178 libavcodec/ffv1dec.c fs->slice_x /= f->num_h_slices; f 179 libavcodec/ffv1dec.c fs->slice_y /= f->num_v_slices; f 180 libavcodec/ffv1dec.c fs->slice_width = fs->slice_width /f->num_h_slices - fs->slice_x; f 181 libavcodec/ffv1dec.c fs->slice_height = fs->slice_height/f->num_v_slices - fs->slice_y; f 182 libavcodec/ffv1dec.c if ((unsigned)fs->slice_width > f->width || (unsigned)fs->slice_height > f->height) f 184 libavcodec/ffv1dec.c if ( (unsigned)fs->slice_x + (uint64_t)fs->slice_width > f->width f 185 libavcodec/ffv1dec.c || (unsigned)fs->slice_y + (uint64_t)fs->slice_height > f->height) f 188 libavcodec/ffv1dec.c for (i = 0; i < f->plane_count; i++) { f 191 libavcodec/ffv1dec.c if (idx >= (unsigned)f->quant_table_count) { f 192 libavcodec/ffv1dec.c av_log(f->avctx, AV_LOG_ERROR, "quant_table_index out of range\n"); f 196 libavcodec/ffv1dec.c memcpy(p->quant_table, f->quant_tables[idx], sizeof(p->quant_table)); f 197 libavcodec/ffv1dec.c context_count = f->context_count[idx]; f 208 libavcodec/ffv1dec.c f->cur->interlaced_frame = 1; f 209 libavcodec/ffv1dec.c f->cur->top_field_first = 1; f 211 libavcodec/ffv1dec.c f->cur->interlaced_frame = 1; f 212 libavcodec/ffv1dec.c f->cur->top_field_first = 0; f 214 libavcodec/ffv1dec.c f->cur->interlaced_frame = 0; f 216 libavcodec/ffv1dec.c f->cur->sample_aspect_ratio.num = get_symbol(c, state, 0); f 217 libavcodec/ffv1dec.c f->cur->sample_aspect_ratio.den = get_symbol(c, state, 0); f 219 libavcodec/ffv1dec.c if (av_image_check_sar(f->width, f->height, f 220 libavcodec/ffv1dec.c f->cur->sample_aspect_ratio) < 0) { f 221 libavcodec/ffv1dec.c av_log(f->avctx, AV_LOG_WARNING, "ignoring invalid SAR: %u/%u\n", f 222 libavcodec/ffv1dec.c f->cur->sample_aspect_ratio.num, f 223 libavcodec/ffv1dec.c f->cur->sample_aspect_ratio.den); f 224 libavcodec/ffv1dec.c f->cur->sample_aspect_ratio = (AVRational){ 0, 1 }; f 234 libavcodec/ffv1dec.c av_log(f->avctx, AV_LOG_ERROR, "slice_rct_y_coef out of range\n"); f 246 libavcodec/ffv1dec.c FFV1Context *f = fs->avctx->priv_data; f 249 libavcodec/ffv1dec.c AVFrame * const p = f->cur; f 252 libavcodec/ffv1dec.c for( si=0; fs != f->slice_context[si]; si ++) f 255 libavcodec/ffv1dec.c if(f->fsrc && !p->key_frame) f 256 libavcodec/ffv1dec.c ff_thread_await_progress(&f->last_picture, si, 0); f 258 libavcodec/ffv1dec.c if(f->fsrc && !p->key_frame) { f 259 libavcodec/ffv1dec.c FFV1Context *fssrc = f->fsrc->slice_context[si]; f 260 libavcodec/ffv1dec.c FFV1Context *fsdst = f->slice_context[si]; f 267 libavcodec/ffv1dec.c for (i = 0; i < f->plane_count; i++) { f 290 libavcodec/ffv1dec.c if (f->version > 2) { f 291 libavcodec/ffv1dec.c if (ff_ffv1_init_slice_state(f, fs) < 0) f 293 libavcodec/ffv1dec.c if (decode_slice_header(f, fs) < 0) { f 299 libavcodec/ffv1dec.c if ((ret = ff_ffv1_init_slice_state(f, fs)) < 0) f 301 libavcodec/ffv1dec.c if (f->cur->key_frame || fs->slice_reset_contexts) f 302 libavcodec/ffv1dec.c ff_ffv1_clear_slice_state(f, fs); f 310 libavcodec/ffv1dec.c if (f->version == 3 && f->micro_version > 1 || f->version > 3) f 312 libavcodec/ffv1dec.c fs->ac_byte_count = f->version > 2 || (!x && !y) ? fs->c.bytestream - fs->c.bytestream_start - 1 : 0; f 319 libavcodec/ffv1dec.c if (f->colorspace == 0 && (f->chroma_planes || !fs->transparency)) { f 320 libavcodec/ffv1dec.c const int chroma_width = AV_CEIL_RSHIFT(width, f->chroma_h_shift); f 321 libavcodec/ffv1dec.c const int chroma_height = AV_CEIL_RSHIFT(height, f->chroma_v_shift); f 322 libavcodec/ffv1dec.c const int cx = x >> f->chroma_h_shift; f 323 libavcodec/ffv1dec.c const int cy = y >> f->chroma_v_shift; f 326 libavcodec/ffv1dec.c if (f->chroma_planes) { f 331 libavcodec/ffv1dec.c decode_plane(fs, p->data[3] + ps*x + y*p->linesize[3], width, height, p->linesize[3], (f->version >= 4 && !f->chroma_planes) ? 1 : 2, 1); f 332 libavcodec/ffv1dec.c } else if (f->colorspace == 0) { f 335 libavcodec/ffv1dec.c } else if (f->use32bit) { f 348 libavcodec/ffv1dec.c if (fs->ac != AC_GOLOMB_RICE && f->version > 2) { f 351 libavcodec/ffv1dec.c v = fs->c.bytestream_end - fs->c.bytestream - 2 - 5*f->ec; f 353 libavcodec/ffv1dec.c av_log(f->avctx, AV_LOG_ERROR, "bytestream end mismatching by %d\n", v); f 360 libavcodec/ffv1dec.c ff_thread_report_progress(&f->picture, si, 0); f 410 libavcodec/ffv1dec.c static int read_extra_header(FFV1Context *f) f 412 libavcodec/ffv1dec.c RangeCoder *const c = &f->c; f 421 libavcodec/ffv1dec.c ff_init_range_decoder(c, f->avctx->extradata, f->avctx->extradata_size); f 424 libavcodec/ffv1dec.c f->version = get_symbol(c, state, 0); f 425 libavcodec/ffv1dec.c if (f->version < 2) { f 426 libavcodec/ffv1dec.c av_log(f->avctx, AV_LOG_ERROR, "Invalid version in global header\n"); f 429 libavcodec/ffv1dec.c if (f->version > 2) { f 431 libavcodec/ffv1dec.c f->micro_version = get_symbol(c, state, 0); f 432 libavcodec/ffv1dec.c if (f->micro_version < 0) f 435 libavcodec/ffv1dec.c f->ac = get_symbol(c, state, 0); f 437 libavcodec/ffv1dec.c if (f->ac == AC_RANGE_CUSTOM_TAB) { f 439 libavcodec/ffv1dec.c f->state_transition[i] = get_symbol(c, state, 1) + c->one_state[i]; f 442 libavcodec/ffv1dec.c f->colorspace = get_symbol(c, state, 0); //YUV cs type f 443 libavcodec/ffv1dec.c f->avctx->bits_per_raw_sample = get_symbol(c, state, 0); f 444 libavcodec/ffv1dec.c f->chroma_planes = get_rac(c, state); f 445 libavcodec/ffv1dec.c f->chroma_h_shift = get_symbol(c, state, 0); f 446 libavcodec/ffv1dec.c f->chroma_v_shift = get_symbol(c, state, 0); f 447 libavcodec/ffv1dec.c f->transparency = get_rac(c, state); f 448 libavcodec/ffv1dec.c f->plane_count = 1 + (f->chroma_planes || f->version<4) + f->transparency; f 449 libavcodec/ffv1dec.c f->num_h_slices = 1 + get_symbol(c, state, 0); f 450 libavcodec/ffv1dec.c f->num_v_slices = 1 + get_symbol(c, state, 0); f 452 libavcodec/ffv1dec.c if (f->chroma_h_shift > 4U || f->chroma_v_shift > 4U) { f 453 libavcodec/ffv1dec.c av_log(f->avctx, AV_LOG_ERROR, "chroma shift parameters %d %d are invalid\n", f 454 libavcodec/ffv1dec.c f->chroma_h_shift, f->chroma_v_shift); f 458 libavcodec/ffv1dec.c if (f->num_h_slices > (unsigned)f->width || !f->num_h_slices || f 459 libavcodec/ffv1dec.c f->num_v_slices > (unsigned)f->height || !f->num_v_slices f 461 libavcodec/ffv1dec.c av_log(f->avctx, AV_LOG_ERROR, "slice count invalid\n"); f 465 libavcodec/ffv1dec.c f->quant_table_count = get_symbol(c, state, 0); f 466 libavcodec/ffv1dec.c if (f->quant_table_count > (unsigned)MAX_QUANT_TABLES || !f->quant_table_count) { f 467 libavcodec/ffv1dec.c av_log(f->avctx, AV_LOG_ERROR, "quant table count %d is invalid\n", f->quant_table_count); f 468 libavcodec/ffv1dec.c f->quant_table_count = 0; f 472 libavcodec/ffv1dec.c for (i = 0; i < f->quant_table_count; i++) { f 473 libavcodec/ffv1dec.c f->context_count[i] = read_quant_tables(c, f->quant_tables[i]); f 474 libavcodec/ffv1dec.c if (f->context_count[i] < 0) { f 475 libavcodec/ffv1dec.c av_log(f->avctx, AV_LOG_ERROR, "read_quant_table error\n"); f 479 libavcodec/ffv1dec.c if ((ret = ff_ffv1_allocate_initial_states(f)) < 0) f 482 libavcodec/ffv1dec.c for (i = 0; i < f->quant_table_count; i++) f 484 libavcodec/ffv1dec.c for (j = 0; j < f->context_count[i]; j++) f 486 libavcodec/ffv1dec.c int pred = j ? f->initial_states[i][j - 1][k] : 128; f 487 libavcodec/ffv1dec.c f->initial_states[i][j][k] = f 492 libavcodec/ffv1dec.c if (f->version > 2) { f 493 libavcodec/ffv1dec.c f->ec = get_symbol(c, state, 0); f 494 libavcodec/ffv1dec.c if (f->micro_version > 2) f 495 libavcodec/ffv1dec.c f->intra = get_symbol(c, state, 0); f 498 libavcodec/ffv1dec.c if (f->version > 2) { f 501 libavcodec/ffv1dec.c f->avctx->extradata, f->avctx->extradata_size); f 502 libavcodec/ffv1dec.c if (v || f->avctx->extradata_size < 4) { f 503 libavcodec/ffv1dec.c av_log(f->avctx, AV_LOG_ERROR, "CRC mismatch %X!\n", v); f 506 libavcodec/ffv1dec.c crc = AV_RB32(f->avctx->extradata + f->avctx->extradata_size - 4); f 509 libavcodec/ffv1dec.c if (f->avctx->debug & FF_DEBUG_PICT_INFO) f 510 libavcodec/ffv1dec.c av_log(f->avctx, AV_LOG_DEBUG, f 512 libavcodec/ffv1dec.c f->version, f->micro_version, f 513 libavcodec/ffv1dec.c f->ac, f 514 libavcodec/ffv1dec.c f->colorspace, f 515 libavcodec/ffv1dec.c f->avctx->bits_per_raw_sample, f 516 libavcodec/ffv1dec.c f->chroma_planes, f->chroma_h_shift, f->chroma_v_shift, f 517 libavcodec/ffv1dec.c f->transparency, f 518 libavcodec/ffv1dec.c f->num_h_slices, f->num_v_slices, f 519 libavcodec/ffv1dec.c f->quant_table_count, f 520 libavcodec/ffv1dec.c f->ec, f 521 libavcodec/ffv1dec.c f->intra, f 527 libavcodec/ffv1dec.c static int read_header(FFV1Context *f) f 531 libavcodec/ffv1dec.c RangeCoder *const c = &f->slice_context[0]->c; f 535 libavcodec/ffv1dec.c if (f->version < 2) { f 539 libavcodec/ffv1dec.c av_log(f->avctx, AV_LOG_ERROR, "invalid version %d in ver01 header\n", v); f 542 libavcodec/ffv1dec.c f->version = v; f 543 libavcodec/ffv1dec.c f->ac = get_symbol(c, state, 0); f 545 libavcodec/ffv1dec.c if (f->ac == AC_RANGE_CUSTOM_TAB) { f 549 libavcodec/ffv1dec.c av_log(f->avctx, AV_LOG_ERROR, "invalid state transition %d\n", st); f 552 libavcodec/ffv1dec.c f->state_transition[i] = st; f 557 libavcodec/ffv1dec.c bits_per_raw_sample = f->version > 0 ? get_symbol(c, state, 0) : f->avctx->bits_per_raw_sample; f 562 libavcodec/ffv1dec.c if (colorspace == 0 && f->avctx->skip_alpha) f 565 libavcodec/ffv1dec.c if (f->plane_count) { f 566 libavcodec/ffv1dec.c if (colorspace != f->colorspace || f 567 libavcodec/ffv1dec.c bits_per_raw_sample != f->avctx->bits_per_raw_sample || f 568 libavcodec/ffv1dec.c chroma_planes != f->chroma_planes || f 569 libavcodec/ffv1dec.c chroma_h_shift != f->chroma_h_shift || f 570 libavcodec/ffv1dec.c chroma_v_shift != f->chroma_v_shift || f 571 libavcodec/ffv1dec.c transparency != f->transparency) { f 572 libavcodec/ffv1dec.c av_log(f->avctx, AV_LOG_ERROR, "Invalid change of global parameters\n"); f 578 libavcodec/ffv1dec.c av_log(f->avctx, AV_LOG_ERROR, "chroma shift parameters %d %d are invalid\n", f 583 libavcodec/ffv1dec.c f->colorspace = colorspace; f 584 libavcodec/ffv1dec.c f->avctx->bits_per_raw_sample = bits_per_raw_sample; f 585 libavcodec/ffv1dec.c f->chroma_planes = chroma_planes; f 586 libavcodec/ffv1dec.c f->chroma_h_shift = chroma_h_shift; f 587 libavcodec/ffv1dec.c f->chroma_v_shift = chroma_v_shift; f 588 libavcodec/ffv1dec.c f->transparency = transparency; f 590 libavcodec/ffv1dec.c f->plane_count = 2 + f->transparency; f 593 libavcodec/ffv1dec.c if (f->colorspace == 0) { f 594 libavcodec/ffv1dec.c if (!f->transparency && !f->chroma_planes) { f 595 libavcodec/ffv1dec.c if (f->avctx->bits_per_raw_sample <= 8) f 596 libavcodec/ffv1dec.c f->avctx->pix_fmt = AV_PIX_FMT_GRAY8; f 597 libavcodec/ffv1dec.c else if (f->avctx->bits_per_raw_sample == 9) { f 598 libavcodec/ffv1dec.c f->packed_at_lsb = 1; f 599 libavcodec/ffv1dec.c f->avctx->pix_fmt = AV_PIX_FMT_GRAY9; f 600 libavcodec/ffv1dec.c } else if (f->avctx->bits_per_raw_sample == 10) { f 601 libavcodec/ffv1dec.c f->packed_at_lsb = 1; f 602 libavcodec/ffv1dec.c f->avctx->pix_fmt = AV_PIX_FMT_GRAY10; f 603 libavcodec/ffv1dec.c } else if (f->avctx->bits_per_raw_sample == 12) { f 604 libavcodec/ffv1dec.c f->packed_at_lsb = 1; f 605 libavcodec/ffv1dec.c f->avctx->pix_fmt = AV_PIX_FMT_GRAY12; f 606 libavcodec/ffv1dec.c } else if (f->avctx->bits_per_raw_sample == 16) { f 607 libavcodec/ffv1dec.c f->packed_at_lsb = 1; f 608 libavcodec/ffv1dec.c f->avctx->pix_fmt = AV_PIX_FMT_GRAY16; f 609 libavcodec/ffv1dec.c } else if (f->avctx->bits_per_raw_sample < 16) { f 610 libavcodec/ffv1dec.c f->avctx->pix_fmt = AV_PIX_FMT_GRAY16; f 613 libavcodec/ffv1dec.c } else if (f->transparency && !f->chroma_planes) { f 614 libavcodec/ffv1dec.c if (f->avctx->bits_per_raw_sample <= 8) f 615 libavcodec/ffv1dec.c f->avctx->pix_fmt = AV_PIX_FMT_YA8; f 618 libavcodec/ffv1dec.c } else if (f->avctx->bits_per_raw_sample<=8 && !f->transparency) { f 619 libavcodec/ffv1dec.c switch(16 * f->chroma_h_shift + f->chroma_v_shift) { f 620 libavcodec/ffv1dec.c case 0x00: f->avctx->pix_fmt = AV_PIX_FMT_YUV444P; break; f 621 libavcodec/ffv1dec.c case 0x01: f->avctx->pix_fmt = AV_PIX_FMT_YUV440P; break; f 622 libavcodec/ffv1dec.c case 0x10: f->avctx->pix_fmt = AV_PIX_FMT_YUV422P; break; f 623 libavcodec/ffv1dec.c case 0x11: f->avctx->pix_fmt = AV_PIX_FMT_YUV420P; break; f 624 libavcodec/ffv1dec.c case 0x20: f->avctx->pix_fmt = AV_PIX_FMT_YUV411P; break; f 625 libavcodec/ffv1dec.c case 0x22: f->avctx->pix_fmt = AV_PIX_FMT_YUV410P; break; f 627 libavcodec/ffv1dec.c } else if (f->avctx->bits_per_raw_sample <= 8 && f->transparency) { f 628 libavcodec/ffv1dec.c switch(16*f->chroma_h_shift + f->chroma_v_shift) { f 629 libavcodec/ffv1dec.c case 0x00: f->avctx->pix_fmt = AV_PIX_FMT_YUVA444P; break; f 630 libavcodec/ffv1dec.c case 0x10: f->avctx->pix_fmt = AV_PIX_FMT_YUVA422P; break; f 631 libavcodec/ffv1dec.c case 0x11: f->avctx->pix_fmt = AV_PIX_FMT_YUVA420P; break; f 633 libavcodec/ffv1dec.c } else if (f->avctx->bits_per_raw_sample == 9 && !f->transparency) { f 634 libavcodec/ffv1dec.c f->packed_at_lsb = 1; f 635 libavcodec/ffv1dec.c switch(16 * f->chroma_h_shift + f->chroma_v_shift) { f 636 libavcodec/ffv1dec.c case 0x00: f->avctx->pix_fmt = AV_PIX_FMT_YUV444P9; break; f 637 libavcodec/ffv1dec.c case 0x10: f->avctx->pix_fmt = AV_PIX_FMT_YUV422P9; break; f 638 libavcodec/ffv1dec.c case 0x11: f->avctx->pix_fmt = AV_PIX_FMT_YUV420P9; break; f 640 libavcodec/ffv1dec.c } else if (f->avctx->bits_per_raw_sample == 9 && f->transparency) { f 641 libavcodec/ffv1dec.c f->packed_at_lsb = 1; f 642 libavcodec/ffv1dec.c switch(16 * f->chroma_h_shift + f->chroma_v_shift) { f 643 libavcodec/ffv1dec.c case 0x00: f->avctx->pix_fmt = AV_PIX_FMT_YUVA444P9; break; f 644 libavcodec/ffv1dec.c case 0x10: f->avctx->pix_fmt = AV_PIX_FMT_YUVA422P9; break; f 645 libavcodec/ffv1dec.c case 0x11: f->avctx->pix_fmt = AV_PIX_FMT_YUVA420P9; break; f 647 libavcodec/ffv1dec.c } else if (f->avctx->bits_per_raw_sample == 10 && !f->transparency) { f 648 libavcodec/ffv1dec.c f->packed_at_lsb = 1; f 649 libavcodec/ffv1dec.c switch(16 * f->chroma_h_shift + f->chroma_v_shift) { f 650 libavcodec/ffv1dec.c case 0x00: f->avctx->pix_fmt = AV_PIX_FMT_YUV444P10; break; f 651 libavcodec/ffv1dec.c case 0x01: f->avctx->pix_fmt = AV_PIX_FMT_YUV440P10; break; f 652 libavcodec/ffv1dec.c case 0x10: f->avctx->pix_fmt = AV_PIX_FMT_YUV422P10; break; f 653 libavcodec/ffv1dec.c case 0x11: f->avctx->pix_fmt = AV_PIX_FMT_YUV420P10; break; f 655 libavcodec/ffv1dec.c } else if (f->avctx->bits_per_raw_sample == 10 && f->transparency) { f 656 libavcodec/ffv1dec.c f->packed_at_lsb = 1; f 657 libavcodec/ffv1dec.c switch(16 * f->chroma_h_shift + f->chroma_v_shift) { f 658 libavcodec/ffv1dec.c case 0x00: f->avctx->pix_fmt = AV_PIX_FMT_YUVA444P10; break; f 659 libavcodec/ffv1dec.c case 0x10: f->avctx->pix_fmt = AV_PIX_FMT_YUVA422P10; break; f 660 libavcodec/ffv1dec.c case 0x11: f->avctx->pix_fmt = AV_PIX_FMT_YUVA420P10; break; f 662 libavcodec/ffv1dec.c } else if (f->avctx->bits_per_raw_sample == 12 && !f->transparency) { f 663 libavcodec/ffv1dec.c f->packed_at_lsb = 1; f 664 libavcodec/ffv1dec.c switch(16 * f->chroma_h_shift + f->chroma_v_shift) { f 665 libavcodec/ffv1dec.c case 0x00: f->avctx->pix_fmt = AV_PIX_FMT_YUV444P12; break; f 666 libavcodec/ffv1dec.c case 0x01: f->avctx->pix_fmt = AV_PIX_FMT_YUV440P12; break; f 667 libavcodec/ffv1dec.c case 0x10: f->avctx->pix_fmt = AV_PIX_FMT_YUV422P12; break; f 668 libavcodec/ffv1dec.c case 0x11: f->avctx->pix_fmt = AV_PIX_FMT_YUV420P12; break; f 670 libavcodec/ffv1dec.c } else if (f->avctx->bits_per_raw_sample == 14 && !f->transparency) { f 671 libavcodec/ffv1dec.c f->packed_at_lsb = 1; f 672 libavcodec/ffv1dec.c switch(16 * f->chroma_h_shift + f->chroma_v_shift) { f 673 libavcodec/ffv1dec.c case 0x00: f->avctx->pix_fmt = AV_PIX_FMT_YUV444P14; break; f 674 libavcodec/ffv1dec.c case 0x10: f->avctx->pix_fmt = AV_PIX_FMT_YUV422P14; break; f 675 libavcodec/ffv1dec.c case 0x11: f->avctx->pix_fmt = AV_PIX_FMT_YUV420P14; break; f 677 libavcodec/ffv1dec.c } else if (f->avctx->bits_per_raw_sample == 16 && !f->transparency){ f 678 libavcodec/ffv1dec.c f->packed_at_lsb = 1; f 679 libavcodec/ffv1dec.c switch(16 * f->chroma_h_shift + f->chroma_v_shift) { f 680 libavcodec/ffv1dec.c case 0x00: f->avctx->pix_fmt = AV_PIX_FMT_YUV444P16; break; f 681 libavcodec/ffv1dec.c case 0x10: f->avctx->pix_fmt = AV_PIX_FMT_YUV422P16; break; f 682 libavcodec/ffv1dec.c case 0x11: f->avctx->pix_fmt = AV_PIX_FMT_YUV420P16; break; f 684 libavcodec/ffv1dec.c } else if (f->avctx->bits_per_raw_sample == 16 && f->transparency){ f 685 libavcodec/ffv1dec.c f->packed_at_lsb = 1; f 686 libavcodec/ffv1dec.c switch(16 * f->chroma_h_shift + f->chroma_v_shift) { f 687 libavcodec/ffv1dec.c case 0x00: f->avctx->pix_fmt = AV_PIX_FMT_YUVA444P16; break; f 688 libavcodec/ffv1dec.c case 0x10: f->avctx->pix_fmt = AV_PIX_FMT_YUVA422P16; break; f 689 libavcodec/ffv1dec.c case 0x11: f->avctx->pix_fmt = AV_PIX_FMT_YUVA420P16; break; f 692 libavcodec/ffv1dec.c } else if (f->colorspace == 1) { f 693 libavcodec/ffv1dec.c if (f->chroma_h_shift || f->chroma_v_shift) { f 694 libavcodec/ffv1dec.c av_log(f->avctx, AV_LOG_ERROR, f 698 libavcodec/ffv1dec.c if ( f->avctx->bits_per_raw_sample <= 8 && !f->transparency) f 699 libavcodec/ffv1dec.c f->avctx->pix_fmt = AV_PIX_FMT_0RGB32; f 700 libavcodec/ffv1dec.c else if (f->avctx->bits_per_raw_sample <= 8 && f->transparency) f 701 libavcodec/ffv1dec.c f->avctx->pix_fmt = AV_PIX_FMT_RGB32; f 702 libavcodec/ffv1dec.c else if (f->avctx->bits_per_raw_sample == 9 && !f->transparency) f 703 libavcodec/ffv1dec.c f->avctx->pix_fmt = AV_PIX_FMT_GBRP9; f 704 libavcodec/ffv1dec.c else if (f->avctx->bits_per_raw_sample == 10 && !f->transparency) f 705 libavcodec/ffv1dec.c f->avctx->pix_fmt = AV_PIX_FMT_GBRP10; f 706 libavcodec/ffv1dec.c else if (f->avctx->bits_per_raw_sample == 10 && f->transparency) f 707 libavcodec/ffv1dec.c f->avctx->pix_fmt = AV_PIX_FMT_GBRAP10; f 708 libavcodec/ffv1dec.c else if (f->avctx->bits_per_raw_sample == 12 && !f->transparency) f 709 libavcodec/ffv1dec.c f->avctx->pix_fmt = AV_PIX_FMT_GBRP12; f 710 libavcodec/ffv1dec.c else if (f->avctx->bits_per_raw_sample == 12 && f->transparency) f 711 libavcodec/ffv1dec.c f->avctx->pix_fmt = AV_PIX_FMT_GBRAP12; f 712 libavcodec/ffv1dec.c else if (f->avctx->bits_per_raw_sample == 14 && !f->transparency) f 713 libavcodec/ffv1dec.c f->avctx->pix_fmt = AV_PIX_FMT_GBRP14; f 714 libavcodec/ffv1dec.c else if (f->avctx->bits_per_raw_sample == 16 && !f->transparency) { f 715 libavcodec/ffv1dec.c f->avctx->pix_fmt = AV_PIX_FMT_GBRP16; f 716 libavcodec/ffv1dec.c f->use32bit = 1; f 718 libavcodec/ffv1dec.c else if (f->avctx->bits_per_raw_sample == 16 && f->transparency) { f 719 libavcodec/ffv1dec.c f->avctx->pix_fmt = AV_PIX_FMT_GBRAP16; f 720 libavcodec/ffv1dec.c f->use32bit = 1; f 723 libavcodec/ffv1dec.c av_log(f->avctx, AV_LOG_ERROR, "colorspace not supported\n"); f 726 libavcodec/ffv1dec.c if (f->avctx->pix_fmt == AV_PIX_FMT_NONE) { f 727 libavcodec/ffv1dec.c av_log(f->avctx, AV_LOG_ERROR, "format not supported\n"); f 731 libavcodec/ffv1dec.c ff_dlog(f->avctx, "%d %d %d\n", f 732 libavcodec/ffv1dec.c f->chroma_h_shift, f->chroma_v_shift, f->avctx->pix_fmt); f 733 libavcodec/ffv1dec.c if (f->version < 2) { f 734 libavcodec/ffv1dec.c context_count = read_quant_tables(c, f->quant_table); f 736 libavcodec/ffv1dec.c av_log(f->avctx, AV_LOG_ERROR, "read_quant_table error\n"); f 739 libavcodec/ffv1dec.c f->slice_count = f->max_slice_count; f 740 libavcodec/ffv1dec.c } else if (f->version < 3) { f 741 libavcodec/ffv1dec.c f->slice_count = get_symbol(c, state, 0); f 744 libavcodec/ffv1dec.c for (f->slice_count = 0; f 745 libavcodec/ffv1dec.c f->slice_count < MAX_SLICES && 3 + 5*!!f->ec < p - c->bytestream_start; f 746 libavcodec/ffv1dec.c f->slice_count++) { f 747 libavcodec/ffv1dec.c int trailer = 3 + 5*!!f->ec; f 754 libavcodec/ffv1dec.c if (f->slice_count > (unsigned)MAX_SLICES || f->slice_count <= 0 || f->slice_count > f->max_slice_count) { f 755 libavcodec/ffv1dec.c av_log(f->avctx, AV_LOG_ERROR, "slice count %d is invalid (max=%d)\n", f->slice_count, f->max_slice_count); f 759 libavcodec/ffv1dec.c for (j = 0; j < f->slice_count; j++) { f 760 libavcodec/ffv1dec.c FFV1Context *fs = f->slice_context[j]; f 761 libavcodec/ffv1dec.c fs->ac = f->ac; f 762 libavcodec/ffv1dec.c fs->packed_at_lsb = f->packed_at_lsb; f 766 libavcodec/ffv1dec.c if (f->version == 2) { f 767 libavcodec/ffv1dec.c fs->slice_x = get_symbol(c, state, 0) * f->width ; f 768 libavcodec/ffv1dec.c fs->slice_y = get_symbol(c, state, 0) * f->height; f 769 libavcodec/ffv1dec.c fs->slice_width = (get_symbol(c, state, 0) + 1) * f->width + fs->slice_x; f 770 libavcodec/ffv1dec.c fs->slice_height = (get_symbol(c, state, 0) + 1) * f->height + fs->slice_y; f 772 libavcodec/ffv1dec.c fs->slice_x /= f->num_h_slices; f 773 libavcodec/ffv1dec.c fs->slice_y /= f->num_v_slices; f 774 libavcodec/ffv1dec.c fs->slice_width = fs->slice_width / f->num_h_slices - fs->slice_x; f 775 libavcodec/ffv1dec.c fs->slice_height = fs->slice_height / f->num_v_slices - fs->slice_y; f 776 libavcodec/ffv1dec.c if ((unsigned)fs->slice_width > f->width || f 777 libavcodec/ffv1dec.c (unsigned)fs->slice_height > f->height) f 779 libavcodec/ffv1dec.c if ( (unsigned)fs->slice_x + (uint64_t)fs->slice_width > f->width f 780 libavcodec/ffv1dec.c || (unsigned)fs->slice_y + (uint64_t)fs->slice_height > f->height) f 784 libavcodec/ffv1dec.c for (i = 0; i < f->plane_count; i++) { f 787 libavcodec/ffv1dec.c if (f->version == 2) { f 789 libavcodec/ffv1dec.c if (idx > (unsigned)f->quant_table_count) { f 790 libavcodec/ffv1dec.c av_log(f->avctx, AV_LOG_ERROR, f 795 libavcodec/ffv1dec.c memcpy(p->quant_table, f->quant_tables[idx], f 797 libavcodec/ffv1dec.c context_count = f->context_count[idx]; f 799 libavcodec/ffv1dec.c memcpy(p->quant_table, f->quant_table, sizeof(p->quant_table)); f 802 libavcodec/ffv1dec.c if (f->version <= 2) { f 817 libavcodec/ffv1dec.c FFV1Context *f = avctx->priv_data; f 823 libavcodec/ffv1dec.c if (avctx->extradata_size > 0 && (ret = read_extra_header(f)) < 0) f 826 libavcodec/ffv1dec.c if ((ret = ff_ffv1_init_slice_contexts(f)) < 0) f 836 libavcodec/ffv1dec.c FFV1Context *f = avctx->priv_data; f 837 libavcodec/ffv1dec.c RangeCoder *const c = &f->slice_context[0]->c; f 843 libavcodec/ffv1dec.c if (f->last_picture.f) f 844 libavcodec/ffv1dec.c ff_thread_release_buffer(avctx, &f->last_picture); f 845 libavcodec/ffv1dec.c FFSWAP(ThreadFrame, f->picture, f->last_picture); f 847 libavcodec/ffv1dec.c f->cur = p = f->picture.f; f 849 libavcodec/ffv1dec.c if (f->version < 3 && avctx->field_order > AV_FIELD_PROGRESSIVE) { f 856 libavcodec/ffv1dec.c f->avctx = avctx; f 863 libavcodec/ffv1dec.c f->key_frame_ok = 0; f 864 libavcodec/ffv1dec.c if ((ret = read_header(f)) < 0) f 866 libavcodec/ffv1dec.c f->key_frame_ok = 1; f 868 libavcodec/ffv1dec.c if (!f->key_frame_ok) { f 876 libavcodec/ffv1dec.c if ((ret = ff_thread_get_buffer(avctx, &f->picture, AV_GET_BUFFER_FLAG_REF)) < 0) f 881 libavcodec/ffv1dec.c f->version, p->key_frame, f->ac, f->ec, f->slice_count, f->avctx->bits_per_raw_sample); f 886 libavcodec/ffv1dec.c for (i = f->slice_count - 1; i >= 0; i--) { f 887 libavcodec/ffv1dec.c FFV1Context *fs = f->slice_context[i]; f 888 libavcodec/ffv1dec.c int trailer = 3 + 5*!!f->ec; f 891 libavcodec/ffv1dec.c if (i || f->version > 2) v = AV_RB24(buf_p-trailer) + trailer; f 895 libavcodec/ffv1dec.c ff_thread_report_progress(&f->picture, INT_MAX, 0); f 900 libavcodec/ffv1dec.c if (f->ec) { f 904 libavcodec/ffv1dec.c av_log(f->avctx, AV_LOG_ERROR, "slice CRC mismatch %X!", crc); f 906 libavcodec/ffv1dec.c av_log(f->avctx, AV_LOG_ERROR, "at %f seconds\n", ts*av_q2d(avctx->pkt_timebase)); f 908 libavcodec/ffv1dec.c av_log(f->avctx, AV_LOG_ERROR, "at %"PRId64"\n", ts); f 910 libavcodec/ffv1dec.c av_log(f->avctx, AV_LOG_ERROR, "\n"); f 930 libavcodec/ffv1dec.c &f->slice_context[0], f 932 libavcodec/ffv1dec.c f->slice_count, f 935 libavcodec/ffv1dec.c for (i = f->slice_count - 1; i >= 0; i--) { f 936 libavcodec/ffv1dec.c FFV1Context *fs = f->slice_context[i]; f 938 libavcodec/ffv1dec.c if (fs->slice_damaged && f->last_picture.f->data[0]) { f 942 libavcodec/ffv1dec.c ff_thread_await_progress(&f->last_picture, INT_MAX, 0); f 945 libavcodec/ffv1dec.c int sh = (j == 1 || j == 2) ? f->chroma_h_shift : 0; f 946 libavcodec/ffv1dec.c int sv = (j == 1 || j == 2) ? f->chroma_v_shift : 0; f 949 libavcodec/ffv1dec.c src[j] = f->last_picture.f->data[j] + f->last_picture.f->linesize[j] * f 956 libavcodec/ffv1dec.c src[1] = f->last_picture.f->data[1]; f 959 libavcodec/ffv1dec.c f->last_picture.f->linesize, f 965 libavcodec/ffv1dec.c ff_thread_report_progress(&f->picture, INT_MAX, 0); f 967 libavcodec/ffv1dec.c f->picture_number++; f 969 libavcodec/ffv1dec.c if (f->last_picture.f) f 970 libavcodec/ffv1dec.c ff_thread_release_buffer(avctx, &f->last_picture); f 971 libavcodec/ffv1dec.c f->cur = NULL; f 972 libavcodec/ffv1dec.c if ((ret = av_frame_ref(data, f->picture.f)) < 0) f 1043 libavcodec/ffv1dec.c if (fsrc->picture.f->data[0]) { f 346 libavcodec/ffv1enc.c static void write_header(FFV1Context *f) f 350 libavcodec/ffv1enc.c RangeCoder *const c = &f->slice_context[0]->c; f 354 libavcodec/ffv1enc.c if (f->version < 2) { f 355 libavcodec/ffv1enc.c put_symbol(c, state, f->version, 0); f 356 libavcodec/ffv1enc.c put_symbol(c, state, f->ac, 0); f 357 libavcodec/ffv1enc.c if (f->ac == AC_RANGE_CUSTOM_TAB) { f 360 libavcodec/ffv1enc.c f->state_transition[i] - c->one_state[i], 1); f 362 libavcodec/ffv1enc.c put_symbol(c, state, f->colorspace, 0); //YUV cs type f 363 libavcodec/ffv1enc.c if (f->version > 0) f 364 libavcodec/ffv1enc.c put_symbol(c, state, f->bits_per_raw_sample, 0); f 365 libavcodec/ffv1enc.c put_rac(c, state, f->chroma_planes); f 366 libavcodec/ffv1enc.c put_symbol(c, state, f->chroma_h_shift, 0); f 367 libavcodec/ffv1enc.c put_symbol(c, state, f->chroma_v_shift, 0); f 368 libavcodec/ffv1enc.c put_rac(c, state, f->transparency); f 370 libavcodec/ffv1enc.c write_quant_tables(c, f->quant_table); f 371 libavcodec/ffv1enc.c } else if (f->version < 3) { f 372 libavcodec/ffv1enc.c put_symbol(c, state, f->slice_count, 0); f 373 libavcodec/ffv1enc.c for (i = 0; i < f->slice_count; i++) { f 374 libavcodec/ffv1enc.c FFV1Context *fs = f->slice_context[i]; f 376 libavcodec/ffv1enc.c (fs->slice_x + 1) * f->num_h_slices / f->width, 0); f 378 libavcodec/ffv1enc.c (fs->slice_y + 1) * f->num_v_slices / f->height, 0); f 380 libavcodec/ffv1enc.c (fs->slice_width + 1) * f->num_h_slices / f->width - 1, f 383 libavcodec/ffv1enc.c (fs->slice_height + 1) * f->num_v_slices / f->height - 1, f 385 libavcodec/ffv1enc.c for (j = 0; j < f->plane_count; j++) { f 386 libavcodec/ffv1enc.c put_symbol(c, state, f->plane[j].quant_table_index, 0); f 387 libavcodec/ffv1enc.c av_assert0(f->plane[j].quant_table_index == f->context_model); f 393 libavcodec/ffv1enc.c static int write_extradata(FFV1Context *f) f 395 libavcodec/ffv1enc.c RangeCoder *const c = &f->c; f 404 libavcodec/ffv1enc.c f->avctx->extradata_size = 10000 + 4 + f 406 libavcodec/ffv1enc.c f->avctx->extradata = av_malloc(f->avctx->extradata_size + AV_INPUT_BUFFER_PADDING_SIZE); f 407 libavcodec/ffv1enc.c if (!f->avctx->extradata) f 409 libavcodec/ffv1enc.c ff_init_range_encoder(c, f->avctx->extradata, f->avctx->extradata_size); f 412 libavcodec/ffv1enc.c put_symbol(c, state, f->version, 0); f 413 libavcodec/ffv1enc.c if (f->version > 2) { f 414 libavcodec/ffv1enc.c if (f->version == 3) { f 415 libavcodec/ffv1enc.c f->micro_version = 4; f 416 libavcodec/ffv1enc.c } else if (f->version == 4) f 417 libavcodec/ffv1enc.c f->micro_version = 2; f 418 libavcodec/ffv1enc.c put_symbol(c, state, f->micro_version, 0); f 421 libavcodec/ffv1enc.c put_symbol(c, state, f->ac, 0); f 422 libavcodec/ffv1enc.c if (f->ac == AC_RANGE_CUSTOM_TAB) f 424 libavcodec/ffv1enc.c put_symbol(c, state, f->state_transition[i] - c->one_state[i], 1); f 426 libavcodec/ffv1enc.c put_symbol(c, state, f->colorspace, 0); // YUV cs type f 427 libavcodec/ffv1enc.c put_symbol(c, state, f->bits_per_raw_sample, 0); f 428 libavcodec/ffv1enc.c put_rac(c, state, f->chroma_planes); f 429 libavcodec/ffv1enc.c put_symbol(c, state, f->chroma_h_shift, 0); f 430 libavcodec/ffv1enc.c put_symbol(c, state, f->chroma_v_shift, 0); f 431 libavcodec/ffv1enc.c put_rac(c, state, f->transparency); f 432 libavcodec/ffv1enc.c put_symbol(c, state, f->num_h_slices - 1, 0); f 433 libavcodec/ffv1enc.c put_symbol(c, state, f->num_v_slices - 1, 0); f 435 libavcodec/ffv1enc.c put_symbol(c, state, f->quant_table_count, 0); f 436 libavcodec/ffv1enc.c for (i = 0; i < f->quant_table_count; i++) f 437 libavcodec/ffv1enc.c write_quant_tables(c, f->quant_tables[i]); f 439 libavcodec/ffv1enc.c for (i = 0; i < f->quant_table_count; i++) { f 440 libavcodec/ffv1enc.c if (contains_non_128(f->initial_states[i], f->context_count[i])) { f 442 libavcodec/ffv1enc.c for (j = 0; j < f->context_count[i]; j++) f 444 libavcodec/ffv1enc.c int pred = j ? f->initial_states[i][j - 1][k] : 128; f 446 libavcodec/ffv1enc.c (int8_t)(f->initial_states[i][j][k] - pred), 1); f 453 libavcodec/ffv1enc.c if (f->version > 2) { f 454 libavcodec/ffv1enc.c put_symbol(c, state, f->ec, 0); f 455 libavcodec/ffv1enc.c put_symbol(c, state, f->intra = (f->avctx->gop_size < 2), 0); f 458 libavcodec/ffv1enc.c f->avctx->extradata_size = ff_rac_terminate(c, 0); f 459 libavcodec/ffv1enc.c v = av_crc(av_crc_get_table(AV_CRC_32_IEEE), 0, f->avctx->extradata, f->avctx->extradata_size); f 460 libavcodec/ffv1enc.c AV_WL32(f->avctx->extradata + f->avctx->extradata_size, v); f 461 libavcodec/ffv1enc.c f->avctx->extradata_size += 4; f 927 libavcodec/ffv1enc.c static void encode_slice_header(FFV1Context *f, FFV1Context *fs) f 934 libavcodec/ffv1enc.c put_symbol(c, state, (fs->slice_x +1)*f->num_h_slices / f->width , 0); f 935 libavcodec/ffv1enc.c put_symbol(c, state, (fs->slice_y +1)*f->num_v_slices / f->height , 0); f 936 libavcodec/ffv1enc.c put_symbol(c, state, (fs->slice_width +1)*f->num_h_slices / f->width -1, 0); f 937 libavcodec/ffv1enc.c put_symbol(c, state, (fs->slice_height+1)*f->num_v_slices / f->height-1, 0); f 938 libavcodec/ffv1enc.c for (j=0; j<f->plane_count; j++) { f 939 libavcodec/ffv1enc.c put_symbol(c, state, f->plane[j].quant_table_index, 0); f 940 libavcodec/ffv1enc.c av_assert0(f->plane[j].quant_table_index == f->context_model); f 942 libavcodec/ffv1enc.c if (!f->picture.f->interlaced_frame) f 945 libavcodec/ffv1enc.c put_symbol(c, state, 1 + !f->picture.f->top_field_first, 0); f 946 libavcodec/ffv1enc.c put_symbol(c, state, f->picture.f->sample_aspect_ratio.num, 0); f 947 libavcodec/ffv1enc.c put_symbol(c, state, f->picture.f->sample_aspect_ratio.den, 0); f 948 libavcodec/ffv1enc.c if (f->version > 3) { f 951 libavcodec/ffv1enc.c ff_ffv1_clear_slice_state(f, fs); f 1045 libavcodec/ffv1enc.c FFV1Context *f = fs->avctx->priv_data; f 1050 libavcodec/ffv1enc.c const AVFrame *const p = f->picture.f; f 1060 libavcodec/ffv1enc.c if (f->version > 3) { f 1068 libavcodec/ffv1enc.c if (f->key_frame) f 1069 libavcodec/ffv1enc.c ff_ffv1_clear_slice_state(f, fs); f 1070 libavcodec/ffv1enc.c if (f->version > 2) { f 1071 libavcodec/ffv1enc.c encode_slice_header(f, fs); f 1074 libavcodec/ffv1enc.c fs->ac_byte_count = f->version > 2 || (!x && !y) ? ff_rac_terminate(&fs->c, f->version > 2) : 0; f 1080 libavcodec/ffv1enc.c if (f->colorspace == 0 && c->pix_fmt != AV_PIX_FMT_YA8) { f 1081 libavcodec/ffv1enc.c const int chroma_width = AV_CEIL_RSHIFT(width, f->chroma_h_shift); f 1082 libavcodec/ffv1enc.c const int chroma_height = AV_CEIL_RSHIFT(height, f->chroma_v_shift); f 1083 libavcodec/ffv1enc.c const int cx = x >> f->chroma_h_shift; f 1084 libavcodec/ffv1enc.c const int cy = y >> f->chroma_v_shift; f 1088 libavcodec/ffv1enc.c if (f->chroma_planes) { f 1097 libavcodec/ffv1enc.c } else if (f->use32bit) { f 1122 libavcodec/ffv1enc.c FFV1Context *f = avctx->priv_data; f 1123 libavcodec/ffv1enc.c RangeCoder *const c = &f->slice_context[0]->c; f 1124 libavcodec/ffv1enc.c AVFrame *const p = f->picture.f; f 1137 libavcodec/ffv1enc.c memset(f->rc_stat, 0, sizeof(f->rc_stat)); f 1138 libavcodec/ffv1enc.c for (i = 0; i < f->quant_table_count; i++) f 1139 libavcodec/ffv1enc.c memset(f->rc_stat2[i], 0, f->context_count[i] * sizeof(*f->rc_stat2[i])); f 1141 libavcodec/ffv1enc.c av_assert0(f->slice_count == f->max_slice_count); f 1142 libavcodec/ffv1enc.c for (j = 0; j < f->slice_count; j++) { f 1143 libavcodec/ffv1enc.c FFV1Context *fs = f->slice_context[j]; f 1145 libavcodec/ffv1enc.c f->rc_stat[i][0] += fs->rc_stat[i][0]; f 1146 libavcodec/ffv1enc.c f->rc_stat[i][1] += fs->rc_stat[i][1]; f 1148 libavcodec/ffv1enc.c for (i = 0; i < f->quant_table_count; i++) { f 1149 libavcodec/ffv1enc.c for (k = 0; k < f->context_count[i]; k++) f 1151 libavcodec/ffv1enc.c f->rc_stat2[i][k][m][0] += fs->rc_stat2[i][k][m][0]; f 1152 libavcodec/ffv1enc.c f->rc_stat2[i][k][m][1] += fs->rc_stat2[i][k][m][1]; f 1159 libavcodec/ffv1enc.c f->rc_stat[j][0], f->rc_stat[j][1]); f 1164 libavcodec/ffv1enc.c for (i = 0; i < f->quant_table_count; i++) { f 1165 libavcodec/ffv1enc.c for (j = 0; j < f->context_count[i]; j++) f 1168 libavcodec/ffv1enc.c f->rc_stat2[i][j][m][0], f->rc_stat2[i][j][m][1]); f 1172 libavcodec/ffv1enc.c snprintf(p, end - p, "%d\n", f->gob_count); f 1177 libavcodec/ffv1enc.c if (f->version > 3) f 1200 libavcodec/ffv1enc.c if (avctx->gop_size == 0 || f->picture_number % avctx->gop_size == 0) { f 1202 libavcodec/ffv1enc.c f->key_frame = 1; f 1203 libavcodec/ffv1enc.c f->gob_count++; f 1204 libavcodec/ffv1enc.c write_header(f); f 1207 libavcodec/ffv1enc.c f->key_frame = 0; f 1210 libavcodec/ffv1enc.c if (f->ac == AC_RANGE_CUSTOM_TAB) { f 1213 libavcodec/ffv1enc.c c->one_state[i] = f->state_transition[i]; f 1218 libavcodec/ffv1enc.c for (i = 0; i < f->slice_count; i++) { f 1219 libavcodec/ffv1enc.c FFV1Context *fs = f->slice_context[i]; f 1220 libavcodec/ffv1enc.c uint8_t *start = pkt->data + pkt->size * (int64_t)i / f->slice_count; f 1221 libavcodec/ffv1enc.c int len = pkt->size / f->slice_count; f 1230 libavcodec/ffv1enc.c avctx->execute(avctx, encode_slice, &f->slice_context[0], NULL, f 1231 libavcodec/ffv1enc.c f->slice_count, sizeof(void *)); f 1234 libavcodec/ffv1enc.c for (i = 0; i < f->slice_count; i++) { f 1235 libavcodec/ffv1enc.c FFV1Context *fs = f->slice_context[i]; f 1244 libavcodec/ffv1enc.c if (i > 0 || f->version > 2) { f 1245 libavcodec/ffv1enc.c av_assert0(bytes < pkt->size / f->slice_count); f 1251 libavcodec/ffv1enc.c if (f->ec) { f 1266 libavcodec/ffv1enc.c avctx->coded_frame->key_frame = f->key_frame; f 1270 libavcodec/ffv1enc.c f->picture_number++; f 1274 libavcodec/ffv1enc.c pkt->flags |= AV_PKT_FLAG_KEY * f->key_frame; f 119 libavcodec/flac_parser.c AVFifoBuffer *f = fpc->fifo_buf; f 120 libavcodec/flac_parser.c uint8_t *start = f->rptr + offset; f 123 libavcodec/flac_parser.c if (start >= f->end) f 124 libavcodec/flac_parser.c start -= f->end - f->buffer; f 125 libavcodec/flac_parser.c if (f->end - start >= len) f 137 libavcodec/flac_parser.c int seg_len = FFMIN(f->end - start, len); f 142 libavcodec/flac_parser.c start += seg_len - (f->end - f->buffer); f 158 libavcodec/flac_parser.c AVFifoBuffer *f = fpc->fifo_buf; f 159 libavcodec/flac_parser.c uint8_t *start = f->rptr + offset; f 161 libavcodec/flac_parser.c if (start >= f->end) f 162 libavcodec/flac_parser.c start -= f->end - f->buffer; f 163 libavcodec/flac_parser.c *len = FFMIN(*len, f->end - start); f 562 libavcodec/flacdec.c ThreadFrame tframe = { .f = data }; f 811 libavcodec/flacenc.c int f = d - c; f 812 libavcodec/flacenc.c res[i ] = f - e; f 816 libavcodec/flacenc.c res[i+1] = e - f; f 139 libavcodec/fraps.c ThreadFrame frame = { .f = data }; f 140 libavcodec/fraps.c AVFrame * const f = data; f 218 libavcodec/fraps.c f->pict_type = AV_PICTURE_TYPE_I; f 219 libavcodec/fraps.c f->key_frame = 1; f 241 libavcodec/fraps.c luma1 = (uint32_t*)&f->data[0][ y * 2 * f->linesize[0] ]; f 242 libavcodec/fraps.c luma2 = (uint32_t*)&f->data[0][ (y * 2 + 1) * f->linesize[0] ]; f 243 libavcodec/fraps.c cr = (uint32_t*)&f->data[1][ y * f->linesize[1] ]; f 244 libavcodec/fraps.c cb = (uint32_t*)&f->data[2][ y * f->linesize[2] ]; f 258 libavcodec/fraps.c uint32_t *pal = (uint32_t *)f->data[1]; f 266 libavcodec/fraps.c memcpy(&f->data[0][y * f->linesize[0]], f 272 libavcodec/fraps.c memcpy(&f->data[0][(avctx->height - y - 1) * f->linesize[0]], f 286 libavcodec/fraps.c if ((ret = fraps2_decode_plane(s, f->data[i], f->linesize[i], f 300 libavcodec/fraps.c if ((ret = fraps2_decode_plane(s, f->data[0] + i + (f->linesize[0] * (avctx->height - 1)), f 301 libavcodec/fraps.c -f->linesize[0], avctx->width, avctx->height, f 307 libavcodec/fraps.c out = f->data[0]; f 316 libavcodec/fraps.c out += f->linesize[0] - 3*avctx->width; f 201 libavcodec/g723_1enc.c int f[LPC_ORDER + 2]; ///< coefficients of the sum and difference f 214 libavcodec/g723_1enc.c f[0] = f[1] = 1 << 25; f 219 libavcodec/g723_1enc.c f[2 * i + 2] = -f[2 * i] - ((lsp[i] + lsp[LPC_ORDER - 1 - i]) << 12); f 221 libavcodec/g723_1enc.c f[2 * i + 3] = f[2 * i + 1] - ((lsp[i] - lsp[LPC_ORDER - 1 - i]) << 12); f 225 libavcodec/g723_1enc.c f[LPC_ORDER] >>= 1; f 226 libavcodec/g723_1enc.c f[LPC_ORDER + 1] >>= 1; f 229 libavcodec/g723_1enc.c max = FFABS(f[0]); f 231 libavcodec/g723_1enc.c max = FFMAX(max, FFABS(f[i])); f 236 libavcodec/g723_1enc.c f[i] = av_clipl_int32((int64_t) (f[i] << shift) + (1 << 15)) >> 16; f 245 libavcodec/g723_1enc.c temp += f[2 * i] * cos_tab[0]; f 252 libavcodec/g723_1enc.c temp += f[LPC_ORDER - 2 * j + p] * cos_tab[i * j % COS_TBL_SIZE]; f 275 libavcodec/g723_1enc.c temp += f[LPC_ORDER - 2 * j + p] * f 45 libavcodec/g726.c static inline Float11* i2f(int i, Float11* f) f 47 libavcodec/g726.c f->sign = (i < 0); f 48 libavcodec/g726.c if (f->sign) f 50 libavcodec/g726.c f->exp = av_log2_16bit(i) + !!i; f 51 libavcodec/g726.c f->mant = i? (i<<6) >> f->exp : 1<<5; f 52 libavcodec/g726.c return f; f 196 libavcodec/g726.c Float11 f; f 266 libavcodec/g726.c c->se += mult(i2f(c->b[i] >> 2, &f), &c->dq[i]); f 269 libavcodec/g726.c c->se += mult(i2f(c->a[i] >> 2, &f), &c->sr[i]); f 634 libavcodec/h261dec.c s->current_picture.f->pict_type = s->pict_type; f 635 libavcodec/h261dec.c s->current_picture.f->key_frame = s->pict_type == AV_PICTURE_TYPE_I; f 658 libavcodec/h261dec.c av_assert0(s->current_picture.f->pict_type == s->current_picture_ptr->f->pict_type); f 659 libavcodec/h261dec.c av_assert0(s->current_picture.f->pict_type == s->pict_type); f 661 libavcodec/h261dec.c if ((ret = av_frame_ref(pict, s->current_picture_ptr->f)) < 0) f 435 libavcodec/h263dec.c if ((ret = av_frame_ref(pict, s->next_picture_ptr->f)) < 0) f 537 libavcodec/h263dec.c if (!s->current_picture_ptr || s->current_picture_ptr->f->data[0]) { f 585 libavcodec/h263dec.c s->current_picture.f->pict_type = s->pict_type; f 586 libavcodec/h263dec.c s->current_picture.f->key_frame = s->pict_type == AV_PICTURE_TYPE_I; f 690 libavcodec/h263dec.c av_assert1(s->current_picture.f->pict_type == s->current_picture_ptr->f->pict_type); f 691 libavcodec/h263dec.c av_assert1(s->current_picture.f->pict_type == s->pict_type); f 693 libavcodec/h263dec.c if ((ret = av_frame_ref(pict, s->current_picture_ptr->f)) < 0) f 698 libavcodec/h263dec.c if ((ret = av_frame_ref(pict, s->last_picture_ptr->f)) < 0) f 56 libavcodec/h264_mb_template.c dest_y = h->cur_pic.f->data[0] + ((mb_x << PIXEL_SHIFT) + mb_y * sl->linesize) * 16; f 57 libavcodec/h264_mb_template.c dest_cb = h->cur_pic.f->data[1] + (mb_x << PIXEL_SHIFT) * 8 + mb_y * sl->uvlinesize * block_h; f 58 libavcodec/h264_mb_template.c dest_cr = h->cur_pic.f->data[2] + (mb_x << PIXEL_SHIFT) * 8 + mb_y * sl->uvlinesize * block_h; f 270 libavcodec/h264_mb_template.c dest[p] = h->cur_pic.f->data[p] + f 49 libavcodec/h264_picture.c if (!pic->f || !pic->f->buf[0]) f 70 libavcodec/h264_picture.c av_assert0(!dst->f->buf[0]); f 71 libavcodec/h264_picture.c av_assert0(src->f->buf[0]); f 72 libavcodec/h264_picture.c av_assert0(src->tf.f == src->f); f 74 libavcodec/h264_picture.c dst->tf.f = dst->f; f 146 libavcodec/h264_picture.c dst->f = src->f; f 54 libavcodec/h264_refs.c memcpy(dst->data, src->f->data, sizeof(dst->data)); f 55 libavcodec/h264_refs.c memcpy(dst->linesize, src->f->linesize, sizeof(dst->linesize)); f 129 libavcodec/h264_refs.c const AVFrame *f = pic->f; f 130 libavcodec/h264_refs.c return (h->cur_pic_ptr->f->width != f->width || f 131 libavcodec/h264_refs.c h->cur_pic_ptr->f->height != f->height || f 132 libavcodec/h264_refs.c h->cur_pic_ptr->f->format != f->format); f 169 libavcodec/h264_refs.c sl->ref_list[0][i].parent->f->buf[0]->buffer == f 170 libavcodec/h264_refs.c sl->ref_list[1][i].parent->f->buf[0]->buffer; i++); f 228 libavcodec/h264_refs.c i, pic->frame_num, pic->poc, pic->f->data[0]); f 245 libavcodec/h264_refs.c i, pic->frame_num, pic->poc, pic->f->data[0]); f 292 libavcodec/h264_refs.c field[1].data[j] += frame->parent->f->linesize[j]; f 413 libavcodec/h264_refs.c av_assert0(av_buffer_get_ref_count(sl->ref_list[list][index].parent->f->buf[0]) > 0); f 574 libavcodec/h264_refs.c if (h->short_ref_count && !h->last_pic_for_ec.f->data[0]) { f 824 libavcodec/h264_refs.c && h->cur_pic_ptr->f->pict_type == AV_PICTURE_TYPE_I){ f 121 libavcodec/h264_slice.c if (h->DPB[i].f->buf[0] && !h->DPB[i].reference && f 191 libavcodec/h264_slice.c av_assert0(!pic->f->data[0]); f 193 libavcodec/h264_slice.c pic->tf.f = pic->f; f 209 libavcodec/h264_slice.c if (CONFIG_GRAY && !h->avctx->hwaccel && h->flags & AV_CODEC_FLAG_GRAY && pic->f->data[2]) { f 211 libavcodec/h264_slice.c av_pix_fmt_get_chroma_sub_sample(pic->f->format, f 214 libavcodec/h264_slice.c for(i=0; i<AV_CEIL_RSHIFT(pic->f->height, v_chroma_shift); i++) { f 215 libavcodec/h264_slice.c memset(pic->f->data[1] + pic->f->linesize[1]*i, f 216 libavcodec/h264_slice.c 0x80, AV_CEIL_RSHIFT(pic->f->width, h_chroma_shift)); f 217 libavcodec/h264_slice.c memset(pic->f->data[2] + pic->f->linesize[2]*i, f 218 libavcodec/h264_slice.c 0x80, AV_CEIL_RSHIFT(pic->f->width, h_chroma_shift)); f 266 libavcodec/h264_slice.c if (!h->DPB[i].f->buf[0]) f 390 libavcodec/h264_slice.c if (h1->DPB[i].f->buf[0] && f 397 libavcodec/h264_slice.c if (h1->cur_pic.f->buf[0]) { f 480 libavcodec/h264_slice.c pic->f->coded_picture_number = h->coded_picture_number++; f 488 libavcodec/h264_slice.c pic->f->key_frame = 0; f 494 libavcodec/h264_slice.c pic->f->pict_type = h->slice_ctx[0].slice_type; f 496 libavcodec/h264_slice.c pic->f->crop_left = h->crop_left; f 497 libavcodec/h264_slice.c pic->f->crop_right = h->crop_right; f 498 libavcodec/h264_slice.c pic->f->crop_top = h->crop_top; f 499 libavcodec/h264_slice.c pic->f->crop_bottom = h->crop_bottom; f 514 libavcodec/h264_slice.c h->slice_ctx[i].linesize = h->cur_pic_ptr->f->linesize[0]; f 515 libavcodec/h264_slice.c h->slice_ctx[i].uvlinesize = h->cur_pic_ptr->f->linesize[1]; f 525 libavcodec/h264_slice.c h->block_offset[i] = (4 * ((scan8[i] - scan8[0]) & 7) << pixel_shift) + 4 * pic->f->linesize[0] * ((scan8[i] - scan8[0]) >> 3); f 526 libavcodec/h264_slice.c h->block_offset[48 + i] = (4 * ((scan8[i] - scan8[0]) & 7) << pixel_shift) + 8 * pic->f->linesize[0] * ((scan8[i] - scan8[0]) >> 3); f 530 libavcodec/h264_slice.c h->block_offset[32 + i] = (4 * ((scan8[i] - scan8[0]) & 7) << pixel_shift) + 4 * pic->f->linesize[1] * ((scan8[i] - scan8[0]) >> 3); f 532 libavcodec/h264_slice.c h->block_offset[48 + 32 + i] = (4 * ((scan8[i] - scan8[0]) & 7) << pixel_shift) + 8 * pic->f->linesize[1] * ((scan8[i] - scan8[0]) >> 3); f 1129 libavcodec/h264_slice.c cur->f->interlaced_frame = 0; f 1130 libavcodec/h264_slice.c cur->f->repeat_pict = 0; f 1153 libavcodec/h264_slice.c cur->f->interlaced_frame = 1; f 1158 libavcodec/h264_slice.c cur->f->interlaced_frame = 1; f 1161 libavcodec/h264_slice.c cur->f->interlaced_frame = h->prev_interlaced_frame; f 1168 libavcodec/h264_slice.c cur->f->repeat_pict = 1; f 1171 libavcodec/h264_slice.c cur->f->repeat_pict = 2; f 1174 libavcodec/h264_slice.c cur->f->repeat_pict = 4; f 1180 libavcodec/h264_slice.c cur->f->interlaced_frame = (pt->ct_type & (1 << 1)) != 0; f 1183 libavcodec/h264_slice.c cur->f->interlaced_frame = FIELD_OR_MBAFF_PICTURE(h); f 1185 libavcodec/h264_slice.c h->prev_interlaced_frame = cur->f->interlaced_frame; f 1189 libavcodec/h264_slice.c cur->f->top_field_first = cur->field_poc[0] < cur->field_poc[1]; f 1196 libavcodec/h264_slice.c cur->f->top_field_first = 1; f 1198 libavcodec/h264_slice.c cur->f->top_field_first = 0; f 1199 libavcodec/h264_slice.c } else if (cur->f->interlaced_frame) { f 1202 libavcodec/h264_slice.c cur->f->top_field_first = 1; f 1205 libavcodec/h264_slice.c cur->f->top_field_first = 0; f 1214 libavcodec/h264_slice.c AVStereo3D *stereo = av_stereo3d_create_side_data(cur->f); f 1261 libavcodec/h264_slice.c AVFrameSideData *rotation = av_frame_new_side_data(cur->f, f 1272 libavcodec/h264_slice.c AVFrameSideData *sd = av_frame_new_side_data(cur->f, AV_FRAME_DATA_AFD, f 1284 libavcodec/h264_slice.c AVFrameSideData *sd = av_frame_new_side_data_from_buf(cur->f, AV_FRAME_DATA_A53_CC, a53->buf_ref); f 1296 libavcodec/h264_slice.c AVFrameSideData *tcside = av_frame_new_side_data(cur->f, f 1365 libavcodec/h264_slice.c if( cur->f->pict_type == AV_PICTURE_TYPE_B f 1393 libavcodec/h264_slice.c !h->delayed_pic[i]->f->key_frame && f 1401 libavcodec/h264_slice.c (h->delayed_pic[0]->f->key_frame || h->delayed_pic[0]->mmco_reset)) f 1412 libavcodec/h264_slice.c if (out_idx == 0 && h->delayed_pic[0] && (h->delayed_pic[0]->f->key_frame || h->delayed_pic[0]->mmco_reset)) { f 1429 libavcodec/h264_slice.c out->f->flags |= AV_FRAME_FLAG_CORRUPT; f 1499 libavcodec/h264_slice.c av_assert0(h->cur_pic_ptr->f->buf[0]); f 1589 libavcodec/h264_slice.c h->short_ref[0]->f->width == prev->f->width && f 1590 libavcodec/h264_slice.c h->short_ref[0]->f->height == prev->f->height && f 1591 libavcodec/h264_slice.c h->short_ref[0]->f->format == prev->f->format) { f 1595 libavcodec/h264_slice.c av_image_copy(h->short_ref[0]->f->data, f 1596 libavcodec/h264_slice.c h->short_ref[0]->f->linesize, f 1597 libavcodec/h264_slice.c (const uint8_t **)prev->f->data, f 1598 libavcodec/h264_slice.c prev->f->linesize, f 1599 libavcodec/h264_slice.c prev->f->format, f 1600 libavcodec/h264_slice.c prev->f->width, f 1601 libavcodec/h264_slice.c prev->f->height); f 1604 libavcodec/h264_slice.c ff_color_frame(h->short_ref[0]->f, c); f 1614 libavcodec/h264_slice.c av_assert0(h->cur_pic_ptr->f->buf[0]); f 1696 libavcodec/h264_slice.c h->cur_pic_ptr->f->key_frame |= (nal->type == H264_NAL_IDR_SLICE); f 2025 libavcodec/h264_slice.c sl->ref_list[j][i].parent->f->buf[0]) { f 2027 libavcodec/h264_slice.c AVBuffer *buf = sl->ref_list[j][i].parent->f->buf[0]->buffer; f 2029 libavcodec/h264_slice.c if (h->short_ref[k]->f->buf[0]->buffer == buf) { f 2034 libavcodec/h264_slice.c if (h->long_ref[k] && h->long_ref[k]->f->buf[0]->buffer == buf) { f 2470 libavcodec/h264_slice.c dest_y = h->cur_pic.f->data[0] + f 2472 libavcodec/h264_slice.c dest_cb = h->cur_pic.f->data[1] + f 2475 libavcodec/h264_slice.c dest_cr = h->cur_pic.f->data[2] + f 2581 libavcodec/h264_slice.c sl->linesize = h->cur_pic_ptr->f->linesize[0]; f 2582 libavcodec/h264_slice.c sl->uvlinesize = h->cur_pic_ptr->f->linesize[1]; f 107 libavcodec/h264dec.c const AVFrame *src = h->cur_pic.f; f 336 libavcodec/h264dec.c h->DPB[i].f = av_frame_alloc(); f 337 libavcodec/h264dec.c if (!h->DPB[i].f) f 341 libavcodec/h264dec.c h->cur_pic.f = av_frame_alloc(); f 342 libavcodec/h264dec.c if (!h->cur_pic.f) f 345 libavcodec/h264dec.c h->last_pic_for_ec.f = av_frame_alloc(); f 346 libavcodec/h264dec.c if (!h->last_pic_for_ec.f) f 365 libavcodec/h264dec.c av_frame_free(&h->DPB[i].f); f 380 libavcodec/h264dec.c av_frame_free(&h->cur_pic.f); f 382 libavcodec/h264dec.c av_frame_free(&h->last_pic_for_ec.f); f 746 libavcodec/h264dec.c h->cur_pic_ptr->f->decode_error_flags |= FF_DECODE_ERROR_DECODE_SLICES; f 768 libavcodec/h264dec.c int use_last_pic = h->last_pic_for_ec.f->buf[0] && !sl->ref_count[0]; f 775 libavcodec/h264dec.c memcpy(sl->ref_list[0][0].data, h->last_pic_for_ec.f->data, sizeof(sl->ref_list[0][0].data)); f 776 libavcodec/h264dec.c memcpy(sl->ref_list[0][0].linesize, h->last_pic_for_ec.f->linesize, sizeof(sl->ref_list[0][0].linesize)); f 815 libavcodec/h264dec.c static int h264_export_enc_params(AVFrame *f, H264Picture *p) f 821 libavcodec/h264dec.c par = av_video_enc_params_create_side_data(f, AV_VIDEO_ENC_PARAMS_H264, nb_mb); f 851 libavcodec/h264dec.c AVFrame *src = srcp->f; f 912 libavcodec/h264dec.c AVFrame *f = out->f; f 921 libavcodec/h264dec.c dst_data[p] = f->data[p] + (field^1)*f->linesize[p]; f 922 libavcodec/h264dec.c src_data[p] = f->data[p] + field *f->linesize[p]; f 923 libavcodec/h264dec.c linesizes[p] = 2*f->linesize[p]; f 927 libavcodec/h264dec.c f->format, f->width, f->height>>1); f 961 libavcodec/h264dec.c !h->delayed_pic[i]->f->key_frame && f 129 libavcodec/h264dec.h AVFrame *f; f 52 libavcodec/h264qpel.c #define FUNCC(f, depth) f ## _ ## depth ## _c f 331 libavcodec/hapdec.c tframe.f = data; f 387 libavcodec/hapdec.c avctx->execute2(avctx, decompress_texture_thread, tframe.f, NULL, ctx->slice_count); f 389 libavcodec/hapdec.c tframe.f = data; f 390 libavcodec/hapdec.c avctx->execute2(avctx, decompress_texture2_thread, tframe.f, NULL, ctx->slice_count); f 395 libavcodec/hapdec.c tframe.f->pict_type = AV_PICTURE_TYPE_I; f 396 libavcodec/hapdec.c tframe.f->key_frame = 1; f 55 libavcodec/hapenc.c static int compress_texture(AVCodecContext *avctx, uint8_t *out, int out_length, const AVFrame *f) f 65 libavcodec/hapenc.c uint8_t *p = f->data[0] + i * 4 + j * f->linesize[0]; f 66 libavcodec/hapenc.c const int step = ctx->tex_fun(out, f->linesize[0], p); f 3374 libavcodec/hevcdec.c s->DPB[i].tf.f = s->DPB[i].frame; f 409 libavcodec/hqx.c ThreadFrame frame = { .f = data }; f 1196 libavcodec/huffyuvdec.c ThreadFrame frame = { .f = data }; f 322 libavcodec/iirfilter.c void ff_iir_filter_init(FFIIRFilterContext *f) { f 323 libavcodec/iirfilter.c f->filter_flt = ff_iir_filter_flt; f 326 libavcodec/iirfilter.c ff_iir_filter_init_mips(f); f 71 libavcodec/iirfilter.h void ff_iir_filter_init(FFIIRFilterContext *f); f 72 libavcodec/iirfilter.h void ff_iir_filter_init_mips(FFIIRFilterContext *f); f 365 libavcodec/ilbcdec.c static void get_lsp_poly(int16_t *lsp, int32_t *f) f 371 libavcodec/ilbcdec.c f[0] = 16777216; f 372 libavcodec/ilbcdec.c f[1] = lsp[0] * -1024; f 375 libavcodec/ilbcdec.c f[l] = f[l - 2]; f 378 libavcodec/ilbcdec.c high = f[l - 1] >> 16; f 379 libavcodec/ilbcdec.c low = (f[l - 1] - (high * (1 << 16))) >> 1; f 383 libavcodec/ilbcdec.c f[l] += f[l - 2]; f 384 libavcodec/ilbcdec.c f[l] -= (unsigned)tmp; f 387 libavcodec/ilbcdec.c f[l] -= lsp[k] * (1 << 10); f 394 libavcodec/ilbcdec.c int32_t f[2][6]; f 401 libavcodec/ilbcdec.c get_lsp_poly(&lsp[0], f[0]); f 402 libavcodec/ilbcdec.c get_lsp_poly(&lsp[1], f[1]); f 405 libavcodec/ilbcdec.c f[0][i] += (unsigned)f[0][i - 1]; f 406 libavcodec/ilbcdec.c f[1][i] -= (unsigned)f[1][i - 1]; f 411 libavcodec/ilbcdec.c tmp = f[0][6 - i] + (unsigned)f[1][6 - i] + 4096; f 414 libavcodec/ilbcdec.c tmp = f[0][6 - i] - (unsigned)f[1][6 - i] + 4096; f 784 libavcodec/intrax8.c w->frame = pict->f; f 667 libavcodec/ituh263dec.c if (s->codec_tag == AV_RL32("U263") && p->f->pict_type == AV_PICTURE_TYPE_I) { f 2358 libavcodec/jpeg2000dec.c ThreadFrame frame = { .f = data }; f 542 libavcodec/lagarith.c ThreadFrame frame = { .f = data }; f 161 libavcodec/lcldec.c ThreadFrame tframe = { .f = data }; f 327 libavcodec/libopenjpegdec.c ThreadFrame frame = { .f = data }; f 196 libavcodec/lpc.h LPC_TYPE f = lpc_last[ j]; f 198 libavcodec/lpc.h lpc[ j] = f + (LPC_TYPE_U)AAC_MUL26(r, b); f 199 libavcodec/lpc.h lpc[i-1-j] = b + (LPC_TYPE_U)AAC_MUL26(r, f); f 106 libavcodec/lsp.c static void lsp2poly(int* f, const int16_t* lsp, int lp_half_order) f 110 libavcodec/lsp.c f[0] = 0x400000; // 1.0 in (3.22) f 111 libavcodec/lsp.c f[1] = -lsp[0] * 256; // *2 and (0.15) -> (3.22) f 115 libavcodec/lsp.c f[i] = f[i-2]; f 117 libavcodec/lsp.c f[j] -= MULL(f[j-1], lsp[2*i-2], FRAC_BITS) - f[j-2]; f 119 libavcodec/lsp.c f[1] -= lsp[2*i-2] * 256; f 191 libavcodec/lsp.c void ff_lsp2polyf(const double *lsp, double *f, int lp_half_order) f 195 libavcodec/lsp.c f[0] = 1.0; f 196 libavcodec/lsp.c f[1] = -2 * lsp[0]; f 201 libavcodec/lsp.c f[i] = val * f[i-1] + 2*f[i-2]; f 203 libavcodec/lsp.c f[j] += f[j-1] * val + f[j-2]; f 204 libavcodec/lsp.c f[1] += val; f 128 libavcodec/lsp.h void ff_lsp2polyf(const double *lsp, double *f, int lp_half_order); f 520 libavcodec/magicyuv.c ThreadFrame frame = { .f = data }; f 176 libavcodec/mdec.c ThreadFrame frame = { .f = data }; f 181 libavcodec/mdec.c frame.f->pict_type = AV_PICTURE_TYPE_I; f 182 libavcodec/mdec.c frame.f->key_frame = 1; f 204 libavcodec/mdec.c idct_put(a, frame.f, a->mb_x, a->mb_y); f 37 libavcodec/microdvddec.c char *f = strchr(s, c); f 38 libavcodec/microdvddec.c return f ? (f - s) : -1; f 126 libavcodec/mimic.c if (ctx->frames[i].f) f 128 libavcodec/mimic.c av_frame_free(&ctx->frames[i].f); f 156 libavcodec/mimic.c ctx->frames[i].f = av_frame_alloc(); f 157 libavcodec/mimic.c if (!ctx->frames[i].f) { f 180 libavcodec/mimic.c if (i != src->next_cur_index && src->frames[i].f->data[0]) { f 281 libavcodec/mimic.c const int stride = ctx->frames[ctx->cur_index ].f->linesize[plane]; f 282 libavcodec/mimic.c const uint8_t *src = ctx->frames[ctx->prev_index].f->data[plane]; f 283 libavcodec/mimic.c uint8_t *dst = ctx->frames[ctx->cur_index ].f->data[plane]; f 306 libavcodec/mimic.c uint8_t *p = ctx->frames[index].f->data[0]; f 312 libavcodec/mimic.c ctx->frames[ctx->prev_index].f->data[plane]; f 342 libavcodec/mimic.c static void flip_swap_frame(AVFrame *f) f 345 libavcodec/mimic.c uint8_t *data_1 = f->data[1]; f 346 libavcodec/mimic.c f->data[0] = f->data[0] + ( f->height - 1) * f->linesize[0]; f 347 libavcodec/mimic.c f->data[1] = f->data[2] + ((f->height >> 1) - 1) * f->linesize[2]; f 348 libavcodec/mimic.c f->data[2] = data_1 + ((f->height >> 1) - 1) * f->linesize[1]; f 350 libavcodec/mimic.c f->linesize[i] *= -1; f 405 libavcodec/mimic.c if (is_pframe && !ctx->frames[ctx->prev_index].f->data[0]) { f 411 libavcodec/mimic.c ctx->frames[ctx->cur_index].f->pict_type = is_pframe ? AV_PICTURE_TYPE_P : f 439 libavcodec/mimic.c if ((res = av_frame_ref(data, ctx->frames[ctx->cur_index].f)) < 0) f 107 libavcodec/mips/aacpsy_mips.h [e]"+f"(band->energy), [f]"+f"(form_factor), f 203 libavcodec/mips/iirfilter_mips.c void ff_iir_filter_init_mips(FFIIRFilterContext *f) { f 206 libavcodec/mips/iirfilter_mips.c f->filter_flt = iir_filter_flt_mips; f 61 libavcodec/mips/lsp_mips.h static av_always_inline void ff_lsp2polyf_mips(const double *lsp, double *f, int lp_half_order) f 64 libavcodec/mips/lsp_mips.h double * p_fi = f; f 67 libavcodec/mips/lsp_mips.h f[0] = 1.0; f 68 libavcodec/mips/lsp_mips.h f[1] = -2 * lsp[0]; f 107 libavcodec/mips/lsp_mips.h f[1] += val; f 684 libavcodec/motion_est.c s->new_picture.f->data[0] + f 701 libavcodec/motion_est.c s->hdsp.put_no_rnd_pixels_tab[1][dxy](c->scratchpad , s->last_picture.f->data[1] + offset, s->uvlinesize, 8); f 702 libavcodec/motion_est.c s->hdsp.put_no_rnd_pixels_tab[1][dxy](c->scratchpad + 8, s->last_picture.f->data[2] + offset, s->uvlinesize, 8); f 704 libavcodec/motion_est.c s->hdsp.put_pixels_tab [1][dxy](c->scratchpad , s->last_picture.f->data[1] + offset, s->uvlinesize, 8); f 705 libavcodec/motion_est.c s->hdsp.put_pixels_tab [1][dxy](c->scratchpad + 8, s->last_picture.f->data[2] + offset, s->uvlinesize, 8); f 708 libavcodec/motion_est.c dmin_sum += s->mecc.mb_cmp[1](s, s->new_picture.f->data[1] + s->mb_x * 8 + s->mb_y * 8 * s->uvlinesize, c->scratchpad, s->uvlinesize, 8); f 709 libavcodec/motion_est.c dmin_sum += s->mecc.mb_cmp[1](s, s->new_picture.f->data[2] + s->mb_x * 8 + s->mb_y * 8 * s->uvlinesize, c->scratchpad + 8, s->uvlinesize, 8); f 898 libavcodec/motion_est.c init_ref(c, s->new_picture.f->data, s->last_picture.f->data, NULL, 16*mb_x, 16*mb_y, 0); f 1069 libavcodec/motion_est.c init_ref(c, s->new_picture.f->data, s->last_picture.f->data, NULL, 16*mb_x, 16*mb_y, 0); f 1498 libavcodec/motion_est.c init_ref(c, s->new_picture.f->data, s->last_picture.f->data, f 1499 libavcodec/motion_est.c s->next_picture.f->data, 16 * mb_x, 16 * mb_y, 2); f 1382 libavcodec/mpeg12dec.c s->current_picture.f->pict_type = s->pict_type; f 1383 libavcodec/mpeg12dec.c s->current_picture.f->key_frame = s->pict_type == AV_PICTURE_TYPE_I; f 1558 libavcodec/mpeg12dec.c s->current_picture.f->pict_type = s->pict_type; f 1559 libavcodec/mpeg12dec.c s->current_picture.f->key_frame = s->pict_type == AV_PICTURE_TYPE_I; f 1619 libavcodec/mpeg12dec.c s->current_picture_ptr->f->repeat_pict = 0; f 1623 libavcodec/mpeg12dec.c s->current_picture_ptr->f->repeat_pict = 4; f 1625 libavcodec/mpeg12dec.c s->current_picture_ptr->f->repeat_pict = 2; f 1627 libavcodec/mpeg12dec.c s->current_picture_ptr->f->repeat_pict = 1; f 1631 libavcodec/mpeg12dec.c pan_scan = av_frame_new_side_data(s->current_picture_ptr->f, f 1640 libavcodec/mpeg12dec.c s->current_picture_ptr->f, AV_FRAME_DATA_A53_CC, f 1648 libavcodec/mpeg12dec.c AVStereo3D *stereo = av_stereo3d_create_side_data(s->current_picture_ptr->f); f 1658 libavcodec/mpeg12dec.c av_frame_new_side_data(s->current_picture_ptr->f, f 1686 libavcodec/mpeg12dec.c s->current_picture.f->data[i] = s->current_picture_ptr->f->data[i]; f 1688 libavcodec/mpeg12dec.c s->current_picture.f->data[i] += f 1689 libavcodec/mpeg12dec.c s->current_picture_ptr->f->linesize[i]; f 2066 libavcodec/mpeg12dec.c int ret = av_frame_ref(pict, s->current_picture_ptr->f); f 2077 libavcodec/mpeg12dec.c int ret = av_frame_ref(pict, s->last_picture_ptr->f); f 2801 libavcodec/mpeg12dec.c int ret = av_frame_ref(picture, s2->next_picture_ptr->f); f 253 libavcodec/mpeg12enc.c if (s->current_picture.f->key_frame) { f 342 libavcodec/mpeg12enc.c side_data = av_frame_get_side_data(s->current_picture_ptr->f, AV_FRAME_DATA_PANSCAN); f 378 libavcodec/mpeg12enc.c time_code = s->current_picture_ptr->f->coded_picture_number + f 381 libavcodec/mpeg12enc.c s->gop_picture_number = s->current_picture_ptr->f->coded_picture_number; f 488 libavcodec/mpeg12enc.c put_bits(&s->pb, 1, s->current_picture_ptr->f->top_field_first); f 512 libavcodec/mpeg12enc.c side_data = av_frame_get_side_data(s->current_picture_ptr->f, f 552 libavcodec/mpeg12enc.c side_data = av_frame_get_side_data(s->current_picture_ptr->f, f 647 libavcodec/mpeg4videoenc.c p_pic = s->new_picture.f->data[0] + offset; f 655 libavcodec/mpeg4videoenc.c if (!pic || pic->f->pict_type != AV_PICTURE_TYPE_B) f 658 libavcodec/mpeg4videoenc.c b_pic = pic->f->data[0] + offset; f 892 libavcodec/mpeg4videoenc.c time = s->current_picture_ptr->f->pts; f 894 libavcodec/mpeg4videoenc.c time = FFMIN(time, s->reordered_input_picture[1]->f->pts); f 1107 libavcodec/mpeg4videoenc.c put_bits(&s->pb, 1, s->current_picture_ptr->f->top_field_first); f 29 libavcodec/mpeg_er.c dst->f = NULL; f 34 libavcodec/mpeg_er.c dst->f = src->f; f 84 libavcodec/mpeg_er.c s->dest[0] = s->current_picture.f->data[0] + f 87 libavcodec/mpeg_er.c s->dest[1] = s->current_picture.f->data[1] + f 90 libavcodec/mpeg_er.c s->dest[2] = s->current_picture.f->data[2] + f 62 libavcodec/mpegaudio_tablegen.h double f, fm; f 67 libavcodec/mpegaudio_tablegen.h f = pow43_val * exp2_lut[i & 3]; f 68 libavcodec/mpegaudio_tablegen.h fm = frexp(f, &e); f 81 libavcodec/mpegaudio_tablegen.h double f = pow43_lut[value] * exp2_val; f 82 libavcodec/mpegaudio_tablegen.h expval_table_fixed[exponent][value] = (f < 0xFFFFFFFF ? llrint(f) : 0xFFFFFFFF); f 83 libavcodec/mpegaudio_tablegen.h expval_table_float[exponent][value] = f; f 362 libavcodec/mpegaudiodec_template.c float f; f 365 libavcodec/mpegaudiodec_template.c f = tan((double)i * M_PI / 12.0); f 366 libavcodec/mpegaudiodec_template.c v = FIXR(f / (1.0 + f)); f 378 libavcodec/mpegaudiodec_template.c double f; f 383 libavcodec/mpegaudiodec_template.c f = exp2(e / 4.0); f 385 libavcodec/mpegaudiodec_template.c is_table_lsf[j][k ^ 1][i] = FIXR(f); f 108 libavcodec/mpegpicture.c pic->tf.f = pic->f; f 113 libavcodec/mpegpicture.c pic->f->width = avctx->width + 2 * EDGE_WIDTH; f 114 libavcodec/mpegpicture.c pic->f->height = avctx->height + 2 * EDGE_WIDTH; f 120 libavcodec/mpegpicture.c pic->f->width = avctx->width; f 121 libavcodec/mpegpicture.c pic->f->height = avctx->height; f 122 libavcodec/mpegpicture.c pic->f->format = avctx->pix_fmt; f 123 libavcodec/mpegpicture.c r = avcodec_default_get_buffer2(avctx, pic->f, 0); f 126 libavcodec/mpegpicture.c if (r < 0 || !pic->f->buf[0]) { f 128 libavcodec/mpegpicture.c r, pic->f->data[0]); f 134 libavcodec/mpegpicture.c for (i = 0; pic->f->data[i]; i++) { f 136 libavcodec/mpegpicture.c pic->f->linesize[i] + f 138 libavcodec/mpegpicture.c pic->f->data[i] += offset; f 140 libavcodec/mpegpicture.c pic->f->width = avctx->width; f 141 libavcodec/mpegpicture.c pic->f->height = avctx->height; f 156 libavcodec/mpegpicture.c if ((linesize && linesize != pic->f->linesize[0]) || f 157 libavcodec/mpegpicture.c (uvlinesize && uvlinesize != pic->f->linesize[1])) { f 160 libavcodec/mpegpicture.c linesize, pic->f->linesize[0], f 161 libavcodec/mpegpicture.c uvlinesize, pic->f->linesize[1]); f 166 libavcodec/mpegpicture.c if (av_pix_fmt_count_planes(pic->f->format) > 2 && f 167 libavcodec/mpegpicture.c pic->f->linesize[1] != pic->f->linesize[2]) { f 176 libavcodec/mpegpicture.c pic->f->linesize[0])) < 0) { f 250 libavcodec/mpegpicture.c av_assert0(pic->f->data[0]); f 253 libavcodec/mpegpicture.c av_assert0(!pic->f->buf[0]); f 259 libavcodec/mpegpicture.c *linesize = pic->f->linesize[0]; f 260 libavcodec/mpegpicture.c *uvlinesize = pic->f->linesize[1]; f 303 libavcodec/mpegpicture.c pic->tf.f = pic->f; f 310 libavcodec/mpegpicture.c else if (pic->f) f 311 libavcodec/mpegpicture.c av_frame_unref(pic->f); f 370 libavcodec/mpegpicture.c av_assert0(!dst->f->buf[0]); f 371 libavcodec/mpegpicture.c av_assert0(src->f->buf[0]); f 373 libavcodec/mpegpicture.c src->tf.f = src->f; f 374 libavcodec/mpegpicture.c dst->tf.f = dst->f; f 411 libavcodec/mpegpicture.c if (!pic->f->buf[0]) f 424 libavcodec/mpegpicture.c if (!picture[i].f->buf[0]) f 46 libavcodec/mpegpicture.h struct AVFrame *f; f 546 libavcodec/mpegvideo.c if (s1->picture && s1->picture[i].f->buf[0] && f 554 libavcodec/mpegvideo.c if (s1->pic.f && s1->pic.f->buf[0])\ f 632 libavcodec/mpegvideo.c s->last_lambda_for[s1->pict_type] = s1->current_picture_ptr->f->quality; f 940 libavcodec/mpegvideo.c s->picture[i].f = av_frame_alloc(); f 941 libavcodec/mpegvideo.c if (!s->picture[i].f) f 944 libavcodec/mpegvideo.c s->next_picture.f = av_frame_alloc(); f 945 libavcodec/mpegvideo.c if (!s->next_picture.f) f 947 libavcodec/mpegvideo.c s->last_picture.f = av_frame_alloc(); f 948 libavcodec/mpegvideo.c if (!s->last_picture.f) f 950 libavcodec/mpegvideo.c s->current_picture.f = av_frame_alloc(); f 951 libavcodec/mpegvideo.c if (!s->current_picture.f) f 953 libavcodec/mpegvideo.c s->new_picture.f = av_frame_alloc(); f 954 libavcodec/mpegvideo.c if (!s->new_picture.f) f 1158 libavcodec/mpegvideo.c av_frame_free(&s->picture[i].f); f 1164 libavcodec/mpegvideo.c av_frame_free(&s->last_picture.f); f 1167 libavcodec/mpegvideo.c av_frame_free(&s->current_picture.f); f 1170 libavcodec/mpegvideo.c av_frame_free(&s->next_picture.f); f 1173 libavcodec/mpegvideo.c av_frame_free(&s->new_picture.f); f 1219 libavcodec/mpegvideo.c s->last_picture_ptr->f->buf[0]) { f 1243 libavcodec/mpegvideo.c if (s->current_picture_ptr && !s->current_picture_ptr->f->buf[0]) { f 1262 libavcodec/mpegvideo.c pic->f->coded_picture_number = s->coded_picture_number++; f 1269 libavcodec/mpegvideo.c s->current_picture_ptr->f->top_field_first = s->top_field_first; f 1273 libavcodec/mpegvideo.c s->current_picture_ptr->f->top_field_first = f 1276 libavcodec/mpegvideo.c s->current_picture_ptr->f->interlaced_frame = !s->progressive_frame && f 1280 libavcodec/mpegvideo.c s->current_picture_ptr->f->pict_type = s->pict_type; f 1283 libavcodec/mpegvideo.c s->current_picture_ptr->f->key_frame = s->pict_type == AV_PICTURE_TYPE_I; f 1296 libavcodec/mpegvideo.c s->last_picture_ptr ? s->last_picture_ptr->f->data[0] : NULL, f 1297 libavcodec/mpegvideo.c s->next_picture_ptr ? s->next_picture_ptr->f->data[0] : NULL, f 1298 libavcodec/mpegvideo.c s->current_picture_ptr ? s->current_picture_ptr->f->data[0] : NULL, f 1301 libavcodec/mpegvideo.c if ((!s->last_picture_ptr || !s->last_picture_ptr->f->buf[0]) && f 1306 libavcodec/mpegvideo.c if (s->pict_type == AV_PICTURE_TYPE_B && s->next_picture_ptr && s->next_picture_ptr->f->buf[0]) f 1322 libavcodec/mpegvideo.c s->last_picture_ptr->f->key_frame = 0; f 1323 libavcodec/mpegvideo.c s->last_picture_ptr->f->pict_type = AV_PICTURE_TYPE_P; f 1332 libavcodec/mpegvideo.c memset(s->last_picture_ptr->f->data[0] + s->last_picture_ptr->f->linesize[0]*i, f 1334 libavcodec/mpegvideo.c if (s->last_picture_ptr->f->data[2]) { f 1336 libavcodec/mpegvideo.c memset(s->last_picture_ptr->f->data[1] + s->last_picture_ptr->f->linesize[1]*i, f 1338 libavcodec/mpegvideo.c memset(s->last_picture_ptr->f->data[2] + s->last_picture_ptr->f->linesize[2]*i, f 1345 libavcodec/mpegvideo.c memset(s->last_picture_ptr->f->data[0] + s->last_picture_ptr->f->linesize[0]*i, 16, avctx->width); f 1352 libavcodec/mpegvideo.c if ((!s->next_picture_ptr || !s->next_picture_ptr->f->buf[0]) && f 1363 libavcodec/mpegvideo.c s->next_picture_ptr->f->key_frame = 0; f 1364 libavcodec/mpegvideo.c s->next_picture_ptr->f->pict_type = AV_PICTURE_TYPE_P; f 1375 libavcodec/mpegvideo.c memset(s->last_picture.f->data, 0, sizeof(s->last_picture.f->data)); f 1376 libavcodec/mpegvideo.c memset(s->next_picture.f->data, 0, sizeof(s->next_picture.f->data)); f 1379 libavcodec/mpegvideo.c if (s->last_picture_ptr->f->buf[0] && f 1385 libavcodec/mpegvideo.c if (s->next_picture_ptr->f->buf[0] && f 1392 libavcodec/mpegvideo.c s->last_picture_ptr->f->buf[0])); f 1398 libavcodec/mpegvideo.c s->current_picture.f->data[i] += f 1399 libavcodec/mpegvideo.c s->current_picture.f->linesize[i]; f 1401 libavcodec/mpegvideo.c s->current_picture.f->linesize[i] *= 2; f 1402 libavcodec/mpegvideo.c s->last_picture.f->linesize[i] *= 2; f 1403 libavcodec/mpegvideo.c s->next_picture.f->linesize[i] *= 2; f 1422 libavcodec/mpegvideo.c gray_frame(s->current_picture_ptr->f); f 1444 libavcodec/mpegvideo.c int ff_mpv_export_qp_table(MpegEncContext *s, AVFrame *f, Picture *p, int qp_type) f 1450 libavcodec/mpegvideo.c av_assert0(ref->size >= offset + s->mb_stride * ((f->height+15)/16)); f 1453 libavcodec/mpegvideo.c return av_frame_set_qp_table(f, ref, s->mb_stride, qp_type); f 1524 libavcodec/mpegvideo.c linesize = s->current_picture.f->linesize[0] << field_based; f 1525 libavcodec/mpegvideo.c uvlinesize = s->current_picture.f->linesize[1] << field_based; f 1771 libavcodec/mpegvideo.c ref_picture = s->current_picture_ptr->f->data; f 1789 libavcodec/mpegvideo.c ref2picture = s->current_picture_ptr->f->data; f 1831 libavcodec/mpegvideo.c ref_picture = s->current_picture_ptr->f->data; f 1997 libavcodec/mpegvideo.c const int linesize = s->current_picture.f->linesize[0]; //not s->linesize as this would be wrong for field pics f 1998 libavcodec/mpegvideo.c const int uvlinesize = s->current_picture.f->linesize[1]; f 2053 libavcodec/mpegvideo.c MPV_motion_lowres(s, dest_y, dest_cb, dest_cr, 0, s->last_picture.f->data, op_pix); f 2057 libavcodec/mpegvideo.c MPV_motion_lowres(s, dest_y, dest_cb, dest_cr, 1, s->next_picture.f->data, op_pix); f 2067 libavcodec/mpegvideo.c ff_mpv_motion(s, dest_y, dest_cb, dest_cr, 0, s->last_picture.f->data, op_pix, op_qpix); f 2072 libavcodec/mpegvideo.c ff_mpv_motion(s, dest_y, dest_cb, dest_cr, 1, s->next_picture.f->data, op_pix, op_qpix); f 2267 libavcodec/mpegvideo.c ff_draw_horiz_band(s->avctx, s->current_picture_ptr->f, f 2268 libavcodec/mpegvideo.c s->last_picture_ptr ? s->last_picture_ptr->f : NULL, y, h, s->picture_structure, f 2273 libavcodec/mpegvideo.c const int linesize = s->current_picture.f->linesize[0]; //not s->linesize as this would be wrong for field pics f 2274 libavcodec/mpegvideo.c const int uvlinesize = s->current_picture.f->linesize[1]; f 2286 libavcodec/mpegvideo.c s->dest[0] = s->current_picture.f->data[0] + (int)((s->mb_x - 1U) << width_of_mb); f 2287 libavcodec/mpegvideo.c s->dest[1] = s->current_picture.f->data[1] + (int)((s->mb_x - 1U) << (width_of_mb - s->chroma_x_shift)); f 2288 libavcodec/mpegvideo.c s->dest[2] = s->current_picture.f->data[2] + (int)((s->mb_x - 1U) << (width_of_mb - s->chroma_x_shift)); f 716 libavcodec/mpegvideo.h int ff_mpv_export_qp_table(MpegEncContext *s, AVFrame *f, Picture *p, int qp_type); f 1214 libavcodec/mpegvideo_enc.c if ((ret = av_frame_ref(pic->f, pic_arg)) < 0) f 1222 libavcodec/mpegvideo_enc.c if (pic->f->data[0] + INPLACE_OFFSET == pic_arg->data[0] && f 1223 libavcodec/mpegvideo_enc.c pic->f->data[1] + INPLACE_OFFSET == pic_arg->data[1] && f 1224 libavcodec/mpegvideo_enc.c pic->f->data[2] + INPLACE_OFFSET == pic_arg->data[2]) { f 1240 libavcodec/mpegvideo_enc.c uint8_t *dst = pic->f->data[i]; f 1273 libavcodec/mpegvideo_enc.c ret = av_frame_copy_props(pic->f, pic_arg); f 1277 libavcodec/mpegvideo_enc.c pic->f->display_picture_number = display_picture_number; f 1278 libavcodec/mpegvideo_enc.c pic->f->pts = pts; // we set this here to avoid modifying pic_arg f 1308 libavcodec/mpegvideo_enc.c const int stride = p->f->linesize[plane]; f 1313 libavcodec/mpegvideo_enc.c uint8_t *dptr = p->f->data[plane] + 8 * (x + y * stride) + off; f 1314 libavcodec/mpegvideo_enc.c uint8_t *rptr = ref->f->data[plane] + 8 * (x + y * stride); f 1396 libavcodec/mpegvideo_enc.c memcpy(data, pre_input_ptr->f->data, sizeof(data)); f 1407 libavcodec/mpegvideo_enc.c pre_input.f->linesize[0], f 1412 libavcodec/mpegvideo_enc.c pre_input.f->linesize[1], f 1417 libavcodec/mpegvideo_enc.c pre_input.f->linesize[2], f 1515 libavcodec/mpegvideo_enc.c av_frame_unref(s->input_picture[0]->f); f 1526 libavcodec/mpegvideo_enc.c s->reordered_input_picture[0]->f->pict_type = AV_PICTURE_TYPE_I; f 1527 libavcodec/mpegvideo_enc.c s->reordered_input_picture[0]->f->coded_picture_number = f 1534 libavcodec/mpegvideo_enc.c int pict_num = s->input_picture[0]->f->display_picture_number + i; f 1543 libavcodec/mpegvideo_enc.c s->input_picture[i]->f->pict_type = f 1558 libavcodec/mpegvideo_enc.c s->input_picture[i ]->f->data[0], f 1559 libavcodec/mpegvideo_enc.c s->input_picture[i - 1]->f->data[0], f 1585 libavcodec/mpegvideo_enc.c int type = s->input_picture[i]->f->pict_type; f 1589 libavcodec/mpegvideo_enc.c if (s->input_picture[b_frames]->f->pict_type == AV_PICTURE_TYPE_B && f 1602 libavcodec/mpegvideo_enc.c s->input_picture[b_frames]->f->pict_type = AV_PICTURE_TYPE_I; f 1607 libavcodec/mpegvideo_enc.c s->input_picture[b_frames]->f->pict_type == AV_PICTURE_TYPE_I) f 1611 libavcodec/mpegvideo_enc.c if (s->reordered_input_picture[0]->f->pict_type != AV_PICTURE_TYPE_I) f 1612 libavcodec/mpegvideo_enc.c s->reordered_input_picture[0]->f->pict_type = AV_PICTURE_TYPE_P; f 1613 libavcodec/mpegvideo_enc.c s->reordered_input_picture[0]->f->coded_picture_number = f 1617 libavcodec/mpegvideo_enc.c s->reordered_input_picture[i + 1]->f->pict_type = f 1619 libavcodec/mpegvideo_enc.c s->reordered_input_picture[i + 1]->f->coded_picture_number = f 1629 libavcodec/mpegvideo_enc.c s->reordered_input_picture[0]->f->pict_type != f 1650 libavcodec/mpegvideo_enc.c ret = av_frame_copy_props(pic->f, s->reordered_input_picture[0]->f); f 1655 libavcodec/mpegvideo_enc.c av_frame_unref(s->reordered_input_picture[0]->f); f 1663 libavcodec/mpegvideo_enc.c s->new_picture.f->data[i] += INPLACE_OFFSET; f 1671 libavcodec/mpegvideo_enc.c s->picture_number = s->new_picture.f->display_picture_number; f 1684 libavcodec/mpegvideo_enc.c s->mpvencdsp.draw_edges(s->current_picture.f->data[0], f 1685 libavcodec/mpegvideo_enc.c s->current_picture.f->linesize[0], f 1689 libavcodec/mpegvideo_enc.c s->mpvencdsp.draw_edges(s->current_picture.f->data[1], f 1690 libavcodec/mpegvideo_enc.c s->current_picture.f->linesize[1], f 1696 libavcodec/mpegvideo_enc.c s->mpvencdsp.draw_edges(s->current_picture.f->data[2], f 1697 libavcodec/mpegvideo_enc.c s->current_picture.f->linesize[2], f 1708 libavcodec/mpegvideo_enc.c s->last_lambda_for [s->pict_type] = s->current_picture_ptr->f->quality; f 1715 libavcodec/mpegvideo_enc.c av_frame_copy_props(s->avctx->coded_frame, s->current_picture.f); f 1720 libavcodec/mpegvideo_enc.c memcpy(s->current_picture.f->error, s->current_picture.encoding_error, f 1754 libavcodec/mpegvideo_enc.c s->last_picture_ptr->f->buf[0]) { f 1758 libavcodec/mpegvideo_enc.c s->current_picture_ptr->f->pict_type = s->pict_type; f 1759 libavcodec/mpegvideo_enc.c s->current_picture_ptr->f->key_frame = s->pict_type == AV_PICTURE_TYPE_I; f 1774 libavcodec/mpegvideo_enc.c if (s->last_picture_ptr->f->buf[0] && f 1781 libavcodec/mpegvideo_enc.c if (s->next_picture_ptr->f->buf[0] && f 1791 libavcodec/mpegvideo_enc.c s->current_picture.f->data[i] += f 1792 libavcodec/mpegvideo_enc.c s->current_picture.f->linesize[i]; f 1794 libavcodec/mpegvideo_enc.c s->current_picture.f->linesize[i] *= 2; f 1795 libavcodec/mpegvideo_enc.c s->last_picture.f->linesize[i] *= 2; f 1796 libavcodec/mpegvideo_enc.c s->next_picture.f->linesize[i] *= 2; f 1838 libavcodec/mpegvideo_enc.c if (s->new_picture.f->data[0]) { f 1862 libavcodec/mpegvideo_enc.c s->pict_type = s->new_picture.f->pict_type; f 1945 libavcodec/mpegvideo_enc.c ff_side_data_set_encoder_stats(pkt, s->current_picture.f->quality, f 2050 libavcodec/mpegvideo_enc.c pkt->pts = s->current_picture.f->pts; f 2052 libavcodec/mpegvideo_enc.c if (!s->current_picture.f->coded_picture_number) f 2059 libavcodec/mpegvideo_enc.c if (s->current_picture.f->key_frame) f 2246 libavcodec/mpegvideo_enc.c ptr_y = s->new_picture.f->data[0] + f 2248 libavcodec/mpegvideo_enc.c ptr_cb = s->new_picture.f->data[1] + f 2250 libavcodec/mpegvideo_enc.c ptr_cr = s->new_picture.f->data[2] + f 2345 libavcodec/mpegvideo_enc.c s->last_picture.f->data, f 2352 libavcodec/mpegvideo_enc.c s->next_picture.f->data, f 2729 libavcodec/mpegvideo_enc.c return s->mecc.nsse[0](s, s->new_picture.f->data[0] + s->mb_x * 16 + s->mb_y * s->linesize * 16, s->dest[0], s->linesize, 16) + f 2730 libavcodec/mpegvideo_enc.c s->mecc.nsse[1](s, s->new_picture.f->data[1] + s->mb_x * 8 + s->mb_y * s->uvlinesize * 8, s->dest[1], s->uvlinesize, 8) + f 2731 libavcodec/mpegvideo_enc.c s->mecc.nsse[1](s, s->new_picture.f->data[2] + s->mb_x * 8 + s->mb_y * s->uvlinesize * 8, s->dest[2], s->uvlinesize, 8); f 2733 libavcodec/mpegvideo_enc.c return s->mecc.sse[0](NULL, s->new_picture.f->data[0] + s->mb_x * 16 + s->mb_y * s->linesize * 16, s->dest[0], s->linesize, 16) + f 2734 libavcodec/mpegvideo_enc.c s->mecc.sse[1](NULL, s->new_picture.f->data[1] + s->mb_x * 8 + s->mb_y * s->uvlinesize * 8, s->dest[1], s->uvlinesize, 8) + f 2735 libavcodec/mpegvideo_enc.c s->mecc.sse[1](NULL, s->new_picture.f->data[2] + s->mb_x * 8 + s->mb_y * s->uvlinesize * 8, s->dest[2], s->uvlinesize, 8); f 2738 libavcodec/mpegvideo_enc.c return sse(s, s->new_picture.f->data[0] + s->mb_x*16 + s->mb_y*s->linesize*16, s->dest[0], w, h, s->linesize) f 2739 libavcodec/mpegvideo_enc.c +sse(s, s->new_picture.f->data[1] + s->mb_x*8 + s->mb_y*s->uvlinesize*8,s->dest[1], w>>1, h>>1, s->uvlinesize) f 2740 libavcodec/mpegvideo_enc.c +sse(s, s->new_picture.f->data[2] + s->mb_x*8 + s->mb_y*s->uvlinesize*8,s->dest[2], w>>1, h>>1, s->uvlinesize); f 2799 libavcodec/mpegvideo_enc.c uint8_t *pix = s->new_picture.f->data[0] + (yy * s->linesize) + xx; f 3522 libavcodec/mpegvideo_enc.c s, s->new_picture.f->data[0] + s->mb_x*16 + s->mb_y*s->linesize*16, f 3525 libavcodec/mpegvideo_enc.c s, s->new_picture.f->data[1] + s->mb_x*8 + s->mb_y*s->uvlinesize*chr_h, f 3528 libavcodec/mpegvideo_enc.c s, s->new_picture.f->data[2] + s->mb_x*8 + s->mb_y*s->uvlinesize*chr_h, f 3603 libavcodec/mpegvideo_enc.c s->current_picture_ptr->f->quality = f 3604 libavcodec/mpegvideo_enc.c s->current_picture.f->quality = s->next_lambda; f 3608 libavcodec/mpegvideo_enc.c s->current_picture_ptr->f->quality = f 3609 libavcodec/mpegvideo_enc.c s->current_picture.f->quality = quality; f 3610 libavcodec/mpegvideo_enc.c if (s->current_picture.f->quality < 0) f 3633 libavcodec/mpegvideo_enc.c s->lambda = s->current_picture.f->quality; f 3640 libavcodec/mpegvideo_enc.c av_assert1(s->current_picture_ptr->f->pts != AV_NOPTS_VALUE); f 3641 libavcodec/mpegvideo_enc.c s->time = s->current_picture_ptr->f->pts * s->avctx->time_base.num; f 3864 libavcodec/mpegvideo_enc.c s->current_picture_ptr->f->key_frame = f 3865 libavcodec/mpegvideo_enc.c s->current_picture.f->key_frame = s->pict_type == AV_PICTURE_TYPE_I; //FIXME pic_ptr f 3866 libavcodec/mpegvideo_enc.c s->current_picture_ptr->f->pict_type = f 3867 libavcodec/mpegvideo_enc.c s->current_picture.f->pict_type = s->pict_type; f 3869 libavcodec/mpegvideo_enc.c if (s->current_picture.f->key_frame) f 251 libavcodec/mpegvideo_motion.c linesize = s->current_picture.f->linesize[0] << field_based; f 252 libavcodec/mpegvideo_motion.c uvlinesize = s->current_picture.f->linesize[1] << field_based; f 906 libavcodec/mpegvideo_motion.c ref_picture = s->current_picture_ptr->f->data; f 923 libavcodec/mpegvideo_motion.c ref2picture = s->current_picture_ptr->f->data; f 950 libavcodec/mpegvideo_motion.c ref_picture = s->current_picture_ptr->f->data; f 965 libavcodec/mpegvideo_motion.c ref_picture = s->current_picture_ptr->f->data; f 45 libavcodec/mpegvideo_xvmc.c struct xvmc_pix_fmt *render = (struct xvmc_pix_fmt*)s->current_picture.f->data[2]; f 90 libavcodec/mpegvideo_xvmc.c struct xvmc_pix_fmt *last, *next, *render = (struct xvmc_pix_fmt*)s->current_picture.f->data[2]; f 130 libavcodec/mpegvideo_xvmc.c next = (struct xvmc_pix_fmt*)s->next_picture.f->data[2]; f 138 libavcodec/mpegvideo_xvmc.c last = (struct xvmc_pix_fmt*)s->last_picture.f->data[2]; f 159 libavcodec/mpegvideo_xvmc.c struct xvmc_pix_fmt *render = (struct xvmc_pix_fmt*)s->current_picture.f->data[2]; f 201 libavcodec/mpegvideo_xvmc.c render = (struct xvmc_pix_fmt*)s->current_picture.f->data[2]; f 280 libavcodec/msmpeg4.c dest= s->current_picture.f->data[0] + (((n >> 1) + 2*s->mb_y) * bs* wrap ) + ((n & 1) + 2*s->mb_x) * bs; f 283 libavcodec/msmpeg4.c dest= s->current_picture.f->data[n - 3] + (s->mb_y * bs * wrap) + s->mb_x * bs; f 385 libavcodec/mss2.c AVFrame *f; f 434 libavcodec/mss2.c f = s->current_picture.f; f 437 libavcodec/mss2.c ctx->dsp.upsample_plane(f->data[0], f->linesize[0], w, h); f 438 libavcodec/mss2.c ctx->dsp.upsample_plane(f->data[1], f->linesize[1], w+1 >> 1, h+1 >> 1); f 439 libavcodec/mss2.c ctx->dsp.upsample_plane(f->data[2], f->linesize[2], w+1 >> 1, h+1 >> 1); f 444 libavcodec/mss2.c av_assert0(f->linesize[1] == f->linesize[2]); f 451 libavcodec/mss2.c f->data[0], f->linesize[0], f 452 libavcodec/mss2.c f->data[1], f->data[2], f->linesize[1], f 457 libavcodec/mss2.c f->data[0], f->linesize[0], f 458 libavcodec/mss2.c f->data[1], f->data[2], f->linesize[1], f 399 libavcodec/notchlc.c ThreadFrame frame = { .f = data }; f 76 libavcodec/nuv.c static void copy_frame(AVFrame *f, const uint8_t *src, int width, int height) f 81 libavcodec/nuv.c f->format, width, height, 1); f 82 libavcodec/nuv.c av_image_copy(f->data, f->linesize, (const uint8_t **)src_data, src_linesize, f 83 libavcodec/nuv.c f->format, width, height); f 35 libavcodec/nvdec_h264.c FrameDecodeData *fdd = (FrameDecodeData*)src->f->private_ref->data; f 62 libavcodec/nvdec_h264.c ret = ff_nvdec_start_frame(avctx, h->cur_pic_ptr->f); f 66 libavcodec/nvdec_h264.c fdd = (FrameDecodeData*)h->cur_pic_ptr->f->private_ref->data; f 37 libavcodec/nvdec_mpeg12.c AVFrame *cur_frame = s->current_picture.f; f 62 libavcodec/nvdec_mpeg12.c .ForwardRefIdx = ff_nvdec_get_ref_idx(s->last_picture.f), f 63 libavcodec/nvdec_mpeg12.c .BackwardRefIdx = ff_nvdec_get_ref_idx(s->next_picture.f), f 38 libavcodec/nvdec_mpeg4.c AVFrame *cur_frame = s->current_picture.f; f 60 libavcodec/nvdec_mpeg4.c .ForwardRefIdx = ff_nvdec_get_ref_idx(s->last_picture.f), f 61 libavcodec/nvdec_mpeg4.c .BackwardRefIdx = ff_nvdec_get_ref_idx(s->next_picture.f), f 37 libavcodec/nvdec_vc1.c AVFrame *cur_frame = s->current_picture.f; f 62 libavcodec/nvdec_vc1.c .ForwardRefIdx = ff_nvdec_get_ref_idx(s->last_picture.f), f 63 libavcodec/nvdec_vc1.c .BackwardRefIdx = ff_nvdec_get_ref_idx(s->next_picture.f), f 31 libavcodec/nvdec_vp8.c return frame ? ff_nvdec_get_ref_idx(frame->tf.f) : 255; f 42 libavcodec/nvdec_vp8.c AVFrame *cur_frame = h->framep[VP56_FRAME_CURRENT]->tf.f; f 41 libavcodec/nvdec_vp9.c AVFrame *cur_frame = h->frames[CUR_FRAME].tf.f; f 61 libavcodec/nvdec_vp9.c .LastRefIdx = ff_nvdec_get_ref_idx(h->refs[h->h.refidx[0]].f), f 62 libavcodec/nvdec_vp9.c .GoldenRefIdx = ff_nvdec_get_ref_idx(h->refs[h->h.refidx[1]].f), f 63 libavcodec/nvdec_vp9.c .AltRefIdx = ff_nvdec_get_ref_idx(h->refs[h->h.refidx[2]].f), f 446 libavcodec/opus.c void ff_celt_quant_bands(CeltFrame *f, OpusRangeCoder *rc) f 452 libavcodec/opus.c int totalbits = (f->framebits << 3) - f->anticollapse_needed; f 459 libavcodec/opus.c for (i = f->start_band; i < f->end_band; i++) { f 460 libavcodec/opus.c uint32_t cm[2] = { (1 << f->blocks) - 1, (1 << f->blocks) - 1 }; f 461 libavcodec/opus.c int band_offset = ff_celt_freq_bands[i] << f->size; f 462 libavcodec/opus.c int band_size = ff_celt_freq_range[i] << f->size; f 463 libavcodec/opus.c float *X = f->block[0].coeffs + band_offset; f 464 libavcodec/opus.c float *Y = (f->channels == 2) ? f->block[1].coeffs + band_offset : NULL; f 472 libavcodec/opus.c if (i != f->start_band) f 473 libavcodec/opus.c f->remaining -= consumed; f 474 libavcodec/opus.c f->remaining2 = totalbits - consumed - 1; f 475 libavcodec/opus.c if (i <= f->coded_bands - 1) { f 476 libavcodec/opus.c int curr_balance = f->remaining / FFMIN(3, f->coded_bands-i); f 477 libavcodec/opus.c b = av_clip_uintp2(FFMIN(f->remaining2 + 1, f->pulses[i] + curr_balance), 14); f 480 libavcodec/opus.c if ((ff_celt_freq_bands[i] - ff_celt_freq_range[i] >= ff_celt_freq_bands[f->start_band] || f 481 libavcodec/opus.c i == f->start_band + 1) && (update_lowband || lowband_offset == 0)) f 484 libavcodec/opus.c if (i == f->start_band + 1) { f 487 libavcodec/opus.c int count = (ff_celt_freq_range[i] - ff_celt_freq_range[i-1]) << f->size; f 491 libavcodec/opus.c if (f->channels == 2) f 497 libavcodec/opus.c if (lowband_offset != 0 && (f->spread != CELT_SPREAD_AGGRESSIVE || f 498 libavcodec/opus.c f->blocks > 1 || f->tf_change[i] < 0)) { f 502 libavcodec/opus.c effective_lowband = FFMAX(ff_celt_freq_bands[f->start_band], f 511 libavcodec/opus.c cm[0] |= f->block[0].collapse_masks[j]; f 512 libavcodec/opus.c cm[1] |= f->block[f->channels - 1].collapse_masks[j]; f 516 libavcodec/opus.c if (f->dual_stereo && i == f->intensity_stereo) { f 518 libavcodec/opus.c f->dual_stereo = 0; f 519 libavcodec/opus.c for (j = ff_celt_freq_bands[f->start_band] << f->size; j < band_offset; j++) f 523 libavcodec/opus.c norm_loc1 = effective_lowband != -1 ? norm1 + (effective_lowband << f->size) : NULL; f 524 libavcodec/opus.c norm_loc2 = effective_lowband != -1 ? norm2 + (effective_lowband << f->size) : NULL; f 526 libavcodec/opus.c if (f->dual_stereo) { f 527 libavcodec/opus.c cm[0] = f->pvq->quant_band(f->pvq, f, rc, i, X, NULL, band_size, b >> 1, f 528 libavcodec/opus.c f->blocks, norm_loc1, f->size, f 532 libavcodec/opus.c cm[1] = f->pvq->quant_band(f->pvq, f, rc, i, Y, NULL, band_size, b >> 1, f 533 libavcodec/opus.c f->blocks, norm_loc2, f->size, f 537 libavcodec/opus.c cm[0] = f->pvq->quant_band(f->pvq, f, rc, i, X, Y, band_size, b >> 0, f 538 libavcodec/opus.c f->blocks, norm_loc1, f->size, f 544 libavcodec/opus.c f->block[0].collapse_masks[i] = (uint8_t)cm[0]; f 545 libavcodec/opus.c f->block[f->channels - 1].collapse_masks[i] = (uint8_t)cm[1]; f 546 libavcodec/opus.c f->remaining += f->pulses[i] + consumed; f 553 libavcodec/opus.c #define NORMC(bits) ((bits) << (f->channels - 1) << f->size >> 2) f 555 libavcodec/opus.c void ff_celt_bitalloc(CeltFrame *f, OpusRangeCoder *rc, int encode) f 558 libavcodec/opus.c int skip_startband = f->start_band; f 572 libavcodec/opus.c if (opus_rc_tell(rc) + 4 <= f->framebits) { f 574 libavcodec/opus.c ff_opus_rc_enc_cdf(rc, f->spread, ff_celt_model_spread); f 576 libavcodec/opus.c f->spread = ff_opus_rc_dec_cdf(rc, ff_celt_model_spread); f 578 libavcodec/opus.c f->spread = CELT_SPREAD_NORMAL; f 583 libavcodec/opus.c f->caps[i] = NORMC((ff_celt_static_caps[f->size][f->channels - 1][i] + 64) * ff_celt_freq_range[i]); f 586 libavcodec/opus.c tbits_8ths = f->framebits << 3; f 587 libavcodec/opus.c for (i = f->start_band; i < f->end_band; i++) { f 588 libavcodec/opus.c int quanta = ff_celt_freq_range[i] << (f->channels - 1) << f->size; f 590 libavcodec/opus.c int boost_amount = f->alloc_boost[i]; f 593 libavcodec/opus.c while (opus_rc_tell_frac(rc) + (b_dynalloc << 3) < tbits_8ths && boost[i] < f->caps[i]) { f 617 libavcodec/opus.c f->alloc_trim = 5; f 620 libavcodec/opus.c ff_opus_rc_enc_cdf(rc, f->alloc_trim, ff_celt_model_alloc_trim); f 622 libavcodec/opus.c f->alloc_trim = ff_opus_rc_dec_cdf(rc, ff_celt_model_alloc_trim); f 625 libavcodec/opus.c tbits_8ths = (f->framebits << 3) - opus_rc_tell_frac(rc) - 1; f 626 libavcodec/opus.c f->anticollapse_needed = 0; f 627 libavcodec/opus.c if (f->transient && f->size >= 2 && tbits_8ths >= ((f->size + 2) << 3)) f 628 libavcodec/opus.c f->anticollapse_needed = 1 << 3; f 629 libavcodec/opus.c tbits_8ths -= f->anticollapse_needed; f 637 libavcodec/opus.c if (f->channels == 2) { f 638 libavcodec/opus.c intensitystereo_bit = ff_celt_log2_frac[f->end_band - f->start_band]; f 651 libavcodec/opus.c for (i = f->start_band; i < f->end_band; i++) { f 652 libavcodec/opus.c int trim = f->alloc_trim - 5 - f->size; f 653 libavcodec/opus.c int band = ff_celt_freq_range[i] * (f->end_band - i - 1); f 654 libavcodec/opus.c int duration = f->size + 3; f 655 libavcodec/opus.c int scale = duration + f->channels - 1; f 660 libavcodec/opus.c f->channels << 3); f 664 libavcodec/opus.c if (ff_celt_freq_range[i] << f->size == 1) f 665 libavcodec/opus.c trim_offset[i] -= f->channels << 3; f 675 libavcodec/opus.c for (i = f->end_band - 1; i >= f->start_band; i--) { f 684 libavcodec/opus.c total += FFMIN(bandbits, f->caps[i]); f 685 libavcodec/opus.c } else if (bandbits >= f->channels << 3) { f 686 libavcodec/opus.c total += f->channels << 3; f 698 libavcodec/opus.c for (i = f->start_band; i < f->end_band; i++) { f 700 libavcodec/opus.c bits2[i] = high >= CELT_VECTORS ? f->caps[i] : f 724 libavcodec/opus.c for (j = f->end_band - 1; j >= f->start_band; j--) { f 729 libavcodec/opus.c total += FFMIN(bandbits, f->caps[j]); f 730 libavcodec/opus.c } else if (bandbits >= f->channels << 3) f 731 libavcodec/opus.c total += f->channels << 3; f 741 libavcodec/opus.c for (i = f->end_band - 1; i >= f->start_band; i--) { f 747 libavcodec/opus.c bandbits = (bandbits >= f->channels << 3) ? f 748 libavcodec/opus.c f->channels << 3 : 0; f 750 libavcodec/opus.c bandbits = FFMIN(bandbits, f->caps[i]); f 751 libavcodec/opus.c f->pulses[i] = bandbits; f 756 libavcodec/opus.c for (f->coded_bands = f->end_band; ; f->coded_bands--) { f 758 libavcodec/opus.c j = f->coded_bands - 1; f 768 libavcodec/opus.c bandbits = remaining / (ff_celt_freq_bands[j+1] - ff_celt_freq_bands[f->start_band]); f 769 libavcodec/opus.c remaining -= bandbits * (ff_celt_freq_bands[j+1] - ff_celt_freq_bands[f->start_band]); f 770 libavcodec/opus.c allocation = f->pulses[j] + bandbits * ff_celt_freq_range[j]; f 771 libavcodec/opus.c allocation += FFMAX(remaining - (ff_celt_freq_bands[j] - ff_celt_freq_bands[f->start_band]), 0); f 775 libavcodec/opus.c if (allocation >= FFMAX(threshold[j], (f->channels + 1) << 3)) { f 778 libavcodec/opus.c do_not_skip = f->coded_bands <= f->skip_band_floor; f 792 libavcodec/opus.c total -= f->pulses[j]; f 795 libavcodec/opus.c intensitystereo_bit = ff_celt_log2_frac[j - f->start_band]; f 799 libavcodec/opus.c total += f->pulses[j] = (allocation >= f->channels << 3) ? f->channels << 3 : 0; f 805 libavcodec/opus.c f->intensity_stereo = FFMIN(f->intensity_stereo, f->coded_bands); f 806 libavcodec/opus.c ff_opus_rc_enc_uint(rc, f->intensity_stereo, f->coded_bands + 1 - f->start_band); f 809 libavcodec/opus.c f->intensity_stereo = f->dual_stereo = 0; f 811 libavcodec/opus.c f->intensity_stereo = f->start_band + ff_opus_rc_dec_uint(rc, f->coded_bands + 1 - f->start_band); f 815 libavcodec/opus.c if (f->intensity_stereo <= f->start_band) f 819 libavcodec/opus.c ff_opus_rc_enc_log(rc, f->dual_stereo, 1); f 821 libavcodec/opus.c f->dual_stereo = ff_opus_rc_dec_log(rc, 1); f 825 libavcodec/opus.c bandbits = remaining / (ff_celt_freq_bands[f->coded_bands] - ff_celt_freq_bands[f->start_band]); f 826 libavcodec/opus.c remaining -= bandbits * (ff_celt_freq_bands[f->coded_bands] - ff_celt_freq_bands[f->start_band]); f 827 libavcodec/opus.c for (i = f->start_band; i < f->coded_bands; i++) { f 829 libavcodec/opus.c f->pulses[i] += bits + bandbits * ff_celt_freq_range[i]; f 834 libavcodec/opus.c for (i = f->start_band; i < f->coded_bands; i++) { f 835 libavcodec/opus.c int N = ff_celt_freq_range[i] << f->size; f 837 libavcodec/opus.c f->pulses[i] += extrabits; f 848 libavcodec/opus.c extrabits = FFMAX(f->pulses[i] - f->caps[i], 0); f 849 libavcodec/opus.c f->pulses[i] -= extrabits; f 852 libavcodec/opus.c dof = N * f->channels + (f->channels == 2 && N > 2 && !f->dual_stereo && i < f->intensity_stereo); f 853 libavcodec/opus.c temp = dof * (ff_celt_log_freq_range[i] + (f->size << 3)); f 859 libavcodec/opus.c if (f->pulses[i] + offset < 2 * (dof << 3)) f 861 libavcodec/opus.c else if (f->pulses[i] + offset < 3 * (dof << 3)) f 864 libavcodec/opus.c fine_bits = (f->pulses[i] + offset + (dof << 2)) / (dof << 3); f 865 libavcodec/opus.c max_bits = FFMIN((f->pulses[i] >> 3) >> (f->channels - 1), CELT_MAX_FINE_BITS); f 867 libavcodec/opus.c f->fine_bits[i] = av_clip(fine_bits, 0, max_bits); f 871 libavcodec/opus.c f->fine_priority[i] = (f->fine_bits[i] * (dof << 3) >= f->pulses[i] + offset); f 874 libavcodec/opus.c f->pulses[i] -= f->fine_bits[i] << (f->channels - 1) << 3; f 877 libavcodec/opus.c extrabits = FFMAX(f->pulses[i] - (f->channels << 3), 0); f 878 libavcodec/opus.c f->pulses[i] -= extrabits; f 879 libavcodec/opus.c f->fine_bits[i] = 0; f 880 libavcodec/opus.c f->fine_priority[i] = 1; f 885 libavcodec/opus.c int fineextra = FFMIN(extrabits >> (f->channels + 2), f 886 libavcodec/opus.c CELT_MAX_FINE_BITS - f->fine_bits[i]); f 887 libavcodec/opus.c f->fine_bits[i] += fineextra; f 889 libavcodec/opus.c fineextra <<= f->channels + 2; f 890 libavcodec/opus.c f->fine_priority[i] = (fineextra >= extrabits - prev_extra); f 894 libavcodec/opus.c f->remaining = extrabits; f 897 libavcodec/opus.c for (; i < f->end_band; i++) { f 898 libavcodec/opus.c f->fine_bits[i] = f->pulses[i] >> (f->channels - 1) >> 3; f 899 libavcodec/opus.c f->pulses[i] = 0; f 900 libavcodec/opus.c f->fine_priority[i] = f->fine_bits[i] < 1; f 195 libavcodec/opus.h void ff_celt_quant_bands(CeltFrame *f, OpusRangeCoder *rc); f 198 libavcodec/opus.h void ff_celt_bitalloc(CeltFrame *f, OpusRangeCoder *rc, int encode); f 34 libavcodec/opus_celt.c static void celt_decode_coarse_energy(CeltFrame *f, OpusRangeCoder *rc) f 38 libavcodec/opus_celt.c float alpha = ff_celt_alpha_coef[f->size]; f 39 libavcodec/opus_celt.c float beta = ff_celt_beta_coef[f->size]; f 40 libavcodec/opus_celt.c const uint8_t *model = ff_celt_coarse_energy_dist[f->size][0]; f 43 libavcodec/opus_celt.c if (opus_rc_tell(rc) + 3 <= f->framebits && ff_opus_rc_dec_log(rc, 3)) { f 46 libavcodec/opus_celt.c model = ff_celt_coarse_energy_dist[f->size][1]; f 50 libavcodec/opus_celt.c for (j = 0; j < f->channels; j++) { f 51 libavcodec/opus_celt.c CeltBlock *block = &f->block[j]; f 55 libavcodec/opus_celt.c if (i < f->start_band || i >= f->end_band) { f 60 libavcodec/opus_celt.c available = f->framebits - opus_rc_tell(rc); f 78 libavcodec/opus_celt.c static void celt_decode_fine_energy(CeltFrame *f, OpusRangeCoder *rc) f 81 libavcodec/opus_celt.c for (i = f->start_band; i < f->end_band; i++) { f 83 libavcodec/opus_celt.c if (!f->fine_bits[i]) f 86 libavcodec/opus_celt.c for (j = 0; j < f->channels; j++) { f 87 libavcodec/opus_celt.c CeltBlock *block = &f->block[j]; f 90 libavcodec/opus_celt.c q2 = ff_opus_rc_get_raw(rc, f->fine_bits[i]); f 91 libavcodec/opus_celt.c offset = (q2 + 0.5f) * (1 << (14 - f->fine_bits[i])) / 16384.0f - 0.5f; f 97 libavcodec/opus_celt.c static void celt_decode_final_energy(CeltFrame *f, OpusRangeCoder *rc) f 100 libavcodec/opus_celt.c int bits_left = f->framebits - opus_rc_tell(rc); f 103 libavcodec/opus_celt.c for (i = f->start_band; i < f->end_band && bits_left >= f->channels; i++) { f 104 libavcodec/opus_celt.c if (f->fine_priority[i] != priority || f->fine_bits[i] >= CELT_MAX_FINE_BITS) f 107 libavcodec/opus_celt.c for (j = 0; j < f->channels; j++) { f 111 libavcodec/opus_celt.c offset = (q2 - 0.5f) * (1 << (14 - f->fine_bits[i] - 1)) / 16384.0f; f 112 libavcodec/opus_celt.c f->block[j].energy[i] += offset; f 119 libavcodec/opus_celt.c static void celt_decode_tf_changes(CeltFrame *f, OpusRangeCoder *rc) f 122 libavcodec/opus_celt.c int consumed, bits = f->transient ? 2 : 4; f 125 libavcodec/opus_celt.c tf_select_bit = (f->size != 0 && consumed+bits+1 <= f->framebits); f 127 libavcodec/opus_celt.c for (i = f->start_band; i < f->end_band; i++) { f 128 libavcodec/opus_celt.c if (consumed+bits+tf_select_bit <= f->framebits) { f 133 libavcodec/opus_celt.c f->tf_change[i] = diff; f 134 libavcodec/opus_celt.c bits = f->transient ? 4 : 5; f 137 libavcodec/opus_celt.c if (tf_select_bit && ff_celt_tf_select[f->size][f->transient][0][tf_changed] != f 138 libavcodec/opus_celt.c ff_celt_tf_select[f->size][f->transient][1][tf_changed]) f 141 libavcodec/opus_celt.c for (i = f->start_band; i < f->end_band; i++) { f 142 libavcodec/opus_celt.c f->tf_change[i] = ff_celt_tf_select[f->size][f->transient][tf_select][f->tf_change[i]]; f 146 libavcodec/opus_celt.c static void celt_denormalize(CeltFrame *f, CeltBlock *block, float *data) f 150 libavcodec/opus_celt.c for (i = f->start_band; i < f->end_band; i++) { f 151 libavcodec/opus_celt.c float *dst = data + (ff_celt_freq_bands[i] << f->size); f 155 libavcodec/opus_celt.c for (j = 0; j < ff_celt_freq_range[i] << f->size; j++) f 205 libavcodec/opus_celt.c static void celt_postfilter(CeltFrame *f, CeltBlock *block) f 207 libavcodec/opus_celt.c int len = f->blocksize * f->blocks; f 222 libavcodec/opus_celt.c f->opusdsp.postfilter(block->buf + 1024 + 2 * CELT_OVERLAP, f 233 libavcodec/opus_celt.c static int parse_postfilter(CeltFrame *f, OpusRangeCoder *rc, int consumed) f 237 libavcodec/opus_celt.c memset(f->block[0].pf_gains_new, 0, sizeof(f->block[0].pf_gains_new)); f 238 libavcodec/opus_celt.c memset(f->block[1].pf_gains_new, 0, sizeof(f->block[1].pf_gains_new)); f 240 libavcodec/opus_celt.c if (f->start_band == 0 && consumed + 16 <= f->framebits) { f 249 libavcodec/opus_celt.c tapset = (opus_rc_tell(rc) + 2 <= f->framebits) ? f 253 libavcodec/opus_celt.c CeltBlock *block = &f->block[i]; f 268 libavcodec/opus_celt.c static void process_anticollapse(CeltFrame *f, CeltBlock *block, float *X) f 272 libavcodec/opus_celt.c for (i = f->start_band; i < f->end_band; i++) { f 281 libavcodec/opus_celt.c depth = (1 + f->pulses[i]) / (ff_celt_freq_range[i] << f->size); f 283 libavcodec/opus_celt.c sqrt_1 = 1.0f / sqrtf(ff_celt_freq_range[i] << f->size); f 285 libavcodec/opus_celt.c xptr = X + (ff_celt_freq_bands[i] << f->size); f 289 libavcodec/opus_celt.c if (f->channels == 1) { f 290 libavcodec/opus_celt.c CeltBlock *block1 = &f->block[1]; f 301 libavcodec/opus_celt.c if (f->size == 3) f 304 libavcodec/opus_celt.c for (k = 0; k < 1 << f->size; k++) { f 309 libavcodec/opus_celt.c xptr[(j << f->size) + k] = (celt_rng(f) & 0x8000) ? r : -r; f 316 libavcodec/opus_celt.c celt_renormalize_vector(xptr, ff_celt_freq_range[i] << f->size, 1.0f); f 320 libavcodec/opus_celt.c int ff_celt_decode_frame(CeltFrame *f, OpusRangeCoder *rc, f 329 libavcodec/opus_celt.c av_log(f->avctx, AV_LOG_ERROR, "Invalid number of coded channels: %d\n", f 334 libavcodec/opus_celt.c av_log(f->avctx, AV_LOG_ERROR, "Invalid start/end band: %d %d\n", f 339 libavcodec/opus_celt.c f->silence = 0; f 340 libavcodec/opus_celt.c f->transient = 0; f 341 libavcodec/opus_celt.c f->anticollapse = 0; f 342 libavcodec/opus_celt.c f->flushed = 0; f 343 libavcodec/opus_celt.c f->channels = channels; f 344 libavcodec/opus_celt.c f->start_band = start_band; f 345 libavcodec/opus_celt.c f->end_band = end_band; f 346 libavcodec/opus_celt.c f->framebits = rc->rb.bytes * 8; f 348 libavcodec/opus_celt.c f->size = av_log2(frame_size / CELT_SHORT_BLOCKSIZE); f 349 libavcodec/opus_celt.c if (f->size > CELT_MAX_LOG_BLOCKS || f 350 libavcodec/opus_celt.c frame_size != CELT_SHORT_BLOCKSIZE * (1 << f->size)) { f 351 libavcodec/opus_celt.c av_log(f->avctx, AV_LOG_ERROR, "Invalid CELT frame size: %d\n", f 356 libavcodec/opus_celt.c if (!f->output_channels) f 357 libavcodec/opus_celt.c f->output_channels = channels; f 359 libavcodec/opus_celt.c for (i = 0; i < f->channels; i++) { f 360 libavcodec/opus_celt.c memset(f->block[i].coeffs, 0, sizeof(f->block[i].coeffs)); f 361 libavcodec/opus_celt.c memset(f->block[i].collapse_masks, 0, sizeof(f->block[i].collapse_masks)); f 367 libavcodec/opus_celt.c if (consumed >= f->framebits) f 368 libavcodec/opus_celt.c f->silence = 1; f 370 libavcodec/opus_celt.c f->silence = ff_opus_rc_dec_log(rc, 15); f 373 libavcodec/opus_celt.c if (f->silence) { f 374 libavcodec/opus_celt.c consumed = f->framebits; f 375 libavcodec/opus_celt.c rc->total_bits += f->framebits - opus_rc_tell(rc); f 379 libavcodec/opus_celt.c consumed = parse_postfilter(f, rc, consumed); f 382 libavcodec/opus_celt.c if (f->size != 0 && consumed+3 <= f->framebits) f 383 libavcodec/opus_celt.c f->transient = ff_opus_rc_dec_log(rc, 3); f 385 libavcodec/opus_celt.c f->blocks = f->transient ? 1 << f->size : 1; f 386 libavcodec/opus_celt.c f->blocksize = frame_size / f->blocks; f 388 libavcodec/opus_celt.c imdct = f->imdct[f->transient ? 0 : f->size]; f 392 libavcodec/opus_celt.c f->block[0].energy[i] = FFMAX(f->block[0].energy[i], f->block[1].energy[i]); f 395 libavcodec/opus_celt.c celt_decode_coarse_energy(f, rc); f 396 libavcodec/opus_celt.c celt_decode_tf_changes (f, rc); f 397 libavcodec/opus_celt.c ff_celt_bitalloc (f, rc, 0); f 398 libavcodec/opus_celt.c celt_decode_fine_energy (f, rc); f 399 libavcodec/opus_celt.c ff_celt_quant_bands (f, rc); f 401 libavcodec/opus_celt.c if (f->anticollapse_needed) f 402 libavcodec/opus_celt.c f->anticollapse = ff_opus_rc_get_raw(rc, 1); f 404 libavcodec/opus_celt.c celt_decode_final_energy(f, rc); f 408 libavcodec/opus_celt.c for (i = 0; i < f->channels; i++) { f 409 libavcodec/opus_celt.c CeltBlock *block = &f->block[i]; f 411 libavcodec/opus_celt.c if (f->anticollapse) f 412 libavcodec/opus_celt.c process_anticollapse(f, block, f->block[i].coeffs); f 414 libavcodec/opus_celt.c celt_denormalize(f, block, f->block[i].coeffs); f 418 libavcodec/opus_celt.c if (f->output_channels < f->channels) { f 419 libavcodec/opus_celt.c f->dsp->vector_fmac_scalar(f->block[0].coeffs, f->block[1].coeffs, 1.0, FFALIGN(frame_size, 16)); f 421 libavcodec/opus_celt.c } else if (f->output_channels > f->channels) f 422 libavcodec/opus_celt.c memcpy(f->block[1].coeffs, f->block[0].coeffs, frame_size * sizeof(float)); f 424 libavcodec/opus_celt.c if (f->silence) { f 426 libavcodec/opus_celt.c CeltBlock *block = &f->block[i]; f 431 libavcodec/opus_celt.c memset(f->block[0].coeffs, 0, sizeof(f->block[0].coeffs)); f 432 libavcodec/opus_celt.c memset(f->block[1].coeffs, 0, sizeof(f->block[1].coeffs)); f 436 libavcodec/opus_celt.c for (i = 0; i < f->output_channels; i++) { f 437 libavcodec/opus_celt.c CeltBlock *block = &f->block[i]; f 440 libavcodec/opus_celt.c for (j = 0; j < f->blocks; j++) { f 441 libavcodec/opus_celt.c float *dst = block->buf + 1024 + j * f->blocksize; f 443 libavcodec/opus_celt.c imdct->imdct_half(imdct, dst + CELT_OVERLAP / 2, f->block[i].coeffs + j, f 444 libavcodec/opus_celt.c f->blocks); f 445 libavcodec/opus_celt.c f->dsp->vector_fmul_window(dst, dst, dst + CELT_OVERLAP / 2, f 450 libavcodec/opus_celt.c f->dsp->vector_fmul_scalar(&block->buf[1024], &block->buf[1024], 0.5f, frame_size); f 453 libavcodec/opus_celt.c celt_postfilter(f, block); f 456 libavcodec/opus_celt.c block->emph_coeff = f->opusdsp.deemphasis(output[i], f 462 libavcodec/opus_celt.c memcpy(f->block[1].energy, f->block[0].energy, sizeof(f->block[0].energy)); f 465 libavcodec/opus_celt.c CeltBlock *block = &f->block[i]; f 467 libavcodec/opus_celt.c if (!f->transient) { f 475 libavcodec/opus_celt.c for (j = 0; j < f->start_band; j++) { f 479 libavcodec/opus_celt.c for (j = f->end_band; j < CELT_MAX_BANDS; j++) { f 485 libavcodec/opus_celt.c f->seed = rc->range; f 490 libavcodec/opus_celt.c void ff_celt_flush(CeltFrame *f) f 494 libavcodec/opus_celt.c if (f->flushed) f 498 libavcodec/opus_celt.c CeltBlock *block = &f->block[i]; f 516 libavcodec/opus_celt.c f->seed = 0; f 518 libavcodec/opus_celt.c f->flushed = 1; f 521 libavcodec/opus_celt.c void ff_celt_free(CeltFrame **f) f 523 libavcodec/opus_celt.c CeltFrame *frm = *f; f 535 libavcodec/opus_celt.c av_freep(f); f 538 libavcodec/opus_celt.c int ff_celt_init(AVCodecContext *avctx, CeltFrame **f, int output_channels, f 574 libavcodec/opus_celt.c *f = frm; f 143 libavcodec/opus_celt.h static av_always_inline uint32_t celt_rng(CeltFrame *f) f 145 libavcodec/opus_celt.h f->seed = 1664525 * f->seed + 1013904223; f 146 libavcodec/opus_celt.h return f->seed; f 161 libavcodec/opus_celt.h int ff_celt_init(AVCodecContext *avctx, CeltFrame **f, int output_channels, f 164 libavcodec/opus_celt.h void ff_celt_free(CeltFrame **f); f 166 libavcodec/opus_celt.h void ff_celt_flush(CeltFrame *f); f 168 libavcodec/opus_celt.h int ff_celt_decode_frame(CeltFrame *f, OpusRangeCoder *rc, float **output, f 481 libavcodec/opus_pvq.c static av_always_inline uint32_t quant_band_template(CeltPVQ *pvq, CeltFrame *f, f 510 libavcodec/opus_pvq.c if (f->remaining2 >= 1 << 3) { f 517 libavcodec/opus_pvq.c f->remaining2 -= 1 << 3; f 528 libavcodec/opus_pvq.c int tf_change = f->tf_change[band]; f 596 libavcodec/opus_pvq.c qn = (stereo && band >= f->intensity_stereo) ? 1 : f 614 libavcodec/opus_pvq.c celt_stereo_is_decouple(X, Y, f->block[0].lin_energy[band], f 615 libavcodec/opus_pvq.c f->block[1].lin_energy[band], N); f 630 libavcodec/opus_pvq.c inv = f->apply_phase_inv ? itheta > 8192 : 0; f 635 libavcodec/opus_pvq.c celt_stereo_is_decouple(X, Y, f->block[0].lin_energy[band], f 636 libavcodec/opus_pvq.c f->block[1].lin_energy[band], N); f 638 libavcodec/opus_pvq.c if (b > 2 << 3 && f->remaining2 > 2 << 3) { f 644 libavcodec/opus_pvq.c inv = (b > 2 << 3 && f->remaining2 > 2 << 3) ? ff_opus_rc_dec_log(rc, 2) : 0; f 645 libavcodec/opus_pvq.c inv = f->apply_phase_inv ? inv : 0; f 687 libavcodec/opus_pvq.c f->remaining2 -= qalloc+sbits; f 702 libavcodec/opus_pvq.c cm = pvq->quant_band(pvq, f, rc, band, x2, NULL, N, mbits, blocks, lowband, duration, f 739 libavcodec/opus_pvq.c f->remaining2 -= qalloc; f 751 libavcodec/opus_pvq.c rebalance = f->remaining2; f 755 libavcodec/opus_pvq.c cm = pvq->quant_band(pvq, f, rc, band, X, NULL, N, mbits, blocks, f 758 libavcodec/opus_pvq.c rebalance = mbits - (rebalance - f->remaining2); f 764 libavcodec/opus_pvq.c cmt = pvq->quant_band(pvq, f, rc, band, Y, NULL, N, sbits, blocks, f 771 libavcodec/opus_pvq.c cm = pvq->quant_band(pvq, f, rc, band, Y, NULL, N, sbits, blocks, f 775 libavcodec/opus_pvq.c rebalance = sbits - (rebalance - f->remaining2); f 781 libavcodec/opus_pvq.c cm |= pvq->quant_band(pvq, f, rc, band, X, NULL, N, mbits, blocks, f 790 libavcodec/opus_pvq.c f->remaining2 -= curr_bits; f 793 libavcodec/opus_pvq.c while (f->remaining2 < 0 && q > 0) { f 794 libavcodec/opus_pvq.c f->remaining2 += curr_bits; f 796 libavcodec/opus_pvq.c f->remaining2 -= curr_bits; f 803 libavcodec/opus_pvq.c f->spread, blocks, gain, pvq); f 806 libavcodec/opus_pvq.c f->spread, blocks, gain, pvq); f 816 libavcodec/opus_pvq.c X[i] = (((int32_t)celt_rng(f)) >> 20); f 822 libavcodec/opus_pvq.c X[i] = lowband[i] + (((celt_rng(f)) & 0x8000) ? 1.0f / 256 : -1.0f / 256); f 880 libavcodec/opus_pvq.c return quant_band_template(pvq, f, rc, band, X, Y, N, b, blocks, lowband, duration, f 890 libavcodec/opus_pvq.c return quant_band_template(pvq, f, rc, band, X, Y, N, b, blocks, lowband, duration, f 28 libavcodec/opus_pvq.h #define QUANT_FN(name) uint32_t (name)(struct CeltPVQ *pvq, CeltFrame *f, \ f 116 libavcodec/opusenc.c static void celt_frame_setup_input(OpusEncContext *s, CeltFrame *f) f 124 libavcodec/opusenc.c for (int ch = 0; ch < f->channels; ch++) { f 125 libavcodec/opusenc.c CeltBlock *b = &f->block[ch]; f 139 libavcodec/opusenc.c for (int ch = 0; ch < f->channels; ch++) { f 140 libavcodec/opusenc.c CeltBlock *b = &f->block[ch]; f 156 libavcodec/opusenc.c static void celt_apply_preemph_filter(OpusEncContext *s, CeltFrame *f) f 162 libavcodec/opusenc.c for (int ch = 0; ch < f->channels; ch++) { f 163 libavcodec/opusenc.c CeltBlock *b = &f->block[ch]; f 175 libavcodec/opusenc.c for (int ch = 0; ch < f->channels; ch++) { f 176 libavcodec/opusenc.c CeltBlock *b = &f->block[ch]; f 190 libavcodec/opusenc.c static void celt_frame_mdct(OpusEncContext *s, CeltFrame *f) f 194 libavcodec/opusenc.c if (f->transient) { f 195 libavcodec/opusenc.c for (int ch = 0; ch < f->channels; ch++) { f 196 libavcodec/opusenc.c CeltBlock *b = &f->block[ch]; f 198 libavcodec/opusenc.c for (int t = 0; t < f->blocks; t++) { f 204 libavcodec/opusenc.c s->mdct[0]->mdct(s->mdct[0], b->coeffs + t, win, f->blocks); f 208 libavcodec/opusenc.c int blk_len = OPUS_BLOCK_SIZE(f->size), wlen = OPUS_BLOCK_SIZE(f->size + 1); f 211 libavcodec/opusenc.c for (int ch = 0; ch < f->channels; ch++) { f 212 libavcodec/opusenc.c CeltBlock *b = &f->block[ch]; f 226 libavcodec/opusenc.c s->mdct[f->size]->mdct(s->mdct[f->size], b->coeffs, win, 1); f 230 libavcodec/opusenc.c for (int ch = 0; ch < f->channels; ch++) { f 231 libavcodec/opusenc.c CeltBlock *block = &f->block[ch]; f 234 libavcodec/opusenc.c int band_offset = ff_celt_freq_bands[i] << f->size; f 235 libavcodec/opusenc.c int band_size = ff_celt_freq_range[i] << f->size; f 255 libavcodec/opusenc.c static void celt_enc_tf(CeltFrame *f, OpusRangeCoder *rc) f 258 libavcodec/opusenc.c int bits = f->transient ? 2 : 4; f 260 libavcodec/opusenc.c tf_select_needed = ((f->size && (opus_rc_tell(rc) + bits + 1) <= f->framebits)); f 262 libavcodec/opusenc.c for (int i = f->start_band; i < f->end_band; i++) { f 263 libavcodec/opusenc.c if ((opus_rc_tell(rc) + bits + tf_select_needed) <= f->framebits) { f 264 libavcodec/opusenc.c const int tbit = (diff ^ 1) == f->tf_change[i]; f 269 libavcodec/opusenc.c bits = f->transient ? 4 : 5; f 272 libavcodec/opusenc.c if (tf_select_needed && ff_celt_tf_select[f->size][f->transient][0][tf_changed] != f 273 libavcodec/opusenc.c ff_celt_tf_select[f->size][f->transient][1][tf_changed]) { f 274 libavcodec/opusenc.c ff_opus_rc_enc_log(rc, f->tf_select, 1); f 275 libavcodec/opusenc.c tf_select = f->tf_select; f 278 libavcodec/opusenc.c for (int i = f->start_band; i < f->end_band; i++) f 279 libavcodec/opusenc.c f->tf_change[i] = ff_celt_tf_select[f->size][f->transient][tf_select][f->tf_change[i]]; f 282 libavcodec/opusenc.c static void celt_enc_quant_pfilter(OpusRangeCoder *rc, CeltFrame *f) f 284 libavcodec/opusenc.c float gain = f->pf_gain; f 285 libavcodec/opusenc.c int txval, octave = f->pf_octave, period = f->pf_period, tapset = f->pf_tapset; f 287 libavcodec/opusenc.c ff_opus_rc_enc_log(rc, f->pfilter, 1); f 288 libavcodec/opusenc.c if (!f->pfilter) f 304 libavcodec/opusenc.c if ((opus_rc_tell(rc) + 2) <= f->framebits) f 310 libavcodec/opusenc.c CeltBlock *block = &f->block[i]; f 319 libavcodec/opusenc.c static void exp_quant_coarse(OpusRangeCoder *rc, CeltFrame *f, f 323 libavcodec/opusenc.c const uint8_t *pmod = ff_celt_coarse_energy_dist[f->size][intra]; f 326 libavcodec/opusenc.c if (opus_rc_tell(rc) + 3 <= f->framebits) f 335 libavcodec/opusenc.c alpha = ff_celt_alpha_coef[f->size]; f 336 libavcodec/opusenc.c beta = ff_celt_beta_coef[f->size]; f 339 libavcodec/opusenc.c for (int i = f->start_band; i < f->end_band; i++) { f 340 libavcodec/opusenc.c for (int ch = 0; ch < f->channels; ch++) { f 341 libavcodec/opusenc.c CeltBlock *block = &f->block[ch]; f 342 libavcodec/opusenc.c const int left = f->framebits - opus_rc_tell(rc); f 362 libavcodec/opusenc.c static void celt_quant_coarse(CeltFrame *f, OpusRangeCoder *rc, f 368 libavcodec/opusenc.c exp_quant_coarse(rc, f, last_energy, 1); f 373 libavcodec/opusenc.c exp_quant_coarse(rc, f, last_energy, 0); f 378 libavcodec/opusenc.c exp_quant_coarse(rc, f, last_energy, 1); f 382 libavcodec/opusenc.c static void celt_quant_fine(CeltFrame *f, OpusRangeCoder *rc) f 384 libavcodec/opusenc.c for (int i = f->start_band; i < f->end_band; i++) { f 385 libavcodec/opusenc.c if (!f->fine_bits[i]) f 387 libavcodec/opusenc.c for (int ch = 0; ch < f->channels; ch++) { f 388 libavcodec/opusenc.c CeltBlock *block = &f->block[ch]; f 389 libavcodec/opusenc.c int quant, lim = (1 << f->fine_bits[i]); f 392 libavcodec/opusenc.c ff_opus_rc_put_raw(rc, quant, f->fine_bits[i]); f 393 libavcodec/opusenc.c offset = 0.5f - ((quant + 0.5f) * (1 << (14 - f->fine_bits[i])) / 16384.0f); f 399 libavcodec/opusenc.c static void celt_quant_final(OpusEncContext *s, OpusRangeCoder *rc, CeltFrame *f) f 402 libavcodec/opusenc.c for (int i = f->start_band; i < f->end_band && (f->framebits - opus_rc_tell(rc)) >= f->channels; i++) { f 403 libavcodec/opusenc.c if (f->fine_priority[i] != priority || f->fine_bits[i] >= CELT_MAX_FINE_BITS) f 405 libavcodec/opusenc.c for (int ch = 0; ch < f->channels; ch++) { f 406 libavcodec/opusenc.c CeltBlock *block = &f->block[ch]; f 408 libavcodec/opusenc.c const float offset = 0.5f * (1 << (14 - f->fine_bits[i] - 1)) / 16384.0f; f 418 libavcodec/opusenc.c CeltFrame *f, int index) f 422 libavcodec/opusenc.c ff_opus_psy_celt_frame_init(&s->psyctx, f, index); f 424 libavcodec/opusenc.c celt_frame_setup_input(s, f); f 426 libavcodec/opusenc.c if (f->silence) { f 427 libavcodec/opusenc.c if (f->framebits >= 16) f 435 libavcodec/opusenc.c celt_apply_preemph_filter(s, f); f 436 libavcodec/opusenc.c if (f->pfilter) { f 438 libavcodec/opusenc.c celt_enc_quant_pfilter(rc, f); f 442 libavcodec/opusenc.c celt_frame_mdct(s, f); f 445 libavcodec/opusenc.c while (ff_opus_psy_celt_frame_process(&s->psyctx, f, index)) f 446 libavcodec/opusenc.c celt_frame_mdct(s, f); f 454 libavcodec/opusenc.c if (!f->start_band && opus_rc_tell(rc) + 16 <= f->framebits) f 455 libavcodec/opusenc.c celt_enc_quant_pfilter(rc, f); f 458 libavcodec/opusenc.c if (f->size && opus_rc_tell(rc) + 3 <= f->framebits) f 459 libavcodec/opusenc.c ff_opus_rc_enc_log(rc, f->transient, 3); f 462 libavcodec/opusenc.c celt_quant_coarse (f, rc, s->last_quantized_energy); f 463 libavcodec/opusenc.c celt_enc_tf (f, rc); f 464 libavcodec/opusenc.c ff_celt_bitalloc (f, rc, 1); f 465 libavcodec/opusenc.c celt_quant_fine (f, rc); f 466 libavcodec/opusenc.c ff_celt_quant_bands(f, rc); f 469 libavcodec/opusenc.c if (f->anticollapse_needed) f 470 libavcodec/opusenc.c ff_opus_rc_put_raw(rc, f->anticollapse, 1); f 473 libavcodec/opusenc.c celt_quant_final(s, rc, f); f 475 libavcodec/opusenc.c for (int ch = 0; ch < f->channels; ch++) { f 476 libavcodec/opusenc.c CeltBlock *block = &f->block[ch]; f 517 libavcodec/opusenc.c AVFrame *f = av_frame_alloc(); f 518 libavcodec/opusenc.c if (!f) f 520 libavcodec/opusenc.c f->format = s->avctx->sample_fmt; f 521 libavcodec/opusenc.c f->nb_samples = s->avctx->frame_size; f 522 libavcodec/opusenc.c f->channel_layout = s->avctx->channel_layout; f 523 libavcodec/opusenc.c if (av_frame_get_buffer(f, 4)) { f 524 libavcodec/opusenc.c av_frame_free(&f); f 528 libavcodec/opusenc.c size_t bps = av_get_bytes_per_sample(f->format); f 529 libavcodec/opusenc.c memset(f->extended_data[i], 0, bps*f->nb_samples); f 531 libavcodec/opusenc.c return f; f 28 libavcodec/opusenc_psy.c static float pvq_band_cost(CeltPVQ *pvq, CeltFrame *f, OpusRangeCoder *rc, int band, f 32 libavcodec/opusenc_psy.c uint32_t cm[2] = { (1 << f->blocks) - 1, (1 << f->blocks) - 1 }; f 33 libavcodec/opusenc_psy.c const int band_size = ff_celt_freq_range[band] << f->size; f 37 libavcodec/opusenc_psy.c float *X_orig = f->block[0].coeffs + (ff_celt_freq_bands[band] << f->size); f 38 libavcodec/opusenc_psy.c float *Y = (f->channels == 2) ? &buf[176] : NULL; f 39 libavcodec/opusenc_psy.c float *Y_orig = f->block[1].coeffs + (ff_celt_freq_bands[band] << f->size); f 46 libavcodec/opusenc_psy.c f->remaining2 = ((f->framebits << 3) - f->anticollapse_needed) - opus_rc_tell_frac(rc) - 1; f 47 libavcodec/opusenc_psy.c if (band <= f->coded_bands - 1) { f 48 libavcodec/opusenc_psy.c int curr_balance = f->remaining / FFMIN(3, f->coded_bands - band); f 49 libavcodec/opusenc_psy.c b = av_clip_uintp2(FFMIN(f->remaining2 + 1, f->pulses[band] + curr_balance), 14); f 52 libavcodec/opusenc_psy.c if (f->dual_stereo) { f 53 libavcodec/opusenc_psy.c pvq->quant_band(pvq, f, rc, band, X, NULL, band_size, b / 2, f->blocks, NULL, f 54 libavcodec/opusenc_psy.c f->size, norm1, 0, 1.0f, lowband_scratch, cm[0]); f 56 libavcodec/opusenc_psy.c pvq->quant_band(pvq, f, rc, band, Y, NULL, band_size, b / 2, f->blocks, NULL, f 57 libavcodec/opusenc_psy.c f->size, norm2, 0, 1.0f, lowband_scratch, cm[1]); f 59 libavcodec/opusenc_psy.c pvq->quant_band(pvq, f, rc, band, X, Y, band_size, b, f->blocks, NULL, f->size, f 254 libavcodec/opusenc_psy.c void ff_opus_psy_celt_frame_init(OpusPsyContext *s, CeltFrame *f, int index) f 260 libavcodec/opusenc_psy.c f->start_band = (s->p.mode == OPUS_MODE_HYBRID) ? 17 : 0; f 261 libavcodec/opusenc_psy.c f->end_band = ff_celt_band_end[s->p.bandwidth]; f 262 libavcodec/opusenc_psy.c f->channels = s->avctx->channels; f 263 libavcodec/opusenc_psy.c f->size = s->p.framesize; f 265 libavcodec/opusenc_psy.c for (i = 0; i < (1 << f->size); i++) f 266 libavcodec/opusenc_psy.c silence &= s->steps[index*(1 << f->size) + i]->silence; f 268 libavcodec/opusenc_psy.c f->silence = silence; f 269 libavcodec/opusenc_psy.c if (f->silence) { f 270 libavcodec/opusenc_psy.c f->framebits = 0; /* Otherwise the silence flag eats up 16(!) bits */ f 288 libavcodec/opusenc_psy.c f->transient = neighbouring_points > 0; f 289 libavcodec/opusenc_psy.c f->blocks = f->transient ? OPUS_BLOCK_SIZE(s->p.framesize)/CELT_OVERLAP : 1; f 292 libavcodec/opusenc_psy.c f->pfilter = 0; f 293 libavcodec/opusenc_psy.c f->pf_gain = 0.5f; f 294 libavcodec/opusenc_psy.c f->pf_octave = 2; f 295 libavcodec/opusenc_psy.c f->pf_period = 1; f 296 libavcodec/opusenc_psy.c f->pf_tapset = 2; f 299 libavcodec/opusenc_psy.c f->tf_select = 0; f 300 libavcodec/opusenc_psy.c f->anticollapse = 1; f 301 libavcodec/opusenc_psy.c f->alloc_trim = 5; f 302 libavcodec/opusenc_psy.c f->skip_band_floor = f->end_band; f 303 libavcodec/opusenc_psy.c f->intensity_stereo = f->end_band; f 304 libavcodec/opusenc_psy.c f->dual_stereo = 0; f 305 libavcodec/opusenc_psy.c f->spread = CELT_SPREAD_NORMAL; f 306 libavcodec/opusenc_psy.c memset(f->tf_change, 0, sizeof(int)*CELT_MAX_BANDS); f 307 libavcodec/opusenc_psy.c memset(f->alloc_boost, 0, sizeof(int)*CELT_MAX_BANDS); f 313 libavcodec/opusenc_psy.c int i, f, ch; f 328 libavcodec/opusenc_psy.c for (f = 0; f < (1 << s->p.framesize); f++) { f 329 libavcodec/opusenc_psy.c weight = start[f]->stereo[i]; f 331 libavcodec/opusenc_psy.c weight += start[f]->change_amp[ch][i] + start[f]->tone[ch][i] + start[f]->energy[ch][i]; f 332 libavcodec/opusenc_psy.c tonal_contrib += start[f]->tone[ch][i]; f 363 libavcodec/opusenc_psy.c static int bands_dist(OpusPsyContext *s, CeltFrame *f, float *total_dist) f 369 libavcodec/opusenc_psy.c ff_celt_bitalloc(f, &dump, 1); f 373 libavcodec/opusenc_psy.c float dist = pvq_band_cost(f->pvq, f, &dump, i, &bits, s->lambda); f 382 libavcodec/opusenc_psy.c static void celt_search_for_dual_stereo(OpusPsyContext *s, CeltFrame *f) f 385 libavcodec/opusenc_psy.c f->dual_stereo = 0; f 390 libavcodec/opusenc_psy.c bands_dist(s, f, &td1); f 391 libavcodec/opusenc_psy.c f->dual_stereo = 1; f 392 libavcodec/opusenc_psy.c bands_dist(s, f, &td2); f 394 libavcodec/opusenc_psy.c f->dual_stereo = td2 < td1; f 398 libavcodec/opusenc_psy.c static void celt_search_for_intensity(OpusPsyContext *s, CeltFrame *f) f 408 libavcodec/opusenc_psy.c for (i = f->end_band; i >= end_band; i--) { f 409 libavcodec/opusenc_psy.c f->intensity_stereo = i; f 410 libavcodec/opusenc_psy.c bands_dist(s, f, &dist); f 417 libavcodec/opusenc_psy.c f->intensity_stereo = best_band; f 418 libavcodec/opusenc_psy.c s->avg_is_band = (s->avg_is_band + f->intensity_stereo)/2.0f; f 421 libavcodec/opusenc_psy.c static int celt_search_for_tf(OpusPsyContext *s, OpusPsyStep **start, CeltFrame *f) f 428 libavcodec/opusenc_psy.c int base = f->transient ? 120 : 960; f 431 libavcodec/opusenc_psy.c int c = ff_celt_tf_select[f->size][f->transient][cway][i]; f 438 libavcodec/opusenc_psy.c for (j = 0; j < (1 << f->size); j++) { f 449 libavcodec/opusenc_psy.c f->tf_select = score[0] < score[1]; f 450 libavcodec/opusenc_psy.c memcpy(f->tf_change, config[f->tf_select], sizeof(int)*CELT_MAX_BANDS); f 455 libavcodec/opusenc_psy.c int ff_opus_psy_celt_frame_process(OpusPsyContext *s, CeltFrame *f, int index) f 457 libavcodec/opusenc_psy.c int start_transient_flag = f->transient; f 460 libavcodec/opusenc_psy.c if (f->silence) f 463 libavcodec/opusenc_psy.c celt_gauge_psy_weight(s, start, f); f 464 libavcodec/opusenc_psy.c celt_search_for_intensity(s, f); f 465 libavcodec/opusenc_psy.c celt_search_for_dual_stereo(s, f); f 466 libavcodec/opusenc_psy.c celt_search_for_tf(s, start, f); f 468 libavcodec/opusenc_psy.c if (f->transient != start_transient_flag) { f 469 libavcodec/opusenc_psy.c f->blocks = f->transient ? OPUS_BLOCK_SIZE(s->p.framesize)/CELT_OVERLAP : 1; f 479 libavcodec/opusenc_psy.c void ff_opus_psy_postencode_update(OpusPsyContext *s, CeltFrame *f, OpusRangeCoder *rc) f 503 libavcodec/opusenc_psy.c s->avg_is_band += f[i].intensity_stereo; f 504 libavcodec/opusenc_psy.c s->lambda *= ideal_fbits / f[i].framebits; f 95 libavcodec/opusenc_psy.h void ff_opus_psy_celt_frame_init (OpusPsyContext *s, CeltFrame *f, int index); f 96 libavcodec/opusenc_psy.h int ff_opus_psy_celt_frame_process(OpusPsyContext *s, CeltFrame *f, int index); f 97 libavcodec/opusenc_psy.h void ff_opus_psy_postencode_update (OpusPsyContext *s, CeltFrame *f, OpusRangeCoder *rc); f 593 libavcodec/pixlet.c ThreadFrame frame = { .f = data }; f 663 libavcodec/pixlet.c ret = decode_plane(avctx, i, avpkt, frame.f); f 670 libavcodec/pixlet.c postprocess_luma(frame.f, ctx->w, ctx->h, ctx->depth); f 671 libavcodec/pixlet.c postprocess_chroma(frame.f, ctx->w >> 1, ctx->h >> 1, ctx->depth); f 855 libavcodec/pngdec.c static int decode_iccp_chunk(PNGDecContext *s, int length, AVFrame *f) f 884 libavcodec/pngdec.c sd = av_frame_new_side_data(f, AV_FRAME_DATA_ICC_PROFILE, bp.len); f 1023 libavcodec/pngdec.c if ((sequence_number == 0 || !s->previous_picture.f->data[0]) && f 1056 libavcodec/pngdec.c uint8_t *pd_last = s->last_picture.f->data[0]; f 1095 libavcodec/pngdec.c memcpy(buffer, s->last_picture.f->data[0], s->image_linesize * s->height); f 1101 libavcodec/pngdec.c memcpy(s->previous_picture.f->data[0], buffer, s->image_linesize * s->height); f 1105 libavcodec/pngdec.c memcpy(buffer, s->previous_picture.f->data[0], s->image_linesize * s->height); f 1442 libavcodec/pngdec.c if (s->last_picture.f->data[0]) { f 1444 libavcodec/pngdec.c && s->last_picture.f->width == p->width f 1445 libavcodec/pngdec.c && s->last_picture.f->height== p->height f 1446 libavcodec/pngdec.c && s->last_picture.f->format== p->format f 1451 libavcodec/pngdec.c s->previous_picture.f->width == p->width && f 1452 libavcodec/pngdec.c s->previous_picture.f->height== p->height && f 1453 libavcodec/pngdec.c s->previous_picture.f->format== p->format && f 1484 libavcodec/pngdec.c p = s->picture.f; f 1519 libavcodec/pngdec.c if ((ret = av_frame_ref(data, s->picture.f)) < 0) f 1543 libavcodec/pngdec.c p = s->picture.f; f 1576 libavcodec/pngdec.c if ((ret = av_frame_ref(data, s->picture.f)) < 0) f 1610 libavcodec/pngdec.c if (s->last_picture.f->data[0]) { f 1611 libavcodec/pngdec.c ret = av_frame_copy(frame, s->last_picture.f); f 1706 libavcodec/pngdec.c av_frame_unref(s->last_picture.f); f 1707 libavcodec/pngdec.c if ((ret = av_frame_ref(s->last_picture.f, frame)) < 0) f 1723 libavcodec/pngdec.c av_frame_unref(s->last_picture.f); f 1739 libavcodec/pngdec.c if (psrc->picture.f->data[0] && f 1764 libavcodec/pngdec.c if (psrc->last_picture.f->data[0] && f 1769 libavcodec/pngdec.c if (psrc->previous_picture.f->data[0] && f 1788 libavcodec/pngdec.c s->previous_picture.f = av_frame_alloc(); f 1789 libavcodec/pngdec.c s->last_picture.f = av_frame_alloc(); f 1790 libavcodec/pngdec.c s->picture.f = av_frame_alloc(); f 1791 libavcodec/pngdec.c if (!s->previous_picture.f || !s->last_picture.f || !s->picture.f) { f 1792 libavcodec/pngdec.c av_frame_free(&s->previous_picture.f); f 1793 libavcodec/pngdec.c av_frame_free(&s->last_picture.f); f 1794 libavcodec/pngdec.c av_frame_free(&s->picture.f); f 1808 libavcodec/pngdec.c av_frame_free(&s->previous_picture.f); f 1810 libavcodec/pngdec.c av_frame_free(&s->last_picture.f); f 1812 libavcodec/pngdec.c av_frame_free(&s->picture.f); f 224 libavcodec/pngenc.c static void png_write_chunk(uint8_t **f, uint32_t tag, f 231 libavcodec/pngenc.c bytestream_put_be32(f, length); f 234 libavcodec/pngenc.c bytestream_put_be32(f, av_bswap32(tag)); f 237 libavcodec/pngenc.c memcpy(*f, buf, length); f 238 libavcodec/pngenc.c *f += length; f 240 libavcodec/pngenc.c bytestream_put_be32(f, ~crc); f 170 libavcodec/pnmdec.c unsigned int j, f = (255 * 128 + s->maxval / 2) / s->maxval; f 172 libavcodec/pnmdec.c ptr[j] = (s->bytestream[j] * f + 64) >> 7; f 174 libavcodec/pnmdec.c unsigned int j, v, f = (65535 * 32768 + s->maxval / 2) / s->maxval; f 177 libavcodec/pnmdec.c ((uint16_t *)ptr)[j] = (v * f + 16384) >> 15; f 220 libavcodec/pnmdec.c const int f = (65535 * 32768 + s->maxval / 2) / s->maxval; f 231 libavcodec/pnmdec.c ((uint16_t *)ptr)[j] = (v * f + 16384) >> 15; f 243 libavcodec/pnmdec.c ptr1[j] = (v * f + 16384) >> 15; f 249 libavcodec/pnmdec.c ptr2[j] = (v * f + 16384) >> 15; f 755 libavcodec/proresdec2.c ThreadFrame tframe = { .f = data }; f 322 libavcodec/prosumer.c uint32_t f = 0xFFFFFFFFu; f 325 libavcodec/prosumer.c fill_elements(j, d, &c, &f); f 327 libavcodec/prosumer.c lut[2 * a + 2 * j + 1] = f; f 376 libavcodec/pthread_frame.c AVFrame *f; f 383 libavcodec/pthread_frame.c f = p->released_buffers[--p->num_released_buffers]; f 384 libavcodec/pthread_frame.c f->extended_data = f->data; f 385 libavcodec/pthread_frame.c av_frame_unref(f); f 568 libavcodec/pthread_frame.c void ff_thread_report_progress(ThreadFrame *f, int n, int field) f 571 libavcodec/pthread_frame.c atomic_int *progress = f->progress ? (atomic_int*)f->progress->data : NULL; f 577 libavcodec/pthread_frame.c p = f->owner[field]->internal->thread_ctx; f 580 libavcodec/pthread_frame.c av_log(f->owner[field], AV_LOG_DEBUG, f 591 libavcodec/pthread_frame.c void ff_thread_await_progress(ThreadFrame *f, int n, int field) f 594 libavcodec/pthread_frame.c atomic_int *progress = f->progress ? (atomic_int*)f->progress->data : NULL; f 600 libavcodec/pthread_frame.c p = f->owner[field]->internal->thread_ctx; f 603 libavcodec/pthread_frame.c av_log(f->owner[field], AV_LOG_DEBUG, f 916 libavcodec/pthread_frame.c static int thread_get_buffer_internal(AVCodecContext *avctx, ThreadFrame *f, int flags) f 921 libavcodec/pthread_frame.c f->owner[0] = f->owner[1] = avctx; f 924 libavcodec/pthread_frame.c return ff_get_buffer(avctx, f->f, flags); f 934 libavcodec/pthread_frame.c f->progress = av_buffer_alloc(2 * sizeof(*progress)); f 935 libavcodec/pthread_frame.c if (!f->progress) { f 938 libavcodec/pthread_frame.c progress = (atomic_int*)f->progress->data; f 946 libavcodec/pthread_frame.c err = ff_get_buffer(avctx, f->f, flags); f 949 libavcodec/pthread_frame.c p->requested_frame = f->f; f 965 libavcodec/pthread_frame.c av_buffer_unref(&f->progress); f 998 libavcodec/pthread_frame.c int ff_thread_get_buffer(AVCodecContext *avctx, ThreadFrame *f, int flags) f 1000 libavcodec/pthread_frame.c int ret = thread_get_buffer_internal(avctx, f, flags); f 1006 libavcodec/pthread_frame.c void ff_thread_release_buffer(AVCodecContext *avctx, ThreadFrame *f) f 1015 libavcodec/pthread_frame.c if (!f->f) f 1019 libavcodec/pthread_frame.c av_log(avctx, AV_LOG_DEBUG, "thread_release_buffer called on pic %p\n", f); f 1021 libavcodec/pthread_frame.c av_buffer_unref(&f->progress); f 1022 libavcodec/pthread_frame.c f->owner[0] = f->owner[1] = NULL; f 1025 libavcodec/pthread_frame.c if (can_direct_free || !f->f->buf[0]) { f 1026 libavcodec/pthread_frame.c av_frame_unref(f->f); f 1049 libavcodec/pthread_frame.c av_frame_move_ref(dst, f->f); f 1060 libavcodec/pthread_frame.c memset(f->f->buf, 0, sizeof(f->f->buf)); f 1061 libavcodec/pthread_frame.c if (f->f->extended_buf) f 1062 libavcodec/pthread_frame.c memset(f->f->extended_buf, 0, f->f->nb_extended_buf * sizeof(*f->f->extended_buf)); f 1063 libavcodec/pthread_frame.c av_frame_unref(f->f); f 741 libavcodec/qdm2.c float f = 0.81; f 744 libavcodec/qdm2.c f = -f; f 745 libavcodec/qdm2.c f -= noise_samples[((sb + 1) * (j +5 * ch + 1)) & 127] * 9.0 / 40.0; f 746 libavcodec/qdm2.c samples[0] = f; f 1427 libavcodec/qdm2.c float level, f[6]; f 1446 libavcodec/qdm2.c f[1] = -tone->table[4]; f 1447 libavcodec/qdm2.c f[0] = tone->table[3] - tone->table[0]; f 1448 libavcodec/qdm2.c f[2] = 1.0 - tone->table[2] - tone->table[3]; f 1449 libavcodec/qdm2.c f[3] = tone->table[1] + tone->table[4] - 1.0; f 1450 libavcodec/qdm2.c f[4] = tone->table[0] - tone->table[1]; f 1451 libavcodec/qdm2.c f[5] = tone->table[2]; f 1454 libavcodec/qdm2.c c.re * f[i]; f 1456 libavcodec/qdm2.c c.im * ((tone->cutoff <= i) ? -f[i] : f[i]); f 1459 libavcodec/qdm2.c tone->complex[i].re += c.re * f[i + 2]; f 1460 libavcodec/qdm2.c tone->complex[i].im += c.im * f[i + 2]; f 1262 libavcodec/qsvenc.c static int get_free_frame(QSVEncContext *q, QSVFrame **f) f 1272 libavcodec/qsvenc.c *f = frame; f 1296 libavcodec/qsvenc.c *f = frame; f 43 libavcodec/ratecontrol.c s->current_picture_ptr->f->display_picture_number, f 44 libavcodec/ratecontrol.c s->current_picture_ptr->f->coded_picture_number, f 46 libavcodec/ratecontrol.c s->current_picture.f->quality, f 923 libavcodec/ratecontrol.c if (!dts_pic || dts_pic->f->pts == AV_NOPTS_VALUE) f 926 libavcodec/ratecontrol.c wanted_bits = (uint64_t)(s->bit_rate * (double)dts_pic->f->pts / fps); f 106 libavcodec/rtjpeg.c int ff_rtjpeg_decode_frame_yuv420(RTJpegContext *c, AVFrame *f, f 111 libavcodec/rtjpeg.c uint8_t *y1 = f->data[0], *y2 = f->data[0] + 8 * f->linesize[0]; f 112 libavcodec/rtjpeg.c uint8_t *u = f->data[1], *v = f->data[2]; f 127 libavcodec/rtjpeg.c BLOCK(c->lquant, y1, f->linesize[0]); f 129 libavcodec/rtjpeg.c BLOCK(c->lquant, y1, f->linesize[0]); f 131 libavcodec/rtjpeg.c BLOCK(c->lquant, y2, f->linesize[0]); f 133 libavcodec/rtjpeg.c BLOCK(c->lquant, y2, f->linesize[0]); f 135 libavcodec/rtjpeg.c BLOCK(c->cquant, u, f->linesize[1]); f 137 libavcodec/rtjpeg.c BLOCK(c->cquant, v, f->linesize[2]); f 140 libavcodec/rtjpeg.c y1 += 2 * 8 * (f->linesize[0] - w); f 141 libavcodec/rtjpeg.c y2 += 2 * 8 * (f->linesize[0] - w); f 142 libavcodec/rtjpeg.c u += 8 * (f->linesize[1] - w); f 143 libavcodec/rtjpeg.c v += 8 * (f->linesize[2] - w); f 47 libavcodec/rtjpeg.h int ff_rtjpeg_decode_frame_yuv420(RTJpegContext *c, AVFrame *f, f 363 libavcodec/rv10.c int f, new_w, new_h; f 366 libavcodec/rv10.c f = get_bits(&s->gb, rpr_bits); f 368 libavcodec/rv10.c if (f) { f 369 libavcodec/rv10.c if (s->avctx->extradata_size < 8 + 2 * f) { f 374 libavcodec/rv10.c new_w = 4 * ((uint8_t *) s->avctx->extradata)[6 + 2 * f]; f 375 libavcodec/rv10.c new_h = 4 * ((uint8_t *) s->avctx->extradata)[7 + 2 * f]; f 407 libavcodec/rv10.c av_log(s->avctx, AV_LOG_DEBUG, "F %d/%d/%d\n", f, rpr_bits, rpr_max); f 597 libavcodec/rv10.c if (s->current_picture_ptr->f->pict_type != s->pict_type) { f 772 libavcodec/rv10.c if ((ret = av_frame_ref(pict, s->current_picture_ptr->f)) < 0) f 777 libavcodec/rv10.c if ((ret = av_frame_ref(pict, s->last_picture_ptr->f)) < 0) f 177 libavcodec/rv30.c Y = s->current_picture_ptr->f->data[0] + mb_x*16 + (row*16 + j) * s->linesize + 4 * !mb_x; f 197 libavcodec/rv30.c C = s->current_picture_ptr->f->data[k + 1] + mb_x*8 + (row*8 + j) * s->uvlinesize + 4 * !mb_x; f 219 libavcodec/rv30.c Y = s->current_picture_ptr->f->data[0] + mb_x*16 + (row*16 + j) * s->linesize; f 239 libavcodec/rv30.c C = s->current_picture_ptr->f->data[k+1] + mb_x*8 + (row*8 + j) * s->uvlinesize; f 711 libavcodec/rv34.c ThreadFrame *f = dir ? &s->next_picture_ptr->tf : &s->last_picture_ptr->tf; f 712 libavcodec/rv34.c ff_thread_await_progress(f, mb_row, 0); f 716 libavcodec/rv34.c srcY = dir ? s->next_picture_ptr->f->data[0] : s->last_picture_ptr->f->data[0]; f 717 libavcodec/rv34.c srcU = dir ? s->next_picture_ptr->f->data[1] : s->last_picture_ptr->f->data[1]; f 718 libavcodec/rv34.c srcV = dir ? s->next_picture_ptr->f->data[2] : s->last_picture_ptr->f->data[2]; f 1587 libavcodec/rv34.c if ((ret = av_frame_ref(pict, s->current_picture_ptr->f)) < 0) f 1593 libavcodec/rv34.c if ((ret = av_frame_ref(pict, s->last_picture_ptr->f)) < 0) f 1634 libavcodec/rv34.c if ((ret = av_frame_ref(pict, s->next_picture_ptr->f)) < 0) f 1662 libavcodec/rv34.c if ((!s->last_picture_ptr || !s->last_picture_ptr->f->data[0]) && f 462 libavcodec/rv40.c Y = s->current_picture_ptr->f->data[0] + mb_x*16 + (row*16 + j) * s->linesize; f 507 libavcodec/rv40.c C = s->current_picture_ptr->f->data[k + 1] + mb_x*8 + (row*8 + j*4) * s->uvlinesize; f 27 libavcodec/sbrdsp_template.c INTFLOAT f = z[k] + z[k + 64] + z[k + 128] + z[k + 192] + z[k + 256]; f 28 libavcodec/sbrdsp_template.c z[k] = f; f 46 libavcodec/scpr3.c for (int q = a + 128 - 1 >> 7, f = (a + b - 1 >> 7) + 1; q < f; q++) f 161 libavcodec/scpr3.c uint32_t f = m->symbols[q]; f 162 libavcodec/scpr3.c uint32_t p = e + f - g; f 176 libavcodec/scpr3.c *value = f; f 191 libavcodec/scpr3.c e += f - g + k; f 192 libavcodec/scpr3.c g = f + 1; f 207 libavcodec/scpr3.c int c, d, e, f, k, p, length, i, j, index; f 228 libavcodec/scpr3.c f = freqs[j]; f 229 libavcodec/scpr3.c if (!f) { f 230 libavcodec/scpr3.c f = c; f 236 libavcodec/scpr3.c k = ((f + e - 1) >> 7) + 1; f 241 libavcodec/scpr3.c e += f; f 298 libavcodec/scpr3.c int c, d, e, f, g, k, q, p; f 327 libavcodec/scpr3.c for (p = f = g = 0; p < c; p++) { f 332 libavcodec/scpr3.c f = n.freqs[2 * p + 1]; f 335 libavcodec/scpr3.c d = 0 < g ? f + g + (value - d - 1 << n.fshift) : value << n.fshift; f 350 libavcodec/scpr3.c for (g = c + 1, f = n.size; g < f; g++) { f 423 libavcodec/scpr3.c int c, d, e, f, g, q; f 425 libavcodec/scpr3.c for (c = 0, d = 0, e = 0, f = 0, g = 0, q = m->size; g < q; g++) { f 448 libavcodec/scpr3.c q = f = 0; f 451 libavcodec/scpr3.c f = code - (d + c) >> m->fshift; f 452 libavcodec/scpr3.c q = f + e + 1; f 453 libavcodec/scpr3.c f = d + c + (f << m->fshift); f 456 libavcodec/scpr3.c f = q << m->fshift; f 460 libavcodec/scpr3.c *b = f; f 463 libavcodec/scpr3.c c = add_dec(m, q, g, f); f 468 libavcodec/scpr3.c c = add_dec(m, q, g, f); f 582 libavcodec/scpr3.c int c, d, e, f, g, q; f 597 libavcodec/scpr3.c for (f = d = 0; f < c; f++) { f 598 libavcodec/scpr3.c int p = f; f 685 libavcodec/scpr3.c int c, d, e, f, g, q; f 708 libavcodec/scpr3.c f = (c + g - 1 >> 7) + 1; f 709 libavcodec/scpr3.c if (f > FF_ARRAY_ELEMS(n.dectab)) f 711 libavcodec/scpr3.c for (q = c + 128 - 1 >> 7; q < f; q++) { f 1809 libavcodec/sheervideo.c ThreadFrame frame = { .f = data }; f 208 libavcodec/sipr16k.c AMRFixed f; f 221 libavcodec/sipr16k.c f.pitch_fac = FFMIN(pitch_fac, 1.0); f 222 libavcodec/sipr16k.c f.pitch_lag = DIVIDE_BY_3(pitch_delay_3x+1); f 223 libavcodec/sipr16k.c ctx->pitch_lag_prev = f.pitch_lag; f 236 libavcodec/sipr16k.c ff_decode_10_pulses_35bits(params->fc_indexes[i], &f, f 239 libavcodec/sipr16k.c ff_set_fixed_vector(fixed_vector, &f, 1.0, L_SUBFR_16k); f 1668 libavcodec/snowenc.c s->m.current_picture.f = s->current_picture; f 1669 libavcodec/snowenc.c s->m.current_picture.f->pts = pict->pts; f 1679 libavcodec/snowenc.c s->m. last_picture.f = s->last_picture[0]; f 1680 libavcodec/snowenc.c s->m. new_picture.f = s->input_picture; f 1883 libavcodec/snowenc.c s->m.current_picture.f->display_picture_number = f 1884 libavcodec/snowenc.c s->m.current_picture.f->coded_picture_number = avctx->frame_number; f 1885 libavcodec/snowenc.c s->m.current_picture.f->quality = pic->quality; f 274 libavcodec/svq1enc.c s->m.last_picture.f->data[0] = ref_plane; f 276 libavcodec/svq1enc.c s->m.last_picture.f->linesize[0] = f 277 libavcodec/svq1enc.c s->m.new_picture.f->linesize[0] = f 278 libavcodec/svq1enc.c s->m.current_picture.f->linesize[0] = stride; f 327 libavcodec/svq1enc.c s->m.new_picture.f->data[0] = src - y * 16 * stride; // ugly f 71 libavcodec/svq3.c AVFrame *f; f 440 libavcodec/svq3.c int linesize = s->cur_pic->f->linesize[0]; f 441 libavcodec/svq3.c int uvlinesize = s->cur_pic->f->linesize[1]; f 454 libavcodec/svq3.c dest = s->cur_pic->f->data[0] + x + y * linesize; f 455 libavcodec/svq3.c src = pic->f->data[0] + mx + my * linesize; f 481 libavcodec/svq3.c dest = s->cur_pic->f->data[i] + (x >> 1) + (y >> 1) * uvlinesize; f 482 libavcodec/svq3.c src = pic->f->data[i] + mx + my * uvlinesize; f 685 libavcodec/svq3.c linesize = s->cur_pic->f->linesize[0]; f 686 libavcodec/svq3.c uvlinesize = s->cur_pic->f->linesize[1]; f 688 libavcodec/svq3.c dest_y = s->cur_pic->f->data[0] + (mb_x + mb_y * linesize) * 16; f 689 libavcodec/svq3.c dest_cb = s->cur_pic->f->data[1] + mb_x * 8 + mb_y * uvlinesize * block_h; f 690 libavcodec/svq3.c dest_cr = s->cur_pic->f->data[2] + mb_x * 8 + mb_y * uvlinesize * block_h; f 1146 libavcodec/svq3.c s->cur_pic->f = av_frame_alloc(); f 1147 libavcodec/svq3.c s->last_pic->f = av_frame_alloc(); f 1148 libavcodec/svq3.c s->next_pic->f = av_frame_alloc(); f 1149 libavcodec/svq3.c if (!s->cur_pic->f || !s->last_pic->f || !s->next_pic->f) f 1354 libavcodec/svq3.c av_frame_unref(pic->f); f 1387 libavcodec/svq3.c ret = ff_get_buffer(avctx, pic->f, f 1394 libavcodec/svq3.c s->edge_emu_buffer = av_mallocz_array(pic->f->linesize[0], 17); f 1416 libavcodec/svq3.c if (s->next_pic->f->data[0] && !s->low_delay && !s->last_frame_output) { f 1417 libavcodec/svq3.c ret = av_frame_ref(data, s->next_pic->f); f 1450 libavcodec/svq3.c av_frame_unref(s->cur_pic->f); f 1453 libavcodec/svq3.c s->cur_pic->f->pict_type = s->pict_type; f 1454 libavcodec/svq3.c s->cur_pic->f->key_frame = (s->pict_type == AV_PICTURE_TYPE_I); f 1461 libavcodec/svq3.c s->block_offset[i] = (4 * ((scan8[i] - scan8[0]) & 7)) + 4 * s->cur_pic->f->linesize[0] * ((scan8[i] - scan8[0]) >> 3); f 1462 libavcodec/svq3.c s->block_offset[48 + i] = (4 * ((scan8[i] - scan8[0]) & 7)) + 8 * s->cur_pic->f->linesize[0] * ((scan8[i] - scan8[0]) >> 3); f 1466 libavcodec/svq3.c s->block_offset[32 + i] = (4 * ((scan8[i] - scan8[0]) & 7)) + 4 * s->cur_pic->f->linesize[1] * ((scan8[i] - scan8[0]) >> 3); f 1468 libavcodec/svq3.c s->block_offset[48 + 32 + i] = (4 * ((scan8[i] - scan8[0]) & 7)) + 8 * s->cur_pic->f->linesize[1] * ((scan8[i] - scan8[0]) >> 3); f 1472 libavcodec/svq3.c if (!s->last_pic->f->data[0]) { f 1474 libavcodec/svq3.c av_frame_unref(s->last_pic->f); f 1478 libavcodec/svq3.c memset(s->last_pic->f->data[0], 0, avctx->height * s->last_pic->f->linesize[0]); f 1479 libavcodec/svq3.c memset(s->last_pic->f->data[1], 0x80, (avctx->height / 2) * f 1480 libavcodec/svq3.c s->last_pic->f->linesize[1]); f 1481 libavcodec/svq3.c memset(s->last_pic->f->data[2], 0x80, (avctx->height / 2) * f 1482 libavcodec/svq3.c s->last_pic->f->linesize[2]); f 1485 libavcodec/svq3.c if (s->pict_type == AV_PICTURE_TYPE_B && !s->next_pic->f->data[0]) { f 1487 libavcodec/svq3.c av_frame_unref(s->next_pic->f); f 1491 libavcodec/svq3.c memset(s->next_pic->f->data[0], 0, avctx->height * s->next_pic->f->linesize[0]); f 1492 libavcodec/svq3.c memset(s->next_pic->f->data[1], 0x80, (avctx->height / 2) * f 1493 libavcodec/svq3.c s->next_pic->f->linesize[1]); f 1494 libavcodec/svq3.c memset(s->next_pic->f->data[2], 0x80, (avctx->height / 2) * f 1495 libavcodec/svq3.c s->next_pic->f->linesize[2]); f 1586 libavcodec/svq3.c ff_draw_horiz_band(avctx, s->cur_pic->f, f 1587 libavcodec/svq3.c s->last_pic->f->data[0] ? s->last_pic->f : NULL, f 1605 libavcodec/svq3.c ret = av_frame_ref(data, s->cur_pic->f); f 1606 libavcodec/svq3.c else if (s->last_pic->f->data[0]) f 1607 libavcodec/svq3.c ret = av_frame_ref(data, s->last_pic->f); f 1612 libavcodec/svq3.c if (s->last_pic->f->data[0] || s->low_delay) f 1618 libavcodec/svq3.c av_frame_unref(s->cur_pic->f); f 1631 libavcodec/svq3.c av_frame_free(&s->cur_pic->f); f 1632 libavcodec/svq3.c av_frame_free(&s->next_pic->f); f 1633 libavcodec/svq3.c av_frame_free(&s->last_pic->f); f 681 libavcodec/takdec.c ThreadFrame tframe = { .f = data }; f 140 libavcodec/tests/fft.c double f = cos(M_PI * a / (double) (2 * n)); f 141 libavcodec/tests/fft.c sum += f * in[k]; f 35 libavcodec/thread.h AVFrame *f; f 83 libavcodec/thread.h void ff_thread_report_progress(ThreadFrame *f, int progress, int field); f 97 libavcodec/thread.h void ff_thread_await_progress(ThreadFrame *f, int progress, int field); f 117 libavcodec/thread.h int ff_thread_get_buffer(AVCodecContext *avctx, ThreadFrame *f, int flags); f 130 libavcodec/thread.h void ff_thread_release_buffer(AVCodecContext *avctx, ThreadFrame *f); f 1210 libavcodec/tiff.c memcpy(frame->f->data[1], s->palette, sizeof(s->palette)); f 1214 libavcodec/tiff.c uint32_t *pal = (uint32_t *)frame->f->data[1]; f 1771 libavcodec/tiff.c ThreadFrame frame = { .f = data }; f 223 libavcodec/tta.c ThreadFrame tframe = { .f = data }; f 1847 libavcodec/utils.c ret = av_frame_ref(dst->f, src->f); f 1869 libavcodec/utils.c int ff_thread_get_buffer(AVCodecContext *avctx, ThreadFrame *f, int flags) f 1871 libavcodec/utils.c f->owner[0] = f->owner[1] = avctx; f 1872 libavcodec/utils.c return ff_get_buffer(avctx, f->f, flags); f 1875 libavcodec/utils.c void ff_thread_release_buffer(AVCodecContext *avctx, ThreadFrame *f) f 1877 libavcodec/utils.c if (f->f) f 1878 libavcodec/utils.c av_frame_unref(f->f); f 1885 libavcodec/utils.c void ff_thread_report_progress(ThreadFrame *f, int progress, int field) f 1889 libavcodec/utils.c void ff_thread_await_progress(ThreadFrame *f, int progress, int field) f 611 libavcodec/utvideodec.c ThreadFrame frame = { .f = data }; f 752 libavcodec/utvideodec.c ret = decode_plane(c, i, frame.f->data[i], f 753 libavcodec/utvideodec.c frame.f->linesize[i], avctx->width, f 760 libavcodec/utvideodec.c restore_median_planar(c, frame.f->data[i], f 761 libavcodec/utvideodec.c frame.f->linesize[i], avctx->width, f 764 libavcodec/utvideodec.c restore_median_planar_il(c, frame.f->data[i], f 765 libavcodec/utvideodec.c frame.f->linesize[i], f 771 libavcodec/utvideodec.c restore_gradient_planar(c, frame.f->data[i], f 772 libavcodec/utvideodec.c frame.f->linesize[i], avctx->width, f 775 libavcodec/utvideodec.c restore_gradient_planar_il(c, frame.f->data[i], f 776 libavcodec/utvideodec.c frame.f->linesize[i], f 782 libavcodec/utvideodec.c c->utdsp.restore_rgb_planes(frame.f->data[2], frame.f->data[0], frame.f->data[1], f 783 libavcodec/utvideodec.c frame.f->linesize[2], frame.f->linesize[0], frame.f->linesize[1], f 789 libavcodec/utvideodec.c ret = decode_plane10(c, i, (uint16_t *)frame.f->data[i], f 790 libavcodec/utvideodec.c frame.f->linesize[i] / 2, avctx->width, f 797 libavcodec/utvideodec.c c->utdsp.restore_rgb_planes10((uint16_t *)frame.f->data[2], (uint16_t *)frame.f->data[0], (uint16_t *)frame.f->data[1], f 798 libavcodec/utvideodec.c frame.f->linesize[2] / 2, frame.f->linesize[0] / 2, frame.f->linesize[1] / 2, f 803 libavcodec/utvideodec.c ret = decode_plane(c, i, frame.f->data[i], frame.f->linesize[i], f 810 libavcodec/utvideodec.c restore_median_planar(c, frame.f->data[i], frame.f->linesize[i], f 814 libavcodec/utvideodec.c restore_median_planar_il(c, frame.f->data[i], frame.f->linesize[i], f 821 libavcodec/utvideodec.c restore_gradient_planar(c, frame.f->data[i], frame.f->linesize[i], f 825 libavcodec/utvideodec.c restore_gradient_planar_il(c, frame.f->data[i], frame.f->linesize[i], f 835 libavcodec/utvideodec.c ret = decode_plane(c, i, frame.f->data[i], frame.f->linesize[i], f 842 libavcodec/utvideodec.c restore_median_planar(c, frame.f->data[i], frame.f->linesize[i], f 846 libavcodec/utvideodec.c restore_median_planar_il(c, frame.f->data[i], frame.f->linesize[i], f 852 libavcodec/utvideodec.c restore_gradient_planar(c, frame.f->data[i], frame.f->linesize[i], f 856 libavcodec/utvideodec.c restore_gradient_planar_il(c, frame.f->data[i], frame.f->linesize[i], f 865 libavcodec/utvideodec.c ret = decode_plane(c, i, frame.f->data[i], frame.f->linesize[i], f 872 libavcodec/utvideodec.c restore_median_planar(c, frame.f->data[i], frame.f->linesize[i], f 876 libavcodec/utvideodec.c restore_median_planar_il(c, frame.f->data[i], frame.f->linesize[i], f 882 libavcodec/utvideodec.c restore_gradient_planar(c, frame.f->data[i], frame.f->linesize[i], f 886 libavcodec/utvideodec.c restore_gradient_planar_il(c, frame.f->data[i], frame.f->linesize[i], f 895 libavcodec/utvideodec.c ret = decode_plane10(c, i, (uint16_t *)frame.f->data[i], frame.f->linesize[i] / 2, f 904 libavcodec/utvideodec.c ret = decode_plane10(c, i, (uint16_t *)frame.f->data[i], frame.f->linesize[i] / 2, f 913 libavcodec/utvideodec.c frame.f->key_frame = 1; f 914 libavcodec/utvideodec.c frame.f->pict_type = AV_PICTURE_TYPE_I; f 915 libavcodec/utvideodec.c frame.f->interlaced_frame = !!c->interlaced; f 146 libavcodec/v210dec.c ThreadFrame frame = { .f = data }; f 92 libavcodec/v410dec.c ThreadFrame frame = { .f = data }; f 161 libavcodec/v4l2_context.h int ff_v4l2_context_dequeue_frame(V4L2Context* ctx, AVFrame* f, int timeout); f 184 libavcodec/v4l2_context.h int ff_v4l2_context_enqueue_frame(V4L2Context* ctx, const AVFrame* f); f 63 libavcodec/vaapi_h264.c va_pic->picture_id = ff_vaapi_get_surface_id(pic->f); f 103 libavcodec/vaapi_h264.c if (va_pic->picture_id == ff_vaapi_get_surface_id(pic->f)) { f 238 libavcodec/vaapi_h264.c pic->output_surface = ff_vaapi_get_surface_id(h->cur_pic_ptr->f); f 50 libavcodec/vaapi_mpeg2.c pic->output_surface = ff_vaapi_get_surface_id(s->current_picture_ptr->f); f 76 libavcodec/vaapi_mpeg2.c pic_param.backward_reference_picture = ff_vaapi_get_surface_id(s->next_picture.f); f 79 libavcodec/vaapi_mpeg2.c pic_param.forward_reference_picture = ff_vaapi_get_surface_id(s->last_picture.f); f 54 libavcodec/vaapi_mpeg4.c pic->output_surface = ff_vaapi_get_surface_id(s->current_picture_ptr->f); f 79 libavcodec/vaapi_mpeg4.c s->pict_type == AV_PICTURE_TYPE_B ? s->next_picture.f->pict_type - AV_PICTURE_TYPE_I : 0, f 101 libavcodec/vaapi_mpeg4.c pic_param.backward_reference_picture = ff_vaapi_get_surface_id(s->next_picture.f); f 103 libavcodec/vaapi_mpeg4.c pic_param.forward_reference_picture = ff_vaapi_get_surface_id(s->last_picture.f); f 258 libavcodec/vaapi_vc1.c pic->output_surface = ff_vaapi_get_surface_id(s->current_picture_ptr->f); f 375 libavcodec/vaapi_vc1.c pic_param.backward_reference_picture = ff_vaapi_get_surface_id(s->next_picture.f); f 378 libavcodec/vaapi_vc1.c pic_param.forward_reference_picture = ff_vaapi_get_surface_id(s->last_picture.f); f 29 libavcodec/vaapi_vp8.c return ff_vaapi_get_surface_id(vf->tf.f); f 32 libavcodec/vaapi_vp9.c return ff_vaapi_get_surface_id(vf->tf.f); f 103 libavcodec/vaapi_vp9.c if (h->refs[i].f->buf[0]) f 104 libavcodec/vaapi_vp9.c pic_param.reference_frames[i] = ff_vaapi_get_surface_id(h->refs[i].f); f 128 libavcodec/vble.c ThreadFrame frame = { .f = data }; f 860 libavcodec/vc1.c v->s.current_picture_ptr->f->pict_type = v->s.pict_type; f 64 libavcodec/vc1_block.c s->dest[0] += s->current_picture_ptr->f->linesize[0]; f 65 libavcodec/vc1_block.c s->dest[1] += s->current_picture_ptr->f->linesize[1]; f 66 libavcodec/vc1_block.c s->dest[2] += s->current_picture_ptr->f->linesize[2]; f 2987 libavcodec/vc1_block.c if (!v->s.last_picture.f->data[0]) f 2996 libavcodec/vc1_block.c memcpy(s->dest[0], s->last_picture.f->data[0] + s->mb_y * 16 * s->linesize, s->linesize * 16); f 2997 libavcodec/vc1_block.c memcpy(s->dest[1], s->last_picture.f->data[1] + s->mb_y * 8 * s->uvlinesize, s->uvlinesize * 8); f 2998 libavcodec/vc1_block.c memcpy(s->dest[2], s->last_picture.f->data[2] + s->mb_y * 8 * s->uvlinesize, s->uvlinesize * 8); f 187 libavcodec/vc1_mc.c !v->s.last_picture.f->data[0]) f 190 libavcodec/vc1_mc.c linesize = s->current_picture_ptr->f->linesize[0]; f 191 libavcodec/vc1_mc.c uvlinesize = s->current_picture_ptr->f->linesize[1]; f 222 libavcodec/vc1_mc.c srcY = s->current_picture.f->data[0]; f 223 libavcodec/vc1_mc.c srcU = s->current_picture.f->data[1]; f 224 libavcodec/vc1_mc.c srcV = s->current_picture.f->data[2]; f 230 libavcodec/vc1_mc.c srcY = s->last_picture.f->data[0]; f 231 libavcodec/vc1_mc.c srcU = s->last_picture.f->data[1]; f 232 libavcodec/vc1_mc.c srcV = s->last_picture.f->data[2]; f 236 libavcodec/vc1_mc.c interlace = s->last_picture.f->interlaced_frame; f 239 libavcodec/vc1_mc.c srcY = s->next_picture.f->data[0]; f 240 libavcodec/vc1_mc.c srcU = s->next_picture.f->data[1]; f 241 libavcodec/vc1_mc.c srcV = s->next_picture.f->data[2]; f 245 libavcodec/vc1_mc.c interlace = s->next_picture.f->interlaced_frame; f 467 libavcodec/vc1_mc.c !v->s.last_picture.f->data[0]) f 470 libavcodec/vc1_mc.c linesize = s->current_picture_ptr->f->linesize[0]; f 477 libavcodec/vc1_mc.c srcY = s->current_picture.f->data[0]; f 482 libavcodec/vc1_mc.c srcY = s->last_picture.f->data[0]; f 485 libavcodec/vc1_mc.c interlace = s->last_picture.f->interlaced_frame; f 488 libavcodec/vc1_mc.c srcY = s->next_picture.f->data[0]; f 491 libavcodec/vc1_mc.c interlace = s->next_picture.f->interlaced_frame; f 508 libavcodec/vc1_mc.c int k, f = opp_count > 2; f 510 libavcodec/vc1_mc.c v->mv_f[1][s->block_index[k] + v->blocks_off] = f; f 648 libavcodec/vc1_mc.c if (!v->field_mode && !v->s.last_picture.f->data[0]) f 667 libavcodec/vc1_mc.c if (v->field_mode && chroma_ref_type == 1 && v->cur_field_type == 1 && !v->s.last_picture.f->data[0]) f 672 libavcodec/vc1_mc.c uvlinesize = s->current_picture_ptr->f->linesize[1]; f 701 libavcodec/vc1_mc.c srcU = s->current_picture.f->data[1]; f 702 libavcodec/vc1_mc.c srcV = s->current_picture.f->data[2]; f 707 libavcodec/vc1_mc.c srcU = s->last_picture.f->data[1]; f 708 libavcodec/vc1_mc.c srcV = s->last_picture.f->data[2]; f 711 libavcodec/vc1_mc.c interlace = s->last_picture.f->interlaced_frame; f 714 libavcodec/vc1_mc.c srcU = s->next_picture.f->data[1]; f 715 libavcodec/vc1_mc.c srcV = s->next_picture.f->data[2]; f 718 libavcodec/vc1_mc.c interlace = s->next_picture.f->interlaced_frame; f 859 libavcodec/vc1_mc.c uvlinesize = s->current_picture_ptr->f->linesize[1]; f 883 libavcodec/vc1_mc.c srcU = s->next_picture.f->data[1]; f 884 libavcodec/vc1_mc.c srcV = s->next_picture.f->data[2]; f 887 libavcodec/vc1_mc.c interlace = s->next_picture.f->interlaced_frame; f 889 libavcodec/vc1_mc.c srcU = s->last_picture.f->data[1]; f 890 libavcodec/vc1_mc.c srcV = s->last_picture.f->data[2]; f 893 libavcodec/vc1_mc.c interlace = s->last_picture.f->interlaced_frame; f 1015 libavcodec/vc1_mc.c if (!v->field_mode && !v->s.next_picture.f->data[0]) f 1018 libavcodec/vc1_mc.c linesize = s->current_picture_ptr->f->linesize[0]; f 1019 libavcodec/vc1_mc.c uvlinesize = s->current_picture_ptr->f->linesize[1]; f 1033 libavcodec/vc1_mc.c srcY = s->next_picture.f->data[0]; f 1034 libavcodec/vc1_mc.c srcU = s->next_picture.f->data[1]; f 1035 libavcodec/vc1_mc.c srcV = s->next_picture.f->data[2]; f 1037 libavcodec/vc1_mc.c interlace = s->next_picture.f->interlaced_frame; f 899 libavcodec/vc1_pred.c int total_opp, k, f; f 914 libavcodec/vc1_pred.c f = (total_opp > 2) ? 1 : 0; f 918 libavcodec/vc1_pred.c f = 0; f 920 libavcodec/vc1_pred.c v->ref_field_type[0] = v->ref_field_type[1] = v->cur_field_type ^ f; f 926 libavcodec/vc1_pred.c v->mv_f[0][s->block_index[k] + v->blocks_off] = f; f 927 libavcodec/vc1_pred.c v->mv_f[1][s->block_index[k] + v->blocks_off] = f; f 203 libavcodec/vc1dec.c uint8_t *iplane = s->current_picture.f->data[plane]; f 204 libavcodec/vc1dec.c int iline = s->current_picture.f->linesize[plane]; f 210 libavcodec/vc1dec.c iplane = s->last_picture.f->data[plane]; f 211 libavcodec/vc1dec.c iline = s->last_picture.f->linesize[plane]; f 285 libavcodec/vc1dec.c if (!s->current_picture.f || !s->current_picture.f->data[0]) { f 290 libavcodec/vc1dec.c if (v->two_sprites && (!s->last_picture_ptr || !s->last_picture.f->data[0])) { f 308 libavcodec/vc1dec.c AVFrame *f = s->current_picture.f; f 315 libavcodec/vc1dec.c if (f && f->data[0]) f 318 libavcodec/vc1dec.c memset(f->data[plane] + i * f->linesize[plane], f 319 libavcodec/vc1dec.c plane ? 128 : 0, f->linesize[plane]); f 662 libavcodec/vc1dec.c if ((ret = av_frame_ref(pict, s->next_picture_ptr->f)) < 0) f 870 libavcodec/vc1dec.c s->current_picture.f->pict_type = s->pict_type; f 871 libavcodec/vc1dec.c s->current_picture.f->key_frame = s->pict_type == AV_PICTURE_TYPE_I; f 896 libavcodec/vc1dec.c v->s.current_picture_ptr->f->interlaced_frame = (v->fcm != PROGRESSIVE); f 897 libavcodec/vc1dec.c v->s.current_picture_ptr->f->top_field_first = v->tff; f 900 libavcodec/vc1dec.c s->current_picture_ptr->f->repeat_pict = 0; f 905 libavcodec/vc1dec.c s->current_picture_ptr->f->repeat_pict = 1; f 908 libavcodec/vc1dec.c s->current_picture_ptr->f->repeat_pict = v->rptfrm * 2; f 964 libavcodec/vc1dec.c v->s.current_picture_ptr->f->pict_type = v->s.pict_type; f 1043 libavcodec/vc1dec.c s->current_picture.f->linesize[0] <<= 1; f 1044 libavcodec/vc1dec.c s->current_picture.f->linesize[1] <<= 1; f 1045 libavcodec/vc1dec.c s->current_picture.f->linesize[2] <<= 1; f 1120 libavcodec/vc1dec.c s->current_picture.f->linesize[0] >>= 1; f 1121 libavcodec/vc1dec.c s->current_picture.f->linesize[1] >>= 1; f 1122 libavcodec/vc1dec.c s->current_picture.f->linesize[2] >>= 1; f 1159 libavcodec/vc1dec.c if ((ret = av_frame_ref(pict, s->current_picture_ptr->f)) < 0) f 1164 libavcodec/vc1dec.c if ((ret = av_frame_ref(pict, s->last_picture_ptr->f)) < 0) f 368 libavcodec/vdpau.c val = ff_vdpau_common_end_frame(avctx, pic->f, pic_ctx); f 56 libavcodec/vdpau_h264.c VdpVideoSurface surface = ff_vdpau_get_surface_id(pic->f); f 93 libavcodec/vdpau_h264.c surface_ref = ff_vdpau_get_surface_id(pic->f); f 210 libavcodec/vdpau_h264.c val = ff_vdpau_common_end_frame(avctx, pic->f, pic_ctx); f 48 libavcodec/vdpau_mpeg12.c ref = ff_vdpau_get_surface_id(s->next_picture.f); f 53 libavcodec/vdpau_mpeg12.c ref = ff_vdpau_get_surface_id(s->last_picture.f); f 50 libavcodec/vdpau_mpeg4.c ref = ff_vdpau_get_surface_id(s->next_picture.f); f 56 libavcodec/vdpau_mpeg4.c ref = ff_vdpau_get_surface_id(s->last_picture.f); f 49 libavcodec/vdpau_vc1.c ref = ff_vdpau_get_surface_id(s->next_picture.f); f 56 libavcodec/vdpau_vc1.c ref = ff_vdpau_get_surface_id(s->last_picture.f); f 55 libavcodec/vdpau_vp9.c if (h->refs[h->h.refidx[0]].f && h->refs[h->h.refidx[0]].f->private_ref) { f 56 libavcodec/vdpau_vp9.c info->lastReference = ff_vdpau_get_surface_id(h->refs[h->h.refidx[0]].f); f 58 libavcodec/vdpau_vp9.c if (h->refs[h->h.refidx[1]].f && h->refs[h->h.refidx[1]].f->private_ref) { f 59 libavcodec/vdpau_vp9.c info->goldenReference = ff_vdpau_get_surface_id(h->refs[h->h.refidx[1]].f); f 61 libavcodec/vdpau_vp9.c if (h->refs[h->h.refidx[2]].f && h->refs[h->h.refidx[2]].f->private_ref) { f 62 libavcodec/vdpau_vp9.c info->altReference = ff_vdpau_get_surface_id(h->refs[h->h.refidx[2]].f); f 195 libavcodec/vdpau_vp9.c val = ff_vdpau_common_end_frame(avctx, pic.tf.f, pic_ctx); f 937 libavcodec/videotoolbox.c AVFrame *frame = h->cur_pic_ptr->f; f 1002 libavcodec/videotoolbox.c AVFrame *frame = s->current_picture_ptr->f; f 57 libavcodec/vlc.h #define INIT_VLC_SPARSE_STATIC(vlc, bits, a, b, c, d, e, f, g, h, i, j, static_size) \ f 62 libavcodec/vlc.h ff_init_vlc_sparse(vlc, bits, a, b, c, d, e, f, g, h, i, j, \ f 66 libavcodec/vlc.h #define INIT_LE_VLC_SPARSE_STATIC(vlc, bits, a, b, c, d, e, f, g, h, i, j, static_size) \ f 71 libavcodec/vlc.h ff_init_vlc_sparse(vlc, bits, a, b, c, d, e, f, g, h, i, j, \ f 75 libavcodec/vlc.h #define INIT_VLC_STATIC(vlc, bits, a, b, c, d, e, f, g, static_size) \ f 76 libavcodec/vlc.h INIT_VLC_SPARSE_STATIC(vlc, bits, a, b, c, d, e, f, g, NULL, 0, 0, static_size) f 78 libavcodec/vlc.h #define INIT_LE_VLC_STATIC(vlc, bits, a, b, c, d, e, f, g, static_size) \ f 79 libavcodec/vlc.h INIT_LE_VLC_SPARSE_STATIC(vlc, bits, a, b, c, d, e, f, g, NULL, 0, 0, static_size) f 470 libavcodec/vorbisenc.c static void put_float(PutBitContext *pb, float f) f 474 libavcodec/vorbisenc.c mant = (int)ldexp(frexp(f, &exp), 20); f 1028 libavcodec/vorbisenc.c AVFrame *f = av_frame_alloc(); f 1031 libavcodec/vorbisenc.c if (!f) f 1034 libavcodec/vorbisenc.c f->format = avctx->sample_fmt; f 1035 libavcodec/vorbisenc.c f->nb_samples = avctx->frame_size; f 1036 libavcodec/vorbisenc.c f->channel_layout = avctx->channel_layout; f 1038 libavcodec/vorbisenc.c if (av_frame_get_buffer(f, 4)) { f 1039 libavcodec/vorbisenc.c av_frame_free(&f); f 1044 libavcodec/vorbisenc.c size_t bps = av_get_bytes_per_sample(f->format); f 1045 libavcodec/vorbisenc.c memset(f->extended_data[ch], 0, bps * f->nb_samples); f 1047 libavcodec/vorbisenc.c return f; f 326 libavcodec/vp3.c if (s->golden_frame.f) f 328 libavcodec/vp3.c if (s->last_frame.f) f 330 libavcodec/vp3.c if (s->current_frame.f) f 346 libavcodec/vp3.c av_frame_free(&s->current_frame.f); f 347 libavcodec/vp3.c av_frame_free(&s->last_frame.f); f 348 libavcodec/vp3.c av_frame_free(&s->golden_frame.f); f 1788 libavcodec/vp3.c ptrdiff_t stride = s->current_frame.f->linesize[plane]; f 1789 libavcodec/vp3.c uint8_t *plane_data = s->current_frame.f->data[plane]; f 1919 libavcodec/vp3.c offset[0] = s->current_frame.f->linesize[0] * y; f 1920 libavcodec/vp3.c offset[1] = s->current_frame.f->linesize[1] * cy; f 1921 libavcodec/vp3.c offset[2] = s->current_frame.f->linesize[2] * cy; f 1926 libavcodec/vp3.c s->avctx->draw_horiz_band(s->avctx, s->current_frame.f, offset, y, 3, h); f 2068 libavcodec/vp3.c uint8_t *output_plane = s->current_frame.f->data[plane] + f 2070 libavcodec/vp3.c uint8_t *last_plane = s->last_frame.f->data[plane] + f 2072 libavcodec/vp3.c uint8_t *golden_plane = s->golden_frame.f->data[plane] + f 2074 libavcodec/vp3.c ptrdiff_t stride = s->current_frame.f->linesize[plane]; f 2301 libavcodec/vp3.c s->current_frame.f = av_frame_alloc(); f 2302 libavcodec/vp3.c s->last_frame.f = av_frame_alloc(); f 2303 libavcodec/vp3.c s->golden_frame.f = av_frame_alloc(); f 2305 libavcodec/vp3.c if (!s->current_frame.f || !s->last_frame.f || !s->golden_frame.f) { f 2306 libavcodec/vp3.c av_frame_free(&s->current_frame.f); f 2307 libavcodec/vp3.c av_frame_free(&s->last_frame.f); f 2308 libavcodec/vp3.c av_frame_free(&s->golden_frame.f); f 2573 libavcodec/vp3.c if (src->f->data[0]) f 2593 libavcodec/vp3.c if (!s1->current_frame.f->data[0] || f 2719 libavcodec/vp3.c s->current_frame.f->pict_type = s->keyframe ? AV_PICTURE_TYPE_I f 2721 libavcodec/vp3.c s->current_frame.f->key_frame = s->keyframe; f 2726 libavcodec/vp3.c s->edge_emu_buffer = av_malloc(9 * FFABS(s->current_frame.f->linesize[0])); f 2769 libavcodec/vp3.c if (!s->golden_frame.f->data[0]) { f 2773 libavcodec/vp3.c s->golden_frame.f->pict_type = AV_PICTURE_TYPE_I; f 2833 libavcodec/vp3.c s->data_offset[i] = (height - 1) * s->current_frame.f->linesize[i]; f 2849 libavcodec/vp3.c if ((ret = av_frame_ref(data, s->current_frame.f)) < 0) f 2871 libavcodec/vp3.c av_frame_unref(s->current_frame.f); f 43 libavcodec/vp8.c #define VPX(vp7, f) (vp7 ? vp7_ ## f : vp8_ ## f) f 45 libavcodec/vp8.c #define VPX(vp7, f) vp7_ ## f f 47 libavcodec/vp8.c #define VPX(vp7, f) vp8_ ## f f 70 libavcodec/vp8.c static int vp8_alloc_frame(VP8Context *s, VP8Frame *f, int ref) f 73 libavcodec/vp8.c if ((ret = ff_thread_get_buffer(s->avctx, &f->tf, f 76 libavcodec/vp8.c if (!(f->seg_map = av_buffer_allocz(s->mb_width * s->mb_height))) f 81 libavcodec/vp8.c f->hwaccel_priv_buf = av_buffer_allocz(hwaccel->frame_priv_data_size); f 82 libavcodec/vp8.c if (!f->hwaccel_priv_buf) f 84 libavcodec/vp8.c f->hwaccel_picture_private = f->hwaccel_priv_buf->data; f 90 libavcodec/vp8.c av_buffer_unref(&f->seg_map); f 91 libavcodec/vp8.c ff_thread_release_buffer(s->avctx, &f->tf); f 95 libavcodec/vp8.c static void vp8_release_frame(VP8Context *s, VP8Frame *f) f 97 libavcodec/vp8.c av_buffer_unref(&f->seg_map); f 98 libavcodec/vp8.c av_buffer_unref(&f->hwaccel_priv_buf); f 99 libavcodec/vp8.c f->hwaccel_picture_private = NULL; f 100 libavcodec/vp8.c ff_thread_release_buffer(s->avctx, &f->tf); f 164 libavcodec/vp8.c if (frame->tf.f->buf[0]) f 520 libavcodec/vp8.c src = s->framep[VP56_FRAME_PREVIOUS]->tf.f; f 528 libavcodec/vp8.c dst = s->framep[VP56_FRAME_PREVIOUS]->tf.f; f 1811 libavcodec/vp8.c uint8_t *src = ref->f->data[0]; f 1869 libavcodec/vp8.c uint8_t *src1 = ref->f->data[1], *src2 = ref->f->data[2]; f 1959 libavcodec/vp8.c uint8_t **src = s->framep[ref]->tf.f->data; f 2121 libavcodec/vp8.c VP8FilterStrength *f, int is_vp7) f 2146 libavcodec/vp8.c f->filter_level = filter_level; f 2147 libavcodec/vp8.c f->inner_limit = interior_limit; f 2148 libavcodec/vp8.c f->inner_filter = is_vp7 || !mb->skip || mb->mode == MODE_I4x4 || f 2153 libavcodec/vp8.c void filter_mb(VP8Context *s, uint8_t *dst[3], VP8FilterStrength *f, f 2157 libavcodec/vp8.c int filter_level = f->filter_level; f 2158 libavcodec/vp8.c int inner_limit = f->inner_limit; f 2159 libavcodec/vp8.c int inner_filter = f->inner_filter; f 2240 libavcodec/vp8.c void filter_mb_simple(VP8Context *s, uint8_t *dst, VP8FilterStrength *f, f 2244 libavcodec/vp8.c int filter_level = f->filter_level; f 2245 libavcodec/vp8.c int inner_limit = f->inner_limit; f 2246 libavcodec/vp8.c int inner_filter = f->inner_filter; f 2373 libavcodec/vp8.c curframe->tf.f->data[0] + 16 * mb_y * s->linesize, f 2374 libavcodec/vp8.c curframe->tf.f->data[1] + 8 * mb_y * s->uvlinesize, f 2375 libavcodec/vp8.c curframe->tf.f->data[2] + 8 * mb_y * s->uvlinesize f 2507 libavcodec/vp8.c AVFrame *curframe = s->curframe->tf.f; f 2531 libavcodec/vp8.c VP8FilterStrength *f = &td->filter_strength[mb_x]; f 2549 libavcodec/vp8.c filter_mb_simple(s, dst[0], f, mb_x, mb_y); f 2551 libavcodec/vp8.c filter_mb(s, dst, f, mb_x, mb_y, is_vp7); f 2665 libavcodec/vp8.c if (s->frames[i].tf.f->buf[0] && f 2694 libavcodec/vp8.c curframe->tf.f->key_frame = s->keyframe; f 2695 libavcodec/vp8.c curframe->tf.f->pict_type = s->keyframe ? AV_PICTURE_TYPE_I f 2735 libavcodec/vp8.c s->linesize = curframe->tf.f->linesize[0]; f 2736 libavcodec/vp8.c s->uvlinesize = curframe->tf.f->linesize[1]; f 2795 libavcodec/vp8.c if ((ret = av_frame_ref(data, curframe->tf.f)) < 0) f 2830 libavcodec/vp8.c av_frame_free(&s->frames[i].tf.f); f 2839 libavcodec/vp8.c s->frames[i].tf.f = av_frame_alloc(); f 2840 libavcodec/vp8.c if (!s->frames[i].tf.f) f 2919 libavcodec/vp8.c if (s_src->frames[i].tf.f->buf[0]) { f 104 libavcodec/vp9.c static void vp9_frame_unref(AVCodecContext *avctx, VP9Frame *f) f 106 libavcodec/vp9.c ff_thread_release_buffer(avctx, &f->tf); f 107 libavcodec/vp9.c av_buffer_unref(&f->extradata); f 108 libavcodec/vp9.c av_buffer_unref(&f->hwaccel_priv_buf); f 109 libavcodec/vp9.c f->segmentation_map = NULL; f 110 libavcodec/vp9.c f->hwaccel_picture_private = NULL; f 113 libavcodec/vp9.c static int vp9_frame_alloc(AVCodecContext *avctx, VP9Frame *f) f 118 libavcodec/vp9.c ret = ff_thread_get_buffer(avctx, &f->tf, AV_GET_BUFFER_FLAG_REF); f 132 libavcodec/vp9.c f->extradata = av_buffer_pool_get(s->frame_extradata_pool); f 133 libavcodec/vp9.c if (!f->extradata) { f 136 libavcodec/vp9.c memset(f->extradata->data, 0, f->extradata->size); f 138 libavcodec/vp9.c f->segmentation_map = f->extradata->data; f 139 libavcodec/vp9.c f->mv = (VP9mvrefPair *) (f->extradata->data + sz); f 143 libavcodec/vp9.c av_assert0(!f->hwaccel_picture_private); f 145 libavcodec/vp9.c f->hwaccel_priv_buf = av_buffer_allocz(hwaccel->frame_priv_data_size); f 146 libavcodec/vp9.c if (!f->hwaccel_priv_buf) f 148 libavcodec/vp9.c f->hwaccel_picture_private = f->hwaccel_priv_buf->data; f 155 libavcodec/vp9.c vp9_frame_unref(avctx, f); f 586 libavcodec/vp9.c if (!s->s.refs[s->s.h.refidx[0]].f->buf[0] || f 587 libavcodec/vp9.c !s->s.refs[s->s.h.refidx[1]].f->buf[0] || f 588 libavcodec/vp9.c !s->s.refs[s->s.h.refidx[2]].f->buf[0]) { f 593 libavcodec/vp9.c w = s->s.refs[s->s.h.refidx[0]].f->width; f 594 libavcodec/vp9.c h = s->s.refs[s->s.h.refidx[0]].f->height; f 596 libavcodec/vp9.c w = s->s.refs[s->s.h.refidx[1]].f->width; f 597 libavcodec/vp9.c h = s->s.refs[s->s.h.refidx[1]].f->height; f 599 libavcodec/vp9.c w = s->s.refs[s->s.h.refidx[2]].f->width; f 600 libavcodec/vp9.c h = s->s.refs[s->s.h.refidx[2]].f->height; f 608 libavcodec/vp9.c s->s.h.use_last_frame_mvs &= s->s.frames[CUR_FRAME].tf.f->width == w && f 609 libavcodec/vp9.c s->s.frames[CUR_FRAME].tf.f->height == h; f 821 libavcodec/vp9.c AVFrame *ref = s->s.refs[s->s.h.refidx[i]].f; f 1098 libavcodec/vp9.c AVFrame *f = s->s.frames[CUR_FRAME].tf.f; f 1099 libavcodec/vp9.c ptrdiff_t y_stride = f->linesize[0], uv_stride = f->linesize[1]; f 1173 libavcodec/vp9.c AVFrame *f = s->s.frames[CUR_FRAME].tf.f; f 1174 libavcodec/vp9.c ptrdiff_t y_stride = f->linesize[0], uv_stride = f->linesize[1]; f 1240 libavcodec/vp9.c av_frame_free(&s->s.frames[i].tf.f); f 1245 libavcodec/vp9.c av_frame_free(&s->s.refs[i].f); f 1247 libavcodec/vp9.c av_frame_free(&s->next_refs[i].f); f 1264 libavcodec/vp9.c AVFrame *f; f 1267 libavcodec/vp9.c f = s->s.frames[CUR_FRAME].tf.f; f 1268 libavcodec/vp9.c ls_y = f->linesize[0]; f 1269 libavcodec/vp9.c ls_uv =f->linesize[1]; f 1357 libavcodec/vp9.c f->data[0] + yoff + 63 * ls_y, f 1360 libavcodec/vp9.c f->data[1] + uvoff + ((64 >> s->ss_v) - 1) * ls_uv, f 1363 libavcodec/vp9.c f->data[2] + uvoff + ((64 >> s->ss_v) - 1) * ls_uv, f 1401 libavcodec/vp9.c AVFrame *f; f 1403 libavcodec/vp9.c f = s->s.frames[CUR_FRAME].tf.f; f 1404 libavcodec/vp9.c ls_y = f->linesize[0]; f 1405 libavcodec/vp9.c ls_uv =f->linesize[1]; f 1451 libavcodec/vp9.c f->data[0] + yoff + 63 * ls_y, f 1454 libavcodec/vp9.c f->data[1] + uvoff + ((64 >> s->ss_v) - 1) * ls_uv, f 1457 libavcodec/vp9.c f->data[2] + uvoff + ((64 >> s->ss_v) - 1) * ls_uv, f 1474 libavcodec/vp9.c AVFrame *f; f 1476 libavcodec/vp9.c f = s->s.frames[CUR_FRAME].tf.f; f 1477 libavcodec/vp9.c ls_y = f->linesize[0]; f 1478 libavcodec/vp9.c ls_uv =f->linesize[1]; f 1509 libavcodec/vp9.c par = av_video_enc_params_create_side_data(frame->tf.f, f 1560 libavcodec/vp9.c AVFrame *f; f 1565 libavcodec/vp9.c if (!s->s.refs[ref].f->buf[0]) { f 1569 libavcodec/vp9.c if ((ret = av_frame_ref(frame, s->s.refs[ref].f)) < 0) f 1579 libavcodec/vp9.c if (s->next_refs[i].f->buf[0]) f 1581 libavcodec/vp9.c if (s->s.refs[i].f->buf[0] && f 1592 libavcodec/vp9.c if (s->s.frames[REF_FRAME_SEGMAP].tf.f->buf[0]) f 1594 libavcodec/vp9.c if (!s->s.h.keyframe && !s->s.h.intraonly && !s->s.h.errorres && s->s.frames[CUR_FRAME].tf.f->buf[0] && f 1598 libavcodec/vp9.c if (s->s.frames[REF_FRAME_MVPAIR].tf.f->buf[0]) f 1600 libavcodec/vp9.c if (!s->s.h.intraonly && !s->s.h.keyframe && !s->s.h.errorres && s->s.frames[CUR_FRAME].tf.f->buf[0] && f 1603 libavcodec/vp9.c if (s->s.frames[CUR_FRAME].tf.f->buf[0]) f 1607 libavcodec/vp9.c f = s->s.frames[CUR_FRAME].tf.f; f 1608 libavcodec/vp9.c f->key_frame = s->s.h.keyframe; f 1609 libavcodec/vp9.c f->pict_type = (s->s.h.keyframe || s->s.h.intraonly) ? AV_PICTURE_TYPE_I : AV_PICTURE_TYPE_P; f 1611 libavcodec/vp9.c if (s->s.frames[REF_FRAME_SEGMAP].tf.f->buf[0] && f 1612 libavcodec/vp9.c (s->s.frames[REF_FRAME_MVPAIR].tf.f->width != s->s.frames[CUR_FRAME].tf.f->width || f 1613 libavcodec/vp9.c s->s.frames[REF_FRAME_MVPAIR].tf.f->height != s->s.frames[CUR_FRAME].tf.f->height)) { f 1619 libavcodec/vp9.c if (s->next_refs[i].f->buf[0]) f 1623 libavcodec/vp9.c } else if (s->s.refs[i].f->buf[0]) { f 1768 libavcodec/vp9.c if (s->s.refs[i].f->buf[0]) f 1770 libavcodec/vp9.c if (s->next_refs[i].f->buf[0] && f 1776 libavcodec/vp9.c if ((ret = av_frame_ref(frame, s->s.frames[CUR_FRAME].tf.f)) < 0) f 1801 libavcodec/vp9.c s->s.frames[i].tf.f = av_frame_alloc(); f 1802 libavcodec/vp9.c if (!s->s.frames[i].tf.f) { f 1809 libavcodec/vp9.c s->s.refs[i].f = av_frame_alloc(); f 1810 libavcodec/vp9.c s->next_refs[i].f = av_frame_alloc(); f 1811 libavcodec/vp9.c if (!s->s.refs[i].f || !s->next_refs[i].f) { f 1838 libavcodec/vp9.c if (s->s.frames[i].tf.f->buf[0]) f 1840 libavcodec/vp9.c if (ssrc->s.frames[i].tf.f->buf[0]) { f 1846 libavcodec/vp9.c if (s->s.refs[i].f->buf[0]) f 1848 libavcodec/vp9.c if (ssrc->next_refs[i].f->buf[0]) { f 40 libavcodec/vp9_mc_template.c AVFrame *ref1 = tref1->f, *ref2; f 47 libavcodec/vp9_mc_template.c ref2 = tref2->f; f 1273 libavcodec/vp9block.c AVFrame *f = s->s.frames[CUR_FRAME].tf.f; f 1367 libavcodec/vp9block.c emu[0] = (col + w4) * 8 * bytesperpixel > f->linesize[0] || f 1369 libavcodec/vp9block.c emu[1] = ((col + w4) * 8 >> s->ss_h) * bytesperpixel > f->linesize[1] || f 1375 libavcodec/vp9block.c td->dst[0] = f->data[0] + yoff; f 1376 libavcodec/vp9block.c td->y_stride = f->linesize[0]; f 1383 libavcodec/vp9block.c td->dst[1] = f->data[1] + uvoff; f 1384 libavcodec/vp9block.c td->dst[2] = f->data[2] + uvoff; f 1385 libavcodec/vp9block.c td->uv_stride = f->linesize[1]; f 1408 libavcodec/vp9block.c s->dsp.mc[n][0][0][0][0](f->data[0] + yoff + o * bytesperpixel, f->linesize[0], f 1423 libavcodec/vp9block.c s->dsp.mc[n][0][0][0][0](f->data[1] + uvoff + o * bytesperpixel, f->linesize[1], f 1425 libavcodec/vp9block.c s->dsp.mc[n][0][0][0][0](f->data[2] + uvoff + o * bytesperpixel, f->linesize[2], f 1834 libavcodec/vp9dsp_template.c int f = av_clip_intp2(p1 - q1, BIT_DEPTH - 1), f1, f2; f 1835 libavcodec/vp9dsp_template.c f = av_clip_intp2(3 * (q0 - p0) + f, BIT_DEPTH - 1); f 1837 libavcodec/vp9dsp_template.c f1 = FFMIN(f + 4, (1 << (BIT_DEPTH - 1)) - 1) >> 3; f 1838 libavcodec/vp9dsp_template.c f2 = FFMIN(f + 3, (1 << (BIT_DEPTH - 1)) - 1) >> 3; f 1843 libavcodec/vp9dsp_template.c int f = av_clip_intp2(3 * (q0 - p0), BIT_DEPTH - 1), f1, f2; f 1845 libavcodec/vp9dsp_template.c f1 = FFMIN(f + 4, (1 << (BIT_DEPTH - 1)) - 1) >> 3; f 1846 libavcodec/vp9dsp_template.c f2 = FFMIN(f + 3, (1 << (BIT_DEPTH - 1)) - 1) >> 3; f 1851 libavcodec/vp9dsp_template.c f = (f1 + 1) >> 1; f 1852 libavcodec/vp9dsp_template.c dst[strideb * -2] = av_clip_pixel(p1 + f); f 1853 libavcodec/vp9dsp_template.c dst[strideb * +1] = av_clip_pixel(q1 - f); f 182 libavcodec/vp9lpf.c AVFrame *f = s->s.frames[CUR_FRAME].tf.f; f 183 libavcodec/vp9lpf.c uint8_t *dst = f->data[0] + yoff; f 184 libavcodec/vp9lpf.c ptrdiff_t ls_y = f->linesize[0], ls_uv = f->linesize[1]; f 198 libavcodec/vp9lpf.c dst = f->data[1 + p] + uvoff; f 230 libavcodec/vp9recon.c uint8_t *dst = td->dst[0], *dst_r = s->s.frames[CUR_FRAME].tf.f->data[0] + y_off; f 245 libavcodec/vp9recon.c s->s.frames[CUR_FRAME].tf.f->linesize[0], f 253 libavcodec/vp9recon.c dst_r += 4 * step1d * s->s.frames[CUR_FRAME].tf.f->linesize[0]; f 264 libavcodec/vp9recon.c dst_r = s->s.frames[CUR_FRAME].tf.f->data[1 + p] + uv_off; f 274 libavcodec/vp9recon.c s->s.frames[CUR_FRAME].tf.f->linesize[1], f 282 libavcodec/vp9recon.c dst_r += 4 * uvstep1d * s->s.frames[CUR_FRAME].tf.f->linesize[1]; f 417 libavcodec/vp9recon.c if (s->s.frames[CUR_FRAME].tf.f->width == ref_frame->f->width && f 418 libavcodec/vp9recon.c s->s.frames[CUR_FRAME].tf.f->height == ref_frame->f->height) { f 477 libavcodec/vp9recon.c if (s->s.frames[CUR_FRAME].tf.f->width == ref_frame->f->width && f 478 libavcodec/vp9recon.c s->s.frames[CUR_FRAME].tf.f->height == ref_frame->f->height) { f 330 libavcodec/wavpack.c float f; f 398 libavcodec/wavpack.c return value.f; f 1022 libavcodec/wavpack.c if (fsrc->curr_frame.f->data[0]) { f 1050 libavcodec/wavpack.c s->curr_frame.f = av_frame_alloc(); f 1051 libavcodec/wavpack.c s->prev_frame.f = av_frame_alloc(); f 1053 libavcodec/wavpack.c if (!s->curr_frame.f || !s->prev_frame.f) f 1070 libavcodec/wavpack.c av_frame_free(&s->curr_frame.f); f 1073 libavcodec/wavpack.c av_frame_free(&s->prev_frame.f); f 1554 libavcodec/wavpack.c wc->curr_frame.f->nb_samples = s->samples; f 1558 libavcodec/wavpack.c wc->frame = wc->curr_frame.f; f 219 libavcodec/wavpackenc.c #define get_mantissa(f) ((f) & 0x7fffff) f 220 libavcodec/wavpackenc.c #define get_exponent(f) (((f) >> 23) & 0xff) f 221 libavcodec/wavpackenc.c #define get_sign(f) (((f) >> 31) & 0x1) f 225 libavcodec/wavpackenc.c int32_t shift_count, value, f = *sample; f 227 libavcodec/wavpackenc.c if (get_exponent(f) == 255) { f 231 libavcodec/wavpackenc.c } else if (get_exponent(f)) { f 232 libavcodec/wavpackenc.c shift_count = s->max_exp - get_exponent(f); f 233 libavcodec/wavpackenc.c value = 0x800000 + get_mantissa(f); f 236 libavcodec/wavpackenc.c value = get_mantissa(f); f 245 libavcodec/wavpackenc.c if (get_exponent(f) || get_mantissa(f)) f 247 libavcodec/wavpackenc.c else if (get_sign(f)) f 252 libavcodec/wavpackenc.c if (!(get_mantissa(f) & mask)) f 254 libavcodec/wavpackenc.c else if ((get_mantissa(f) & mask) == mask) f 261 libavcodec/wavpackenc.c *sample = get_sign(f) ? -value : value; f 278 libavcodec/wavpackenc.c int32_t f = samples_l[i]; f 279 libavcodec/wavpackenc.c crc = crc * 27 + get_mantissa(f) * 9 + get_exponent(f) * 3 + get_sign(f); f 281 libavcodec/wavpackenc.c if (get_exponent(f) > s->max_exp && get_exponent(f) < 255) f 282 libavcodec/wavpackenc.c s->max_exp = get_exponent(f); f 286 libavcodec/wavpackenc.c int32_t f; f 288 libavcodec/wavpackenc.c f = samples_l[i]; f 289 libavcodec/wavpackenc.c crc = crc * 27 + get_mantissa(f) * 9 + get_exponent(f) * 3 + get_sign(f); f 290 libavcodec/wavpackenc.c if (get_exponent(f) > s->max_exp && get_exponent(f) < 255) f 291 libavcodec/wavpackenc.c s->max_exp = get_exponent(f); f 293 libavcodec/wavpackenc.c f = samples_r[i]; f 294 libavcodec/wavpackenc.c crc = crc * 27 + get_mantissa(f) * 9 + get_exponent(f) * 3 + get_sign(f); f 296 libavcodec/wavpackenc.c if (get_exponent(f) > s->max_exp && get_exponent(f) < 255) f 297 libavcodec/wavpackenc.c s->max_exp = get_exponent(f); f 608 libavcodec/webp.c ThreadFrame pt = { .f = img->frame }; f 139 libavcodec/wmadec.c float f; f 145 libavcodec/wmadec.c u.f = x; f 152 libavcodec/wmadec.c return s->lsp_pow_e_table[e] * (a + b * t.f); f 98 libavcodec/x86/hpeldsp_init.c #define PAVGBP(a, b, c, d, e, f) PAVGBP_MMX_NO_RND(a, b, c, d, e, f) f 124 libavcodec/x86/hpeldsp_init.c #define PAVGBP(a, b, c, d, e, f) PAVGBP_MMX(a, b, c, d, e, f) f 89 libavcodec/x86/vp9dsp_init.h #define filter_8tap_1d_fn(op, sz, f, f_opt, fname, dir, dvar, bpp, opt) \ f 95 libavcodec/x86/vp9dsp_init.h h, ff_filters_##f_opt[f][dvar - 1]); \ f 114 libavcodec/x86/vp9dsp_init.h #define filter_8tap_2d_fn(op, sz, f, f_opt, fname, align, bpp, bytes, opt) \ f 122 libavcodec/x86/vp9dsp_init.h ff_filters_##f_opt[f][mx - 1]); \ f 125 libavcodec/x86/vp9dsp_init.h ff_filters_##f_opt[f][my - 1]); \ f 290 libavcodec/ylc.c ThreadFrame frame = { .f = data }; f 76 libavdevice/dshow.c IBaseFilter *f; f 78 libavdevice/dshow.c while (IEnumFilters_Next(fenum, 1, &f, NULL) == S_OK) { f 79 libavdevice/dshow.c if (IGraphBuilder_RemoveFilter(ctx->graph, f) == S_OK) f 82 libavdevice/dshow.c IBaseFilter_Release(f); f 112 libavdevice/xcbgrab.c int w = c->width, h = c->height, f = c->follow_mouse; f 121 libavdevice/xcbgrab.c if (f == FOLLOW_CENTER) { f 125 libavdevice/xcbgrab.c int left = x + f; f 126 libavdevice/xcbgrab.c int right = x + w - f; f 127 libavdevice/xcbgrab.c int top = y + f; f 128 libavdevice/xcbgrab.c int bottom = y + h - f; f 267 libavfilter/af_acrossover.c int f, band; f 281 libavfilter/af_acrossover.c for (f = 0; band + 1 < ctx->nb_outputs && f < s->filter_count; f++) { f 282 libavfilter/af_acrossover.c BiquadContext *lp = &xover->lp[band][f]; f 286 libavfilter/af_acrossover.c for (f = 0; band + 1 < ctx->nb_outputs && f < s->filter_count; f++) { f 287 libavfilter/af_acrossover.c BiquadContext *hp = &xover->hp[band][f]; f 274 libavfilter/af_aemphasis.c double f = 1.0 / (2 * M_PI * tau); f 276 libavfilter/af_aemphasis.c double gain = sqrt(1.0 + nyq * nyq / (f * f)); // gain at Nyquist f 277 libavfilter/af_aemphasis.c double cfreq = sqrt((gain - 1.0) * f * f); // frequency f 221 libavfilter/af_afftdn.c double product, sum, f; f 235 libavfilter/af_afftdn.c f = (0.5 * s->sample_rate) / s->band_centre[14]; f 236 libavfilter/af_afftdn.c f = 15.0 + log(f / 1.5) / log(1.5); f 241 libavfilter/af_afftdn.c product *= f; f 240 libavfilter/af_afftfilt.c const float f = 1. / (s->window_size / 2); f 312 libavfilter/af_afftfilt.c buf[i] += s->fft_temp[ch][i].re * f; f 109 libavfilter/af_anequalizer.c double f; f 115 libavfilter/af_anequalizer.c for (f = 0; f < s->w; f++) { f 122 libavfilter/af_anequalizer.c w = M_PI * (s->fscale ? pow(s->w - 1, f / s->w) : f) / (s->w - 1); f 149 libavfilter/af_anequalizer.c x = lrint(f); f 313 libavfilter/af_anequalizer.c static void butterworth_bp_filter(EqualizatorFilter *f, f 324 libavfilter/af_anequalizer.c f->section[0].a0 = 1; f 325 libavfilter/af_anequalizer.c f->section[0].b0 = 1; f 326 libavfilter/af_anequalizer.c f->section[1].a0 = 1; f 327 libavfilter/af_anequalizer.c f->section[1].b0 = 1; f 346 libavfilter/af_anequalizer.c butterworth_fo_section(&f->section[i - 1], beta, si, g, g0, Di, c0); f 382 libavfilter/af_anequalizer.c static void chebyshev1_bp_filter(EqualizatorFilter *f, f 393 libavfilter/af_anequalizer.c f->section[0].a0 = 1; f 394 libavfilter/af_anequalizer.c f->section[0].b0 = 1; f 395 libavfilter/af_anequalizer.c f->section[1].a0 = 1; f 396 libavfilter/af_anequalizer.c f->section[1].b0 = 1; f 419 libavfilter/af_anequalizer.c chebyshev1_fo_section(&f->section[i - 1], a, ci, tetta_b, g0, si, b, Di, c0); f 455 libavfilter/af_anequalizer.c static void chebyshev2_bp_filter(EqualizatorFilter *f, f 466 libavfilter/af_anequalizer.c f->section[0].a0 = 1; f 467 libavfilter/af_anequalizer.c f->section[0].b0 = 1; f 468 libavfilter/af_anequalizer.c f->section[1].a0 = 1; f 469 libavfilter/af_anequalizer.c f->section[1].b0 = 1; f 492 libavfilter/af_anequalizer.c chebyshev2_fo_section(&f->section[i - 1], a, ci, tetta_b, g, si, b, Di, c0); f 543 libavfilter/af_anequalizer.c static void equalizer(EqualizatorFilter *f, double sample_rate) f 545 libavfilter/af_anequalizer.c double w0 = hz_2_rad(f->freq, sample_rate); f 546 libavfilter/af_anequalizer.c double wb = hz_2_rad(f->width, sample_rate); f 549 libavfilter/af_anequalizer.c switch (f->type) { f 551 libavfilter/af_anequalizer.c bw_gain = butterworth_compute_bw_gain_db(f->gain); f 552 libavfilter/af_anequalizer.c butterworth_bp_filter(f, FILTER_ORDER, w0, wb, f->gain, bw_gain, 0); f 555 libavfilter/af_anequalizer.c bw_gain = chebyshev1_compute_bw_gain_db(f->gain); f 556 libavfilter/af_anequalizer.c chebyshev1_bp_filter(f, FILTER_ORDER, w0, wb, f->gain, bw_gain, 0); f 559 libavfilter/af_anequalizer.c bw_gain = chebyshev2_compute_bw_gain_db(f->gain); f 560 libavfilter/af_anequalizer.c chebyshev2_bp_filter(f, FILTER_ORDER, w0, wb, f->gain, bw_gain, 0); f 721 libavfilter/af_anequalizer.c EqualizatorFilter *f = &s->filters[i]; f 723 libavfilter/af_anequalizer.c if (f->gain == 0. || f->ignore) f 726 libavfilter/af_anequalizer.c bptr = (double *)buf->extended_data[f->channel]; f 730 libavfilter/af_anequalizer.c sample = process_sample(f->section, sample); f 131 libavfilter/af_anlmdn.c static void compute_cache_c(float *cache, const float *f, f 138 libavfilter/af_anlmdn.c cache[v] += -SQR(f[i - K - 1] - f[j - K - 1]) + SQR(f[i + K] - f[j + K]); f 203 libavfilter/af_anlmdn.c const float *f = (const float *)(s->in->extended_data[ch]) + K; f 217 libavfilter/af_anlmdn.c cache[v++] = s->dsp.compute_distance_ssd(f + i, f + j, K); f 220 libavfilter/af_anlmdn.c s->dsp.compute_cache(cache, f, S, K, i, i - S); f 221 libavfilter/af_anlmdn.c s->dsp.compute_cache(cache + S, f, S, K, i, i + 1); f 239 libavfilter/af_anlmdn.c P += w * f[i - S + j + (j >= S)]; f 243 libavfilter/af_anlmdn.c P += f[i]; f 247 libavfilter/af_anlmdn.c case IN_MODE: dst[i - S] = f[i]; break; f 249 libavfilter/af_anlmdn.c case NOISE_MODE: dst[i - S] = f[i] - (P / Q); break; f 33 libavfilter/af_anlmdndsp.h void (*compute_cache)(float *cache, const float *f, ptrdiff_t S, ptrdiff_t K, f 185 libavfilter/af_arnndn.c static RNNModel *rnnoise_model_from_file(FILE *f) f 196 libavfilter/af_arnndn.c if (fscanf(f, "rnnoise-nu model file version %d\n", &in) != 1 || in != 1) f 219 libavfilter/af_arnndn.c if (fscanf(f, "%d", &in) != 1 || in < 0 || in > 128) { \ f 249 libavfilter/af_arnndn.c if (fscanf(f, "%d", &in) != 1) { \ f 267 libavfilter/af_arnndn.c if (fscanf(f, "%d", &in) != 1) { \ f 1456 libavfilter/af_arnndn.c FILE *f; f 1464 libavfilter/af_arnndn.c f = av_fopen_utf8(s->model_name, "r"); f 1465 libavfilter/af_arnndn.c if (!f) f 1468 libavfilter/af_arnndn.c s->model = rnnoise_model_from_file(f); f 1469 libavfilter/af_arnndn.c fclose(f); f 838 libavfilter/af_hdcd.c #define TONEGEN16(sn, f, sr, a) (int16_t)(sin((6.28318530718 * (sn) * (f)) /(sr)) * (a) * 0x7fff) f 1045 libavfilter/af_hdcd.c int i, j, f; f 1067 libavfilter/af_hdcd.c f = 0; f 1074 libavfilter/af_hdcd.c f = 1; f 1089 libavfilter/af_hdcd.c f = 1; f 1100 libavfilter/af_hdcd.c if (f) { f 1179 libavfilter/af_hdcd.c int n, f = 300; f 1180 libavfilter/af_hdcd.c int so = state->rate / f; f 1189 libavfilter/af_hdcd.c samples[n] = TONEGEN16(state->_ana_snb, f, state->rate, 0.1); f 76 libavfilter/af_superequalizer.c static float hn_lpf(int n, float f, float fs) f 79 libavfilter/af_superequalizer.c float omega = 2 * M_PI * f; f 82 libavfilter/af_superequalizer.c return 2 * f * t; f 83 libavfilter/af_superequalizer.c return 2 * f * t * sinf(n * omega * t) / (n * omega * t); f 512 libavfilter/allfilters.c const AVFilter *f = filter_list[i]; f 514 libavfilter/allfilters.c if (f) f 517 libavfilter/allfilters.c return f; f 522 libavfilter/allfilters.c const AVFilter *f = NULL; f 528 libavfilter/allfilters.c while ((f = av_filter_iterate(&opaque))) f 529 libavfilter/allfilters.c if (!strcmp(f->name, name)) f 530 libavfilter/allfilters.c return (AVFilter *)f; f 182 libavfilter/avf_aphasemeter.c const float f = src[0] * src[1] / (src[0]*src[0] + src[1] * src[1]) * 2; f 183 libavfilter/avf_aphasemeter.c const float phase = isnan(f) ? 1 : f; f 206 libavfilter/avf_showcqt.c static double a_weighting(void *p, double f) f 208 libavfilter/avf_showcqt.c double ret = 12200.0*12200.0 * (f*f*f*f); f 209 libavfilter/avf_showcqt.c ret /= (f*f + 20.6*20.6) * (f*f + 12200.0*12200.0) * f 210 libavfilter/avf_showcqt.c sqrt((f*f + 107.7*107.7) * (f*f + 737.9*737.9)); f 214 libavfilter/avf_showcqt.c static double b_weighting(void *p, double f) f 216 libavfilter/avf_showcqt.c double ret = 12200.0*12200.0 * (f*f*f); f 217 libavfilter/avf_showcqt.c ret /= (f*f + 20.6*20.6) * (f*f + 12200.0*12200.0) * sqrt(f*f + 158.5*158.5); f 221 libavfilter/avf_showcqt.c static double c_weighting(void *p, double f) f 223 libavfilter/avf_showcqt.c double ret = 12200.0*12200.0 * (f*f); f 224 libavfilter/avf_showcqt.c ret /= (f*f + 20.6*20.6) * (f*f + 12200.0*12200.0); f 435 libavfilter/avf_showcqt.c static double midi(void *p, double f) f 437 libavfilter/avf_showcqt.c return log2(f/440.0) * 12.0 + 69.0; f 247 libavfilter/avf_showfreqs.c static int get_sx(ShowFreqsContext *s, int f) f 251 libavfilter/avf_showfreqs.c return (s->w/(float)s->nb_freq)*f; f 253 libavfilter/avf_showfreqs.c return s->w-pow(s->w, (s->nb_freq-f-1)/(s->nb_freq-1.)); f 255 libavfilter/avf_showfreqs.c return pow(s->w, f/(s->nb_freq-1.)); f 261 libavfilter/avf_showfreqs.c static float get_bsize(ShowFreqsContext *s, int f) f 267 libavfilter/avf_showfreqs.c return pow(s->w, (s->nb_freq-f-1)/(s->nb_freq-1.))- f 268 libavfilter/avf_showfreqs.c pow(s->w, (s->nb_freq-f-2)/(s->nb_freq-1.)); f 270 libavfilter/avf_showfreqs.c return pow(s->w, (f+1)/(s->nb_freq-1.))- f 271 libavfilter/avf_showfreqs.c pow(s->w, f /(s->nb_freq-1.)); f 278 libavfilter/avf_showfreqs.c double a, int f, uint8_t fg[4], int *prev_y, f 283 libavfilter/avf_showfreqs.c const float avg = s->avg_data[ch][f]; f 284 libavfilter/avf_showfreqs.c const float bsize = get_bsize(s, f); f 285 libavfilter/avf_showfreqs.c const int sx = get_sx(s, f); f 320 libavfilter/avf_showfreqs.c y = s->avg_data[ch][f] = !outlink->frame_count_in ? y : FFMIN(avg, y); f 325 libavfilter/avf_showfreqs.c s->avg_data[ch][f] = avg + y * (y - avg) / (FFMIN(outlink->frame_count_in + 1, s->avg) * y); f 326 libavfilter/avf_showfreqs.c y = s->avg_data[ch][f]; f 409 libavfilter/avf_showfreqs.c int prev_y = -1, f; f 419 libavfilter/avf_showfreqs.c for (f = 1; f < s->nb_freq; f++) { f 420 libavfilter/avf_showfreqs.c a = av_clipd(M(RE(f, ch), IM(f, ch)) / s->scale, 0, 1); f 422 libavfilter/avf_showfreqs.c plot_freq(s, ch, a, f, fg, &prev_y, out, outlink); f 1216 libavfilter/avf_showspectrum.c const float f = s->gain * w; f 1221 libavfilter/avf_showspectrum.c magnitudes[y] = MAGNITUDE(y, ch) * f; f 1244 libavfilter/avf_showspectrum.c const float f = s->gain * w; f 1250 libavfilter/avf_showspectrum.c magnitudes[y] += MAGNITUDE(y, ch) * f; f 43 libavfilter/avf_showvolume.c double f; f 80 libavfilter/avf_showvolume.c { "f", "set fade", OFFSET(f), AV_OPT_TYPE_DOUBLE, {.dbl=0.95}, 0, 1, FLAGS }, f 339 libavfilter/avf_showvolume.c if ((s->f < 1.) && (s->f > 0.)) { f 345 libavfilter/avf_showvolume.c dst[k * 4 + 0] = FFMAX(dst[k * 4 + 0] * s->f, 0); f 346 libavfilter/avf_showvolume.c dst[k * 4 + 1] = FFMAX(dst[k * 4 + 1] * s->f, 0); f 347 libavfilter/avf_showvolume.c dst[k * 4 + 2] = FFMAX(dst[k * 4 + 2] * s->f, 0); f 348 libavfilter/avf_showvolume.c dst[k * 4 + 3] = FFMAX(dst[k * 4 + 3] * s->f, alpha); f 351 libavfilter/avf_showvolume.c } else if (s->f == 0.) { f 823 libavfilter/avf_showwaves.c struct frame_node *f; f 830 libavfilter/avf_showwaves.c f = av_malloc(sizeof(*f)); f 831 libavfilter/avf_showwaves.c if (!f) { f 835 libavfilter/avf_showwaves.c f->frame = insamples; f 836 libavfilter/avf_showwaves.c f->next = NULL; f 839 libavfilter/avf_showwaves.c showwaves->last_frame = f; f 841 libavfilter/avf_showwaves.c showwaves->last_frame->next = f; f 842 libavfilter/avf_showwaves.c showwaves->last_frame = f; f 589 libavfilter/avfilter.c const AVFilter *f = NULL; f 592 libavfilter/avfilter.c while (prev && (f = av_filter_iterate(&opaque))) f 593 libavfilter/avfilter.c if (f->priv_class == prev) f 597 libavfilter/avfilter.c if (prev && !f) f 601 libavfilter/avfilter.c while ((f = av_filter_iterate(&opaque))) f 602 libavfilter/avfilter.c if (f->priv_class) f 603 libavfilter/avfilter.c return f->priv_class; f 271 libavfilter/avfiltergraph.c AVFilterContext *f; f 277 libavfilter/avfiltergraph.c f = graph->filters[i]; f 278 libavfilter/avfiltergraph.c for (j = 0; j < f->nb_outputs; j++) { f 279 libavfilter/avfiltergraph.c l = f->outputs[j]; f 281 libavfilter/avfiltergraph.c ret = av_image_check_size2(l->w, l->h, INT64_MAX, l->format, 0, f); f 352 libavfilter/avfiltergraph.c static int formats_declared(AVFilterContext *f) f 356 libavfilter/avfiltergraph.c for (i = 0; i < f->nb_inputs; i++) { f 357 libavfilter/avfiltergraph.c if (!f->inputs[i]->out_formats) f 359 libavfilter/avfiltergraph.c if (f->inputs[i]->type == AVMEDIA_TYPE_AUDIO && f 360 libavfilter/avfiltergraph.c !(f->inputs[i]->out_samplerates && f 361 libavfilter/avfiltergraph.c f->inputs[i]->out_channel_layouts)) f 364 libavfilter/avfiltergraph.c for (i = 0; i < f->nb_outputs; i++) { f 365 libavfilter/avfiltergraph.c if (!f->outputs[i]->in_formats) f 367 libavfilter/avfiltergraph.c if (f->outputs[i]->type == AVMEDIA_TYPE_AUDIO && f 368 libavfilter/avfiltergraph.c !(f->outputs[i]->in_samplerates && f 369 libavfilter/avfiltergraph.c f->outputs[i]->in_channel_layouts)) f 452 libavfilter/avfiltergraph.c AVFilterContext *f = graph->filters[i]; f 453 libavfilter/avfiltergraph.c if (formats_declared(f)) f 455 libavfilter/avfiltergraph.c if (f->filter->query_formats) f 456 libavfilter/avfiltergraph.c ret = filter_query_formats(f); f 458 libavfilter/avfiltergraph.c ret = ff_default_query_formats(f); f 1194 libavfilter/avfiltergraph.c AVFilterContext *f; f 1198 libavfilter/avfiltergraph.c f = graph->filters[i]; f 1199 libavfilter/avfiltergraph.c for (j = 0; j < f->nb_inputs; j++) { f 1200 libavfilter/avfiltergraph.c f->inputs[j]->graph = graph; f 1201 libavfilter/avfiltergraph.c f->inputs[j]->age_index = -1; f 1203 libavfilter/avfiltergraph.c for (j = 0; j < f->nb_outputs; j++) { f 1204 libavfilter/avfiltergraph.c f->outputs[j]->graph = graph; f 1205 libavfilter/avfiltergraph.c f->outputs[j]->age_index= -1; f 1207 libavfilter/avfiltergraph.c if (!f->nb_outputs) { f 1208 libavfilter/avfiltergraph.c if (f->nb_inputs > INT_MAX - sink_links_count) f 1210 libavfilter/avfiltergraph.c sink_links_count += f->nb_inputs; f 1217 libavfilter/avfiltergraph.c f = graph->filters[i]; f 1218 libavfilter/avfiltergraph.c if (!f->nb_outputs) { f 1219 libavfilter/avfiltergraph.c for (j = 0; j < f->nb_inputs; j++) { f 1220 libavfilter/avfiltergraph.c sinks[n] = f->inputs[j]; f 1221 libavfilter/avfiltergraph.c f->inputs[j]->age_index = n++; f 1233 libavfilter/avfiltergraph.c AVFilterContext *f; f 1238 libavfilter/avfiltergraph.c f = graph->filters[i]; f 1240 libavfilter/avfiltergraph.c for (j = 0; j < f->nb_inputs; j++) { f 1241 libavfilter/avfiltergraph.c AVFilterLink *link = f->inputs[j]; f 1249 libavfilter/avfiltergraph.c fifo = f->inputs[j]->type == AVMEDIA_TYPE_VIDEO ? f 314 libavfilter/formats.c #define ADD_FORMAT(f, fmt, unref_fn, type, list, nb) \ f 317 libavfilter/formats.c void *oldf = *f; \ f 319 libavfilter/formats.c if (!(*f) && !(*f = av_mallocz(sizeof(**f)))) { \ f 323 libavfilter/formats.c fmts = av_realloc_array((*f)->list, (*f)->nb + 1, \ f 324 libavfilter/formats.c sizeof(*(*f)->list)); \ f 326 libavfilter/formats.c unref_fn(f); \ f 328 libavfilter/formats.c av_freep(f); \ f 332 libavfilter/formats.c (*f)->list = fmts; \ f 333 libavfilter/formats.c (*f)->list[(*f)->nb++] = fmt; \ f 449 libavfilter/formats.c #define FORMATS_REF(f, ref, unref_fn) \ f 452 libavfilter/formats.c if (!f || !ref) \ f 455 libavfilter/formats.c tmp = av_realloc_array(f->refs, sizeof(*f->refs), f->refcount + 1); \ f 457 libavfilter/formats.c unref_fn(&f); \ f 460 libavfilter/formats.c f->refs = tmp; \ f 461 libavfilter/formats.c f->refs[f->refcount++] = ref; \ f 462 libavfilter/formats.c *ref = f; \ f 465 libavfilter/formats.c int ff_channel_layouts_ref(AVFilterChannelLayouts *f, AVFilterChannelLayouts **ref) f 467 libavfilter/formats.c FORMATS_REF(f, ref, ff_channel_layouts_unref); f 470 libavfilter/formats.c int ff_formats_ref(AVFilterFormats *f, AVFilterFormats **ref) f 472 libavfilter/formats.c FORMATS_REF(f, ref, ff_formats_unref); f 175 libavfilter/formats.h int ff_channel_layouts_ref(AVFilterChannelLayouts *f, f 266 libavfilter/internal.h static inline int ff_insert_inpad(AVFilterContext *f, unsigned index, f 269 libavfilter/internal.h return ff_insert_pad(index, &f->nb_inputs, offsetof(AVFilterLink, dstpad), f 270 libavfilter/internal.h &f->input_pads, &f->inputs, p); f 274 libavfilter/internal.h static inline int ff_insert_outpad(AVFilterContext *f, unsigned index, f 277 libavfilter/internal.h return ff_insert_pad(index, &f->nb_outputs, offsetof(AVFilterLink, srcpad), f 278 libavfilter/internal.h &f->output_pads, &f->outputs, p); f 49 libavfilter/median.h void (*hmuladd)(uint16_t *dst, const uint16_t *src, int f, int bins); f 36 libavfilter/opencl/tonemap.cl float a = 0.15f, b = 0.50f, c = 0.10f, d = 0.20f, e = 0.02f, f = 0.30f; f 37 libavfilter/opencl/tonemap.cl return (in * (in * a + b * c) + d * e) / (in * (in * a + b) + d * f) - e / f; f 103 libavfilter/opencl/xfade.cl int2 f = p % wh; f 105 libavfilter/opencl/xfade.cl f = f + (int2)(w, h) * (int2)(f.x < 0, f.y < 0); f 106 libavfilter/opencl/xfade.cl float4 val1 = read_imagef(src1, sampler, f); f 107 libavfilter/opencl/xfade.cl float4 val2 = read_imagef(src2, sampler, f); f 94 libavfilter/signature_lookup.c uint8_t f, s; f 98 libavfilter/signature_lookup.c f = first[i]; f 100 libavfilter/signature_lookup.c if (f > s) { f 102 libavfilter/signature_lookup.c dist += sc->l1distlut[243*242/2 - (243-s)*(242-s)/2 + f - s - 1]; f 104 libavfilter/signature_lookup.c dist += sc->l1distlut[243*242/2 - (243-f)*(242-f)/2 + s - f - 1]; f 176 libavfilter/signature_lookup.c FineSignature *f, *s; f 210 libavfilter/signature_lookup.c for (i = 0, f = first; i < COARSE_SIZE && f->next; i++, f = f->next) { f 213 libavfilter/signature_lookup.c pairs[i].a = f; f 216 libavfilter/signature_lookup.c l1dist = get_l1dist(ctx, sc, f->framesig, s->framesig); f 232 libavfilter/signature_lookup.c if (f->next == NULL) { f 26 libavfilter/tests/drawutils.c enum AVPixelFormat f; f 32 libavfilter/tests/drawutils.c for (f = 0; av_pix_fmt_desc_get(f); f++) { f 33 libavfilter/tests/drawutils.c desc = av_pix_fmt_desc_get(f); f 38 libavfilter/tests/drawutils.c r = ff_draw_init(&draw, f, 0); f 245 libavfilter/vaf_spectrumsynth.c int x, int y, int f, int ch) f 265 libavfilter/vaf_spectrumsynth.c s->fft_data[ch][f].re = magnitude * cos(phase); f 266 libavfilter/vaf_spectrumsynth.c s->fft_data[ch][f].im = magnitude * sin(phase); f 270 libavfilter/vaf_spectrumsynth.c int x, int y, int f, int ch) f 290 libavfilter/vaf_spectrumsynth.c s->fft_data[ch][f].re = magnitude * cos(phase); f 291 libavfilter/vaf_spectrumsynth.c s->fft_data[ch][f].im = magnitude * sin(phase); f 300 libavfilter/vaf_spectrumsynth.c int y, f; f 307 libavfilter/vaf_spectrumsynth.c for (y = start, f = 0; y >= end; y--, f++) { f 308 libavfilter/vaf_spectrumsynth.c read16_fft_bin(s, x, y, f, ch); f 314 libavfilter/vaf_spectrumsynth.c for (y = start, f = 0; y >= end; y--, f++) { f 315 libavfilter/vaf_spectrumsynth.c read8_fft_bin(s, x, y, f, ch); f 324 libavfilter/vaf_spectrumsynth.c for (y = end, f = 0; y <= start; y++, f++) { f 325 libavfilter/vaf_spectrumsynth.c read16_fft_bin(s, y, x, f, ch); f 331 libavfilter/vaf_spectrumsynth.c for (y = end, f = 0; y <= start; y++, f++) { f 332 libavfilter/vaf_spectrumsynth.c read8_fft_bin(s, y, x, f, ch); f 345 libavfilter/vaf_spectrumsynth.c int y, f, ch; f 355 libavfilter/vaf_spectrumsynth.c for (y = s->nb_freq + 1, f = s->nb_freq - 1; y < nb; y++, f--) { f 356 libavfilter/vaf_spectrumsynth.c s->fft_data[ch][y].re = s->fft_data[ch][f].re; f 357 libavfilter/vaf_spectrumsynth.c s->fft_data[ch][y].im = -s->fft_data[ch][f].im; f 85 libavfilter/vf_bwdif.c int f = ((prev2[prefs2] + next2[prefs2]) >> 1) - e; \ f 88 libavfilter/vf_bwdif.c int max = FFMAX3(de, dc, FFMIN(b, f)); \ f 89 libavfilter/vf_bwdif.c int min = FFMIN3(de, dc, FFMAX(b, f)); \ f 43 libavfilter/vf_cas.c static inline float lerpf(float v0, float v1, float f) f 45 libavfilter/vf_cas.c return v0 + (v1 - v0) * f; f 84 libavfilter/vf_cas.c int f = src[y * in_linesize + x1]; f 91 libavfilter/vf_cas.c mn = FFMIN3(FFMIN3( d, e, f), b, h); f 96 libavfilter/vf_cas.c mx = FFMAX3(FFMAX3( d, e, f), b, h); f 105 libavfilter/vf_cas.c dst[x] = av_clip_uint8(((b + d + f + h) * weight + e) / (1.f + 4.f * weight)); f 151 libavfilter/vf_cas.c int f = src[y * in_linesize + x1]; f 158 libavfilter/vf_cas.c mn = FFMIN3(FFMIN3( d, e, f), b, h); f 163 libavfilter/vf_cas.c mx = FFMAX3(FFMAX3( d, e, f), b, h); f 172 libavfilter/vf_cas.c dst[x] = av_clip_uintp2_c(((b + d + f + h) * weight + e) / (1.f + 4.f * weight), s->depth); f 204 libavfilter/vf_chromakey.c double f = 1. - av_clipd((diff - ctx->similarity) / ctx->blend, 0.0, 1.0); f 206 libavfilter/vf_chromakey.c frame->data[1][frame->linesize[1] * y + x] = 128 + (u - 128) * f; f 207 libavfilter/vf_chromakey.c frame->data[2][frame->linesize[2] * y + x] = 128 + (v - 128) * f; f 243 libavfilter/vf_chromakey.c double f = 1. - av_clipd((diff - ctx->similarity) / ctx->blend, 0.0, 1.0); f 245 libavfilter/vf_chromakey.c AV_WN16(&frame->data[1][frame->linesize[1] * y + 2 * x], mid + (u - mid) * f); f 246 libavfilter/vf_chromakey.c AV_WN16(&frame->data[2][frame->linesize[2] * y + 2 * x], mid + (v - mid) * f); f 69 libavfilter/vf_ciescope.c AVFrame *f; f 1230 libavfilter/vf_ciescope.c if ((s->f = ff_get_video_buffer(outlink, outlink->w, outlink->h)) == NULL) f 1232 libavfilter/vf_ciescope.c pixels = (uint16_t *)s->f->data[0]; f 1234 libavfilter/vf_ciescope.c tongue_outline(pixels, s->f->linesize[0] / 2, w, h, 65535, s->cie); f 1236 libavfilter/vf_ciescope.c fill_in_tongue(pixels, s->f->linesize[0] / 2, w, h, 65535, cs, (const double (*)[3])s->i, s->cie, f 1422 libavfilter/vf_ciescope.c const uint16_t *src = (const uint16_t *)(s->f->data[0] + y * s->f->linesize[0]); f 1451 libavfilter/vf_ciescope.c av_frame_free(&s->f); f 122 libavfilter/vf_codecview.c int x, y, fr, f; f 143 libavfilter/vf_codecview.c f = ((ey - sy) << 16) / ex; f 145 libavfilter/vf_codecview.c y = (x * f) >> 16; f 146 libavfilter/vf_codecview.c fr = (x * f) & 0xFFFF; f 158 libavfilter/vf_codecview.c f = ((ex - sx) << 16) / ey; f 160 libavfilter/vf_codecview.c f = 0; f 162 libavfilter/vf_codecview.c x = (y*f) >> 16; f 163 libavfilter/vf_codecview.c fr = (y*f) & 0xFFFF; f 417 libavfilter/vf_curves.c FILE *f = av_fopen_utf8(fname, "w"); f 421 libavfilter/vf_curves.c if (!f) { f 464 libavfilter/vf_curves.c fwrite(buf.str, 1, buf.len, f); f 465 libavfilter/vf_curves.c fclose(f); f 72 libavfilter/vf_dblur.c g = q * f(0, 0) + c * f(0, 0); f 74 libavfilter/vf_dblur.c f(y, x) = b0 * f(y, x) + b1 * f(y - 1, x) + g; f 75 libavfilter/vf_dblur.c g = q * f(y, x) + c * f(y - 1, x); f 80 libavfilter/vf_dblur.c g = q * f(y, width - 1) + c * f(y, width - 1); f 82 libavfilter/vf_dblur.c f(y, x) = b0 * f(y, x) + b1 * f(y + 1, x) + g; f 83 libavfilter/vf_dblur.c g = q * f(y, x) + c * f(y + 1, x); f 88 libavfilter/vf_dblur.c g = q * f(0, width - 1) + c * f(0, width - 1); f 90 libavfilter/vf_dblur.c f(y, x) = b0 * f(y, x) + b1 * f(y - 1, x) + g; f 91 libavfilter/vf_dblur.c g = q * f(y, x) + c * f(y - 1, x); f 96 libavfilter/vf_dblur.c g = q * f(y, 0) + c * f(y, 0); f 98 libavfilter/vf_dblur.c f(y, x) = b0 * f(y, x) + b1 * f(y + 1, x) + g; f 99 libavfilter/vf_dblur.c g = q * f(y, x) + c * f(y + 1, x); f 184 libavfilter/vf_deblock.c int A, B, C, D, E, F, a, b, c, d, e, f; \ f 205 libavfilter/vf_deblock.c f = F - delta / 8; \ f 212 libavfilter/vf_deblock.c dst[x + 2 * dst_linesize] = av_clip(f, 0, max); \ f 230 libavfilter/vf_deblock.c int A, B, C, D, E, F, a, b, c, d, e, f; \ f 251 libavfilter/vf_deblock.c f = F - delta / 8; \ f 258 libavfilter/vf_deblock.c dst[+2] = av_clip(f, 0, max); \ f 67 libavfilter/vf_deflicker.c void (*get_factor)(AVFilterContext *ctx, float *f); f 70 libavfilter/vf_deflicker.c uint8_t *dst, ptrdiff_t dst_linesize, int w, int h, float f); f 127 libavfilter/vf_deflicker.c int w, int h, float f) f 133 libavfilter/vf_deflicker.c dst[x] = av_clip_uint8(src[x] * f); f 146 libavfilter/vf_deflicker.c int w, int h, float f) f 156 libavfilter/vf_deflicker.c dst[x] = av_clip(src[x] * f, 0, max); f 212 libavfilter/vf_deflicker.c static void get_am_factor(AVFilterContext *ctx, float *f) f 217 libavfilter/vf_deflicker.c *f = 0.0f; f 220 libavfilter/vf_deflicker.c *f += s->luminance[y]; f 223 libavfilter/vf_deflicker.c *f /= s->size; f 224 libavfilter/vf_deflicker.c *f /= s->luminance[0]; f 227 libavfilter/vf_deflicker.c static void get_gm_factor(AVFilterContext *ctx, float *f) f 232 libavfilter/vf_deflicker.c *f = 1; f 235 libavfilter/vf_deflicker.c *f *= s->luminance[y]; f 238 libavfilter/vf_deflicker.c *f = pow(*f, 1.0f / s->size); f 239 libavfilter/vf_deflicker.c *f /= s->luminance[0]; f 242 libavfilter/vf_deflicker.c static void get_hm_factor(AVFilterContext *ctx, float *f) f 247 libavfilter/vf_deflicker.c *f = 0.0f; f 250 libavfilter/vf_deflicker.c *f += 1.0f / s->luminance[y]; f 253 libavfilter/vf_deflicker.c *f = s->size / *f; f 254 libavfilter/vf_deflicker.c *f /= s->luminance[0]; f 257 libavfilter/vf_deflicker.c static void get_qm_factor(AVFilterContext *ctx, float *f) f 262 libavfilter/vf_deflicker.c *f = 0.0f; f 265 libavfilter/vf_deflicker.c *f += s->luminance[y] * s->luminance[y]; f 268 libavfilter/vf_deflicker.c *f /= s->size; f 269 libavfilter/vf_deflicker.c *f = sqrtf(*f); f 270 libavfilter/vf_deflicker.c *f /= s->luminance[0]; f 273 libavfilter/vf_deflicker.c static void get_cm_factor(AVFilterContext *ctx, float *f) f 278 libavfilter/vf_deflicker.c *f = 0.0f; f 281 libavfilter/vf_deflicker.c *f += s->luminance[y] * s->luminance[y] * s->luminance[y]; f 284 libavfilter/vf_deflicker.c *f /= s->size; f 285 libavfilter/vf_deflicker.c *f = cbrtf(*f); f 286 libavfilter/vf_deflicker.c *f /= s->luminance[0]; f 289 libavfilter/vf_deflicker.c static void get_pm_factor(AVFilterContext *ctx, float *f) f 294 libavfilter/vf_deflicker.c *f = 0.0f; f 297 libavfilter/vf_deflicker.c *f += powf(s->luminance[y], s->size); f 300 libavfilter/vf_deflicker.c *f /= s->size; f 301 libavfilter/vf_deflicker.c *f = powf(*f, 1.0f / s->size); f 302 libavfilter/vf_deflicker.c *f /= s->luminance[0]; f 311 libavfilter/vf_deflicker.c static void get_median_factor(AVFilterContext *ctx, float *f) f 318 libavfilter/vf_deflicker.c *f = s->sorted[s->size >> 1] / s->luminance[0]; f 367 libavfilter/vf_deflicker.c float f; f 385 libavfilter/vf_deflicker.c s->get_factor(ctx, &f); f 388 libavfilter/vf_deflicker.c outlink->w, outlink->h, f); f 403 libavfilter/vf_deflicker.c snprintf(value, sizeof(value), "%f", s->luminance[0] * f); f 406 libavfilter/vf_deflicker.c snprintf(value, sizeof(value), "%f", f - 1.0f); f 373 libavfilter/vf_deinterlace_qsv.c static int get_free_frame(QSVDeintContext *s, QSVFrame **f) f 383 libavfilter/vf_deinterlace_qsv.c *f = frame; f 395 libavfilter/vf_deinterlace_qsv.c *f = frame; f 455 libavfilter/vf_deshake_opencl.c const cl_float2 *f = &point_pairs[i].p.p1; f 458 libavfilter/vf_deshake_opencl.c double a = F0*f->s[0] + F1*f->s[1] + F2 - t->s[0]; f 459 libavfilter/vf_deshake_opencl.c double b = F3*f->s[0] + F4*f->s[1] + F5 - t->s[1]; f 756 libavfilter/vf_deshake_opencl.c double f = model[5]; f 762 libavfilter/vf_deshake_opencl.c ret.translation.s[1] = f; f 156 libavfilter/vf_fieldmatch.c static int get_width(const FieldMatchContext *fm, const AVFrame *f, int plane) f 158 libavfilter/vf_fieldmatch.c return plane ? AV_CEIL_RSHIFT(f->width, fm->hsub) : f->width; f 161 libavfilter/vf_fieldmatch.c static int get_height(const FieldMatchContext *fm, const AVFrame *f, int plane) f 163 libavfilter/vf_fieldmatch.c return plane ? AV_CEIL_RSHIFT(f->height, fm->vsub) : f->height; f 183 libavfilter/vf_hqdn3d.c double f = ((i<<(9-LUT_BITS)) + (1<<(8-LUT_BITS)) - 1) / 512.0; // midpoint of the bin f 184 libavfilter/vf_hqdn3d.c simil = FFMAX(0, 1.0 - fabs(f) / 255.0); f 185 libavfilter/vf_hqdn3d.c C = pow(simil, gamma) * 256.0 * f; f 112 libavfilter/vf_lut3d.c static inline float sanitizef(float f) f 115 libavfilter/vf_lut3d.c t.f = f; f 129 libavfilter/vf_lut3d.c return f; f 132 libavfilter/vf_lut3d.c static inline float lerpf(float v0, float v1, float f) f 134 libavfilter/vf_lut3d.c return v0 + (v1 - v0) * f; f 137 libavfilter/vf_lut3d.c static inline struct rgbvec lerp(const struct rgbvec *v0, const struct rgbvec *v1, float f) f 140 libavfilter/vf_lut3d.c lerpf(v0->r, v1->r, f), lerpf(v0->g, v1->g, f), lerpf(v0->b, v1->b, f) f 492 libavfilter/vf_lut3d.c static char* fget_next_word(char* dst, int max, FILE* f) f 500 libavfilter/vf_lut3d.c while ((c = fgetc(f)) != EOF) { f 511 libavfilter/vf_lut3d.c if ((c = fgetc(f)) == EOF) f 527 libavfilter/vf_lut3d.c if (!fgets(line, sizeof(line), f)) { \ f 534 libavfilter/vf_lut3d.c if (!fgets(line, sizeof(line), f)) { \ f 576 libavfilter/vf_lut3d.c static int parse_dat(AVFilterContext *ctx, FILE *f) f 611 libavfilter/vf_lut3d.c static int parse_cube(AVFilterContext *ctx, FILE *f) f 618 libavfilter/vf_lut3d.c while (fgets(line, sizeof(line), f)) { f 668 libavfilter/vf_lut3d.c static int parse_3dl(AVFilterContext *ctx, FILE *f) f 703 libavfilter/vf_lut3d.c static int parse_m3d(AVFilterContext *ctx, FILE *f) f 711 libavfilter/vf_lut3d.c while (fgets(line, sizeof(line), f)) { f 801 libavfilter/vf_lut3d.c if (!fget_next_word(line, sizeof(line) ,f)) { \ f 810 libavfilter/vf_lut3d.c static int parse_cinespace(AVFilterContext *ctx, FILE *f) f 1147 libavfilter/vf_lut3d.c FILE *f; f 1157 libavfilter/vf_lut3d.c f = av_fopen_utf8(lut3d->file, "r"); f 1158 libavfilter/vf_lut3d.c if (!f) { f 1173 libavfilter/vf_lut3d.c ret = parse_dat(ctx, f); f 1175 libavfilter/vf_lut3d.c ret = parse_3dl(ctx, f); f 1177 libavfilter/vf_lut3d.c ret = parse_cube(ctx, f); f 1179 libavfilter/vf_lut3d.c ret = parse_m3d(ctx, f); f 1181 libavfilter/vf_lut3d.c ret = parse_cinespace(ctx, f); f 1193 libavfilter/vf_lut3d.c fclose(f); f 1549 libavfilter/vf_lut3d.c static int parse_cinespace_1d(AVFilterContext *ctx, FILE *f) f 1629 libavfilter/vf_lut3d.c static int parse_cube_1d(AVFilterContext *ctx, FILE *f) f 1636 libavfilter/vf_lut3d.c while (fgets(line, sizeof(line), f)) { f 2037 libavfilter/vf_lut3d.c FILE *f; f 2048 libavfilter/vf_lut3d.c f = av_fopen_utf8(lut1d->file, "r"); f 2049 libavfilter/vf_lut3d.c if (!f) { f 2064 libavfilter/vf_lut3d.c ret = parse_cube_1d(ctx, f); f 2066 libavfilter/vf_lut3d.c ret = parse_cinespace_1d(ctx, f); f 2078 libavfilter/vf_lut3d.c fclose(f); f 81 libavfilter/vf_median.c static void hmuladd(htype *dst, const htype *src, int f, int bins) f 84 libavfilter/vf_median.c dst[i] += f * src[i]; f 638 libavfilter/vf_nnedi.c static int roundds(const double f) f 640 libavfilter/vf_nnedi.c if (f - floor(f) >= 0.5) f 641 libavfilter/vf_nnedi.c return FFMIN((int)ceil(f), 32767); f 642 libavfilter/vf_nnedi.c return FFMAX((int)floor(f), -32768); f 459 libavfilter/vf_palettegen.c static int update_histogram_frame(struct hist_node *hist, const AVFrame *f) f 463 libavfilter/vf_palettegen.c for (y = 0; y < f->height; y++) { f 464 libavfilter/vf_palettegen.c const uint32_t *p = (const uint32_t *)(f->data[0] + y*f->linesize[0]); f 466 libavfilter/vf_palettegen.c for (x = 0; x < f->width; x++) { f 535 libavfilter/vf_paletteuse.c FILE *f = av_fopen_utf8(fname, "w"); f 537 libavfilter/vf_paletteuse.c if (!f) { f 551 libavfilter/vf_paletteuse.c fwrite(buf.str, 1, buf.len, f); f 552 libavfilter/vf_paletteuse.c fclose(f); f 117 libavfilter/vf_pullup.c static int alloc_metrics(PullupContext *s, PullupField *f) f 119 libavfilter/vf_pullup.c f->diffs = av_calloc(FFALIGN(s->metric_length, 16), sizeof(*f->diffs)); f 120 libavfilter/vf_pullup.c f->combs = av_calloc(FFALIGN(s->metric_length, 16), sizeof(*f->combs)); f 121 libavfilter/vf_pullup.c f->vars = av_calloc(FFALIGN(s->metric_length, 16), sizeof(*f->vars)); f 123 libavfilter/vf_pullup.c if (!f->diffs || !f->combs || !f->vars) { f 124 libavfilter/vf_pullup.c av_freep(&f->diffs); f 125 libavfilter/vf_pullup.c av_freep(&f->combs); f 126 libavfilter/vf_pullup.c av_freep(&f->vars); f 134 libavfilter/vf_pullup.c PullupField *f = head; f 137 libavfilter/vf_pullup.c if (!f) f 139 libavfilter/vf_pullup.c av_free(f->diffs); f 140 libavfilter/vf_pullup.c av_free(f->combs); f 141 libavfilter/vf_pullup.c av_free(f->vars); f 142 libavfilter/vf_pullup.c next = f->next; f 143 libavfilter/vf_pullup.c memset(f, 0, sizeof(*f)); // clear all pointers to avoid stale ones f 144 libavfilter/vf_pullup.c av_free(f); f 145 libavfilter/vf_pullup.c f = next; f 146 libavfilter/vf_pullup.c } while (f != head); f 151 libavfilter/vf_pullup.c PullupField *head, *f; f 153 libavfilter/vf_pullup.c f = head = av_mallocz(sizeof(*head)); f 154 libavfilter/vf_pullup.c if (!f) f 157 libavfilter/vf_pullup.c if (alloc_metrics(s, f) < 0) { f 158 libavfilter/vf_pullup.c av_free(f); f 163 libavfilter/vf_pullup.c f->next = av_mallocz(sizeof(*f->next)); f 164 libavfilter/vf_pullup.c if (!f->next) { f 169 libavfilter/vf_pullup.c f->next->prev = f; f 170 libavfilter/vf_pullup.c f = f->next; f 171 libavfilter/vf_pullup.c if (alloc_metrics(s, f) < 0) { f 177 libavfilter/vf_pullup.c f->next = head; f 178 libavfilter/vf_pullup.c head->prev = f; f 301 libavfilter/vf_pullup.c PullupField *f; f 307 libavfilter/vf_pullup.c for (f = begin; f != end; f = f->next) f 313 libavfilter/vf_pullup.c static int find_first_break(PullupField *f, int max) f 318 libavfilter/vf_pullup.c if (f->breaks & BREAK_RIGHT || f->next->breaks & BREAK_LEFT) f 320 libavfilter/vf_pullup.c f = f->next; f 367 libavfilter/vf_pullup.c static void compute_affinity(PullupContext *s, PullupField *f) f 371 libavfilter/vf_pullup.c if (f->flags & F_HAVE_AFFINITY) f 374 libavfilter/vf_pullup.c f->flags |= F_HAVE_AFFINITY; f 376 libavfilter/vf_pullup.c if (f->buffer == f->next->next->buffer) { f 377 libavfilter/vf_pullup.c f->affinity = 1; f 378 libavfilter/vf_pullup.c f->next->affinity = 0; f 379 libavfilter/vf_pullup.c f->next->next->affinity = -1; f 380 libavfilter/vf_pullup.c f->next->flags |= F_HAVE_AFFINITY; f 381 libavfilter/vf_pullup.c f->next->next->flags |= F_HAVE_AFFINITY; f 386 libavfilter/vf_pullup.c int v = f->vars[i]; f 387 libavfilter/vf_pullup.c int lv = f->prev->vars[i]; f 388 libavfilter/vf_pullup.c int rv = f->next->vars[i]; f 389 libavfilter/vf_pullup.c int lc = f-> combs[i] - 2*(v < lv ? v : lv); f 390 libavfilter/vf_pullup.c int rc = f->next->combs[i] - 2*(v < rv ? v : rv); f 406 libavfilter/vf_pullup.c f->affinity = -1; f 408 libavfilter/vf_pullup.c f->affinity = 1; f 416 libavfilter/vf_pullup.c PullupField *f; f 422 libavfilter/vf_pullup.c f = s->first; f 423 libavfilter/vf_pullup.c n = queue_length(f, s->last); f 426 libavfilter/vf_pullup.c compute_breaks(s, f); f 428 libavfilter/vf_pullup.c compute_affinity(s, f); f 430 libavfilter/vf_pullup.c f = f->next; f 514 libavfilter/vf_pullup.c static void pullup_release_frame(PullupFrame *f) f 518 libavfilter/vf_pullup.c for (i = 0; i < f->length; i++) f 519 libavfilter/vf_pullup.c pullup_release_buffer(f->ifields[i], f->parity ^ (i & 1)); f 521 libavfilter/vf_pullup.c pullup_release_buffer(f->ofields[0], 0); f 522 libavfilter/vf_pullup.c pullup_release_buffer(f->ofields[1], 1); f 524 libavfilter/vf_pullup.c if (f->buffer) f 525 libavfilter/vf_pullup.c pullup_release_buffer(f->buffer, 2); f 526 libavfilter/vf_pullup.c f->lock--; f 565 libavfilter/vf_pullup.c PullupField *f = av_mallocz(sizeof(*f)); f 567 libavfilter/vf_pullup.c if (!f) f 570 libavfilter/vf_pullup.c if ((ret = alloc_metrics(s, f)) < 0) { f 571 libavfilter/vf_pullup.c av_free(f); f 575 libavfilter/vf_pullup.c f->prev = s->head; f 576 libavfilter/vf_pullup.c f->next = s->first; f 577 libavfilter/vf_pullup.c s->head->next = f; f 578 libavfilter/vf_pullup.c s->first->prev = f; f 586 libavfilter/vf_pullup.c PullupField *f; f 596 libavfilter/vf_pullup.c f = s->head; f 597 libavfilter/vf_pullup.c f->parity = parity; f 598 libavfilter/vf_pullup.c f->buffer = pullup_lock_buffer(b, parity); f 599 libavfilter/vf_pullup.c f->flags = 0; f 600 libavfilter/vf_pullup.c f->breaks = 0; f 601 libavfilter/vf_pullup.c f->affinity = 0; f 603 libavfilter/vf_pullup.c compute_metric(s, f->diffs, f, parity, f->prev->prev, parity, s->diff); f 604 libavfilter/vf_pullup.c compute_metric(s, f->combs, parity ? f->prev : f, 0, parity ? f : f->prev, 1, s->comb); f 605 libavfilter/vf_pullup.c compute_metric(s, f->vars, f, parity, f, -1, s->var); f 664 libavfilter/vf_pullup.c PullupFrame *f; f 671 libavfilter/vf_pullup.c f = pullup_get_frame(s); f 672 libavfilter/vf_pullup.c pullup_release_frame(f); f 689 libavfilter/vf_pullup.c f = pullup_get_frame(s); f 690 libavfilter/vf_pullup.c if (!f) f 693 libavfilter/vf_pullup.c if (f->length < 2) { f 694 libavfilter/vf_pullup.c pullup_release_frame(f); f 695 libavfilter/vf_pullup.c f = pullup_get_frame(s); f 696 libavfilter/vf_pullup.c if (!f) f 698 libavfilter/vf_pullup.c if (f->length < 2) { f 699 libavfilter/vf_pullup.c pullup_release_frame(f); f 702 libavfilter/vf_pullup.c f = pullup_get_frame(s); f 703 libavfilter/vf_pullup.c if (!f) f 705 libavfilter/vf_pullup.c if (f->length < 2) { f 706 libavfilter/vf_pullup.c pullup_release_frame(f); f 713 libavfilter/vf_pullup.c if (!f->buffer) f 714 libavfilter/vf_pullup.c pullup_pack_frame(s, f); f 724 libavfilter/vf_pullup.c (const uint8_t**)f->buffer->planes, s->planewidth, f 728 libavfilter/vf_pullup.c pullup_release_frame(f); f 299 libavfilter/vf_readeia608.c int f = FFMIN(i + 1, w-1); f 301 libavfilter/vf_readeia608.c line[LAG + i].input = (src[a] + src[b] + src[c] + src[i] + src[d] + src[e] + src[f] + 6) / 7; f 76 libavfilter/vf_repeatfields.c static void update_pts(AVFilterLink *link, AVFrame *f, int64_t pts, int fields) f 81 libavfilter/vf_repeatfields.c f->pts = pts + av_rescale_q(fields, (AVRational){1001, 60000}, link->time_base); f 83 libavfilter/vf_repeatfields.c f->pts = AV_NOPTS_VALUE; f 131 libavfilter/vf_sab.c static void close_filter_param(FilterParam *f) f 133 libavfilter/vf_sab.c if (f->pre_filter_context) { f 134 libavfilter/vf_sab.c sws_freeContext(f->pre_filter_context); f 135 libavfilter/vf_sab.c f->pre_filter_context = NULL; f 137 libavfilter/vf_sab.c av_freep(&f->pre_filter_buf); f 138 libavfilter/vf_sab.c av_freep(&f->dist_coeff); f 149 libavfilter/vf_sab.c static int open_filter_param(FilterParam *f, int width, int height, unsigned int sws_flags) f 156 libavfilter/vf_sab.c f->pre_filter_buf = av_malloc(linesize * height); f 157 libavfilter/vf_sab.c if (!f->pre_filter_buf) f 160 libavfilter/vf_sab.c f->pre_filter_linesize = linesize; f 161 libavfilter/vf_sab.c vec = sws_getGaussianVec(f->pre_filter_radius, f->quality); f 164 libavfilter/vf_sab.c f->pre_filter_context = sws_getContext(width, height, AV_PIX_FMT_GRAY8, f 169 libavfilter/vf_sab.c vec = sws_getGaussianVec(f->strength, 5.0); f 177 libavfilter/vf_sab.c f->color_diff_coeff[i] = (int)(d/vec->coeff[vec->length/2]*(1<<12) + 0.5); f 181 libavfilter/vf_sab.c vec = sws_getGaussianVec(f->radius, f->quality); f 182 libavfilter/vf_sab.c f->dist_width = vec->length; f 183 libavfilter/vf_sab.c f->dist_linesize = FFALIGN(vec->length, 8); f 184 libavfilter/vf_sab.c f->dist_coeff = av_malloc_array(f->dist_width, f->dist_linesize * sizeof(*f->dist_coeff)); f 185 libavfilter/vf_sab.c if (!f->dist_coeff) { f 193 libavfilter/vf_sab.c f->dist_coeff[x + y*f->dist_linesize] = (int)(d*(1<<10) + 0.5); f 229 libavfilter/vf_sab.c FilterParam f = *fp; f 230 libavfilter/vf_sab.c const int radius = f.dist_width/2; f 234 libavfilter/vf_sab.c uint8_t *dst2[NB_PLANES] = { f.pre_filter_buf }; f 235 libavfilter/vf_sab.c int dst2_linesize[NB_PLANES] = { f.pre_filter_linesize }; f 237 libavfilter/vf_sab.c sws_scale(f.pre_filter_context, src2, src2_linesize, 0, h, dst2, dst2_linesize); f 241 libavfilter/vf_sab.c factor = f.color_diff_coeff[COLOR_DIFF_COEFF_SIZE/2 + pre_val - \ f 242 libavfilter/vf_sab.c f.pre_filter_buf[ix + iy*f.pre_filter_linesize]] * f.dist_coeff[dx + dy*f.dist_linesize]; \ f 252 libavfilter/vf_sab.c const int pre_val = f.pre_filter_buf[x + y*f.pre_filter_linesize]; f 201 libavfilter/vf_signalstats.c static void burn_frame8(const SignalstatsContext *s, AVFrame *f, int x, int y) f 205 libavfilter/vf_signalstats.c f->data[0][y * f->linesize[0] + x] = s->yuv_color[0]; f 206 libavfilter/vf_signalstats.c f->data[1][chromay * f->linesize[1] + chromax] = s->yuv_color[1]; f 207 libavfilter/vf_signalstats.c f->data[2][chromay * f->linesize[2] + chromax] = s->yuv_color[2]; f 210 libavfilter/vf_signalstats.c static void burn_frame16(const SignalstatsContext *s, AVFrame *f, int x, int y) f 215 libavfilter/vf_signalstats.c AV_WN16(f->data[0] + y * f->linesize[0] + x * 2, s->yuv_color[0] * mult); f 216 libavfilter/vf_signalstats.c AV_WN16(f->data[1] + chromay * f->linesize[1] + chromax * 2, s->yuv_color[1] * mult); f 217 libavfilter/vf_signalstats.c AV_WN16(f->data[2] + chromay * f->linesize[2] + chromax * 2, s->yuv_color[2] * mult); f 171 libavfilter/vf_signature.c int f = 0, g = 0, w = 0; f 306 libavfilter/vf_signature.c fs->framesig[f/5] += ternary * pot3[f%5]; f 308 libavfilter/vf_signature.c if (f == wordvec[w]) { f 313 libavfilter/vf_signature.c f++; f 390 libavfilter/vf_signature.c FILE* f; f 393 libavfilter/vf_signature.c f = fopen(filename, "w"); f 394 libavfilter/vf_signature.c if (!f) { f 403 libavfilter/vf_signature.c fprintf(f, "<?xml version='1.0' encoding='ASCII' ?>\n"); f 404 libavfilter/vf_signature.c fprintf(f, "<Mpeg7 xmlns=\"urn:mpeg:mpeg7:schema:2001\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"urn:mpeg:mpeg7:schema:2001 schema/Mpeg7-2001.xsd\">\n"); f 405 libavfilter/vf_signature.c fprintf(f, " <DescriptionUnit xsi:type=\"DescriptorCollectionType\">\n"); f 406 libavfilter/vf_signature.c fprintf(f, " <Descriptor xsi:type=\"VideoSignatureType\">\n"); f 407 libavfilter/vf_signature.c fprintf(f, " <VideoSignatureRegion>\n"); f 408 libavfilter/vf_signature.c fprintf(f, " <VideoSignatureSpatialRegion>\n"); f 409 libavfilter/vf_signature.c fprintf(f, " <Pixel>0 0 </Pixel>\n"); f 410 libavfilter/vf_signature.c fprintf(f, " <Pixel>%d %d </Pixel>\n", sc->w - 1, sc->h - 1); f 411 libavfilter/vf_signature.c fprintf(f, " </VideoSignatureSpatialRegion>\n"); f 412 libavfilter/vf_signature.c fprintf(f, " <StartFrameOfSpatialRegion>0</StartFrameOfSpatialRegion>\n"); f 414 libavfilter/vf_signature.c fprintf(f, " <MediaTimeUnit>%d</MediaTimeUnit>\n", sc->time_base.den / sc->time_base.num); f 415 libavfilter/vf_signature.c fprintf(f, " <MediaTimeOfSpatialRegion>\n"); f 416 libavfilter/vf_signature.c fprintf(f, " <StartMediaTimeOfSpatialRegion>0</StartMediaTimeOfSpatialRegion>\n"); f 417 libavfilter/vf_signature.c fprintf(f, " <EndMediaTimeOfSpatialRegion>%" PRIu64 "</EndMediaTimeOfSpatialRegion>\n", sc->coarseend->last->pts); f 418 libavfilter/vf_signature.c fprintf(f, " </MediaTimeOfSpatialRegion>\n"); f 422 libavfilter/vf_signature.c fprintf(f, " <VSVideoSegment>\n"); f 423 libavfilter/vf_signature.c fprintf(f, " <StartFrameOfSegment>%" PRIu32 "</StartFrameOfSegment>\n", cs->first->index); f 424 libavfilter/vf_signature.c fprintf(f, " <EndFrameOfSegment>%" PRIu32 "</EndFrameOfSegment>\n", cs->last->index); f 425 libavfilter/vf_signature.c fprintf(f, " <MediaTimeOfSegment>\n"); f 426 libavfilter/vf_signature.c fprintf(f, " <StartMediaTimeOfSegment>%" PRIu64 "</StartMediaTimeOfSegment>\n", cs->first->pts); f 427 libavfilter/vf_signature.c fprintf(f, " <EndMediaTimeOfSegment>%" PRIu64 "</EndMediaTimeOfSegment>\n", cs->last->pts); f 428 libavfilter/vf_signature.c fprintf(f, " </MediaTimeOfSegment>\n"); f 430 libavfilter/vf_signature.c fprintf(f, " <BagOfWords>"); f 434 libavfilter/vf_signature.c fprintf(f, "%d %d %d %d %d %d %d %d ", (n & 0x80) >> 7, f 444 libavfilter/vf_signature.c fprintf(f, "%d %d %d ", (n & 0x80) >> 7, f 449 libavfilter/vf_signature.c fprintf(f, "</BagOfWords>\n"); f 451 libavfilter/vf_signature.c fprintf(f, " </VSVideoSegment>\n"); f 456 libavfilter/vf_signature.c fprintf(f, " <VideoFrame>\n"); f 457 libavfilter/vf_signature.c fprintf(f, " <MediaTimeOfFrame>%" PRIu64 "</MediaTimeOfFrame>\n", fs->pts); f 459 libavfilter/vf_signature.c fprintf(f, " <FrameConfidence>%d</FrameConfidence>\n", fs->confidence); f 461 libavfilter/vf_signature.c fprintf(f, " <Word>"); f 463 libavfilter/vf_signature.c fprintf(f, "%d ", fs->words[i]); f 465 libavfilter/vf_signature.c fprintf(f, " "); f 468 libavfilter/vf_signature.c fprintf(f, "</Word>\n"); f 470 libavfilter/vf_signature.c fprintf(f, " <FrameSignature>"); f 473 libavfilter/vf_signature.c fprintf(f, " "); f 475 libavfilter/vf_signature.c fprintf(f, "%d ", fs->framesig[i] / pot3[0]); f 477 libavfilter/vf_signature.c fprintf(f, " %d ", fs->framesig[i] % pot3[j-1] / pot3[j] ); f 479 libavfilter/vf_signature.c fprintf(f, "</FrameSignature>\n"); f 480 libavfilter/vf_signature.c fprintf(f, " </VideoFrame>\n"); f 482 libavfilter/vf_signature.c fprintf(f, " </VideoSignatureRegion>\n"); f 483 libavfilter/vf_signature.c fprintf(f, " </Descriptor>\n"); f 484 libavfilter/vf_signature.c fprintf(f, " </DescriptionUnit>\n"); f 485 libavfilter/vf_signature.c fprintf(f, "</Mpeg7>\n"); f 487 libavfilter/vf_signature.c fclose(f); f 493 libavfilter/vf_signature.c FILE* f; f 507 libavfilter/vf_signature.c f = fopen(filename, "wb"); f 508 libavfilter/vf_signature.c if (!f) { f 564 libavfilter/vf_signature.c fwrite(buffer, 1, put_bits_count(&buf)/8, f); f 565 libavfilter/vf_signature.c fclose(f); f 133 libavfilter/vf_smartblur.c static int alloc_sws_context(FilterParam *f, int width, int height, unsigned int flags) f 138 libavfilter/vf_smartblur.c vec = sws_getGaussianVec(f->radius, f->quality); f 143 libavfilter/vf_smartblur.c sws_scaleVec(vec, f->strength); f 144 libavfilter/vf_smartblur.c vec->coeff[vec->length / 2] += 1.0 - f->strength; f 147 libavfilter/vf_smartblur.c f->filter_context = sws_getCachedContext(NULL, f 154 libavfilter/vf_smartblur.c if (!f->filter_context) f 112 libavfilter/vf_tonemap.c float a = 0.15f, b = 0.50f, c = 0.10f, d = 0.20f, e = 0.02f, f = 0.30f; f 113 libavfilter/vf_tonemap.c return (in * (in * a + b * c) + d * e) / (in * (in * a + b) + d * f) - e / f; f 262 libavfilter/vf_vaguedenoiser.c const float f = input[2 * i - 9] * analysis_low[3]; f 267 libavfilter/vf_vaguedenoiser.c output[i] = a + b + c + d + e + f + g + h + k; f 276 libavfilter/vf_vaguedenoiser.c const float f = input[2 * i - 7] * analysis_high[1]; f 279 libavfilter/vf_vaguedenoiser.c output[i + low_size] = a + b + c + d + e + f + g; f 873 libavfilter/vf_vectorscope.c const float f = 1. - o; f 877 libavfilter/vf_vectorscope.c dst[ l - 3] = dst[ l - 3] * f + V; f 878 libavfilter/vf_vectorscope.c dst[ l + 3] = dst[ l + 3] * f + V; f 879 libavfilter/vf_vectorscope.c dst[-l - 3] = dst[-l - 3] * f + V; f 880 libavfilter/vf_vectorscope.c dst[-l + 3] = dst[-l + 3] * f + V; f 884 libavfilter/vf_vectorscope.c dst[ l - 3] = dst[ l - 3] * f + V; f 885 libavfilter/vf_vectorscope.c dst[ l + 3] = dst[ l + 3] * f + V; f 886 libavfilter/vf_vectorscope.c dst[ l - 2] = dst[ l - 2] * f + V; f 887 libavfilter/vf_vectorscope.c dst[ l + 2] = dst[ l + 2] * f + V; f 888 libavfilter/vf_vectorscope.c dst[-l - 3] = dst[-l - 3] * f + V; f 889 libavfilter/vf_vectorscope.c dst[-l + 3] = dst[-l + 3] * f + V; f 890 libavfilter/vf_vectorscope.c dst[-l - 2] = dst[-l - 2] * f + V; f 891 libavfilter/vf_vectorscope.c dst[-l + 2] = dst[-l + 2] * f + V; f 896 libavfilter/vf_vectorscope.c const float f = 1. - o; f 899 libavfilter/vf_vectorscope.c dst[ l - 3] = dst[ l - 3] * f + (255 - dst[ l - 3]) * o; f 900 libavfilter/vf_vectorscope.c dst[ l + 3] = dst[ l + 3] * f + (255 - dst[ l + 3]) * o; f 901 libavfilter/vf_vectorscope.c dst[-l - 3] = dst[-l - 3] * f + (255 - dst[-l - 3]) * o; f 902 libavfilter/vf_vectorscope.c dst[-l + 3] = dst[-l + 3] * f + (255 - dst[-l + 3]) * o; f 906 libavfilter/vf_vectorscope.c dst[ l - 3] = dst[ l - 3] * f + (255 - dst[ l - 3]) * o; f 907 libavfilter/vf_vectorscope.c dst[ l + 3] = dst[ l + 3] * f + (255 - dst[ l + 3]) * o; f 908 libavfilter/vf_vectorscope.c dst[ l - 2] = dst[ l - 2] * f + (255 - dst[ l - 2]) * o; f 909 libavfilter/vf_vectorscope.c dst[ l + 2] = dst[ l + 2] * f + (255 - dst[ l + 2]) * o; f 910 libavfilter/vf_vectorscope.c dst[-l - 3] = dst[-l - 3] * f + (255 - dst[-l - 3]) * o; f 911 libavfilter/vf_vectorscope.c dst[-l + 3] = dst[-l + 3] * f + (255 - dst[-l + 3]) * o; f 912 libavfilter/vf_vectorscope.c dst[-l - 2] = dst[-l - 2] * f + (255 - dst[-l - 2]) * o; f 913 libavfilter/vf_vectorscope.c dst[-l + 2] = dst[-l + 2] * f + (255 - dst[-l + 2]) * o; f 918 libavfilter/vf_vectorscope.c const float f = 1. - o; f 922 libavfilter/vf_vectorscope.c dst[ l - 3] = dst[ l - 3] * f + V; f 923 libavfilter/vf_vectorscope.c dst[ l + 3] = dst[ l + 3] * f + V; f 924 libavfilter/vf_vectorscope.c dst[-l - 3] = dst[-l - 3] * f + V; f 925 libavfilter/vf_vectorscope.c dst[-l + 3] = dst[-l + 3] * f + V; f 929 libavfilter/vf_vectorscope.c dst[ l - 3] = dst[ l - 3] * f + V; f 930 libavfilter/vf_vectorscope.c dst[ l + 3] = dst[ l + 3] * f + V; f 931 libavfilter/vf_vectorscope.c dst[ l - 2] = dst[ l - 2] * f + V; f 932 libavfilter/vf_vectorscope.c dst[ l + 2] = dst[ l + 2] * f + V; f 933 libavfilter/vf_vectorscope.c dst[-l - 3] = dst[-l - 3] * f + V; f 934 libavfilter/vf_vectorscope.c dst[-l + 3] = dst[-l + 3] * f + V; f 935 libavfilter/vf_vectorscope.c dst[-l - 2] = dst[-l - 2] * f + V; f 936 libavfilter/vf_vectorscope.c dst[-l + 2] = dst[-l + 2] * f + V; f 941 libavfilter/vf_vectorscope.c const float f = 1. - o; f 944 libavfilter/vf_vectorscope.c dst[ l - 3] = dst[ l - 3] * f + (v - dst[ l - 3]) * o; f 945 libavfilter/vf_vectorscope.c dst[ l + 3] = dst[ l + 3] * f + (v - dst[ l + 3]) * o; f 946 libavfilter/vf_vectorscope.c dst[-l - 3] = dst[-l - 3] * f + (v - dst[-l - 3]) * o; f 947 libavfilter/vf_vectorscope.c dst[-l + 3] = dst[-l + 3] * f + (v - dst[-l + 3]) * o; f 951 libavfilter/vf_vectorscope.c dst[ l - 3] = dst[ l - 3] * f + (v - dst[ l - 3]) * o; f 952 libavfilter/vf_vectorscope.c dst[ l + 3] = dst[ l + 3] * f + (v - dst[ l + 3]) * o; f 953 libavfilter/vf_vectorscope.c dst[ l - 2] = dst[ l - 2] * f + (v - dst[ l - 2]) * o; f 954 libavfilter/vf_vectorscope.c dst[ l + 2] = dst[ l + 2] * f + (v - dst[ l + 2]) * o; f 955 libavfilter/vf_vectorscope.c dst[-l - 3] = dst[-l - 3] * f + (v - dst[-l - 3]) * o; f 956 libavfilter/vf_vectorscope.c dst[-l + 3] = dst[-l + 3] * f + (v - dst[-l + 3]) * o; f 957 libavfilter/vf_vectorscope.c dst[-l - 2] = dst[-l - 2] * f + (v - dst[-l - 2]) * o; f 958 libavfilter/vf_vectorscope.c dst[-l + 2] = dst[-l + 2] * f + (v - dst[-l + 2]) * o; f 42 libavfilter/vf_vibrance.c static inline float lerpf(float v0, float v1, float f) f 44 libavfilter/vf_vibrance.c return v0 + (v1 - v0) * f; f 40 libavfilter/vf_vidstabdetect.c FILE *f; f 77 libavfilter/vf_vidstabdetect.c if (s->f) { f 78 libavfilter/vf_vidstabdetect.c fclose(s->f); f 79 libavfilter/vf_vidstabdetect.c s->f = NULL; f 146 libavfilter/vf_vidstabdetect.c s->f = fopen(s->result, "w"); f 147 libavfilter/vf_vidstabdetect.c if (s->f == NULL) { f 151 libavfilter/vf_vidstabdetect.c if (vsPrepareFile(md, s->f) != VS_OK) { f 181 libavfilter/vf_vidstabdetect.c if (vsWriteToFile(md, s->f, &localmotions) != VS_OK) { f 146 libavfilter/vf_vidstabtransform.c FILE *f; f 212 libavfilter/vf_vidstabtransform.c f = fopen(tc->input, "r"); f 213 libavfilter/vf_vidstabtransform.c if (!f) { f 219 libavfilter/vf_vidstabtransform.c if (vsReadLocalMotionsFile(f, &mlms) == VS_OK) { f 226 libavfilter/vf_vidstabtransform.c if (!vsReadOldTransforms(td, f, &tc->trans)) { /* read input file */ f 232 libavfilter/vf_vidstabtransform.c fclose(f); f 247 libavfilter/vf_vignette.c const float f = fmap[x]; f 249 libavfilter/vf_vignette.c dstp[0] = av_clip_uint8(srcp[0] * f + get_dither_value(s)); f 250 libavfilter/vf_vignette.c dstp[1] = av_clip_uint8(srcp[1] * f + get_dither_value(s)); f 251 libavfilter/vf_vignette.c dstp[2] = av_clip_uint8(srcp[2] * f + get_dither_value(s)); f 72 libavfilter/vf_yadif.c int f = (prev2[2 * prefs] + next2[2 * prefs])>>1; \ f 73 libavfilter/vf_yadif.c int max = FFMAX3(d - e, d - c, FFMIN(b - c, f - e)); \ f 74 libavfilter/vf_yadif.c int min = FFMIN3(d - e, d - c, FFMAX(b - c, f - e)); \ f 469 libavfilter/vulkan.c AVVkFrame *f = (AVVkFrame *)frame->data[0]; f 496 libavfilter/vulkan.c e->sem_wait[e->sem_wait_cnt] = f->sem[i]; f 500 libavfilter/vulkan.c e->sem_sig[e->sem_sig_cnt] = f->sem[i]; f 78 libavfilter/yadif_common.c static void fixstride(AVFilterLink *link, AVFrame *f) f 80 libavfilter/yadif_common.c AVFrame *dst = ff_default_get_video_buffer(link, f->width, f->height); f 83 libavfilter/yadif_common.c av_frame_copy_props(dst, f); f 85 libavfilter/yadif_common.c (const uint8_t **)f->data, f->linesize, f 87 libavfilter/yadif_common.c av_frame_unref(f); f 88 libavfilter/yadif_common.c av_frame_move_ref(f, dst); f 520 libavformat/allformats.c const AVOutputFormat *f = NULL; f 523 libavformat/allformats.c f = muxer_list[i]; f 525 libavformat/allformats.c f = outdev_list[i - size]; f 528 libavformat/allformats.c if (f) f 530 libavformat/allformats.c return f; f 537 libavformat/allformats.c const AVInputFormat *f = NULL; f 540 libavformat/allformats.c f = demuxer_list[i]; f 542 libavformat/allformats.c f = indev_list[i - size]; f 545 libavformat/allformats.c if (f) f 547 libavformat/allformats.c return f; f 594 libavformat/allformats.c AVInputFormat *av_iformat_next(const AVInputFormat *f) f 598 libavformat/allformats.c if (f) f 600 libavformat/allformats.c return f->next; f 602 libavformat/allformats.c return (AVInputFormat *) f->next; f 610 libavformat/allformats.c AVOutputFormat *av_oformat_next(const AVOutputFormat *f) f 614 libavformat/allformats.c if (f) f 616 libavformat/allformats.c return f->next; f 618 libavformat/allformats.c return (AVOutputFormat *) f->next; f 2087 libavformat/avformat.h AVInputFormat *av_iformat_next(const AVInputFormat *f); f 2095 libavformat/avformat.h AVOutputFormat *av_oformat_next(const AVOutputFormat *f); f 2751 libavformat/avformat.h void av_hex_dump(FILE *f, const uint8_t *buf, int size); f 2775 libavformat/avformat.h void av_pkt_dump2(FILE *f, const AVPacket *pkt, int dump_payload, const AVStream *st); f 88 libavformat/concatdec.c static int safe_filename(const char *f) f 90 libavformat/concatdec.c const char *start = f; f 92 libavformat/concatdec.c for (; *f; f++) { f 94 libavformat/concatdec.c if (!((unsigned)((*f | 32) - 'a') < 26 || f 95 libavformat/concatdec.c (unsigned)(*f - '0') < 10 || *f == '_' || *f == '-')) { f 96 libavformat/concatdec.c if (f == start) f 98 libavformat/concatdec.c else if (*f == '/') f 99 libavformat/concatdec.c start = f + 1; f 100 libavformat/concatdec.c else if (*f != '.') f 42 libavformat/dump.c if (!f) \ f 45 libavformat/dump.c fprintf(f, __VA_ARGS__); \ f 48 libavformat/dump.c static void hex_dump_internal(void *avcl, FILE *f, int level, f 75 libavformat/dump.c void av_hex_dump(FILE *f, const uint8_t *buf, int size) f 77 libavformat/dump.c hex_dump_internal(NULL, f, 0, buf, size); f 85 libavformat/dump.c static void pkt_dump_internal(void *avcl, FILE *f, int level, const AVPacket *pkt, f 106 libavformat/dump.c hex_dump_internal(avcl, f, level, pkt->data, pkt->size); f 109 libavformat/dump.c void av_pkt_dump2(FILE *f, const AVPacket *pkt, int dump_payload, const AVStream *st) f 111 libavformat/dump.c pkt_dump_internal(NULL, f, 0, pkt, dump_payload, st->time_base); f 292 libavformat/format.c FILE *f = fopen("probestat.tmp", "ab"); f 293 libavformat/format.c fprintf(f, "probe_size:%d format:%s score:%d filename:%s\n", probe_size, (*fmt)->name, score, filename); f 294 libavformat/format.c fclose(f); f 34 libavformat/gxfenc.c #define GXF_TIMECODE(c, d, h, m, s, f) \ f 35 libavformat/gxfenc.c ((c) << 30 | (d) << 29 | (h) << 24 | (m) << 16 | (s) << 8 | (f)) f 409 libavformat/img2dec.c AVIOContext *f[3] = { NULL }; f 436 libavformat/img2dec.c f[i] = s1->pb; f 437 libavformat/img2dec.c } else if (s1->io_open(s1, &f[i], filename, AVIO_FLAG_READ, NULL) < 0) { f 444 libavformat/img2dec.c size[i] = avio_size(f[i]); f 458 libavformat/img2dec.c ret = avio_read(f[0], header, PROBE_BUF_MIN); f 462 libavformat/img2dec.c avio_skip(f[0], -ret); f 475 libavformat/img2dec.c f[0] = s1->pb; f 476 libavformat/img2dec.c if (avio_feof(f[0]) && s->loop && s->is_pipe) f 477 libavformat/img2dec.c avio_seek(f[0], 0, SEEK_SET); f 478 libavformat/img2dec.c if (avio_feof(f[0])) f 512 libavformat/img2dec.c pkt->pos = avio_tell(f[0]); f 527 libavformat/img2dec.c if (f[i]) { f 528 libavformat/img2dec.c ret[i] = avio_read(f[i], pkt->data + pkt->size, size[i]); f 530 libavformat/img2dec.c if (avio_seek(f[i], 0, SEEK_SET) >= 0) { f 532 libavformat/img2dec.c ret[i] = avio_read(f[i], pkt->data + pkt->size, size[i]); f 535 libavformat/img2dec.c if (!s->is_pipe && f[i] != s1->pb) f 536 libavformat/img2dec.c ff_format_io_close(s1, &f[i]); f 563 libavformat/img2dec.c if (f[i] != s1->pb) f 564 libavformat/img2dec.c ff_format_io_close(s1, &f[i]); f 35 libavformat/libmodplug.c ModPlugFile *f; f 115 libavformat/libmodplug.c fname(f, i, item_name); \ f 136 libavformat/libmodplug.c ModPlugFile *f = modplug->f; f 138 libavformat/libmodplug.c const char *name = ModPlug_GetName(f); f 139 libavformat/libmodplug.c const char *msg = ModPlug_GetMessage(f); f 141 libavformat/libmodplug.c unsigned n_instruments = ModPlug_NumInstruments(f); f 142 libavformat/libmodplug.c unsigned n_samples = ModPlug_NumSamples(f); f 143 libavformat/libmodplug.c unsigned n_patterns = ModPlug_NumPatterns(f); f 144 libavformat/libmodplug.c unsigned n_channels = ModPlug_NumChannels(f); f 218 libavformat/libmodplug.c modplug->f = ModPlug_Load(modplug->buf, sz); f 219 libavformat/libmodplug.c if (!modplug->f) { f 227 libavformat/libmodplug.c st->duration = ModPlug_GetLength(modplug->f); f 283 libavformat/libmodplug.c var_values[VAR_SPEED ] = ModPlug_GetCurrentSpeed (modplug->f); f 284 libavformat/libmodplug.c var_values[VAR_TEMPO ] = ModPlug_GetCurrentTempo (modplug->f); f 285 libavformat/libmodplug.c var_values[VAR_ORDER ] = ModPlug_GetCurrentOrder (modplug->f); f 286 libavformat/libmodplug.c var_values[VAR_PATTERN] = ModPlug_GetCurrentPattern(modplug->f); f 287 libavformat/libmodplug.c var_values[VAR_ROW ] = ModPlug_GetCurrentRow (modplug->f); f 328 libavformat/libmodplug.c pkt->size = ModPlug_Read(modplug->f, pkt->data, AUDIO_PKT_SIZE); f 338 libavformat/libmodplug.c ModPlug_Unload(modplug->f); f 346 libavformat/libmodplug.c ModPlug_Seek(modplug->f, (int)ts); f 105 libavformat/matroskadec.c double f; f 435 libavformat/matroskadec.c { MATROSKA_ID_VIDEOCOLOR_RX, EBML_FLOAT, 0, offsetof(MatroskaMasteringMeta, r_x), { .f=-1 } }, f 436 libavformat/matroskadec.c { MATROSKA_ID_VIDEOCOLOR_RY, EBML_FLOAT, 0, offsetof(MatroskaMasteringMeta, r_y), { .f=-1 } }, f 437 libavformat/matroskadec.c { MATROSKA_ID_VIDEOCOLOR_GX, EBML_FLOAT, 0, offsetof(MatroskaMasteringMeta, g_x), { .f=-1 } }, f 438 libavformat/matroskadec.c { MATROSKA_ID_VIDEOCOLOR_GY, EBML_FLOAT, 0, offsetof(MatroskaMasteringMeta, g_y), { .f=-1 } }, f 439 libavformat/matroskadec.c { MATROSKA_ID_VIDEOCOLOR_BX, EBML_FLOAT, 0, offsetof(MatroskaMasteringMeta, b_x), { .f=-1 } }, f 440 libavformat/matroskadec.c { MATROSKA_ID_VIDEOCOLOR_BY, EBML_FLOAT, 0, offsetof(MatroskaMasteringMeta, b_y), { .f=-1 } }, f 441 libavformat/matroskadec.c { MATROSKA_ID_VIDEOCOLOR_WHITEX, EBML_FLOAT, 0, offsetof(MatroskaMasteringMeta, white_x), { .f=-1 } }, f 442 libavformat/matroskadec.c { MATROSKA_ID_VIDEOCOLOR_WHITEY, EBML_FLOAT, 0, offsetof(MatroskaMasteringMeta, white_y), { .f=-1 } }, f 443 libavformat/matroskadec.c { MATROSKA_ID_VIDEOCOLOR_LUMINANCEMIN, EBML_FLOAT, 0, offsetof(MatroskaMasteringMeta, min_luminance), { .f=-1 } }, f 444 libavformat/matroskadec.c { MATROSKA_ID_VIDEOCOLOR_LUMINANCEMAX, EBML_FLOAT, 0, offsetof(MatroskaMasteringMeta, max_luminance), { .f=-1 } }, f 469 libavformat/matroskadec.c { MATROSKA_ID_VIDEOPROJECTIONPOSEYAW, EBML_FLOAT, 0, offsetof(MatroskaTrackVideoProjection, yaw), { .f=0.0 } }, f 470 libavformat/matroskadec.c { MATROSKA_ID_VIDEOPROJECTIONPOSEPITCH, EBML_FLOAT, 0, offsetof(MatroskaTrackVideoProjection, pitch), { .f=0.0 } }, f 471 libavformat/matroskadec.c { MATROSKA_ID_VIDEOPROJECTIONPOSEROLL, EBML_FLOAT, 0, offsetof(MatroskaTrackVideoProjection, roll), { .f=0.0 } }, f 498 libavformat/matroskadec.c { MATROSKA_ID_AUDIOSAMPLINGFREQ, EBML_FLOAT, 0, offsetof(MatroskaTrackAudio, samplerate), { .f = 8000.0 } }, f 561 libavformat/matroskadec.c { MATROSKA_ID_TRACKTIMECODESCALE, EBML_FLOAT, 0, offsetof(MatroskaTrack, time_scale), { .f = 1.0 } }, f 1098 libavformat/matroskadec.c *(double *) ((char *) data + syntax[i].data_offset) = syntax[i].def.f; f 78 libavformat/mov.c static int mov_read_mfra(MOVContext *c, AVIOContext *f); f 7456 libavformat/mov.c static int read_tfra(MOVContext *mov, AVIOContext *f) f 7459 libavformat/mov.c int64_t pos = avio_tell(f); f 7460 libavformat/mov.c uint32_t size = avio_rb32(f); f 7463 libavformat/mov.c if (avio_rb32(f) != MKBETAG('t', 'f', 'r', 'a')) { f 7468 libavformat/mov.c version = avio_r8(f); f 7469 libavformat/mov.c avio_rb24(f); f 7470 libavformat/mov.c track_id = avio_rb32(f); f 7471 libavformat/mov.c fieldlength = avio_rb32(f); f 7472 libavformat/mov.c item_count = avio_rb32(f); f 7478 libavformat/mov.c if (avio_feof(f)) { f 7483 libavformat/mov.c time = avio_rb64(f); f 7484 libavformat/mov.c offset = avio_rb64(f); f 7486 libavformat/mov.c time = avio_rb32(f); f 7487 libavformat/mov.c offset = avio_rb32(f); f 7500 libavformat/mov.c avio_r8(f); f 7502 libavformat/mov.c avio_r8(f); f 7504 libavformat/mov.c avio_r8(f); f 7507 libavformat/mov.c avio_seek(f, pos + size, SEEK_SET); f 7511 libavformat/mov.c static int mov_read_mfra(MOVContext *c, AVIOContext *f) f 7513 libavformat/mov.c int64_t stream_size = avio_size(f); f 7514 libavformat/mov.c int64_t original_pos = avio_tell(f); f 7518 libavformat/mov.c if ((seek_ret = avio_seek(f, stream_size - 4, SEEK_SET)) < 0) { f 7522 libavformat/mov.c mfra_size = avio_rb32(f); f 7527 libavformat/mov.c if ((seek_ret = avio_seek(f, -mfra_size, SEEK_CUR)) < 0) { f 7531 libavformat/mov.c if (avio_rb32(f) != mfra_size) { f 7535 libavformat/mov.c if (avio_rb32(f) != MKBETAG('m', 'f', 'r', 'a')) { f 7541 libavformat/mov.c ret = read_tfra(c, f); f 7547 libavformat/mov.c seek_ret = avio_seek(f, original_pos, SEEK_SET); f 71 libavformat/mpegts.c typedef int PESCallback (MpegTSFilter *f, const uint8_t *buf, int len, f 79 libavformat/mpegts.c typedef void SectionCallback (MpegTSFilter *f, const uint8_t *buf, int len); f 1303 libavformat/mpegts.c MpegTSFilter *f = pes->ts->pids[p->pcr_pid]; f 1304 libavformat/mpegts.c if (f) { f 1306 libavformat/mpegts.c if (f->type == MPEGTS_PES) { f 1307 libavformat/mpegts.c PESContext *pcrpes = f->u.pes_filter.opaque; f 1310 libavformat/mpegts.c } else if (f->type == MPEGTS_PCR) { f 1318 libavformat/mpegts.c if (f->last_pcr != -1 && !f->discard) { f 1323 libavformat/mpegts.c int64_t pcr = f->last_pcr / 300; f 1750 libavformat/mpegts.c MpegTSFilter *f = ts->pids[prg->pcr_pid]; f 1751 libavformat/mpegts.c if (f && f->last_pcr != -1) f 1752 libavformat/mpegts.c ts->pkt->pts = ts->pkt->dts = f->last_pcr/300; f 51 libavformat/mux.c static void frac_init(FFFrac *f, int64_t val, int64_t num, int64_t den) f 58 libavformat/mux.c f->val = val; f 59 libavformat/mux.c f->num = num; f 60 libavformat/mux.c f->den = den; f 69 libavformat/mux.c static void frac_add(FFFrac *f, int64_t incr) f 73 libavformat/mux.c num = f->num + incr; f 74 libavformat/mux.c den = f->den; f 76 libavformat/mux.c f->val += num / den; f 80 libavformat/mux.c f->val--; f 83 libavformat/mux.c f->val += num / den; f 86 libavformat/mux.c f->num = num; f 182 libavformat/nutenc.c AVRational f = av_div_q(av_inv_q(s->streams[stream_id]->avg_frame_rate), *nut->stream[stream_id].time_base); f 183 libavformat/nutenc.c if (f.den == 1 && f.num>0) f 184 libavformat/nutenc.c frame_size = f.num; f 48 libavformat/os_support.h # define lseek(f,p,w) _lseeki64((f), (p), (w)) f 56 libavformat/os_support.h # define fstat(f,s) _fstati64((f), (s)) f 67 libavformat/os_support.h # define lseek(f,p,w) lseek64((f), (p), (w)) f 54 libavformat/rtpdec_h263_rfc2190.c int f, p, i, sbit, ebit, src, r; f 72 libavformat/rtpdec_h263_rfc2190.c f = buf[0] & 0x80; f 74 libavformat/rtpdec_h263_rfc2190.c if (!f) { f 36 libavformat/rtpenc_vc2hq.c static void send_packet(AVFormatContext *ctx, uint8_t parse_code, int info_hdr_size, const uint8_t *buf, int size, int i, int f, int rtp_m) f 41 libavformat/rtpenc_vc2hq.c AV_WB8 (&rtp_ctx->buf[2], i ? (f ? (0x03) : (0x02)) : 0x00); /* flags: interlaced, second field */ f 492 libavformat/sbgdec.c struct sbg_fade f = {0}; f 495 libavformat/sbgdec.c f.in = SBG_FADE_SILENCE; f 497 libavformat/sbgdec.c f.in = SBG_FADE_SAME; f 499 libavformat/sbgdec.c f.in = SBG_FADE_ADAPT; f 503 libavformat/sbgdec.c f.out = SBG_FADE_SILENCE; f 505 libavformat/sbgdec.c f.out = SBG_FADE_SAME; f 507 libavformat/sbgdec.c f.out = SBG_FADE_ADAPT; f 510 libavformat/sbgdec.c *fr = f; f 1041 libavformat/sbgdec.c int64_t ts1, int64_t ts2, int32_t f, int32_t a) f 1059 libavformat/sbgdec.c ts3, f, a, ts4, f, cpoints[i][1]); f 62 libavformat/sccenc.c int i, h, m, s, f; f 73 libavformat/sccenc.c f = (int)(pts % 1000) / 33; f 82 libavformat/sccenc.c if (!scc->inside && (scc->prev_h != h || scc->prev_m != m || scc->prev_s != s || scc->prev_f != f)) { f 83 libavformat/sccenc.c avio_printf(avf->pb, "\n%02d:%02d:%02d:%02d\t", h, m, s, f); f 93 libavformat/sccenc.c avio_printf(avf->pb, "\n%02d:%02d:%02d:%02d\t", h, m, s, f); f 101 libavformat/sccenc.c if (scc->inside && (scc->prev_h != h || scc->prev_m != m || scc->prev_s != s || scc->prev_f != f)) { f 110 libavformat/sccenc.c scc->prev_f = f; f 550 libavformat/segment.c long int f; f 560 libavformat/segment.c f = strtol(fstr, &tailptr, 10); f 561 libavformat/segment.c if (*tailptr || f <= 0 || f >= INT_MAX) { f 567 libavformat/segment.c (*frames)[i] = f; f 3483 libavformat/utils.c const AVBitStreamFilter *f; f 3485 libavformat/utils.c f = av_bsf_get_by_name("extract_extradata"); f 3486 libavformat/utils.c if (!f) f 3489 libavformat/utils.c if (f->codec_ids) { f 3491 libavformat/utils.c for (ids = f->codec_ids; *ids != AV_CODEC_ID_NONE; ids++) f 3502 libavformat/utils.c const AVBitStreamFilter *f; f 3505 libavformat/utils.c f = av_bsf_get_by_name("extract_extradata"); f 3506 libavformat/utils.c if (!f) f 3518 libavformat/utils.c ret = av_bsf_alloc(f, &sti->extract_extradata.bsf); f 86 libavresample/tests/avresample.c double v, f, a, ampa; f 110 libavresample/tests/avresample.c f = 100.0 + (((10000.0 - 100.0) * i) / sample_rate); f 111 libavresample/tests/avresample.c a += M_PI * f * 2.0 / sample_rate; f 138 libavresample/tests/avresample.c f = tabf1[ch] + (((tabf2[ch] - tabf1[ch]) * i) / sample_rate); f 139 libavresample/tests/avresample.c taba[ch] += M_PI * f * 2.0 / sample_rate; f 23 libavutil/arm/cpu.c #define CORE_FLAG(f) \ f 24 libavutil/arm/cpu.c (AV_CPU_FLAG_ ## f * (HAVE_ ## f ## _EXTERNAL || HAVE_ ## f ## _INLINE)) f 54 libavutil/arm/cpu.c FILE *f = fopen("/proc/self/auxv", "r"); f 57 libavutil/arm/cpu.c if (!f) f 60 libavutil/arm/cpu.c while (fread(&auxv, sizeof(auxv), 1, f) > 0) { f 68 libavutil/arm/cpu.c fclose(f); f 74 libavutil/arm/cpu.c FILE *f = fopen("/proc/cpuinfo", "r"); f 77 libavutil/arm/cpu.c if (!f) f 81 libavutil/arm/cpu.c while (fgets(buf, sizeof(buf), f)) { f 100 libavutil/arm/cpu.c fclose(f); f 54 libavutil/avsscanf.c #define shcnt(f) ((f)->shcnt + ((f)->rpos - (f)->buf)) f 56 libavutil/avsscanf.c static int fftoread(FFFILE *f) f 58 libavutil/avsscanf.c f->rpos = f->rend = f->buf + f->buf_size; f 62 libavutil/avsscanf.c static size_t ffstring_read(FFFILE *f, unsigned char *buf, size_t len) f 64 libavutil/avsscanf.c char *src = f->cookie; f 71 libavutil/avsscanf.c f->rpos = (void *)(src+len); f 72 libavutil/avsscanf.c f->rend = (void *)(src+k); f 73 libavutil/avsscanf.c f->cookie = src+k; f 78 libavutil/avsscanf.c static int ffuflow(FFFILE *f) f 81 libavutil/avsscanf.c if (!fftoread(f) && f->read(f, &c, 1)==1) return c; f 85 libavutil/avsscanf.c static void ffshlim(FFFILE *f, ptrdiff_t lim) f 87 libavutil/avsscanf.c f->shlim = lim; f 88 libavutil/avsscanf.c f->shcnt = f->buf - f->rpos; f 90 libavutil/avsscanf.c if (lim && f->rend - f->rpos > lim) f 91 libavutil/avsscanf.c f->shend = f->rpos + lim; f 93 libavutil/avsscanf.c f->shend = f->rend; f 96 libavutil/avsscanf.c static int ffshgetc(FFFILE *f) f 99 libavutil/avsscanf.c ptrdiff_t cnt = shcnt(f); f 100 libavutil/avsscanf.c if (f->shlim && cnt >= f->shlim || (c=ffuflow(f)) < 0) { f 101 libavutil/avsscanf.c f->shcnt = f->buf - f->rpos + cnt; f 102 libavutil/avsscanf.c f->shend = 0; f 106 libavutil/avsscanf.c if (f->shlim && f->rend - f->rpos > f->shlim - cnt) f 107 libavutil/avsscanf.c f->shend = f->rpos + (f->shlim - cnt); f 109 libavutil/avsscanf.c f->shend = f->rend; f 110 libavutil/avsscanf.c f->shcnt = f->buf - f->rpos + cnt; f 111 libavutil/avsscanf.c if (f->rpos[-1] != c) f->rpos[-1] = c; f 115 libavutil/avsscanf.c #define shlim(f, lim) ffshlim((f), (lim)) f 116 libavutil/avsscanf.c #define shgetc(f) (((f)->rpos != (f)->shend) ? *(f)->rpos++ : ffshgetc(f)) f 117 libavutil/avsscanf.c #define shunget(f) ((f)->shend ? (void)(f)->rpos-- : (void)0) f 138 libavutil/avsscanf.c static unsigned long long ffintscan(FFFILE *f, unsigned base, int pok, unsigned long long lim) f 148 libavutil/avsscanf.c while (av_isspace((c=shgetc(f)))); f 151 libavutil/avsscanf.c c = shgetc(f); f 154 libavutil/avsscanf.c c = shgetc(f); f 156 libavutil/avsscanf.c c = shgetc(f); f 158 libavutil/avsscanf.c shunget(f); f 159 libavutil/avsscanf.c if (pok) shunget(f); f 160 libavutil/avsscanf.c else shlim(f, 0); f 170 libavutil/avsscanf.c shunget(f); f 171 libavutil/avsscanf.c shlim(f, 0); f 177 libavutil/avsscanf.c for (x=0; c-'0'<10U && x<=UINT_MAX/10-1; c=shgetc(f)) f 179 libavutil/avsscanf.c for (y=x; c-'0'<10U && y<=ULLONG_MAX/10 && 10*y<=ULLONG_MAX-(c-'0'); c=shgetc(f)) f 184 libavutil/avsscanf.c for (x=0; val[c]<base && x<=UINT_MAX/32; c=shgetc(f)) f 186 libavutil/avsscanf.c for (y=x; val[c]<base && y<=ULLONG_MAX>>bs; c=shgetc(f)) f 189 libavutil/avsscanf.c for (x=0; val[c]<base && x<=UINT_MAX/36-1; c=shgetc(f)) f 191 libavutil/avsscanf.c for (y=x; val[c]<base && y<=ULLONG_MAX/base && base*y<=ULLONG_MAX-val[c]; c=shgetc(f)) f 195 libavutil/avsscanf.c for (; val[c]<base; c=shgetc(f)); f 201 libavutil/avsscanf.c shunget(f); f 214 libavutil/avsscanf.c static long long scanexp(FFFILE *f, int pok) f 221 libavutil/avsscanf.c c = shgetc(f); f 224 libavutil/avsscanf.c c = shgetc(f); f 225 libavutil/avsscanf.c if (c-'0'>=10U && pok) shunget(f); f 228 libavutil/avsscanf.c shunget(f); f 231 libavutil/avsscanf.c for (x=0; c-'0'<10U && x<INT_MAX/10; c = shgetc(f)) f 233 libavutil/avsscanf.c for (y=x; c-'0'<10U && y<LLONG_MAX/100; c = shgetc(f)) f 235 libavutil/avsscanf.c for (; c-'0'<10U; c = shgetc(f)); f 236 libavutil/avsscanf.c shunget(f); f 245 libavutil/avsscanf.c static double decfloat(FFFILE *f, int c, int bits, int emin, int sign, int pok) f 268 libavutil/avsscanf.c for (; c=='0'; c = shgetc(f)) gotdig=1; f 271 libavutil/avsscanf.c for (c = shgetc(f); c=='0'; c = shgetc(f)) gotdig=1, lrp--; f 275 libavutil/avsscanf.c for (; c-'0'<10U || c=='.'; c = shgetc(f)) { f 301 libavutil/avsscanf.c e10 = scanexp(f, pok); f 304 libavutil/avsscanf.c shunget(f); f 306 libavutil/avsscanf.c shlim(f, 0); f 313 libavutil/avsscanf.c shunget(f); f 317 libavutil/avsscanf.c shlim(f, 0); f 497 libavutil/avsscanf.c static double hexfloat(FFFILE *f, int bits, int emin, int sign, int pok) f 510 libavutil/avsscanf.c c = shgetc(f); f 513 libavutil/avsscanf.c for (; c=='0'; c = shgetc(f)) f 518 libavutil/avsscanf.c c = shgetc(f); f 520 libavutil/avsscanf.c for (rp=0; c=='0'; c = shgetc(f), rp--) gotdig = 1; f 523 libavutil/avsscanf.c for (; c-'0'<10U || (c|32)-'a'<6U || c=='.'; c = shgetc(f)) { f 544 libavutil/avsscanf.c shunget(f); f 546 libavutil/avsscanf.c shunget(f); f 547 libavutil/avsscanf.c if (gotrad) shunget(f); f 549 libavutil/avsscanf.c shlim(f, 0); f 556 libavutil/avsscanf.c e2 = scanexp(f, pok); f 559 libavutil/avsscanf.c shunget(f); f 561 libavutil/avsscanf.c shlim(f, 0); f 567 libavutil/avsscanf.c shunget(f); f 610 libavutil/avsscanf.c static double fffloatscan(FFFILE *f, int prec, int pok) f 635 libavutil/avsscanf.c while (av_isspace((c = shgetc(f)))); f 639 libavutil/avsscanf.c c = shgetc(f); f 643 libavutil/avsscanf.c if (i<7) c = shgetc(f); f 646 libavutil/avsscanf.c shunget(f); f 647 libavutil/avsscanf.c if (pok) for (; i>3; i--) shunget(f); f 652 libavutil/avsscanf.c if (i<2) c = shgetc(f); f 654 libavutil/avsscanf.c if (shgetc(f) != '(') { f 655 libavutil/avsscanf.c shunget(f); f 659 libavutil/avsscanf.c c = shgetc(f); f 663 libavutil/avsscanf.c shunget(f); f 666 libavutil/avsscanf.c shlim(f, 0); f 669 libavutil/avsscanf.c while (i--) shunget(f); f 676 libavutil/avsscanf.c shunget(f); f 678 libavutil/avsscanf.c shlim(f, 0); f 683 libavutil/avsscanf.c c = shgetc(f); f 685 libavutil/avsscanf.c return hexfloat(f, bits, emin, sign, pok); f 686 libavutil/avsscanf.c shunget(f); f 690 libavutil/avsscanf.c return decfloat(f, c, bits, emin, sign, pok); f 727 libavutil/avsscanf.c static int ff_vfscanf(FFFILE *f, const char *fmt, va_list ap) f 748 libavutil/avsscanf.c shlim(f, 0); f 749 libavutil/avsscanf.c while (av_isspace(shgetc(f))); f 750 libavutil/avsscanf.c shunget(f); f 751 libavutil/avsscanf.c pos += shcnt(f); f 755 libavutil/avsscanf.c shlim(f, 0); f 758 libavutil/avsscanf.c while (av_isspace((c=shgetc(f)))); f 760 libavutil/avsscanf.c c = shgetc(f); f 763 libavutil/avsscanf.c shunget(f); f 767 libavutil/avsscanf.c pos += shcnt(f); f 839 libavutil/avsscanf.c shlim(f, 0); f 840 libavutil/avsscanf.c while (av_isspace(shgetc(f))); f 841 libavutil/avsscanf.c shunget(f); f 842 libavutil/avsscanf.c pos += shcnt(f); f 845 libavutil/avsscanf.c shlim(f, width); f 846 libavutil/avsscanf.c if (shgetc(f) < 0) goto input_fail; f 847 libavutil/avsscanf.c shunget(f); f 882 libavutil/avsscanf.c while (scanset[(c=shgetc(f))+1]) f 885 libavutil/avsscanf.c while (scanset[(c=shgetc(f))+1]); f 887 libavutil/avsscanf.c shunget(f); f 888 libavutil/avsscanf.c if (!shcnt(f)) goto match_fail; f 889 libavutil/avsscanf.c if (t == 'c' && shcnt(f) != width) goto match_fail; f 909 libavutil/avsscanf.c x = ffintscan(f, base, 0, ULLONG_MAX); f 910 libavutil/avsscanf.c if (!shcnt(f)) f 921 libavutil/avsscanf.c y = fffloatscan(f, size, 0); f 922 libavutil/avsscanf.c if (!shcnt(f)) f 940 libavutil/avsscanf.c pos += shcnt(f); f 954 libavutil/avsscanf.c FFFILE f = { f 959 libavutil/avsscanf.c return ff_vfscanf(&f, fmt, ap); f 36 libavutil/cast5.c f = ((S1[IA(I)] + S2[IB(I)]) ^ S3[IC(I)]) - S4[ID(I)]; \ f 37 libavutil/cast5.c l = f ^ l; \ f 43 libavutil/cast5.c f = ((S1[IA(I)] - S2[IB(I)]) + S3[IC(I)]) ^ S4[ID(I)]; \ f 44 libavutil/cast5.c l = f ^ l; \ f 50 libavutil/cast5.c f = ((S1[IA(I)] ^ S2[IB(I)]) - S3[IC(I)]) + S4[ID(I)]; \ f 51 libavutil/cast5.c l = f ^ l; \ f 394 libavutil/cast5.c uint32_t r, l, f, I; f 421 libavutil/cast5.c uint32_t f, I, r, l; f 30 libavutil/des.c #define T(a, b, c, d, e, f, g, h) 64 - a, 64 - b, 64 - c, 64 - d, 64 - e, 64 - f, 64 - g, 64 - h f 58 libavutil/des.c #define T(a, b, c, d, e, f, g) 64 - a, 64 - b, 64 - c, 64 - d, 64 - e, 64 - f, 64 - g f 71 libavutil/des.c #define T(a, b, c, d, e, f) 56 - a, 56 - b, 56 - c, 56 - d, 56 - e, 56 - f f 223 libavutil/eval.c double f = eval_expr(p, e->param[2]); f 224 libavutil/eval.c return v0 + (v1 - v0) * f; f 29 libavutil/fifo.c AVFifoBuffer *f; f 32 libavutil/fifo.c f = av_mallocz(sizeof(AVFifoBuffer)); f 33 libavutil/fifo.c if (!f) { f 37 libavutil/fifo.c f->buffer = buffer; f 38 libavutil/fifo.c f->end = f->buffer + size; f 39 libavutil/fifo.c av_fifo_reset(f); f 40 libavutil/fifo.c return f; f 55 libavutil/fifo.c void av_fifo_free(AVFifoBuffer *f) f 57 libavutil/fifo.c if (f) { f 58 libavutil/fifo.c av_freep(&f->buffer); f 59 libavutil/fifo.c av_free(f); f 63 libavutil/fifo.c void av_fifo_freep(AVFifoBuffer **f) f 65 libavutil/fifo.c if (f) { f 66 libavutil/fifo.c av_fifo_free(*f); f 67 libavutil/fifo.c *f = NULL; f 71 libavutil/fifo.c void av_fifo_reset(AVFifoBuffer *f) f 73 libavutil/fifo.c f->wptr = f->rptr = f->buffer; f 74 libavutil/fifo.c f->wndx = f->rndx = 0; f 77 libavutil/fifo.c int av_fifo_size(const AVFifoBuffer *f) f 79 libavutil/fifo.c return (uint32_t)(f->wndx - f->rndx); f 82 libavutil/fifo.c int av_fifo_space(const AVFifoBuffer *f) f 84 libavutil/fifo.c return f->end - f->buffer - av_fifo_size(f); f 87 libavutil/fifo.c int av_fifo_realloc2(AVFifoBuffer *f, unsigned int new_size) f 89 libavutil/fifo.c unsigned int old_size = f->end - f->buffer; f 92 libavutil/fifo.c int len = av_fifo_size(f); f 97 libavutil/fifo.c av_fifo_generic_read(f, f2->buffer, len, NULL); f 100 libavutil/fifo.c av_free(f->buffer); f 101 libavutil/fifo.c *f = *f2; f 107 libavutil/fifo.c int av_fifo_grow(AVFifoBuffer *f, unsigned int size) f 109 libavutil/fifo.c unsigned int old_size = f->end - f->buffer; f 110 libavutil/fifo.c if(size + (unsigned)av_fifo_size(f) < size) f 113 libavutil/fifo.c size += av_fifo_size(f); f 116 libavutil/fifo.c return av_fifo_realloc2(f, FFMAX(size, 2*old_size)); f 122 libavutil/fifo.c int av_fifo_generic_write(AVFifoBuffer *f, void *src, int size, f 126 libavutil/fifo.c uint32_t wndx= f->wndx; f 127 libavutil/fifo.c uint8_t *wptr= f->wptr; f 130 libavutil/fifo.c int len = FFMIN(f->end - wptr, size); f 141 libavutil/fifo.c if (wptr >= f->end) f 142 libavutil/fifo.c wptr = f->buffer; f 146 libavutil/fifo.c f->wndx= wndx; f 147 libavutil/fifo.c f->wptr= wptr; f 151 libavutil/fifo.c int av_fifo_generic_peek_at(AVFifoBuffer *f, void *dest, int offset, int buf_size, void (*func)(void*, void*, int)) f 153 libavutil/fifo.c uint8_t *rptr = f->rptr; f 161 libavutil/fifo.c av_assert2(buf_size + (unsigned)offset <= f->wndx - f->rndx); f 163 libavutil/fifo.c if (offset >= f->end - rptr) f 164 libavutil/fifo.c rptr += offset - (f->end - f->buffer); f 171 libavutil/fifo.c if (rptr >= f->end) f 172 libavutil/fifo.c rptr -= f->end - f->buffer; f 174 libavutil/fifo.c len = FFMIN(f->end - rptr, buf_size); f 189 libavutil/fifo.c int av_fifo_generic_peek(AVFifoBuffer *f, void *dest, int buf_size, f 193 libavutil/fifo.c uint8_t *rptr = f->rptr; f 196 libavutil/fifo.c int len = FFMIN(f->end - rptr, buf_size); f 205 libavutil/fifo.c if (rptr >= f->end) f 206 libavutil/fifo.c rptr -= f->end - f->buffer; f 213 libavutil/fifo.c int av_fifo_generic_read(AVFifoBuffer *f, void *dest, int buf_size, f 218 libavutil/fifo.c int len = FFMIN(f->end - f->rptr, buf_size); f 220 libavutil/fifo.c func(dest, f->rptr, len); f 222 libavutil/fifo.c memcpy(dest, f->rptr, len); f 226 libavutil/fifo.c av_fifo_drain(f, len); f 233 libavutil/fifo.c void av_fifo_drain(AVFifoBuffer *f, int size) f 235 libavutil/fifo.c av_assert2(av_fifo_size(f) >= size); f 236 libavutil/fifo.c f->rptr += size; f 237 libavutil/fifo.c if (f->rptr >= f->end) f 238 libavutil/fifo.c f->rptr -= f->end - f->buffer; f 239 libavutil/fifo.c f->rndx += size; f 56 libavutil/fifo.h void av_fifo_free(AVFifoBuffer *f); f 62 libavutil/fifo.h void av_fifo_freep(AVFifoBuffer **f); f 68 libavutil/fifo.h void av_fifo_reset(AVFifoBuffer *f); f 76 libavutil/fifo.h int av_fifo_size(const AVFifoBuffer *f); f 84 libavutil/fifo.h int av_fifo_space(const AVFifoBuffer *f); f 95 libavutil/fifo.h int av_fifo_generic_peek_at(AVFifoBuffer *f, void *dest, int offset, int buf_size, void (*func)(void*, void*, int)); f 105 libavutil/fifo.h int av_fifo_generic_peek(AVFifoBuffer *f, void *dest, int buf_size, void (*func)(void*, void*, int)); f 114 libavutil/fifo.h int av_fifo_generic_read(AVFifoBuffer *f, void *dest, int buf_size, void (*func)(void*, void*, int)); f 129 libavutil/fifo.h int av_fifo_generic_write(AVFifoBuffer *f, void *src, int size, int (*func)(void*, void*, int)); f 139 libavutil/fifo.h int av_fifo_realloc2(AVFifoBuffer *f, unsigned int size); f 150 libavutil/fifo.h int av_fifo_grow(AVFifoBuffer *f, unsigned int additional_space); f 157 libavutil/fifo.h void av_fifo_drain(AVFifoBuffer *f, int size); f 169 libavutil/fifo.h static inline uint8_t *av_fifo_peek2(const AVFifoBuffer *f, int offs) f 171 libavutil/fifo.h uint8_t *ptr = f->rptr + offs; f 172 libavutil/fifo.h if (ptr >= f->end) f 173 libavutil/fifo.h ptr = f->buffer + (ptr - f->end); f 174 libavutil/fifo.h else if (ptr < f->buffer) f 175 libavutil/fifo.h ptr = f->end - (f->buffer - ptr); f 55 libavutil/frame.c int av_frame_set_qp_table(AVFrame *f, AVBufferRef *buf, int stride, int qp_type) f 62 libavutil/frame.c av_buffer_unref(&f->qp_table_buf); f 64 libavutil/frame.c f->qp_table_buf = buf; f 65 libavutil/frame.c f->qscale_table = buf->data; f 66 libavutil/frame.c f->qstride = stride; f 67 libavutil/frame.c f->qscale_type = qp_type; f 70 libavutil/frame.c av_frame_remove_side_data(f, AV_FRAME_DATA_QP_TABLE_PROPERTIES); f 71 libavutil/frame.c av_frame_remove_side_data(f, AV_FRAME_DATA_QP_TABLE_DATA); f 74 libavutil/frame.c if (!av_frame_new_side_data_from_buf(f, AV_FRAME_DATA_QP_TABLE_DATA, ref)) { f 79 libavutil/frame.c sd = av_frame_new_side_data(f, AV_FRAME_DATA_QP_TABLE_PROPERTIES, f 91 libavutil/frame.c int8_t *av_frame_get_qp_table(AVFrame *f, int *stride, int *type) f 99 libavutil/frame.c if (f->qp_table_buf) { f 100 libavutil/frame.c *stride = f->qstride; f 101 libavutil/frame.c *type = f->qscale_type; f 102 libavutil/frame.c buf = f->qp_table_buf; f 107 libavutil/frame.c sd = av_frame_get_side_data(f, AV_FRAME_DATA_QP_TABLE_PROPERTIES); f 111 libavutil/frame.c sd = av_frame_get_side_data(f, AV_FRAME_DATA_QP_TABLE_DATA); f 725 libavutil/frame.h int8_t *av_frame_get_qp_table(AVFrame *f, int *stride, int *type); f 727 libavutil/frame.h int av_frame_set_qp_table(AVFrame *f, AVBufferRef *buf, int stride, int type); f 1339 libavutil/hwcontext_vulkan.c AVVkFrame *f = (AVVkFrame *)data; f 1344 libavutil/hwcontext_vulkan.c vulkan_free_internal(f->internal); f 1347 libavutil/hwcontext_vulkan.c vkDestroyImage(hwctx->act_dev, f->img[i], hwctx->alloc); f 1348 libavutil/hwcontext_vulkan.c vkFreeMemory(hwctx->act_dev, f->mem[i], hwctx->alloc); f 1349 libavutil/hwcontext_vulkan.c vkDestroySemaphore(hwctx->act_dev, f->sem[i], hwctx->alloc); f 1352 libavutil/hwcontext_vulkan.c av_free(f); f 1355 libavutil/hwcontext_vulkan.c static int alloc_bind_mem(AVHWFramesContext *hwfc, AVVkFrame *f, f 1371 libavutil/hwcontext_vulkan.c .image = f->img[i], f 1387 libavutil/hwcontext_vulkan.c if (f->tiling == VK_IMAGE_TILING_LINEAR) f 1395 libavutil/hwcontext_vulkan.c ded_alloc.image = f->img[i]; f 1399 libavutil/hwcontext_vulkan.c f->tiling == VK_IMAGE_TILING_LINEAR ? f 1403 libavutil/hwcontext_vulkan.c &f->flags, &f->mem[i]))) f 1406 libavutil/hwcontext_vulkan.c f->size[i] = req.memoryRequirements.size; f 1408 libavutil/hwcontext_vulkan.c bind_info[i].image = f->img[i]; f 1409 libavutil/hwcontext_vulkan.c bind_info[i].memory = f->mem[i]; f 1525 libavutil/hwcontext_vulkan.c AVVkFrame *f = av_vk_frame_alloc(); f 1526 libavutil/hwcontext_vulkan.c if (!f) { f 1561 libavutil/hwcontext_vulkan.c hwctx->alloc, &f->img[i]); f 1571 libavutil/hwcontext_vulkan.c hwctx->alloc, &f->sem[i]); f 1578 libavutil/hwcontext_vulkan.c f->layout[i] = image_create_info.initialLayout; f 1579 libavutil/hwcontext_vulkan.c f->access[i] = 0x0; f 1582 libavutil/hwcontext_vulkan.c f->flags = 0x0; f 1583 libavutil/hwcontext_vulkan.c f->tiling = tiling; f 1585 libavutil/hwcontext_vulkan.c *frame = f; f 1589 libavutil/hwcontext_vulkan.c vulkan_frame_free(hwfc, (uint8_t *)f); f 1634 libavutil/hwcontext_vulkan.c AVVkFrame *f; f 1662 libavutil/hwcontext_vulkan.c err = create_frame(hwfc, &f, hwctx->tiling, hwctx->usage, f 1667 libavutil/hwcontext_vulkan.c err = alloc_bind_mem(hwfc, f, eminfo, sizeof(*eminfo)); f 1671 libavutil/hwcontext_vulkan.c err = prepare_frame(hwfc, &fp->conv_ctx, f, PREP_MODE_WRITE); f 1675 libavutil/hwcontext_vulkan.c avbuf = av_buffer_create((uint8_t *)f, sizeof(AVVkFrame), f 1683 libavutil/hwcontext_vulkan.c vulkan_frame_free(hwfc, (uint8_t *)f); f 1699 libavutil/hwcontext_vulkan.c AVVkFrame *f; f 1730 libavutil/hwcontext_vulkan.c err = create_frame(hwfc, &f, hwctx->tiling, hwctx->usage, f 1735 libavutil/hwcontext_vulkan.c vulkan_frame_free(hwfc, (uint8_t *)f); f 1830 libavutil/hwcontext_vulkan.c AVVkFrame *f = (AVVkFrame *)src->data[0]; f 1845 libavutil/hwcontext_vulkan.c if (!(f->flags & VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT) || f 1846 libavutil/hwcontext_vulkan.c !(f->tiling == VK_IMAGE_TILING_LINEAR)) { f 1857 libavutil/hwcontext_vulkan.c ret = vkMapMemory(hwctx->act_dev, f->mem[i], 0, f 1870 libavutil/hwcontext_vulkan.c !(f->flags & VK_MEMORY_PROPERTY_HOST_COHERENT_BIT)) { f 1875 libavutil/hwcontext_vulkan.c map_mem_ranges[i].memory = f->mem[i]; f 1893 libavutil/hwcontext_vulkan.c vkGetImageSubresourceLayout(hwctx->act_dev, f->img[i], &sub, &layout); f 1897 libavutil/hwcontext_vulkan.c map->frame = f; f 1909 libavutil/hwcontext_vulkan.c vkUnmapMemory(hwctx->act_dev, f->mem[i]); f 1960 libavutil/hwcontext_vulkan.c AVVkFrame *f; f 1984 libavutil/hwcontext_vulkan.c if (!(f = av_vk_frame_alloc())) { f 1990 libavutil/hwcontext_vulkan.c f->tiling = has_modifiers ? VK_IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT : f 2027 libavutil/hwcontext_vulkan.c .tiling = f->tiling, f 2047 libavutil/hwcontext_vulkan.c hwctx->alloc, &f->img[i]); f 2056 libavutil/hwcontext_vulkan.c hwctx->alloc, &f->sem[i]); f 2068 libavutil/hwcontext_vulkan.c f->layout[i] = image_create_info.initialLayout; f 2069 libavutil/hwcontext_vulkan.c f->access[i] = 0x0; f 2108 libavutil/hwcontext_vulkan.c .image = f->img[i], f 2123 libavutil/hwcontext_vulkan.c ded_alloc.image = f->img[i]; f 2128 libavutil/hwcontext_vulkan.c &f->flags, &f->mem[i]); f 2134 libavutil/hwcontext_vulkan.c f->size[i] = desc->objects[i].size; f 2150 libavutil/hwcontext_vulkan.c bind_info[bind_counts].image = f->img[i]; f 2151 libavutil/hwcontext_vulkan.c bind_info[bind_counts].memory = f->mem[desc->layers[i].planes[j].object_index]; f 2168 libavutil/hwcontext_vulkan.c err = prepare_frame(hwfc, &fp->conv_ctx, f, PREP_MODE_RO_SHADER); f 2172 libavutil/hwcontext_vulkan.c *frame = f; f 2178 libavutil/hwcontext_vulkan.c vkDestroyImage(hwctx->act_dev, f->img[i], hwctx->alloc); f 2179 libavutil/hwcontext_vulkan.c vkDestroySemaphore(hwctx->act_dev, f->sem[i], hwctx->alloc); f 2182 libavutil/hwcontext_vulkan.c vkFreeMemory(hwctx->act_dev, f->mem[i], hwctx->alloc); f 2184 libavutil/hwcontext_vulkan.c av_free(f); f 2193 libavutil/hwcontext_vulkan.c AVVkFrame *f; f 2196 libavutil/hwcontext_vulkan.c err = vulkan_map_from_drm_frame_desc(hwfc, &f, f 2202 libavutil/hwcontext_vulkan.c dst->data[0] = (uint8_t *)f; f 2210 libavutil/hwcontext_vulkan.c map->frame = f; f 2223 libavutil/hwcontext_vulkan.c vulkan_frame_free(hwfc->device_ctx->hwctx, (uint8_t *)f); f 2526 libavutil/hwcontext_vulkan.c AVVkFrame *f = (AVVkFrame *)src->data[0]; f 2540 libavutil/hwcontext_vulkan.c err = prepare_frame(hwfc, &fp->conv_ctx, f, PREP_MODE_EXTERNAL_EXPORT); f 2550 libavutil/hwcontext_vulkan.c ret = pfn_vkGetImageDrmFormatModifierPropertiesEXT(hwctx->act_dev, f->img[0], f 2559 libavutil/hwcontext_vulkan.c for (int i = 0; (i < planes) && (f->mem[i]); i++) { f 2562 libavutil/hwcontext_vulkan.c .memory = f->mem[i], f 2575 libavutil/hwcontext_vulkan.c drm_desc->objects[i].size = f->size[i]; f 2600 libavutil/hwcontext_vulkan.c if (f->tiling == VK_IMAGE_TILING_OPTIMAL) f 2603 libavutil/hwcontext_vulkan.c vkGetImageSubresourceLayout(hwctx->act_dev, f->img[i], &sub, &layout); f 2870 libavutil/hwcontext_vulkan.c static int transfer_image_buf(AVHWFramesContext *hwfc, const AVFrame *f, f 2875 libavutil/hwcontext_vulkan.c AVVkFrame *frame = (AVVkFrame *)f->data[0]; f 2972 libavutil/hwcontext_vulkan.c if (!f->buf[ref]) f 2974 libavutil/hwcontext_vulkan.c if ((err = add_buf_dep_exec_ctx(hwfc, ectx, &f->buf[ref], 1))) f 2990 libavutil/hwcontext_vulkan.c AVVkFrame *f = (AVVkFrame *)dst->data[0]; f 3008 libavutil/hwcontext_vulkan.c if (f->tiling == VK_IMAGE_TILING_LINEAR && f 3009 libavutil/hwcontext_vulkan.c f->flags & VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT) { f 3179 libavutil/hwcontext_vulkan.c AVVkFrame *f = (AVVkFrame *)src->data[0]; f 3192 libavutil/hwcontext_vulkan.c if (f->tiling == VK_IMAGE_TILING_LINEAR && f 3193 libavutil/hwcontext_vulkan.c f->flags & VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT) { f 29 libavutil/intfloat.h float f; f 34 libavutil/intfloat.h double f; f 44 libavutil/intfloat.h return v.f; f 50 libavutil/intfloat.h static av_always_inline uint32_t av_float2int(float f) f 53 libavutil/intfloat.h v.f = f; f 64 libavutil/intfloat.h return v.f; f 70 libavutil/intfloat.h static av_always_inline uint64_t av_double2int(double f) f 73 libavutil/intfloat.h v.f = f; f 1941 libavutil/opt.c float f; f 1978 libavutil/opt.c f = o->default_val.dbl; f 1979 libavutil/opt.c d2 = f; f 84 libavutil/ppc/util_altivec.h #define TRANSPOSE8(a,b,c,d,e,f,g,h) \ f 91 libavutil/ppc/util_altivec.h C1 = vec_mergeh (b, f); \ f 92 libavutil/ppc/util_altivec.h D1 = vec_mergel (b, f); \ f 112 libavutil/ppc/util_altivec.h f = vec_mergel (C2, G2); \ f 90 libavutil/ripemd.c #define ROUND128_0_TO_15(a,b,c,d,e,f,g,h) \ f 92 libavutil/ripemd.c e = rol(e + ((((f ^ g) & h) ^ g) + block[WB[n]] + KB[0]), ROTB[n]); \ f 95 libavutil/ripemd.c #define ROUND128_16_TO_31(a,b,c,d,e,f,g,h) \ f 97 libavutil/ripemd.c e = rol(e + (((~g | f) ^ h) + block[WB[n]] + KB[1]), ROTB[n]); \ f 100 libavutil/ripemd.c #define ROUND128_32_TO_47(a,b,c,d,e,f,g,h) \ f 102 libavutil/ripemd.c e = rol(e + ((((g ^ h) & f) ^ h) + block[WB[n]] + KB[2]), ROTB[n]); \ f 105 libavutil/ripemd.c #define ROUND128_48_TO_63(a,b,c,d,e,f,g,h) \ f 107 libavutil/ripemd.c e = rol(e + (( f ^ g ^ h) + block[WB[n]]), ROTB[n]); \ f 111 libavutil/ripemd.c ROUND128_0_TO_15(a,b,c,d,e,f,g,h); \ f 112 libavutil/ripemd.c ROUND128_0_TO_15(d,a,b,c,h,e,f,g); \ f 113 libavutil/ripemd.c ROUND128_0_TO_15(c,d,a,b,g,h,e,f); \ f 114 libavutil/ripemd.c ROUND128_0_TO_15(b,c,d,a,f,g,h,e) f 117 libavutil/ripemd.c ROUND128_16_TO_31(a,b,c,d,e,f,g,h); \ f 118 libavutil/ripemd.c ROUND128_16_TO_31(d,a,b,c,h,e,f,g); \ f 119 libavutil/ripemd.c ROUND128_16_TO_31(c,d,a,b,g,h,e,f); \ f 120 libavutil/ripemd.c ROUND128_16_TO_31(b,c,d,a,f,g,h,e) f 123 libavutil/ripemd.c ROUND128_32_TO_47(a,b,c,d,e,f,g,h); \ f 124 libavutil/ripemd.c ROUND128_32_TO_47(d,a,b,c,h,e,f,g); \ f 125 libavutil/ripemd.c ROUND128_32_TO_47(c,d,a,b,g,h,e,f); \ f 126 libavutil/ripemd.c ROUND128_32_TO_47(b,c,d,a,f,g,h,e) f 129 libavutil/ripemd.c ROUND128_48_TO_63(a,b,c,d,e,f,g,h); \ f 130 libavutil/ripemd.c ROUND128_48_TO_63(d,a,b,c,h,e,f,g); \ f 131 libavutil/ripemd.c ROUND128_48_TO_63(c,d,a,b,g,h,e,f); \ f 132 libavutil/ripemd.c ROUND128_48_TO_63(b,c,d,a,f,g,h,e) f 136 libavutil/ripemd.c uint32_t a, b, c, d, e, f, g, h, av_unused t; f 141 libavutil/ripemd.c b = f = state[1]; f 151 libavutil/ripemd.c ROUND128_0_TO_15(a,b,c,d,e,f,g,h); f 153 libavutil/ripemd.c t = h; h = g; g = f; f = e; e = t; f 157 libavutil/ripemd.c ROUND128_16_TO_31(a,b,c,d,e,f,g,h); f 159 libavutil/ripemd.c t = h; h = g; g = f; f = e; e = t; f 163 libavutil/ripemd.c ROUND128_32_TO_47(a,b,c,d,e,f,g,h); f 165 libavutil/ripemd.c t = h; h = g; g = f; f = e; e = t; f 169 libavutil/ripemd.c ROUND128_48_TO_63(a,b,c,d,e,f,g,h); f 171 libavutil/ripemd.c t = h; h = g; g = f; f = e; e = t; f 186 libavutil/ripemd.c state[2] = state[3] + a + f; f 193 libavutil/ripemd.c uint32_t a, b, c, d, e, f, g, h, av_unused t; f 198 libavutil/ripemd.c e = state[4]; f = state[5]; g = state[6]; h = state[7]; f 206 libavutil/ripemd.c ROUND128_0_TO_15(a,b,c,d,e,f,g,h); f 208 libavutil/ripemd.c t = h; h = g; g = f; f = e; e = t; f 213 libavutil/ripemd.c ROUND128_16_TO_31(a,b,c,d,e,f,g,h); f 215 libavutil/ripemd.c t = h; h = g; g = f; f = e; e = t; f 217 libavutil/ripemd.c FFSWAP(uint32_t, b, f); f 220 libavutil/ripemd.c ROUND128_32_TO_47(a,b,c,d,e,f,g,h); f 222 libavutil/ripemd.c t = h; h = g; g = f; f = e; e = t; f 227 libavutil/ripemd.c ROUND128_48_TO_63(a,b,c,d,e,f,g,h); f 229 libavutil/ripemd.c t = h; h = g; g = f; f = e; e = t; f 238 libavutil/ripemd.c FFSWAP(uint32_t, b, f); f 248 libavutil/ripemd.c state[4] += e; state[5] += f; state[6] += g; state[7] += h; f 256 libavutil/ripemd.c #define ROUND160_0_TO_15(a,b,c,d,e,f,g,h,i,j) \ f 258 libavutil/ripemd.c f = rol(f + (((~i | h) ^ g) + block[WB[n]] + KB[0]), ROTB[n]) + j; \ f 261 libavutil/ripemd.c #define ROUND160_16_TO_31(a,b,c,d,e,f,g,h,i,j) \ f 263 libavutil/ripemd.c f = rol(f + ((((g ^ h) & i) ^ h) + block[WB[n]] + KB[1]), ROTB[n]) + j; \ f 266 libavutil/ripemd.c #define ROUND160_32_TO_47(a,b,c,d,e,f,g,h,i,j) \ f 268 libavutil/ripemd.c f = rol(f + (((~h | g) ^ i) + block[WB[n]] + KB[2]), ROTB[n]) + j; \ f 271 libavutil/ripemd.c #define ROUND160_48_TO_63(a,b,c,d,e,f,g,h,i,j) \ f 273 libavutil/ripemd.c f = rol(f + ((((h ^ i) & g) ^ i) + block[WB[n]] + KB[3]), ROTB[n]) + j; \ f 276 libavutil/ripemd.c #define ROUND160_64_TO_79(a,b,c,d,e,f,g,h,i,j) \ f 278 libavutil/ripemd.c f = rol(f + (( g ^ h ^ i) + block[WB[n]]), ROTB[n]) + j; \ f 282 libavutil/ripemd.c ROUND160_0_TO_15(a,b,c,d,e,f,g,h,i,j); \ f 283 libavutil/ripemd.c ROUND160_0_TO_15(e,a,b,c,d,j,f,g,h,i); \ f 284 libavutil/ripemd.c ROUND160_0_TO_15(d,e,a,b,c,i,j,f,g,h); \ f 285 libavutil/ripemd.c ROUND160_0_TO_15(c,d,e,a,b,h,i,j,f,g); \ f 286 libavutil/ripemd.c ROUND160_0_TO_15(b,c,d,e,a,g,h,i,j,f) f 289 libavutil/ripemd.c ROUND160_16_TO_31(e,a,b,c,d,j,f,g,h,i); \ f 290 libavutil/ripemd.c ROUND160_16_TO_31(d,e,a,b,c,i,j,f,g,h); \ f 291 libavutil/ripemd.c ROUND160_16_TO_31(c,d,e,a,b,h,i,j,f,g); \ f 292 libavutil/ripemd.c ROUND160_16_TO_31(b,c,d,e,a,g,h,i,j,f); \ f 293 libavutil/ripemd.c ROUND160_16_TO_31(a,b,c,d,e,f,g,h,i,j) f 296 libavutil/ripemd.c ROUND160_32_TO_47(d,e,a,b,c,i,j,f,g,h); \ f 297 libavutil/ripemd.c ROUND160_32_TO_47(c,d,e,a,b,h,i,j,f,g); \ f 298 libavutil/ripemd.c ROUND160_32_TO_47(b,c,d,e,a,g,h,i,j,f); \ f 299 libavutil/ripemd.c ROUND160_32_TO_47(a,b,c,d,e,f,g,h,i,j); \ f 300 libavutil/ripemd.c ROUND160_32_TO_47(e,a,b,c,d,j,f,g,h,i) f 303 libavutil/ripemd.c ROUND160_48_TO_63(c,d,e,a,b,h,i,j,f,g); \ f 304 libavutil/ripemd.c ROUND160_48_TO_63(b,c,d,e,a,g,h,i,j,f); \ f 305 libavutil/ripemd.c ROUND160_48_TO_63(a,b,c,d,e,f,g,h,i,j); \ f 306 libavutil/ripemd.c ROUND160_48_TO_63(e,a,b,c,d,j,f,g,h,i); \ f 307 libavutil/ripemd.c ROUND160_48_TO_63(d,e,a,b,c,i,j,f,g,h) f 310 libavutil/ripemd.c ROUND160_64_TO_79(b,c,d,e,a,g,h,i,j,f); \ f 311 libavutil/ripemd.c ROUND160_64_TO_79(a,b,c,d,e,f,g,h,i,j); \ f 312 libavutil/ripemd.c ROUND160_64_TO_79(e,a,b,c,d,j,f,g,h,i); \ f 313 libavutil/ripemd.c ROUND160_64_TO_79(d,e,a,b,c,i,j,f,g,h); \ f 314 libavutil/ripemd.c ROUND160_64_TO_79(c,d,e,a,b,h,i,j,f,g) f 318 libavutil/ripemd.c uint32_t a, b, c, d, e, f, g, h, i, j, av_unused t; f 322 libavutil/ripemd.c a = f = state[0]; f 334 libavutil/ripemd.c ROUND160_0_TO_15(a,b,c,d,e,f,g,h,i,j); f 336 libavutil/ripemd.c t = j; j = i; i = h; h = g; g = f; f = t; f 340 libavutil/ripemd.c ROUND160_16_TO_31(a,b,c,d,e,f,g,h,i,j); f 342 libavutil/ripemd.c t = j; j = i; i = h; h = g; g = f; f = t; f 346 libavutil/ripemd.c ROUND160_32_TO_47(a,b,c,d,e,f,g,h,i,j); f 348 libavutil/ripemd.c t = j; j = i; i = h; h = g; g = f; f = t; f 352 libavutil/ripemd.c ROUND160_48_TO_63(a,b,c,d,e,f,g,h,i,j); f 354 libavutil/ripemd.c t = j; j = i; i = h; h = g; g = f; f = t; f 358 libavutil/ripemd.c ROUND160_64_TO_79(a,b,c,d,e,f,g,h,i,j); f 360 libavutil/ripemd.c t = j; j = i; i = h; h = g; g = f; f = t; f 365 libavutil/ripemd.c ROUND160_0_TO_15(a,b,c,d,e,f,g,h,i,j); f 368 libavutil/ripemd.c ROUND160_16_TO_31(e,a,b,c,d,j,f,g,h,i); f 371 libavutil/ripemd.c ROUND160_32_TO_47(d,e,a,b,c,i,j,f,g,h); f 374 libavutil/ripemd.c ROUND160_48_TO_63(c,d,e,a,b,h,i,j,f,g); f 377 libavutil/ripemd.c ROUND160_64_TO_79(b,c,d,e,a,g,h,i,j,f); f 382 libavutil/ripemd.c state[2] = state[3] + e + f; f 390 libavutil/ripemd.c uint32_t a, b, c, d, e, f, g, h, i, j, av_unused t; f 395 libavutil/ripemd.c f = state[5]; g = state[6]; h = state[7]; i = state[8]; j = state[9]; f 403 libavutil/ripemd.c ROUND160_0_TO_15(a,b,c,d,e,f,g,h,i,j); f 405 libavutil/ripemd.c t = j; j = i; i = h; h = g; g = f; f = t; f 410 libavutil/ripemd.c ROUND160_16_TO_31(a,b,c,d,e,f,g,h,i,j); f 412 libavutil/ripemd.c t = j; j = i; i = h; h = g; g = f; f = t; f 417 libavutil/ripemd.c ROUND160_32_TO_47(a,b,c,d,e,f,g,h,i,j); f 419 libavutil/ripemd.c t = j; j = i; i = h; h = g; g = f; f = t; f 421 libavutil/ripemd.c FFSWAP(uint32_t, a, f); f 424 libavutil/ripemd.c ROUND160_48_TO_63(a,b,c,d,e,f,g,h,i,j); f 426 libavutil/ripemd.c t = j; j = i; i = h; h = g; g = f; f = t; f 431 libavutil/ripemd.c ROUND160_64_TO_79(a,b,c,d,e,f,g,h,i,j); f 433 libavutil/ripemd.c t = j; j = i; i = h; h = g; g = f; f = t; f 439 libavutil/ripemd.c ROUND160_0_TO_15(a,b,c,d,e,f,g,h,i,j); f 440 libavutil/ripemd.c FFSWAP(uint32_t, a, f); f 443 libavutil/ripemd.c ROUND160_16_TO_31(e,a,b,c,d,j,f,g,h,i); f 447 libavutil/ripemd.c ROUND160_32_TO_47(d,e,a,b,c,i,j,f,g,h); f 451 libavutil/ripemd.c ROUND160_48_TO_63(c,d,e,a,b,h,i,j,f,g); f 455 libavutil/ripemd.c ROUND160_64_TO_79(b,c,d,e,a,g,h,i,j,f); f 460 libavutil/ripemd.c state[5] += f; state[6] += g; state[7] += h; state[8] += i; state[9] += j; f 188 libavutil/sha.c #define ROUND256(a,b,c,d,e,f,g,h) \ f 189 libavutil/sha.c T1 += (h) + Sigma1_256(e) + Ch((e), (f), (g)) + K256[i]; \ f 194 libavutil/sha.c #define ROUND256_0_TO_15(a,b,c,d,e,f,g,h) \ f 196 libavutil/sha.c ROUND256(a,b,c,d,e,f,g,h) f 198 libavutil/sha.c #define ROUND256_16_TO_63(a,b,c,d,e,f,g,h) \ f 200 libavutil/sha.c ROUND256(a,b,c,d,e,f,g,h) f 204 libavutil/sha.c unsigned int i, a, b, c, d, e, f, g, h; f 213 libavutil/sha.c f = state[5]; f 223 libavutil/sha.c T1 += h + Sigma1_256(e) + Ch(e, f, g) + K256[i]; f 226 libavutil/sha.c g = f; f 227 libavutil/sha.c f = e; f 238 libavutil/sha.c ROUND256_0_TO_15(a, b, c, d, e, f, g, h); \ f 239 libavutil/sha.c ROUND256_0_TO_15(h, a, b, c, d, e, f, g); \ f 240 libavutil/sha.c ROUND256_0_TO_15(g, h, a, b, c, d, e, f); \ f 241 libavutil/sha.c ROUND256_0_TO_15(f, g, h, a, b, c, d, e); \ f 242 libavutil/sha.c ROUND256_0_TO_15(e, f, g, h, a, b, c, d); \ f 243 libavutil/sha.c ROUND256_0_TO_15(d, e, f, g, h, a, b, c); \ f 244 libavutil/sha.c ROUND256_0_TO_15(c, d, e, f, g, h, a, b); \ f 245 libavutil/sha.c ROUND256_0_TO_15(b, c, d, e, f, g, h, a) f 250 libavutil/sha.c ROUND256_16_TO_63(a, b, c, d, e, f, g, h); \ f 251 libavutil/sha.c ROUND256_16_TO_63(h, a, b, c, d, e, f, g); \ f 252 libavutil/sha.c ROUND256_16_TO_63(g, h, a, b, c, d, e, f); \ f 253 libavutil/sha.c ROUND256_16_TO_63(f, g, h, a, b, c, d, e); \ f 254 libavutil/sha.c ROUND256_16_TO_63(e, f, g, h, a, b, c, d); \ f 255 libavutil/sha.c ROUND256_16_TO_63(d, e, f, g, h, a, b, c); \ f 256 libavutil/sha.c ROUND256_16_TO_63(c, d, e, f, g, h, a, b); \ f 257 libavutil/sha.c ROUND256_16_TO_63(b, c, d, e, f, g, h, a) f 267 libavutil/sha.c state[5] += f; f 105 libavutil/sha512.c #define ROUND512(a,b,c,d,e,f,g,h) \ f 106 libavutil/sha512.c T1 += (h) + Sigma1_512(e) + Ch((e), (f), (g)) + K512[i]; \ f 111 libavutil/sha512.c #define ROUND512_0_TO_15(a,b,c,d,e,f,g,h) \ f 113 libavutil/sha512.c ROUND512(a,b,c,d,e,f,g,h) f 115 libavutil/sha512.c #define ROUND512_16_TO_80(a,b,c,d,e,f,g,h) \ f 117 libavutil/sha512.c ROUND512(a,b,c,d,e,f,g,h) f 121 libavutil/sha512.c uint64_t a, b, c, d, e, f, g, h; f 131 libavutil/sha512.c f = state[5]; f 141 libavutil/sha512.c T1 += h + Sigma1_512(e) + Ch(e, f, g) + K512[i]; f 144 libavutil/sha512.c g = f; f 145 libavutil/sha512.c f = e; f 155 libavutil/sha512.c ROUND512_0_TO_15(a, b, c, d, e, f, g, h); \ f 156 libavutil/sha512.c ROUND512_0_TO_15(h, a, b, c, d, e, f, g); \ f 157 libavutil/sha512.c ROUND512_0_TO_15(g, h, a, b, c, d, e, f); \ f 158 libavutil/sha512.c ROUND512_0_TO_15(f, g, h, a, b, c, d, e); \ f 159 libavutil/sha512.c ROUND512_0_TO_15(e, f, g, h, a, b, c, d); \ f 160 libavutil/sha512.c ROUND512_0_TO_15(d, e, f, g, h, a, b, c); \ f 161 libavutil/sha512.c ROUND512_0_TO_15(c, d, e, f, g, h, a, b); \ f 162 libavutil/sha512.c ROUND512_0_TO_15(b, c, d, e, f, g, h, a) f 168 libavutil/sha512.c ROUND512_16_TO_80(a, b, c, d, e, f, g, h); \ f 169 libavutil/sha512.c ROUND512_16_TO_80(h, a, b, c, d, e, f, g); \ f 170 libavutil/sha512.c ROUND512_16_TO_80(g, h, a, b, c, d, e, f); \ f 171 libavutil/sha512.c ROUND512_16_TO_80(f, g, h, a, b, c, d, e); \ f 172 libavutil/sha512.c ROUND512_16_TO_80(e, f, g, h, a, b, c, d); \ f 173 libavutil/sha512.c ROUND512_16_TO_80(d, e, f, g, h, a, b, c); \ f 174 libavutil/sha512.c ROUND512_16_TO_80(c, d, e, f, g, h, a, b); \ f 175 libavutil/sha512.c ROUND512_16_TO_80(b, c, d, e, f, g, h, a) f 185 libavutil/sha512.c state[5] += f; f 65 libavutil/tests/audio_fifo.c int p, b, f; f 73 libavutil/tests/audio_fifo.c for (f = 0; f < byte_offset; f++){ f 74 libavutil/tests/audio_fifo.c int order = !HAVE_BIGENDIAN ? (byte_offset - f - 1) : f; f 122 libavutil/tests/rational.c float f = av_int2float(av_q2intfloat(a)); f 124 libavutil/tests/rational.c if (fabs(f - f2) > fabs(f)/5000000) { f 126 libavutil/tests/rational.c a.den, f, f2); f 1378 libpostproc/postprocess_template.c int f= (*(p-stride-1)) + 2*(*(p-stride)) + (*(p-stride+1)) f 1381 libpostproc/postprocess_template.c f= (f + 8)>>4; f 1397 libpostproc/postprocess_template.c int diff= (f - *p); f 1420 libpostproc/postprocess_template.c if (*p + QP2 < f) *p= *p + QP2; f 1421 libpostproc/postprocess_template.c else if(*p - QP2 > f) *p= *p - QP2; f 1422 libpostproc/postprocess_template.c else *p=f; f 1973 libpostproc/postprocess_template.c int a, b, c, d, e, f; f 1979 libpostproc/postprocess_template.c f = (c-a)>>31; f 1980 libpostproc/postprocess_template.c colsrc[stride ] = (a|(d^f)) & (b|(d^e)) & (c|(e^f)); f 151 libswresample/audioconvert.c conv_func_type *f = fmt_pair_to_conv_functions[av_get_packed_sample_fmt(out_fmt) + AV_SAMPLE_FMT_NB*av_get_packed_sample_fmt(in_fmt)]; f 153 libswresample/audioconvert.c if (!f) f 165 libswresample/audioconvert.c ctx->conv_f = f; f 116 libswresample/dither.c const filter_t *f = &filters[i]; f 117 libswresample/dither.c if (llabs(s->out_sample_rate - f->rate)*20 <= f->rate && f->name == s->dither.method) { f 119 libswresample/dither.c s->dither.ns_taps = f->len; f 120 libswresample/dither.c for (j=0; j<f->len; j++) f 121 libswresample/dither.c s->dither.ns_coeffs[j] = f->coefs[j]; f 122 libswresample/dither.c s->dither.ns_scale_1 *= 1 - exp(f->gain_cB * M_LN10 * 0.005) * 2 / (1<<(8*av_get_bytes_per_sample(out_fmt))); f 75 libswresample/soxr_resample.c float f; f 77 libswresample/soxr_resample.c soxr_process((soxr_t)s->resample, &f, 0, &idone, &f, 0, &odone); f 39 libswresample/tests/swresample.c static double get(uint8_t *a[], int ch, int index, int ch_count, enum AVSampleFormat f){ f 41 libswresample/tests/swresample.c if(av_sample_fmt_is_planar(f)){ f 42 libswresample/tests/swresample.c f= av_get_alt_sample_fmt(f, 0); f 49 libswresample/tests/swresample.c switch(f){ f 59 libswresample/tests/swresample.c static void set(uint8_t *a[], int ch, int index, int ch_count, enum AVSampleFormat f, double v){ f 61 libswresample/tests/swresample.c if(av_sample_fmt_is_planar(f)){ f 62 libswresample/tests/swresample.c f= av_get_alt_sample_fmt(f, 0); f 68 libswresample/tests/swresample.c switch(f){ f 78 libswresample/tests/swresample.c static void shift(uint8_t *a[], int index, int ch_count, enum AVSampleFormat f){ f 81 libswresample/tests/swresample.c if(av_sample_fmt_is_planar(f)){ f 82 libswresample/tests/swresample.c f= av_get_alt_sample_fmt(f, 0); f 84 libswresample/tests/swresample.c a[ch] += index*av_get_bytes_per_sample(f); f 86 libswresample/tests/swresample.c a[0] += index*ch_count*av_get_bytes_per_sample(f); f 150 libswresample/tests/swresample.c double v, f, a, ampa; f 176 libswresample/tests/swresample.c f = 100.0 + (((10000.0 - 100.0) * i) / sample_rate); f 177 libswresample/tests/swresample.c a += M_PI * f * 2.0 / sample_rate; f 204 libswresample/tests/swresample.c f = tabf1[ch] + (((tabf2[ch] - tabf1[ch]) * i) / sample_rate); f 205 libswresample/tests/swresample.c taba[ch] += M_PI * f * 2.0 / sample_rate; f 56 libswscale/ppc/swscale_altivec.c #define LOAD_FILTER(vf,f) {\ f 57 libswscale/ppc/swscale_altivec.c vector unsigned char perm0 = vec_lvsl(joffset, f);\ f 58 libswscale/ppc/swscale_altivec.c vf = vec_ld(joffset, f);\ f 72 libswscale/ppc/swscale_altivec.c #define GET_VF4(a, vf, f) {\ f 73 libswscale/ppc/swscale_altivec.c vf = vec_ld(a<< 3, f);\ f 97 libswscale/ppc/swscale_altivec.c #define GET_VFD(a, b, f, vf0, vf1, per, vf, off) {\ f 98 libswscale/ppc/swscale_altivec.c vf1 = vec_ld((a * 2 * filterSize) + (b * 2) + 16 + off, f);\ f 55 libswscale/ppc/swscale_vsx.c #define LOAD_FILTER(vf,f) {\ f 56 libswscale/ppc/swscale_vsx.c vf = vec_vsx_ld(joffset, f);\ f 68 libswscale/ppc/swscale_vsx.c #define GET_VF4(a, vf, f) {\ f 69 libswscale/ppc/swscale_vsx.c vf = (vector signed short)vec_vsx_ld(a << 3, f);\ f 78 libswscale/ppc/swscale_vsx.c #define GET_VFD(a, b, f, vf0, vf1, per, vf, off) {\ f 79 libswscale/ppc/swscale_vsx.c vf = vec_vsx_ld((a * 2 * filterSize) + (b * 2) + off, f);\ f 2001 libswscale/swscale_unscaled.c #define isByteRGB(f) ( \ f 2002 libswscale/swscale_unscaled.c f == AV_PIX_FMT_RGB32 || \ f 2003 libswscale/swscale_unscaled.c f == AV_PIX_FMT_RGB32_1 || \ f 2004 libswscale/swscale_unscaled.c f == AV_PIX_FMT_RGB24 || \ f 2005 libswscale/swscale_unscaled.c f == AV_PIX_FMT_BGR32 || \ f 2006 libswscale/swscale_unscaled.c f == AV_PIX_FMT_BGR32_1 || \ f 2007 libswscale/swscale_unscaled.c f == AV_PIX_FMT_BGR24) f 762 libswscale/yuv2rgb.c static uint16_t roundToInt16(int64_t f) f 764 libswscale/yuv2rgb.c int r = (f + (1 << 15)) >> 16; f 76 tests/audiogen.c int neg, v, f; f 89 tests/audiogen.c f = a & ((1 << CSHIFT) - 1); f 90 tests/audiogen.c v = p[0] + (((p[1] - p[0]) * f + (1 << (CSHIFT - 1))) >> CSHIFT); f 139 tests/audiogen.c int i, a, v, j, f, amp, ampa; f 198 tests/audiogen.c f = 100 + (((10000 - 100) * i) / sample_rate); f 199 tests/audiogen.c a += (f * FRAC_ONE) / sample_rate; f 226 tests/audiogen.c f = tabf1[j] + (((tabf2[j] - tabf1[j]) * i) / sample_rate); f 227 tests/audiogen.c taba[j] += (f * FRAC_ONE) / sample_rate; f 28 tests/audiomatch.c static int64_t fsize(FILE *f) { f 29 tests/audiomatch.c int64_t end, pos = ftell(f); f 30 tests/audiomatch.c fseek(f, 0, SEEK_END); f 31 tests/audiomatch.c end = ftell(f); f 32 tests/audiomatch.c fseek(f, pos, SEEK_SET); f 37 tests/audiomatch.c FILE *f[2]; f 52 tests/audiomatch.c f[0] = fopen(argv[1], "rb"); f 53 tests/audiomatch.c f[1] = fopen(argv[2], "rb"); f 54 tests/audiomatch.c if (!f[0] || !f[1]) { f 61 tests/audiomatch.c if (fread(p, 1, 12, f[i]) != 12) f 65 tests/audiomatch.c if (fread(p, 1, 8, f[i]) != 8) f 69 tests/audiomatch.c fseek(f[i], s, SEEK_CUR); f 70 tests/audiomatch.c if (fread(p, 1, 8, f[i]) != 8) f 74 tests/audiomatch.c fseek(f[i], -12, SEEK_CUR); f 78 tests/audiomatch.c datlen = fsize(f[0]) - ftell(f[0]); f 79 tests/audiomatch.c siglen = fsize(f[1]) - ftell(f[1]); f 83 tests/audiomatch.c if (fread(data , 1, datlen, f[0]) != datlen) f 85 tests/audiomatch.c if (fread(signal, 1, siglen, f[1]) != siglen) f 31 tests/checkasm/aacpsdsp.c const INTFLOAT f = (INTFLOAT)rnd() / UINT_MAX; \ f 32 tests/checkasm/aacpsdsp.c (buf)[i] = f; \ f 42 tests/checkasm/aacpsdsp.c union av_intfloat32 u = { .f = buf[i] }; f 44 tests/checkasm/aacpsdsp.c buf[i] = u.f; f 37 tests/checkasm/audiodsp.c float f = (float)rnd() / (UINT_MAX >> 5) - 16.0f; \ f 38 tests/checkasm/audiodsp.c buf[i] = f; \ f 288 tests/checkasm/checkasm.c x.f = a; f 289 tests/checkasm/checkasm.c y.f = b; f 417 tests/checkasm/checkasm.c static void destroy_func_tree(CheckasmFunc *f) f 419 tests/checkasm/checkasm.c if (f) { f 420 tests/checkasm/checkasm.c CheckasmFuncVersion *v = f->versions.next; f 427 tests/checkasm/checkasm.c destroy_func_tree(f->child[0]); f 428 tests/checkasm/checkasm.c destroy_func_tree(f->child[1]); f 429 tests/checkasm/checkasm.c free(f); f 484 tests/checkasm/checkasm.c static void print_benchs(CheckasmFunc *f) f 486 tests/checkasm/checkasm.c if (f) { f 487 tests/checkasm/checkasm.c print_benchs(f->child[0]); f 490 tests/checkasm/checkasm.c if (f->versions.cpu || f->versions.next) { f 491 tests/checkasm/checkasm.c CheckasmFuncVersion *v = &f->versions; f 496 tests/checkasm/checkasm.c printf("%s_%s: %d.%d\n", f->name, cpu_suffix(v->cpu), decicycles/10, decicycles%10); f 501 tests/checkasm/checkasm.c print_benchs(f->child[1]); f 521 tests/checkasm/checkasm.c static CheckasmFunc *rotate_tree(CheckasmFunc *f, int dir) f 523 tests/checkasm/checkasm.c CheckasmFunc *r = f->child[dir^1]; f 524 tests/checkasm/checkasm.c f->child[dir^1] = r->child[dir]; f 525 tests/checkasm/checkasm.c r->child[dir] = f; f 526 tests/checkasm/checkasm.c r->color = f->color; f 527 tests/checkasm/checkasm.c f->color = 0; f 531 tests/checkasm/checkasm.c #define is_red(f) ((f) && !(f)->color) f 536 tests/checkasm/checkasm.c CheckasmFunc *f = *root; f 538 tests/checkasm/checkasm.c if (is_red(f->child[0]) && is_red(f->child[1])) { f 539 tests/checkasm/checkasm.c f->color ^= 1; f 540 tests/checkasm/checkasm.c f->child[0]->color = f->child[1]->color = 1; f 543 tests/checkasm/checkasm.c if (!is_red(f->child[0]) && is_red(f->child[1])) f 544 tests/checkasm/checkasm.c *root = rotate_tree(f, 0); /* Rotate left */ f 545 tests/checkasm/checkasm.c else if (is_red(f->child[0]) && is_red(f->child[0]->child[0])) f 546 tests/checkasm/checkasm.c *root = rotate_tree(f, 1); /* Rotate right */ f 552 tests/checkasm/checkasm.c CheckasmFunc *f = *root; f 554 tests/checkasm/checkasm.c if (f) { f 556 tests/checkasm/checkasm.c int cmp = cmp_func_names(name, f->name); f 558 tests/checkasm/checkasm.c f = get_func(&f->child[cmp > 0], name); f 561 tests/checkasm/checkasm.c if (!f->versions.func) f 567 tests/checkasm/checkasm.c f = *root = checkasm_malloc(sizeof(CheckasmFunc) + name_length); f 568 tests/checkasm/checkasm.c memcpy(f->name, name, name_length + 1); f 571 tests/checkasm/checkasm.c return f; f 26 tests/checkasm/opusdsp.c float f = (float)rnd() / (UINT_MAX >> 5) - 16.0f; \ f 27 tests/checkasm/opusdsp.c buf[i] = f; \ f 27 tests/checkasm/sbrdsp.c const INTFLOAT f = (INTFLOAT)rnd() / UINT_MAX; \ f 28 tests/checkasm/sbrdsp.c (buf)[i] = f; \ f 39 tests/checkasm/synth_filter.c float f = (float)rnd() / (UINT_MAX >> 5) - 16.0f; \ f 40 tests/checkasm/synth_filter.c in[i] = f; \ f 104 tests/checkasm/synth_filter.c o0.f = out0[j]; o1.f = out1[j]; f 105 tests/checkasm/synth_filter.c b0.f = buf2_0[j], b1.f = buf2_1[j]; f 107 tests/checkasm/synth_filter.c o0.f, o0.i, o1.f, o1.i, fabsf(o0.f - o1.f)); f 109 tests/checkasm/synth_filter.c b0.f, b0.i, b1.f, b1.i, fabsf(b0.f - b1.f)); f 29 tests/dnn/dnn-layer-mathunary-test.c static float get_expected(float f, DNNMathUnaryOperation op) f 34 tests/dnn/dnn-layer-mathunary-test.c return (f >= 0) ? f : -f; f 125 tests/tiny_psnr.c return v.f; f 133 tests/tiny_psnr.c static int run_psnr(FILE *f[2], int len, int shift, int skip_bytes) f 146 tests/tiny_psnr.c noseek = fseek(f[0], 0, SEEK_SET) || f 147 tests/tiny_psnr.c fseek(f[1], 0, SEEK_SET); f 152 tests/tiny_psnr.c if (fread(p, 1, 12, f[i]) != 12) f 156 tests/tiny_psnr.c if (fread(p, 1, 8, f[i]) != 8) f 160 tests/tiny_psnr.c fseek(f[i], s, SEEK_CUR); f 161 tests/tiny_psnr.c if (fread(p, 1, 8, f[i]) != 8) f 165 tests/tiny_psnr.c fseek(f[i], -12, SEEK_CUR); f 169 tests/tiny_psnr.c fseek(f[shift < 0], abs(shift), SEEK_CUR); f 171 tests/tiny_psnr.c fseek(f[0], skip_bytes, SEEK_CUR); f 172 tests/tiny_psnr.c fseek(f[1], skip_bytes, SEEK_CUR); f 176 tests/tiny_psnr.c int s0 = fread(buf[0], 1, SIZE, f[0]); f 177 tests/tiny_psnr.c int s1 = fread(buf[1], 1, SIZE, f[1]); f 267 tests/tiny_psnr.c FILE *f[2]; f 304 tests/tiny_psnr.c f[0] = fopen(argv[1], "rb"); f 305 tests/tiny_psnr.c f[1] = fopen(argv[2], "rb"); f 306 tests/tiny_psnr.c if (!f[0] || !f[1]) { f 312 tests/tiny_psnr.c int psnr = run_psnr(f, len, shift, skip_bytes); f 180 tests/tiny_ssim.c FILE *f[2]; f 195 tests/tiny_ssim.c f[0] = fopen(argv[1], "rb"); f 196 tests/tiny_ssim.c f[1] = fopen(argv[2], "rb"); f 214 tests/tiny_ssim.c fseek(f[seek<0], seek < 0 ? -seek : seek, SEEK_SET); f 220 tests/tiny_ssim.c if( fread(buf[0], frame_size, 1, f[0]) != 1) break; f 221 tests/tiny_ssim.c if( fread(buf[1], frame_size, 1, f[1]) != 1) break; f 109 tests/utils.c FILE *f; f 121 tests/utils.c f = fopen(filename, "wb"); f 122 tests/utils.c fprintf(f, "P5\n%d %d\n%d\n", w, h * 3 / 2, 255); f 124 tests/utils.c f = stdout; f 127 tests/utils.c err_if(fwrite(lum_tab, 1, w * h, f) != w * h); f 135 tests/utils.c err_if(fwrite(cb, 1, w2, f) != w2); f 136 tests/utils.c err_if(fwrite(cr, 1, w2, f) != w2); f 140 tests/utils.c fclose(f); f 143 tests/utils.c err_if(fwrite(cb, 1, w2, f) != w2); f 147 tests/utils.c err_if(fwrite(cr, 1, w2, f) != w2); f 322 tools/ismindex.c static int read_tfra(struct Tracks *tracks, int start_index, AVIOContext *f) f 326 tools/ismindex.c int64_t pos = avio_tell(f); f 327 tools/ismindex.c uint32_t size = avio_rb32(f); f 330 tools/ismindex.c if (avio_rb32(f) != MKBETAG('t', 'f', 'r', 'a')) f 332 tools/ismindex.c version = avio_r8(f); f 333 tools/ismindex.c avio_rb24(f); f 334 tools/ismindex.c track_id = avio_rb32(f); /* track id */ f 343 tools/ismindex.c fieldlength = avio_rb32(f); f 344 tools/ismindex.c track->chunks = avio_rb32(f); f 355 tools/ismindex.c track->offsets[i].time = avio_rb64(f); f 356 tools/ismindex.c track->offsets[i].offset = avio_rb64(f); f 358 tools/ismindex.c track->offsets[i].time = avio_rb32(f); f 359 tools/ismindex.c track->offsets[i].offset = avio_rb32(f); f 362 tools/ismindex.c avio_r8(f); f 364 tools/ismindex.c avio_r8(f); f 366 tools/ismindex.c avio_r8(f); f 378 tools/ismindex.c int64_t duration = read_moof_duration(f, track->offsets[i].offset); f 409 tools/ismindex.c avio_seek(f, pos + size, SEEK_SET); f 419 tools/ismindex.c AVIOContext *f = NULL; f 422 tools/ismindex.c if ((err = avio_open2(&f, file, AVIO_FLAG_READ, NULL, NULL)) < 0) f 424 tools/ismindex.c avio_seek(f, avio_size(f) - 4, SEEK_SET); f 425 tools/ismindex.c mfra_size = avio_rb32(f); f 426 tools/ismindex.c avio_seek(f, -mfra_size, SEEK_CUR); f 427 tools/ismindex.c if (avio_rb32(f) != mfra_size) { f 432 tools/ismindex.c if (avio_rb32(f) != MKBETAG('m', 'f', 'r', 'a')) { f 437 tools/ismindex.c while (!read_tfra(tracks, start_index, f)) { f 442 tools/ismindex.c err = write_fragments(tracks, start_index, f, basename, split, ismf, f 447 tools/ismindex.c if (f) f 448 tools/ismindex.c avio_close(f); f 82 tools/sidxindex.c AVIOContext *f = NULL; f 85 tools/sidxindex.c if ((err = avio_open2(&f, file, AVIO_FLAG_READ, NULL, NULL)) < 0) f 88 tools/sidxindex.c while (!f->eof_reached) { f 89 tools/sidxindex.c int64_t pos = avio_tell(f); f 92 tools/sidxindex.c size = avio_rb32(f); f 93 tools/sidxindex.c tag = avio_rb32(f); f 107 tools/sidxindex.c if (avio_seek(f, pos + size, SEEK_SET) != pos + size) f 112 tools/sidxindex.c if (f) f 113 tools/sidxindex.c avio_close(f); f 35 tools/target_bsf_fuzzer.c static AVBitStreamFilter *f = NULL; f 48 tools/target_bsf_fuzzer.c if (!f) { f 53 tools/target_bsf_fuzzer.c f = &BSF_SYMBOL(FFMPEG_BSF); f 56 tools/target_bsf_fuzzer.c f = &ff_null_bsf; f 61 tools/target_bsf_fuzzer.c res = av_bsf_alloc(f, &bsf); f 75 tools/target_bsf_fuzzer.c if (f->codec_ids) { f 77 tools/target_bsf_fuzzer.c for (i = 0; f->codec_ids[i] != AV_CODEC_ID_NONE; i++); f 78 tools/target_bsf_fuzzer.c id = f->codec_ids[bytestream2_get_byte(&gbc) % i]; f 44 tools/trasher.c FILE *f; f 52 tools/trasher.c f = fopen(argv[1], "rb+"); f 53 tools/trasher.c if (!f) { f 61 tools/trasher.c checked_seek(f, 0, SEEK_END); f 62 tools/trasher.c length = ftell(f); f 63 tools/trasher.c checked_seek(f, 0, SEEK_SET); f 68 tools/trasher.c checked_seek(f, pos, SEEK_SET); f 82 tools/trasher.c fwrite(&val, 1, 1, f); f 17 tools/uncoded_frame.c AVFilterContext *f, int idx) f 19 tools/uncoded_frame.c enum AVMediaType type = avfilter_pad_get_type(f->output_pads, idx); f 35 tools/uncoded_frame.c ret = avfilter_link(f, idx, st->sink, 0); f 82 tools/uncoded_frame.c AVFilterContext *f = in_graph->filters[i]; f 83 tools/uncoded_frame.c for (j = 0; j < f->nb_inputs; j++) { f 84 tools/uncoded_frame.c if (!f->inputs[j]) { f 90 tools/uncoded_frame.c for (j = 0; j < f->nb_outputs; j++) f 91 tools/uncoded_frame.c if (!f->outputs[j]) f 113 tools/uncoded_frame.c AVFilterContext *f = in_graph->filters[i]; f 114 tools/uncoded_frame.c for (j = 0; j < f->nb_outputs; j++) { f 115 tools/uncoded_frame.c if (!f->outputs[j]) { f 116 tools/uncoded_frame.c if ((ret = create_sink(st++, in_graph, f, j)) < 0)