It will be useful in the upcoming transition to refcounted AVFrames.
#include "bytestream.h"
#include "dsputil.h"
#include "get_bits.h"
+#include "internal.h"
//#undef NDEBUG
//#include <assert.h>
avctx->release_buffer(avctx, p);
p->reference = 1;
- if (avctx->get_buffer(avctx, p) < 0) {
+ if (ff_get_buffer(avctx, p) < 0) {
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return -1;
}
} else if (frame_4cc == AV_RL32("pfrm") || frame_4cc == AV_RL32("pfr2")) {
if (!f->last_picture.data[0]) {
f->last_picture.reference = 1;
- if (avctx->get_buffer(avctx, &f->last_picture) < 0) {
+ if (ff_get_buffer(avctx, &f->last_picture) < 0) {
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return -1;
}
#include "libavutil/internal.h"
#include "libavutil/intreadwrite.h"
#include "avcodec.h"
+#include "internal.h"
static const enum AVPixelFormat pixfmt_rgb24[] = {
c->pic.reference = 0;
c->pic.buffer_hints = FF_BUFFER_HINTS_VALID;
- if (avctx->get_buffer(avctx, &c->pic) < 0){
+ if (ff_get_buffer(avctx, &c->pic) < 0){
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return -1;
}
*/
#include "avcodec.h"
+#include "internal.h"
#include "libavutil/common.h"
/** decoder context */
/* get output buffer */
esc->frame.nb_samples = buf_size * (is_compr + 1);
- if ((ret = avctx->get_buffer(avctx, &esc->frame)) < 0) {
+ if ((ret = ff_get_buffer(avctx, &esc->frame)) < 0) {
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return ret;
}
/* get output buffer */
ac->frame.nb_samples = 2048;
- if ((ret = avctx->get_buffer(avctx, &ac->frame)) < 0) {
+ if ((ret = ff_get_buffer(avctx, &ac->frame)) < 0) {
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return ret;
}
/* get output buffer */
avctx->channels = s->out_channels;
s->frame.nb_samples = s->num_blocks * 256;
- if ((ret = avctx->get_buffer(avctx, &s->frame)) < 0) {
+ if ((ret = ff_get_buffer(avctx, &s->frame)) < 0) {
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return ret;
}
#include "bytestream.h"
#include "adpcm.h"
#include "adpcm_data.h"
+#include "internal.h"
/**
* @file
/* get output buffer */
c->frame.nb_samples = nb_samples;
- if ((ret = avctx->get_buffer(avctx, &c->frame)) < 0) {
+ if ((ret = ff_get_buffer(avctx, &c->frame)) < 0) {
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return ret;
}
#include "avcodec.h"
#include "adx.h"
#include "get_bits.h"
+#include "internal.h"
/**
* @file
/* get output buffer */
c->frame.nb_samples = num_blocks * BLOCK_SAMPLES;
- if ((ret = avctx->get_buffer(avctx, &c->frame)) < 0) {
+ if ((ret = ff_get_buffer(avctx, &c->frame)) < 0) {
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return ret;
}
#include "avcodec.h"
#include "get_bits.h"
#include "bytestream.h"
+#include "internal.h"
#include "unary.h"
#include "mathops.h"
if (!alac->nb_samples) {
/* get output buffer */
alac->frame.nb_samples = output_samples;
- if ((ret = avctx->get_buffer(avctx, &alac->frame)) < 0) {
+ if ((ret = ff_get_buffer(avctx, &alac->frame)) < 0) {
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return ret;
}
#include "bytestream.h"
#include "bgmc.h"
#include "dsputil.h"
+#include "internal.h"
#include "libavutil/samplefmt.h"
#include "libavutil/crc.h"
/* get output buffer */
ctx->frame.nb_samples = ctx->cur_frame_length;
- if ((ret = avctx->get_buffer(avctx, &ctx->frame)) < 0) {
+ if ((ret = ff_get_buffer(avctx, &ctx->frame)) < 0) {
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return ret;
}
#include "acelp_pitch_delay.h"
#include "lsp.h"
#include "amr.h"
+#include "internal.h"
#include "amrnbdata.h"
/* get output buffer */
p->avframe.nb_samples = AMR_BLOCK_SIZE;
- if ((ret = avctx->get_buffer(avctx, &p->avframe)) < 0) {
+ if ((ret = ff_get_buffer(avctx, &p->avframe)) < 0) {
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return ret;
}
#include "acelp_filters.h"
#include "acelp_vectors.h"
#include "acelp_pitch_delay.h"
+#include "internal.h"
#define AMR_USE_16BIT_TABLES
#include "amr.h"
/* get output buffer */
ctx->avframe.nb_samples = 4 * AMRWB_SFR_SIZE_16k;
- if ((ret = avctx->get_buffer(avctx, &ctx->avframe)) < 0) {
+ if ((ret = ff_get_buffer(avctx, &ctx->avframe)) < 0) {
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return ret;
}
#include "libavutil/lfg.h"
#include "avcodec.h"
#include "cga_data.h"
+#include "internal.h"
#define ATTR_BOLD 0x01 /**< Bold/Bright-foreground (mode 1) */
#define ATTR_FAINT 0x02 /**< Faint (mode 2) */
if (s->frame.data[0])
avctx->release_buffer(avctx, &s->frame);
avcodec_set_dimensions(avctx, width, height);
- ret = avctx->get_buffer(avctx, &s->frame);
+ ret = ff_get_buffer(avctx, &s->frame);
if (ret < 0) {
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return ret;
#include "avcodec.h"
#include "dsputil.h"
#include "bytestream.h"
+#include "internal.h"
/**
* @file
/* get output buffer */
s->frame.nb_samples = blockstodecode;
- if ((ret = avctx->get_buffer(avctx, &s->frame)) < 0) {
+ if ((ret = ff_get_buffer(avctx, &s->frame)) < 0) {
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return ret;
}
#include "avcodec.h"
#include "put_bits.h"
#include "dsputil.h"
+#include "internal.h"
#include "mathops.h"
#include "mpeg12data.h"
avctx->release_buffer(avctx, p);
p->reference= 0;
- if(avctx->get_buffer(avctx, p) < 0){
+ if(ff_get_buffer(avctx, p) < 0){
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return -1;
}
#include "get_bits.h"
#include "dsputil.h"
#include "fft.h"
+#include "internal.h"
#include "sinewin.h"
#include "atrac.h"
/* get output buffer */
q->frame.nb_samples = AT1_SU_SAMPLES;
- if ((ret = avctx->get_buffer(avctx, &q->frame)) < 0) {
+ if ((ret = ff_get_buffer(avctx, &q->frame)) < 0) {
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return ret;
}
#include "fft.h"
#include "fmtconvert.h"
#include "get_bits.h"
+#include "internal.h"
#include "atrac.h"
#include "atrac3data.h"
/* get output buffer */
q->frame.nb_samples = SAMPLES_PER_FRAME;
- if ((ret = avctx->get_buffer(avctx, &q->frame)) < 0) {
+ if ((ret = ff_get_buffer(avctx, &q->frame)) < 0) {
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return ret;
}
*/
#include "avcodec.h"
+#include "internal.h"
#include "libavutil/internal.h"
typedef struct AuraDecodeContext {
s->frame.buffer_hints = FF_BUFFER_HINTS_VALID;
s->frame.reference = 0;
- if(avctx->get_buffer(avctx, &s->frame) < 0) {
+ if(ff_get_buffer(avctx, &s->frame) < 0) {
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return -1;
}
#include "libavutil/common.h"
#include "avcodec.h"
#include "bytestream.h"
+#include "internal.h"
typedef struct BFIContext {
AVCodecContext *avctx;
bfi->frame.reference = 1;
- if (avctx->get_buffer(avctx, &bfi->frame) < 0) {
+ if (ff_get_buffer(avctx, &bfi->frame) < 0) {
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return -1;
}
#include "dsputil.h"
#include "binkdata.h"
#include "binkdsp.h"
+#include "internal.h"
#include "mathops.h"
#define BITSTREAM_READER_LE
if(c->pic.data[0])
avctx->release_buffer(avctx, &c->pic);
- if(avctx->get_buffer(avctx, &c->pic) < 0){
+ if(ff_get_buffer(avctx, &c->pic) < 0){
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return -1;
}
#include "dct.h"
#include "rdft.h"
#include "fmtconvert.h"
+#include "internal.h"
#include "libavutil/intfloat.h"
extern const uint16_t ff_wma_critical_freqs[25];
/* get output buffer */
s->frame.nb_samples = s->frame_len;
- if ((ret = avctx->get_buffer(avctx, &s->frame)) < 0) {
+ if ((ret = ff_get_buffer(avctx, &s->frame)) < 0) {
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return ret;
}
#include "avcodec.h"
#include "bytestream.h"
#include "bmp.h"
+#include "internal.h"
#include "msrledec.h"
static av_cold int bmp_decode_init(AVCodecContext *avctx){
avctx->release_buffer(avctx, p);
p->reference = 0;
- if(avctx->get_buffer(avctx, p) < 0){
+ if(ff_get_buffer(avctx, p) < 0){
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return -1;
}
#include "libavutil/channel_layout.h"
#include "avcodec.h"
#include "bytestream.h"
+#include "internal.h"
enum BMVFlags{
BMV_NOP = 0,
avctx->release_buffer(avctx, &c->pic);
c->pic.reference = 3;
- if ((ret = avctx->get_buffer(avctx, &c->pic)) < 0) {
+ if ((ret = ff_get_buffer(avctx, &c->pic)) < 0) {
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return ret;
}
/* get output buffer */
c->frame.nb_samples = total_blocks * 32;
- if ((ret = avctx->get_buffer(avctx, &c->frame)) < 0) {
+ if ((ret = ff_get_buffer(avctx, &c->frame)) < 0) {
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return ret;
}
#include "get_bits.h"
#include "golomb.h"
#include "cavs.h"
+#include "internal.h"
static const uint8_t mv_scan[4] = {
MV_FWD_X0,MV_FWD_X1,
if(h->picture.f.data[0])
s->avctx->release_buffer(s->avctx, &h->picture.f);
- s->avctx->get_buffer(s->avctx, &h->picture.f);
+ ff_get_buffer(s->avctx, &h->picture.f);
ff_cavs_init_pic(h);
h->picture.poc = get_bits(&s->gb,8)*2;
#include "avcodec.h"
#include "bytestream.h"
+#include "internal.h"
/**
* @file
}
cdg_init_frame(&new_frame);
- ret = avctx->get_buffer(avctx, &new_frame);
+ ret = ff_get_buffer(avctx, &new_frame);
if (ret) {
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return ret;
#include "libavutil/imgutils.h"
#include "avcodec.h"
#include "get_bits.h"
+#include "internal.h"
#define BIT_PLANAR 0x00
#define BYTE_PLANAR 0x20
avctx->release_buffer(avctx, p);
p->reference = 0;
- if ((ret = avctx->get_buffer(avctx, p)) < 0) {
+ if ((ret = ff_get_buffer(avctx, p)) < 0) {
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return ret;
}
}
p->reference = 0;
- if (avctx->get_buffer(avctx, p) < 0) {
+ if (ff_get_buffer(avctx, p) < 0) {
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return -1;
}
#include "dsputil.h"
#include "get_bits.h"
#include "avcodec.h"
+#include "internal.h"
typedef struct CLLCContext {
DSPContext dsp;
avctx->pix_fmt = AV_PIX_FMT_RGB24;
avctx->bits_per_raw_sample = 8;
- ret = avctx->get_buffer(avctx, pic);
+ ret = ff_get_buffer(avctx, pic);
if (ret < 0) {
av_log(avctx, AV_LOG_ERROR, "Could not allocate buffer.\n");
return ret;
avctx->pix_fmt = AV_PIX_FMT_ARGB;
avctx->bits_per_raw_sample = 8;
- ret = avctx->get_buffer(avctx, pic);
+ ret = ff_get_buffer(avctx, pic);
if (ret < 0) {
av_log(avctx, AV_LOG_ERROR, "Could not allocate buffer.\n");
return ret;
#include "libavutil/common.h"
#include "avcodec.h"
#include "celp_filters.h"
+#include "internal.h"
#include "libavutil/lfg.h"
typedef struct CNGContext {
p->excitation, avctx->frame_size, p->order);
p->avframe.nb_samples = avctx->frame_size;
- if ((ret = avctx->get_buffer(avctx, &p->avframe)) < 0) {
+ if ((ret = ff_get_buffer(avctx, &p->avframe)) < 0) {
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return ret;
}
#include "dsputil.h"
#include "bytestream.h"
#include "fft.h"
+#include "internal.h"
#include "sinewin.h"
#include "cookdata.h"
/* get output buffer */
if (q->discarded_packets >= 2) {
q->frame.nb_samples = q->samples_per_channel;
- if ((ret = avctx->get_buffer(avctx, &q->frame)) < 0) {
+ if ((ret = ff_get_buffer(avctx, &q->frame)) < 0) {
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return ret;
}
#include <stdlib.h>
#include "avcodec.h"
+#include "internal.h"
#include "libavutil/common.h"
#if CONFIG_ZLIB
c->pic.reference = 1;
c->pic.buffer_hints = FF_BUFFER_HINTS_VALID | FF_BUFFER_HINTS_READABLE |
FF_BUFFER_HINTS_PRESERVE | FF_BUFFER_HINTS_REUSABLE;
- if (avctx->get_buffer(avctx, &c->pic) < 0) {
+ if (ff_get_buffer(avctx, &c->pic) < 0) {
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return -1;
}
#include "avcodec.h"
#include "dsputil.h"
+#include "internal.h"
#include "libavutil/internal.h"
s->frame.buffer_hints = FF_BUFFER_HINTS_VALID;
s->frame.reference = 0;
- if (avctx->get_buffer(avctx, &s->frame) < 0) {
+ if (ff_get_buffer(avctx, &s->frame) < 0) {
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return -1;
}
#include "synth_filter.h"
#include "dcadsp.h"
#include "fmtconvert.h"
+#include "internal.h"
#if ARCH_ARM
# include "arm/dca.h"
/* get output buffer */
s->frame.nb_samples = 256 * (s->sample_blocks / 8);
- if ((ret = avctx->get_buffer(avctx, &s->frame)) < 0) {
+ if ((ret = ff_get_buffer(avctx, &s->frame)) < 0) {
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return ret;
}
#include "avcodec.h"
#include "bytestream.h"
+#include "internal.h"
#include "libavutil/imgutils.h"
#include "libavutil/mem.h"
if (s->pic.data[0])
avctx->release_buffer(avctx, &s->pic);
- if ((ret = avctx->get_buffer(avctx, &s->pic))) {
+ if ((ret = ff_get_buffer(avctx, &s->pic))) {
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return ret;
}
#include "get_bits.h"
#include "dnxhddata.h"
#include "dsputil.h"
+#include "internal.h"
typedef struct DNXHDContext {
AVCodecContext *avctx;
if (first_field) {
if (ctx->picture.data[0])
avctx->release_buffer(avctx, &ctx->picture);
- if (avctx->get_buffer(avctx, &ctx->picture) < 0) {
+ if (ff_get_buffer(avctx, &ctx->picture) < 0) {
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return -1;
}
#include "libavutil/intreadwrite.h"
#include "avcodec.h"
#include "bytestream.h"
+#include "internal.h"
#include "mathops.h"
typedef struct DPCMContext {
/* get output buffer */
s->frame.nb_samples = out / avctx->channels;
- if ((ret = avctx->get_buffer(avctx, &s->frame)) < 0) {
+ if ((ret = ff_get_buffer(avctx, &s->frame)) < 0) {
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return ret;
}
#include "libavutil/imgutils.h"
#include "bytestream.h"
#include "avcodec.h"
+#include "internal.h"
typedef struct DPXContext {
AVFrame picture;
return -1;
if (w != avctx->width || h != avctx->height)
avcodec_set_dimensions(avctx, w, h);
- if (avctx->get_buffer(avctx, p) < 0) {
+ if (ff_get_buffer(avctx, p) < 0) {
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return -1;
}
#include "libavutil/channel_layout.h"
#include "avcodec.h"
#include "bytestream.h"
+#include "internal.h"
#include "mathops.h"
/* get output buffer */
cin->frame.nb_samples = avpkt->size - cin->initial_decode_frame;
- if ((ret = avctx->get_buffer(avctx, &cin->frame)) < 0) {
+ if ((ret = ff_get_buffer(avctx, &cin->frame)) < 0) {
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return ret;
}
#include "libavutil/pixdesc.h"
#include "avcodec.h"
#include "dsputil.h"
+#include "internal.h"
#include "get_bits.h"
#include "put_bits.h"
#include "simple_idct.h"
avctx->pix_fmt = s->sys->pix_fmt;
avctx->time_base = s->sys->time_base;
avcodec_set_dimensions(avctx, s->sys->width, s->sys->height);
- if (avctx->get_buffer(avctx, &s->picture) < 0) {
+ if (ff_get_buffer(avctx, &s->picture) < 0) {
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return -1;
}
#include "libavutil/common.h"
#include "libavutil/intreadwrite.h"
#include "avcodec.h"
+#include "internal.h"
#include <zlib.h>
buf_size -= 768+4;
}
- if(avctx->get_buffer(avctx, &c->pic) < 0){
+ if(ff_get_buffer(avctx, &c->pic) < 0){
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return -1;
}
*/
#include "avcodec.h"
+#include "internal.h"
#include "libavutil/common.h"
#include "libavutil/intreadwrite.h"
}
pic->reference = 0;
- if ((ret = avctx->get_buffer(avctx, pic)) < 0)
+ if ((ret = ff_get_buffer(avctx, pic)) < 0)
return ret;
pic->pict_type = AV_PICTURE_TYPE_I;
#include "libavutil/intreadwrite.h"
#include "libavutil/imgutils.h"
#include "avcodec.h"
+#include "internal.h"
typedef struct CmvContext {
AVCodecContext *avctx;
s->frame.reference = 1;
s->frame.buffer_hints = FF_BUFFER_HINTS_VALID;
- if (avctx->get_buffer(avctx, &s->frame)<0) {
+ if (ff_get_buffer(avctx, &s->frame)<0) {
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return -1;
}
#include "dsputil.h"
#include "aandcttab.h"
#include "eaidct.h"
+#include "internal.h"
#include "mpeg12.h"
#include "mpeg12data.h"
#include "libavutil/imgutils.h"
s->frame.reference = 1;
if (!s->frame.data[0]) {
- if (avctx->get_buffer(avctx, &s->frame) < 0) {
+ if (ff_get_buffer(avctx, &s->frame) < 0) {
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return -1;
}
#include "dsputil.h"
#include "aandcttab.h"
#include "eaidct.h"
+#include "internal.h"
typedef struct TgqContext {
AVCodecContext *avctx;
s->frame.key_frame = 1;
s->frame.pict_type = AV_PICTURE_TYPE_I;
s->frame.buffer_hints = FF_BUFFER_HINTS_VALID;
- if (avctx->get_buffer(avctx, &s->frame)) {
+ if (ff_get_buffer(avctx, &s->frame)) {
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return -1;
}
#include "dsputil.h"
#include "aandcttab.h"
#include "eaidct.h"
+#include "internal.h"
#include "mpeg12.h"
#include "mpegvideo.h"
if (s->avctx->width!=s->width || s->avctx->height!=s->height)
avcodec_set_dimensions(s->avctx, s->width, s->height);
- if(avctx->get_buffer(avctx, &t->frame) < 0) {
+ if(ff_get_buffer(avctx, &t->frame) < 0) {
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return -1;
}
*/
#include "avcodec.h"
+#include "internal.h"
#define BITSTREAM_READER_LE
#include "get_bits.h"
}
new_frame.reference = 3;
- if (avctx->get_buffer(avctx, &new_frame)) {
+ if (ff_get_buffer(avctx, &new_frame)) {
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return -1;
}
#include "libavutil/opt.h"
#include "libavutil/imgutils.h"
#include "avcodec.h"
+#include "internal.h"
#include "get_bits.h"
#include "put_bits.h"
#include "dsputil.h"
}
p->reference = 3; //for error concealment
- if ((ret = avctx->get_buffer(avctx, p)) < 0) {
+ if ((ret = ff_get_buffer(avctx, p)) < 0) {
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return ret;
}
/* get output buffer */
s->frame.nb_samples = s->blocksize;
- if ((ret = avctx->get_buffer(avctx, &s->frame)) < 0) {
+ if ((ret = ff_get_buffer(avctx, &s->frame)) < 0) {
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return ret;
}
#include "avcodec.h"
#include "bytestream.h"
+#include "internal.h"
static av_cold int decode_init(AVCodecContext *avctx)
{
}
pic->reference = 0;
- if ((ret = avctx->get_buffer(avctx, pic)) < 0) {
+ if ((ret = ff_get_buffer(avctx, pic)) < 0) {
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return ret;
}
#include "avcodec.h"
#include "get_bits.h"
#include "g722.h"
+#include "internal.h"
#define OFFSET(x) offsetof(G722Context, x)
#define AD AV_OPT_FLAG_AUDIO_PARAM | AV_OPT_FLAG_DECODING_PARAM
/* get output buffer */
c->frame.nb_samples = avpkt->size * 2;
- if ((ret = avctx->get_buffer(avctx, &c->frame)) < 0) {
+ if ((ret = ff_get_buffer(avctx, &c->frame)) < 0) {
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return ret;
}
#include "acelp_vectors.h"
#include "celp_filters.h"
#include "g723_1_data.h"
+#include "internal.h"
#define CNG_RANDOM_SEED 12345
}
p->frame.nb_samples = FRAME_LEN;
- if ((ret = avctx->get_buffer(avctx, &p->frame)) < 0) {
+ if ((ret = ff_get_buffer(avctx, &p->frame)) < 0) {
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return ret;
}
/* get output buffer */
c->frame.nb_samples = out_samples;
- if ((ret = avctx->get_buffer(avctx, &c->frame)) < 0) {
+ if ((ret = ff_get_buffer(avctx, &c->frame)) < 0) {
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return ret;
}
#include "libavutil/imgutils.h"
#include "avcodec.h"
#include "bytestream.h"
+#include "internal.h"
#include "lzw.h"
#define GCE_DISPOSAL_NONE 0
if (s->picture.data[0])
avctx->release_buffer(avctx, &s->picture);
- if (avctx->get_buffer(avctx, &s->picture) < 0) {
+ if (ff_get_buffer(avctx, &s->picture) < 0) {
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return -1;
}
#include "libavutil/channel_layout.h"
#include "avcodec.h"
#include "get_bits.h"
+#include "internal.h"
#include "msgsmdec.h"
#include "gsmdec_template.c"
/* get output buffer */
s->frame.nb_samples = avctx->frame_size;
- if ((res = avctx->get_buffer(avctx, &s->frame)) < 0) {
+ if ((res = ff_get_buffer(avctx, &s->frame)) < 0) {
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return res;
}
#include <string.h>
#include "avcodec.h"
+#include "internal.h"
#include "libavutil/internal.h"
#define HUFFMAN_TABLE_SIZE 64 * 1024
if (s->frame.data[0])
avctx->release_buffer(avctx, &s->frame);
- if (avctx->get_buffer(avctx, &s->frame)) {
+ if (ff_get_buffer(avctx, &s->frame)) {
av_log(avctx, AV_LOG_ERROR, " id CIN Video: get_buffer() failed\n");
return -1;
}
#include "bytestream.h"
#include "avcodec.h"
#include "get_bits.h"
+#include "internal.h"
typedef struct {
AVFrame frame;
av_log(avctx, AV_LOG_ERROR, "reget_buffer() failed\n");
return res;
}
- } else if ((res = avctx->get_buffer(avctx, &s->frame)) < 0) {
+ } else if ((res = ff_get_buffer(avctx, &s->frame)) < 0) {
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return res;
} else if (avctx->bits_per_coded_sample <= 8 && avctx->pix_fmt != AV_PIX_FMT_GRAY8) {
av_log(avctx, AV_LOG_ERROR, "reget_buffer() failed\n");
return res;
}
- } else if ((res = avctx->get_buffer(avctx, &s->frame)) < 0) {
+ } else if ((res = ff_get_buffer(avctx, &s->frame)) < 0) {
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return res;
} else if (avctx->bits_per_coded_sample <= 8 && avctx->pix_fmt != AV_PIX_FMT_GRAY8) {
#include "get_bits.h"
#include "dsputil.h"
#include "fft.h"
+#include "internal.h"
#include "sinewin.h"
#include "imcdata.h"
/* get output buffer */
q->frame.nb_samples = COEFFS;
- if ((ret = avctx->get_buffer(avctx, &q->frame)) < 0) {
+ if ((ret = ff_get_buffer(avctx, &q->frame)) < 0) {
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return ret;
}
#include "dsputil.h"
#include "bytestream.h"
#include "get_bits.h"
+#include "internal.h"
#include "indeo3data.h"
avctx->release_buffer(avctx, &ctx->frame);
ctx->frame.reference = 0;
- if ((res = avctx->get_buffer(avctx, &ctx->frame)) < 0) {
+ if ((res = ff_get_buffer(avctx, &ctx->frame)) < 0) {
av_log(ctx->avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return res;
}
avctx->time_base);
}
+/**
+ * Get a buffer for a frame. This is a wrapper around
+ * AVCodecContext.get_buffer() and should be used instead calling get_buffer()
+ * directly.
+ */
+int ff_get_buffer(AVCodecContext *avctx, AVFrame *frame);
+
#endif /* AVCODEC_INTERNAL_H */
#include "dsputil.h"
#define BITSTREAM_READER_LE
#include "get_bits.h"
+#include "internal.h"
#define PALETTE_COUNT 256
buf_size - s->decoding_map_size);
s->current_frame.reference = 3;
- if (avctx->get_buffer(avctx, &s->current_frame)) {
+ if (ff_get_buffer(avctx, &s->current_frame)) {
av_log(avctx, AV_LOG_ERROR, " Interplay Video: get_buffer() failed\n");
return -1;
}
#include "libavutil/attributes.h"
#include "avcodec.h"
#include "get_bits.h"
+#include "internal.h"
#include "mathops.h"
#include "ivi_common.h"
#include "ivi_dsp.h"
ctx->frame.reference = 0;
avcodec_set_dimensions(avctx, ctx->planes[0].width, ctx->planes[0].height);
- if ((result = avctx->get_buffer(avctx, &ctx->frame)) < 0) {
+ if ((result = ff_get_buffer(avctx, &ctx->frame)) < 0) {
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return result;
}
#include "libavutil/intreadwrite.h"
#include "libavutil/imgutils.h"
#include "avcodec.h"
+#include "internal.h"
typedef struct {
AVCodecContext *avctx;
maxcnt = w * h;
c->cur.reference = 3;
- if ((res = avctx->get_buffer(avctx, &c->cur)) < 0)
+ if ((res = ff_get_buffer(avctx, &c->cur)) < 0)
return res;
out = (uint16_t *) c->cur.data[0];
if (c->prev.data[0]) {
#include "avcodec.h"
#include "bytestream.h"
+#include "internal.h"
#define KMVC_KEYFRAME 0x80
#define KMVC_PALETTE 0x40
ctx->pic.reference = 1;
ctx->pic.buffer_hints = FF_BUFFER_HINTS_VALID;
- if (avctx->get_buffer(avctx, &ctx->pic) < 0) {
+ if (ff_get_buffer(avctx, &ctx->pic) < 0) {
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return -1;
}
#include "libavutil/mem.h"
#include "avcodec.h"
#include "bytestream.h"
+#include "internal.h"
#include "lcl.h"
#if CONFIG_ZLIB_DECODER
c->pic.reference = 0;
c->pic.buffer_hints = FF_BUFFER_HINTS_VALID;
- if(avctx->get_buffer(avctx, &c->pic) < 0){
+ if(ff_get_buffer(avctx, &c->pic) < 0){
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return -1;
}
/* get output buffer */
s->frame.nb_samples = avctx->frame_size;
- if ((ret = avctx->get_buffer(avctx, &s->frame)) < 0) {
+ if ((ret = ff_get_buffer(avctx, &s->frame)) < 0) {
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return ret;
}
}
s->frame.nb_samples = s->decoder.blockl;
- if ((ret = avctx->get_buffer(avctx, &s->frame)) < 0) {
+ if ((ret = ff_get_buffer(avctx, &s->frame)) < 0) {
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return ret;
}
/* get output buffer */
s->frame.nb_samples = 160;
- if ((ret = avctx->get_buffer(avctx, &s->frame)) < 0) {
+ if ((ret = ff_get_buffer(avctx, &s->frame)) < 0) {
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return ret;
}
/* get output buffer */
s->frame.nb_samples = 320;
- if ((ret = avctx->get_buffer(avctx, &s->frame)) < 0) {
+ if ((ret = ff_get_buffer(avctx, &s->frame)) < 0) {
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return ret;
}
#include "libavutil/avassert.h"
#include "libavutil/intreadwrite.h"
#include "avcodec.h"
+#include "internal.h"
#include "vorbis.h"
#include "mathops.h"
#include "libopus.h"
int ret, nb_samples;
opus->frame.nb_samples = MAX_FRAME_SIZE;
- ret = avc->get_buffer(avc, &opus->frame);
+ ret = ff_get_buffer(avc, &opus->frame);
if (ret < 0) {
av_log(avc, AV_LOG_ERROR, "get_buffer() failed\n");
return ret;
#include "libavutil/intreadwrite.h"
#include "libavutil/mem.h"
#include "avcodec.h"
+#include "internal.h"
#include "libschroedinger.h"
#undef NDEBUG
if (framewithpts && framewithpts->frame) {
if (p_schro_params->dec_frame.data[0])
avccontext->release_buffer(avccontext, &p_schro_params->dec_frame);
- if (avccontext->get_buffer(avccontext, &p_schro_params->dec_frame) < 0) {
+ if (ff_get_buffer(avccontext, &p_schro_params->dec_frame) < 0) {
av_log(avccontext, AV_LOG_ERROR, "Unable to allocate buffer\n");
return AVERROR(ENOMEM);
}
#include "libavutil/channel_layout.h"
#include "libavutil/common.h"
#include "avcodec.h"
+#include "internal.h"
typedef struct {
AVFrame frame;
/* get output buffer */
s->frame.nb_samples = s->frame_size;
- if ((ret = avctx->get_buffer(avctx, &s->frame)) < 0) {
+ if ((ret = ff_get_buffer(avctx, &s->frame)) < 0) {
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return ret;
}
#include "avcodec.h"
#include "get_bits.h"
#include "golomb.h"
+#include "internal.h"
#include "mathops.h"
enum LOCO_MODE {LOCO_UNKN=0, LOCO_CYUY2=-1, LOCO_CRGB=-2, LOCO_CRGBA=-3, LOCO_CYV12=-4,
avctx->release_buffer(avctx, p);
p->reference = 0;
- if(avctx->get_buffer(avctx, p) < 0){
+ if(ff_get_buffer(avctx, p) < 0){
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return -1;
}
*/
#include "avcodec.h"
+#include "internal.h"
#include "libavutil/common.h"
/*
/* get output buffer */
ctx->frame.nb_samples = 3 * (buf_size << (1 - is_mace3)) / avctx->channels;
- if ((ret = avctx->get_buffer(avctx, &ctx->frame)) < 0) {
+ if ((ret = ff_get_buffer(avctx, &ctx->frame)) < 0) {
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return ret;
}
#include "libavutil/opt.h"
#include "avcodec.h"
#include "dsputil.h"
+#include "internal.h"
#include "mjpeg.h"
#include "mjpegdec.h"
#include "jpeglsdec.h"
if (s->picture_ptr->data[0])
s->avctx->release_buffer(s->avctx, s->picture_ptr);
- if (s->avctx->get_buffer(s->avctx, s->picture_ptr) < 0) {
+ if (ff_get_buffer(s->avctx, s->picture_ptr) < 0) {
av_log(s->avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return -1;
}
#include "avcodec.h"
#include "libavutil/intreadwrite.h"
#include "get_bits.h"
+#include "internal.h"
#include "libavutil/crc.h"
#include "parser.h"
#include "mlp_parser.h"
/* get output buffer */
m->frame.nb_samples = s->blockpos;
- if ((ret = avctx->get_buffer(avctx, &m->frame)) < 0) {
+ if ((ret = ff_get_buffer(avctx, &m->frame)) < 0) {
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return ret;
}
#include "avcodec.h"
#include "get_bits.h"
#include "dsputil.h"
+#include "internal.h"
#include "mpegaudiodsp.h"
#include "mpc.h"
/* get output buffer */
c->frame.nb_samples = last_frame ? c->lastframelen : MPC_FRAME_SIZE;
- if ((ret = avctx->get_buffer(avctx, &c->frame)) < 0) {
+ if ((ret = ff_get_buffer(avctx, &c->frame)) < 0) {
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return ret;
}
#include "avcodec.h"
#include "get_bits.h"
#include "dsputil.h"
+#include "internal.h"
#include "mpegaudiodsp.h"
#include "mpc.h"
/* get output buffer */
c->frame.nb_samples = MPC_FRAME_SIZE;
- if ((res = avctx->get_buffer(avctx, &c->frame)) < 0) {
+ if ((res = ff_get_buffer(avctx, &c->frame)) < 0) {
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return res;
}
#include "libavutil/channel_layout.h"
#include "avcodec.h"
#include "get_bits.h"
+#include "internal.h"
#include "mathops.h"
#include "mpegaudiodsp.h"
#include "dsputil.h"
/* get output buffer */
if (!samples) {
s->frame.nb_samples = s->avctx->frame_size;
- if ((ret = s->avctx->get_buffer(s->avctx, &s->frame)) < 0) {
+ if ((ret = ff_get_buffer(s->avctx, &s->frame)) < 0) {
av_log(s->avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return ret;
}
/* get output buffer */
s->frame->nb_samples = MPA_FRAME_SIZE;
- if ((ret = avctx->get_buffer(avctx, s->frame)) < 0) {
+ if ((ret = ff_get_buffer(avctx, s->frame)) < 0) {
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return ret;
}
*/
#include "libavutil/avassert.h"
+#include "internal.h"
#include "msmpeg4data.h"
#include "vc1.h"
#include "mss12.h"
FF_BUFFER_HINTS_PRESERVE |
FF_BUFFER_HINTS_REUSABLE;
- if ((ret = avctx->get_buffer(avctx, &ctx->pic)) < 0) {
+ if ((ret = ff_get_buffer(avctx, &ctx->pic)) < 0) {
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return ret;
}
* MxPEG decoder
*/
+#include "internal.h"
#include "mjpeg.h"
#include "mjpegdec.h"
/* use stored SOF data to allocate current picture */
if (jpg->picture_ptr->data[0])
avctx->release_buffer(avctx, jpg->picture_ptr);
- if (avctx->get_buffer(avctx, jpg->picture_ptr) < 0) {
+ if (ff_get_buffer(avctx, jpg->picture_ptr) < 0) {
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return AVERROR(ENOMEM);
}
/* allocate dummy reference picture if needed */
if (!reference_ptr->data[0] &&
- avctx->get_buffer(avctx, reference_ptr) < 0) {
+ ff_get_buffer(avctx, reference_ptr) < 0) {
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return AVERROR(ENOMEM);
}
#include "dsputil.h"
#include "fft.h"
#include "fmtconvert.h"
+#include "internal.h"
#include "nellymoser.h"
#include "sinewin.h"
/* get output buffer */
s->frame.nb_samples = NELLY_SAMPLES * blocks;
- if ((ret = avctx->get_buffer(avctx, &s->frame)) < 0) {
+ if ((ret = ff_get_buffer(avctx, &s->frame)) < 0) {
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return ret;
}
#include "libavutil/channel_layout.h"
#include "avcodec.h"
#include "bytestream.h"
+#include "internal.h"
/*
* Channel Mapping according to
/* get output buffer */
s->frame.nb_samples = samples;
- if ((retval = avctx->get_buffer(avctx, &s->frame)) < 0) {
+ if ((retval = ff_get_buffer(avctx, &s->frame)) < 0) {
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return retval;
}
/* get output buffer */
s->frame.nb_samples = n * samples_per_block / avctx->channels;
- if ((ret = avctx->get_buffer(avctx, &s->frame)) < 0) {
+ if ((ret = ff_get_buffer(avctx, &s->frame)) < 0) {
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return ret;
}
#include "avcodec.h"
#include "bytestream.h"
#include "get_bits.h"
+#include "internal.h"
typedef struct PCXContext {
AVFrame picture;
return -1;
if (w != avctx->width || h != avctx->height)
avcodec_set_dimensions(avctx, w, h);
- if (avctx->get_buffer(avctx, p) < 0) {
+ if (ff_get_buffer(avctx, p) < 0) {
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return -1;
}
#include "avcodec.h"
#include "bytestream.h"
#include "cga_data.h"
+#include "internal.h"
typedef struct PicContext {
AVFrame frame;
avctx->release_buffer(avctx, &s->frame);
}
- if (avctx->get_buffer(avctx, &s->frame) < 0){
+ if (ff_get_buffer(avctx, &s->frame) < 0){
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return -1;
}
#include "libavutil/imgutils.h"
#include "avcodec.h"
#include "bytestream.h"
+#include "internal.h"
#include "png.h"
#include "pngdsp.h"
avctx->release_buffer(avctx, p);
p->reference= 0;
- if(avctx->get_buffer(avctx, p) < 0){
+ if(ff_get_buffer(avctx, p) < 0){
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
goto fail;
}
#include "avcodec.h"
#include "bytestream.h"
+#include "internal.h"
#include "put_bits.h"
#include "pnm.h"
avctx->release_buffer(avctx, p);
p->reference = 0;
- if (avctx->get_buffer(avctx, p) < 0) {
+ if (ff_get_buffer(avctx, p) < 0) {
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return -1;
}
#include "libavutil/intmath.h"
#include "avcodec.h"
+#include "internal.h"
#include "proresdata.h"
#include "proresdsp.h"
#include "get_bits.h"
avctx->release_buffer(avctx, picture);
picture->reference = 0;
- if (avctx->get_buffer(avctx, picture) < 0)
+ if (ff_get_buffer(avctx, picture) < 0)
return -1;
for (pic_num = 0; ctx->picture.interlaced_frame - pic_num + 1; pic_num++) {
pthread_cond_wait(&p->progress_cond, &p->progress_mutex);
if (p->state == STATE_GET_BUFFER) {
- p->result = p->avctx->get_buffer(p->avctx, p->requested_frame);
+ p->result = ff_get_buffer(p->avctx, p->requested_frame);
p->state = STATE_SETTING_UP;
pthread_cond_signal(&p->progress_cond);
}
if (!(avctx->active_thread_type&FF_THREAD_FRAME)) {
f->thread_opaque = NULL;
- return avctx->get_buffer(avctx, f);
+ return ff_get_buffer(avctx, f);
}
if (p->state != STATE_SETTING_UP &&
if (avctx->thread_safe_callbacks ||
avctx->get_buffer == avcodec_default_get_buffer) {
- err = avctx->get_buffer(avctx, f);
+ err = ff_get_buffer(avctx, f);
} else {
p->requested_frame = f;
p->state = STATE_GET_BUFFER;
#include "libavutil/intreadwrite.h"
#include "libavutil/imgutils.h"
#include "avcodec.h"
+#include "internal.h"
typedef struct PTXContext {
AVFrame picture;
return -1;
if (w != avctx->width || h != avctx->height)
avcodec_set_dimensions(avctx, w, h);
- if (avctx->get_buffer(avctx, p) < 0) {
+ if (ff_get_buffer(avctx, p) < 0) {
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return -1;
}
/* get output buffer */
q->avframe.nb_samples = 160;
- if ((ret = avctx->get_buffer(avctx, &q->avframe)) < 0) {
+ if ((ret = ff_get_buffer(avctx, &q->avframe)) < 0) {
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return ret;
}
#include "avcodec.h"
#include "get_bits.h"
#include "dsputil.h"
+#include "internal.h"
#include "rdft.h"
#include "mpegaudiodsp.h"
#include "mpegaudio.h"
/* get output buffer */
s->frame.nb_samples = 16 * s->frame_size;
- if ((ret = avctx->get_buffer(avctx, &s->frame)) < 0) {
+ if ((ret = ff_get_buffer(avctx, &s->frame)) < 0) {
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return ret;
}
#include "libavutil/common.h"
#include "libavutil/intreadwrite.h"
#include "avcodec.h"
+#include "internal.h"
typedef struct QdrawContext{
AVCodecContext *avctx;
avctx->release_buffer(avctx, p);
p->reference= 0;
- if(avctx->get_buffer(avctx, p) < 0){
+ if(ff_get_buffer(avctx, p) < 0){
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return -1;
}
*/
#include "avcodec.h"
+#include "internal.h"
#include "libavutil/bswap.h"
#include "libavutil/common.h"
}
pic->reference = 0;
- if (avctx->get_buffer(avctx, pic) < 0)
+ if (ff_get_buffer(avctx, pic) < 0)
return -1;
pic->pict_type = AV_PICTURE_TYPE_I;
#include "libavutil/intmath.h"
#include "avcodec.h"
#include "get_bits.h"
+#include "internal.h"
#include "ra144.h"
/* get output buffer */
ractx->frame.nb_samples = NBLOCKS * BLOCKSIZE;
- if ((ret = avctx->get_buffer(avctx, &ractx->frame)) < 0) {
+ if ((ret = ff_get_buffer(avctx, &ractx->frame)) < 0) {
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return ret;
}
#include "libavutil/channel_layout.h"
#include "libavutil/float_dsp.h"
#include "avcodec.h"
+#include "internal.h"
#define BITSTREAM_READER_LE
#include "get_bits.h"
#include "ra288.h"
/* get output buffer */
ractx->frame.nb_samples = RA288_BLOCK_SIZE * RA288_BLOCKS_PER_FRAME;
- if ((ret = avctx->get_buffer(avctx, &ractx->frame)) < 0) {
+ if ((ret = ff_get_buffer(avctx, &ractx->frame)) < 0) {
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return ret;
}
#include "avcodec.h"
#include "get_bits.h"
#include "golomb.h"
+#include "internal.h"
#include "unary.h"
#include "ralfdata.h"
}
ctx->frame.nb_samples = ctx->max_frame_size;
- if ((ret = avctx->get_buffer(avctx, &ctx->frame)) < 0) {
+ if ((ret = ff_get_buffer(avctx, &ctx->frame)) < 0) {
av_log(avctx, AV_LOG_ERROR, "Me fail get_buffer()? That's unpossible!\n");
return ret;
}
#include "libavutil/intreadwrite.h"
#include "libavutil/mem.h"
#include "avcodec.h"
+#include "internal.h"
#define EXTRADATA1_SIZE (6 + 256 * 3) ///< video base, clr count, palette
/** get buffer */
s->frame.reference= 0;
- if(avctx->get_buffer(avctx, &s->frame)) {
+ if(ff_get_buffer(avctx, &s->frame)) {
av_log(s->avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return -1;
}
if (enc->first_frame) {
/* Alloc memory for the reconstruction data (we must know the stride
for that) */
- if (avctx->get_buffer(avctx, enc->current_frame) ||
- avctx->get_buffer(avctx, enc->last_frame)) {
+ if (ff_get_buffer(avctx, enc->current_frame) ||
+ ff_get_buffer(avctx, enc->last_frame)) {
av_log(avctx, AV_LOG_ERROR, " RoQ: get_buffer() failed\n");
return -1;
}
#include "libavutil/intreadwrite.h"
#include "libavutil/log.h"
#include "avcodec.h"
+#include "internal.h"
#include "mathops.h"
#define AES3_HEADER_LEN 4
/* get output buffer */
block_size = (avctx->bits_per_coded_sample + 4) / 4;
s->frame.nb_samples = 2 * (buf_size / block_size) / avctx->channels;
- if ((ret = avctx->get_buffer(avctx, &s->frame)) < 0) {
+ if ((ret = ff_get_buffer(avctx, &s->frame)) < 0) {
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return ret;
}
#include "libavutil/imgutils.h"
#include "avcodec.h"
#include "bytestream.h"
+#include "internal.h"
#include "sgi.h"
typedef struct SgiState {
avctx->release_buffer(avctx, p);
p->reference = 0;
- if (avctx->get_buffer(avctx, p) < 0) {
+ if (ff_get_buffer(avctx, p) < 0) {
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed.\n");
return -1;
}
#include "bytestream.h"
#include "get_bits.h"
#include "golomb.h"
+#include "internal.h"
#define MAX_CHANNELS 8
#define MAX_BLOCKSIZE 65535
if (s->cur_chan == s->channels) {
/* get output buffer */
s->frame.nb_samples = s->blocksize;
- if ((ret = avctx->get_buffer(avctx, &s->frame)) < 0) {
+ if ((ret = ff_get_buffer(avctx, &s->frame)) < 0) {
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return ret;
}
#define BITSTREAM_READER_LE
#include "get_bits.h"
#include "dsputil.h"
+#include "internal.h"
#include "lsp.h"
#include "acelp_vectors.h"
/* get output buffer */
ctx->frame.nb_samples = mode_par->frames_per_packet * subframe_size *
mode_par->subframe_count;
- if ((ret = avctx->get_buffer(avctx, &ctx->frame)) < 0) {
+ if ((ret = ff_get_buffer(avctx, &ctx->frame)) < 0) {
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return ret;
}
#include "libavutil/channel_layout.h"
#include "avcodec.h"
+#include "internal.h"
#include "mathops.h"
#define BITSTREAM_READER_LE
/* get output buffer */
s->frame.nb_samples = unp_size / (avctx->channels * (bits + 1));
- if ((ret = avctx->get_buffer(avctx, &s->frame)) < 0) {
+ if ((ret = ff_get_buffer(avctx, &s->frame)) < 0) {
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return ret;
}
for(j=0; j<MAX_REF_FRAMES; j++)
ff_scale_mv_ref[i][j] = 256*(i+1)/(j+1);
- if ((ret = s->avctx->get_buffer(s->avctx, &s->mconly_picture)) < 0) {
+ if ((ret = s->ff_get_buffer(s->avctx, &s->mconly_picture)) < 0) {
av_log(s->avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return ret;
}
}
s->current_picture.reference= 1;
- if(s->avctx->get_buffer(s->avctx, &s->current_picture) < 0){
+ if(s->ff_get_buffer(s->avctx, &s->current_picture) < 0){
av_log(s->avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return -1;
}
#include "avcodec.h"
#include "dsputil.h"
#include "dwt.h"
+#include "internal.h"
#include "snow.h"
#include "rangecoder.h"
ff_set_cmp(&s->dsp, s->dsp.me_cmp, s->avctx->me_cmp);
ff_set_cmp(&s->dsp, s->dsp.me_sub_cmp, s->avctx->me_sub_cmp);
- s->avctx->get_buffer(s->avctx, &s->input_picture);
+ s->ff_get_buffer(s->avctx, &s->input_picture);
if(s->avctx->me_method == ME_ITER){
int i;
#include "libavutil/intreadwrite.h"
#include "libavutil/imgutils.h"
#include "avcodec.h"
+#include "internal.h"
#include "sunrast.h"
typedef struct SUNRASTContext {
if (w != avctx->width || h != avctx->height)
avcodec_set_dimensions(avctx, w, h);
- if ((ret = avctx->get_buffer(avctx, p)) < 0) {
+ if ((ret = ff_get_buffer(avctx, p)) < 0) {
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return ret;
}
}
if (!s->current_picture.data[0]) {
- avctx->get_buffer(avctx, &s->current_picture);
- avctx->get_buffer(avctx, &s->last_picture);
+ ff_get_buffer(avctx, &s->current_picture);
+ ff_get_buffer(avctx, &s->last_picture);
s->scratchbuf = av_malloc(s->current_picture.linesize[0] * 16 * 2);
}
#include "libavutil/imgutils.h"
#include "avcodec.h"
#include "bytestream.h"
+#include "internal.h"
#include "targa.h"
typedef struct TargaContext {
return -1;
if(w != avctx->width || h != avctx->height)
avcodec_set_dimensions(avctx, w, h);
- if(avctx->get_buffer(avctx, p) < 0){
+ if(ff_get_buffer(avctx, p) < 0){
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return -1;
}
/**
* Wrapper around get_buffer() for frame-multithreaded codecs.
- * Call this function instead of avctx->get_buffer(f).
+ * Call this function instead of ff_get_buffer(f).
* Cannot be called after the codec has called ff_thread_finish_setup().
*
* @param avctx The current context.
#include "lzw.h"
#include "tiff.h"
#include "faxcompr.h"
+#include "internal.h"
#include "mathops.h"
#include "libavutil/attributes.h"
#include "libavutil/intreadwrite.h"
}
if (s->picture.data[0])
s->avctx->release_buffer(s->avctx, &s->picture);
- if ((ret = s->avctx->get_buffer(s->avctx, &s->picture)) < 0) {
+ if ((ret = ff_get_buffer(s->avctx, &s->picture)) < 0) {
av_log(s->avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return ret;
}
#include <string.h>
#include "avcodec.h"
+#include "internal.h"
#include "libavutil/internal.h"
#include "cga_data.h"
if (tmv->pic.data[0])
avctx->release_buffer(avctx, &tmv->pic);
- if (avctx->get_buffer(avctx, &tmv->pic) < 0) {
+ if (ff_get_buffer(avctx, &tmv->pic) < 0) {
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return -1;
}
#include "avcodec.h"
#include "dsputil.h"
#include "get_bits.h"
+#include "internal.h"
#include "truespeech_data.h"
/**
/* get output buffer */
c->frame.nb_samples = iterations * 240;
- if ((ret = avctx->get_buffer(avctx, &c->frame)) < 0) {
+ if ((ret = ff_get_buffer(avctx, &c->frame)) < 0) {
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return ret;
}
#include <stdlib.h>
#include "avcodec.h"
+#include "internal.h"
#include "msrledec.h"
#include <zlib.h>
c->pic.reference = 1;
c->pic.buffer_hints = FF_BUFFER_HINTS_VALID;
- if(avctx->get_buffer(avctx, &c->pic) < 0){
+ if(ff_get_buffer(avctx, &c->pic) < 0){
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return -1;
}
#include <limits.h>
#include "avcodec.h"
#include "get_bits.h"
+#include "internal.h"
#include "libavutil/crc.h"
#define FORMAT_SIMPLE 1
/* get output buffer */
s->frame.nb_samples = framelen;
- if ((ret = avctx->get_buffer(avctx, &s->frame)) < 0) {
+ if ((ret = ff_get_buffer(avctx, &s->frame)) < 0) {
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return ret;
}
#include "get_bits.h"
#include "dsputil.h"
#include "fft.h"
+#include "internal.h"
#include "lsp.h"
#include "sinewin.h"
/* get output buffer */
if (tctx->discarded_packets >= 2) {
tctx->frame.nb_samples = mtab->size;
- if ((ret = avctx->get_buffer(avctx, &tctx->frame)) < 0) {
+ if ((ret = ff_get_buffer(avctx, &tctx->frame)) < 0) {
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return ret;
}
#include "libavutil/imgutils.h"
#include "avcodec.h"
#include "bytestream.h"
+#include "internal.h"
#include "s3tc.h"
typedef struct TXDContext {
return -1;
if (w != avctx->width || h != avctx->height)
avcodec_set_dimensions(avctx, w, h);
- if (avctx->get_buffer(avctx, p) < 0) {
+ if (ff_get_buffer(avctx, p) < 0) {
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return -1;
}
}
}
+int ff_get_buffer(AVCodecContext *avctx, AVFrame *frame)
+{
+ return avctx->get_buffer(avctx, frame);
+}
+
void avcodec_default_release_buffer(AVCodecContext *s, AVFrame *pic)
{
int i;
if (pic->data[0] == NULL) {
/* We will copy from buffer, so must be readable */
pic->buffer_hints |= FF_BUFFER_HINTS_READABLE;
- return s->get_buffer(s, pic);
+ return ff_get_buffer(s, pic);
}
assert(s->pix_fmt == pic->format);
pic->data[i] = pic->base[i] = NULL;
pic->opaque = NULL;
/* Allocate new frame */
- if (s->get_buffer(s, pic))
+ if (ff_get_buffer(s, pic))
return -1;
/* Copy image data from old buffer to new buffer */
av_picture_copy((AVPicture *)pic, (AVPicture *)&temp_pic, s->pix_fmt, s->width,
int ff_thread_get_buffer(AVCodecContext *avctx, AVFrame *f)
{
f->owner = avctx;
- return avctx->get_buffer(avctx, f);
+ return ff_get_buffer(avctx, f);
}
void ff_thread_release_buffer(AVCodecContext *avctx, AVFrame *f)
*/
#include "avcodec.h"
+#include "internal.h"
#include "libavutil/bswap.h"
#include "libavutil/internal.h"
#include "libavutil/mem.h"
}
pic->reference = 0;
- if (avctx->get_buffer(avctx, pic) < 0)
+ if (ff_get_buffer(avctx, pic) < 0)
return -1;
y = (uint16_t*)pic->data[0];
*/
#include "avcodec.h"
+#include "internal.h"
#include "libavutil/bswap.h"
#include "libavutil/internal.h"
#include "libavutil/mem.h"
}
pic->reference= 0;
- if(avctx->get_buffer(avctx, pic) < 0)
+ if(ff_get_buffer(avctx, pic) < 0)
return -1;
ydst= (uint16_t *)pic->data[0];
#include "libavutil/common.h"
#include "libavutil/intreadwrite.h"
#include "avcodec.h"
+#include "internal.h"
static av_cold int v410_decode_init(AVCodecContext *avctx)
{
pic->reference = 0;
- if (avctx->get_buffer(avctx, pic) < 0) {
+ if (ff_get_buffer(avctx, pic) < 0) {
av_log(avctx, AV_LOG_ERROR, "Could not allocate buffer.\n");
return AVERROR(ENOMEM);
}
#include "avcodec.h"
#include "bytestream.h"
+#include "internal.h"
enum VBFlags{
VB_HAS_GMC = 0x01,
if(c->pic.data[0])
avctx->release_buffer(avctx, &c->pic);
c->pic.reference = 1;
- if(avctx->get_buffer(avctx, &c->pic) < 0){
+ if(ff_get_buffer(avctx, &c->pic) < 0){
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return -1;
}
#include "avcodec.h"
#include "dsputil.h"
#include "get_bits.h"
+#include "internal.h"
#include "mathops.h"
typedef struct {
avctx->release_buffer(avctx, pic);
/* Allocate buffer */
- if (avctx->get_buffer(avctx, pic) < 0) {
+ if (ff_get_buffer(avctx, pic) < 0) {
av_log(avctx, AV_LOG_ERROR, "Could not allocate buffer.\n");
return AVERROR(ENOMEM);
}
v->sprite_output_frame.buffer_hints = FF_BUFFER_HINTS_VALID;
v->sprite_output_frame.reference = 0;
- if (avctx->get_buffer(avctx, &v->sprite_output_frame) < 0) {
+ if (ff_get_buffer(avctx, &v->sprite_output_frame) < 0) {
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return -1;
}
#include "avcodec.h"
#include "dsputil.h"
+#include "internal.h"
#include "libavutil/internal.h"
typedef struct VCR1Context {
avctx->release_buffer(avctx, p);
p->reference = 0;
- if (avctx->get_buffer(avctx, p) < 0) {
+ if (ff_get_buffer(avctx, p) < 0) {
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return -1;
}
#include "libavutil/common.h"
#include "libavutil/intreadwrite.h"
#include "avcodec.h"
+#include "internal.h"
#define VMD_HEADER_SIZE 0x330
#define PALETTE_COUNT 256
return buf_size;
s->frame.reference = 1;
- if (avctx->get_buffer(avctx, &s->frame)) {
+ if (ff_get_buffer(avctx, &s->frame)) {
av_log(s->avctx, AV_LOG_ERROR, "VMD Video: get_buffer() failed\n");
return -1;
}
/* get output buffer */
s->frame.nb_samples = ((silent_chunks + audio_chunks) * avctx->block_align) / avctx->channels;
- if ((ret = avctx->get_buffer(avctx, &s->frame)) < 0) {
+ if ((ret = ff_get_buffer(avctx, &s->frame)) < 0) {
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return ret;
}
#include "dsputil.h"
#include "fft.h"
#include "fmtconvert.h"
+#include "internal.h"
#include "vorbis.h"
#include "xiph.h"
/* get output buffer */
vc->frame.nb_samples = vc->blocksize[1] / 2;
- if ((ret = avccontext->get_buffer(avccontext, &vc->frame)) < 0) {
+ if ((ret = ff_get_buffer(avccontext, &vc->frame)) < 0) {
av_log(avccontext, AV_LOG_ERROR, "get_buffer() failed\n");
return ret;
}
#include "avcodec.h"
#include "bytestream.h"
+#include "internal.h"
#include "vp56.h"
#include "vp56data.h"
if (!is_alpha) {
p->reference = 1;
- if (avctx->get_buffer(avctx, p) < 0) {
+ if (ff_get_buffer(avctx, p) < 0) {
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return -1;
}
#include "libavutil/imgutils.h"
#include "avcodec.h"
#include "bytestream.h"
+#include "internal.h"
#define PALETTE_COUNT 256
#define VQA_HEADER_SIZE 0x2A
if (s->frame.data[0])
avctx->release_buffer(avctx, &s->frame);
- if (avctx->get_buffer(avctx, &s->frame)) {
+ if (ff_get_buffer(avctx, &s->frame)) {
av_log(s->avctx, AV_LOG_ERROR, " VQA Video: get_buffer() failed\n");
return -1;
}
#include "libavutil/channel_layout.h"
#include "avcodec.h"
#include "get_bits.h"
+#include "internal.h"
#include "unary.h"
/**
/* get output buffer */
s->frame.nb_samples = s->samples;
- if ((ret = avctx->get_buffer(avctx, &s->frame)) < 0) {
+ if ((ret = ff_get_buffer(avctx, &s->frame)) < 0) {
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return ret;
}
*/
#include "avcodec.h"
+#include "internal.h"
#include "wma.h"
#undef NDEBUG
/* get output buffer */
s->frame.nb_samples = nb_frames * s->frame_len;
- if ((ret = avctx->get_buffer(avctx, &s->frame)) < 0) {
+ if ((ret = ff_get_buffer(avctx, &s->frame)) < 0) {
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return ret;
}
int more_frames = 0, len = 0, i, ret;
s->frame.nb_samples = s->samples_per_frame;
- if ((ret = s->avctx->get_buffer(s->avctx, &s->frame)) < 0) {
+ if ((ret = ff_get_buffer(s->avctx, &s->frame)) < 0) {
/* return an error if no frame could be decoded at all */
av_log(s->avctx, AV_LOG_ERROR,
"not enough space for the output samples\n");
/* get output buffer */
s->frame.nb_samples = s->samples_per_frame;
- if ((ret = avctx->get_buffer(avctx, &s->frame)) < 0) {
+ if ((ret = ff_get_buffer(avctx, &s->frame)) < 0) {
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
s->packet_loss = 1;
return 0;
#include "libavutil/mem.h"
#include "dsputil.h"
#include "avcodec.h"
+#include "internal.h"
#include "get_bits.h"
#include "put_bits.h"
#include "wmavoice_data.h"
/* get output buffer */
s->frame.nb_samples = 480;
- if ((res = ctx->get_buffer(ctx, &s->frame)) < 0) {
+ if ((res = ff_get_buffer(ctx, &s->frame)) < 0) {
av_log(ctx, AV_LOG_ERROR, "get_buffer() failed\n");
return res;
}
#include "avcodec.h"
#include "get_bits.h"
+#include "internal.h"
#include "mathops.h"
avctx->release_buffer(avctx, p);
p->reference = 0;
- if(avctx->get_buffer(avctx, p) < 0){
+ if(ff_get_buffer(avctx, p) < 0){
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
av_free(rbuf);
return -1;
#include "libavutil/common.h"
#include "libavutil/intreadwrite.h"
#include "avcodec.h"
+#include "internal.h"
/**
* @file
/* get output buffer */
s->frame.nb_samples = out_size;
- if ((ret = avctx->get_buffer(avctx, &s->frame)) < 0) {
+ if ((ret = ff_get_buffer(avctx, &s->frame)) < 0) {
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return ret;
}
#include "bytestream.h"
#define BITSTREAM_READER_LE
#include "get_bits.h"
+#include "internal.h"
#define RUNTIME_GAMMA 0
return AVERROR_INVALIDDATA;
}
- if ((ret = avctx->get_buffer(avctx, &s->current_frame))) {
+ if ((ret = ff_get_buffer(avctx, &s->current_frame))) {
av_log(s->avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return ret;
}
#include "libavutil/common.h"
#include "libavutil/intreadwrite.h"
#include "avcodec.h"
+#include "internal.h"
typedef struct VideoXLContext{
AVCodecContext *avctx;
avctx->release_buffer(avctx, p);
p->reference = 0;
- if(avctx->get_buffer(avctx, p) < 0){
+ if(ff_get_buffer(avctx, p) < 0){
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return -1;
}
#include "libavutil/imgutils.h"
#include "avcodec.h"
#include "bytestream.h"
+#include "internal.h"
#include "xwd.h"
static av_cold int xwd_decode_init(AVCodecContext *avctx)
avctx->release_buffer(avctx, p);
p->reference = 0;
- if ((ret = avctx->get_buffer(avctx, p)) < 0) {
+ if ((ret = ff_get_buffer(avctx, p)) < 0) {
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return ret;
}
#include "avcodec.h"
#include "get_bits.h"
+#include "internal.h"
typedef struct YopDecContext {
AVFrame frame;
if (s->frame.data[0])
avctx->release_buffer(avctx, &s->frame);
- ret = avctx->get_buffer(avctx, &s->frame);
+ ret = ff_get_buffer(avctx, &s->frame);
if (ret < 0) {
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return ret;
#include <zlib.h>
#include "avcodec.h"
+#include "internal.h"
#include "libavutil/common.h"
typedef struct {
return AVERROR_INVALIDDATA;
}
- if (avctx->get_buffer(avctx, pic) < 0) {
+ if (ff_get_buffer(avctx, pic) < 0) {
av_log(avctx, AV_LOG_ERROR, "Could not allocate buffer.\n");
return AVERROR(ENOMEM);
}
#include "libavutil/common.h"
#include "libavutil/intreadwrite.h"
#include "avcodec.h"
+#include "internal.h"
#include <zlib.h>
c->pic.reference = 1;
c->pic.buffer_hints = FF_BUFFER_HINTS_VALID;
- if ((ret = avctx->get_buffer(avctx, &c->pic)) < 0) {
+ if ((ret = ff_get_buffer(avctx, &c->pic)) < 0) {
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
return ret;
}