chromium/third_party/ffmpeg/libavcodec/utils.c

/*
 * utils for libavcodec
 * Copyright (c) 2001 Fabrice Bellard
 * Copyright (c) 2002-2004 Michael Niedermayer <[email protected]>
 *
 * This file is part of FFmpeg.
 *
 * FFmpeg is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * FFmpeg is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with FFmpeg; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
 */

/**
 * @file
 * utils.
 */

#include "config.h"
#include "libavutil/avassert.h"
#include "libavutil/channel_layout.h"
#include "libavutil/intreadwrite.h"
#include "libavutil/mem.h"
#include "libavutil/pixdesc.h"
#include "libavutil/imgutils.h"
#include "libavutil/pixfmt.h"
#include "avcodec.h"
#include "codec.h"
#include "codec_desc.h"
#include "codec_internal.h"
#include "codec_par.h"
#include "decode.h"
#include "hwconfig.h"
#include "refstruct.h"
#include "thread.h"
#include "threadframe.h"
#include "internal.h"
#include "put_bits.h"
#include "startcode.h"
#include <stdlib.h>
#include <limits.h>

void av_fast_padded_malloc(void *ptr, unsigned int *size, size_t min_size)
{}

void av_fast_padded_mallocz(void *ptr, unsigned int *size, size_t min_size)
{}

int av_codec_is_encoder(const AVCodec *avcodec)
{}

int av_codec_is_decoder(const AVCodec *avcodec)
{}

int ff_set_dimensions(AVCodecContext *s, int width, int height)
{}

int ff_set_sar(AVCodecContext *avctx, AVRational sar)
{}

int ff_side_data_update_matrix_encoding(AVFrame *frame,
                                        enum AVMatrixEncoding matrix_encoding)
{}

void avcodec_align_dimensions2(AVCodecContext *s, int *width, int *height,
                               int linesize_align[AV_NUM_DATA_POINTERS])
{}

void avcodec_align_dimensions(AVCodecContext *s, int *width, int *height)
{}

int avcodec_fill_audio_frame(AVFrame *frame, int nb_channels,
                             enum AVSampleFormat sample_fmt, const uint8_t *buf,
                             int buf_size, int align)
{}


int avpriv_codec_get_cap_skip_frame_fill_param(const AVCodec *codec){}

const char *avcodec_get_name(enum AVCodecID id)
{}

const char *av_get_profile_name(const AVCodec *codec, int profile)
{}

const char *avcodec_profile_name(enum AVCodecID codec_id, int profile)
{}

int av_get_exact_bits_per_sample(enum AVCodecID codec_id)
{}

enum AVCodecID av_get_pcm_codec(enum AVSampleFormat fmt, int be)
{}

int av_get_bits_per_sample(enum AVCodecID codec_id)
{}

static int get_audio_frame_duration(enum AVCodecID id, int sr, int ch, int ba,
                                    uint32_t tag, int bits_per_coded_sample, int64_t bitrate,
                                    uint8_t * extradata, int frame_size, int frame_bytes)
{}

int av_get_audio_frame_duration(AVCodecContext *avctx, int frame_bytes)
{}

int av_get_audio_frame_duration2(AVCodecParameters *par, int frame_bytes)
{}

#if !HAVE_THREADS
int ff_thread_init(AVCodecContext *s)
{
    return -1;
}

#endif

unsigned int av_xiphlacing(unsigned char *s, unsigned int v)
{}

int ff_match_2uint16(const uint16_t(*tab)[2], int size, int a, int b)
{}

const AVCodecHWConfig *avcodec_get_hw_config(const AVCodec *avcodec, int index)
{}

int ff_thread_ref_frame(ThreadFrame *dst, const ThreadFrame *src)
{}

int ff_thread_replace_frame(ThreadFrame *dst, const ThreadFrame *src)
{}

#if !HAVE_THREADS

int ff_thread_get_buffer(AVCodecContext *avctx, AVFrame *f, int flags)
{
    return ff_get_buffer(avctx, f, flags);
}

int ff_thread_get_ext_buffer(AVCodecContext *avctx, ThreadFrame *f, int flags)
{
    f->owner[0] = f->owner[1] = avctx;
    return ff_get_buffer(avctx, f->f, flags);
}

void ff_thread_release_ext_buffer(ThreadFrame *f)
{
    f->owner[0] = f->owner[1] = NULL;
    if (f->f)
        av_frame_unref(f->f);
}

void ff_thread_finish_setup(AVCodecContext *avctx)
{
}

void ff_thread_report_progress(ThreadFrame *f, int progress, int field)
{
}

void ff_thread_await_progress(const ThreadFrame *f, int progress, int field)
{
}

int ff_thread_can_start_frame(AVCodecContext *avctx)
{
    return 1;
}

int ff_slice_thread_init_progress(AVCodecContext *avctx)
{
    return 0;
}

int ff_slice_thread_allocz_entries(AVCodecContext *avctx, int count)
{
    return 0;
}

void ff_thread_await_progress2(AVCodecContext *avctx, int field, int thread, int shift)
{
}

void ff_thread_report_progress2(AVCodecContext *avctx, int field, int thread, int n)
{
}

#endif

const uint8_t *avpriv_find_start_code(const uint8_t *restrict p,
                                      const uint8_t *end,
                                      uint32_t *restrict state)
{}

AVCPBProperties *av_cpb_properties_alloc(size_t *size)
{}

static unsigned bcd2uint(uint8_t bcd)
{}

int ff_alloc_timecode_sei(const AVFrame *frame, AVRational rate, size_t prefix_len,
                     void **data, size_t *sei_size)
{}

int64_t ff_guess_coded_bitrate(AVCodecContext *avctx)
{}