Skip to content

Commit

Permalink
Replace PIX_FMT_* -> AV_PIX_FMT_*, PixelFormat -> AVPixelFormat
Browse files Browse the repository at this point in the history
  • Loading branch information
elenril committed Oct 8, 2012
1 parent 78071a1 commit 716d413
Show file tree
Hide file tree
Showing 296 changed files with 2,494 additions and 2,493 deletions.
2 changes: 1 addition & 1 deletion avconv.h
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ typedef struct OutputStream {
const char *attachment_filename;
int copy_initial_nonkeyframes;

enum PixelFormat pix_fmts[2];
enum AVPixelFormat pix_fmts[2];
} OutputStream;

typedef struct OutputFile {
Expand Down
2 changes: 1 addition & 1 deletion avconv_filter.c
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ static char *choose_ ## var ## s(OutputStream *ost) \
return NULL; \
}

DEF_CHOOSE_FORMAT(enum PixelFormat, pix_fmt, pix_fmts, PIX_FMT_NONE,
DEF_CHOOSE_FORMAT(enum AVPixelFormat, pix_fmt, pix_fmts, AV_PIX_FMT_NONE,
GET_PIX_FMT_NAME, ":")

DEF_CHOOSE_FORMAT(enum AVSampleFormat, sample_fmt, sample_fmts,
Expand Down
4 changes: 2 additions & 2 deletions avconv_opt.c
Original file line number Diff line number Diff line change
Expand Up @@ -846,7 +846,7 @@ static OutputStream *new_output_stream(OptionsContext *o, AVFormatContext *oc, e

av_opt_get_int(sws_opts, "sws_flags", 0, &ost->sws_flags);

ost->pix_fmts[0] = ost->pix_fmts[1] = PIX_FMT_NONE;
ost->pix_fmts[0] = ost->pix_fmts[1] = AV_PIX_FMT_NONE;

return ost;
}
Expand Down Expand Up @@ -904,7 +904,7 @@ static OutputStream *new_video_stream(OptionsContext *o, AVFormatContext *oc)
ost->frame_aspect_ratio = parse_frame_aspect_ratio(frame_aspect_ratio);

MATCH_PER_STREAM_OPT(frame_pix_fmts, str, frame_pix_fmt, oc, st);
if (frame_pix_fmt && (video_enc->pix_fmt = av_get_pix_fmt(frame_pix_fmt)) == PIX_FMT_NONE) {
if (frame_pix_fmt && (video_enc->pix_fmt = av_get_pix_fmt(frame_pix_fmt)) == AV_PIX_FMT_NONE) {
av_log(NULL, AV_LOG_FATAL, "Unknown pixel format requested: %s.\n", frame_pix_fmt);
exit(1);
}
Expand Down
4 changes: 2 additions & 2 deletions avplay.c
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ typedef struct VideoPicture {
int width, height; /* source height & width */
int allocated;
int reallocate;
enum PixelFormat pix_fmt;
enum AVPixelFormat pix_fmt;

#if CONFIG_AVFILTER
AVFilterBufferRef *picref;
Expand Down Expand Up @@ -1316,7 +1316,7 @@ static int queue_picture(VideoState *is, AVFrame *src_frame, double pts, int64_t
#if CONFIG_AVFILTER
AVPicture pict_src;
#else
int dst_pix_fmt = PIX_FMT_YUV420P;
int dst_pix_fmt = AV_PIX_FMT_YUV420P;
#endif
/* wait until we have space to put a new picture */
SDL_LockMutex(is->pictq_mutex);
Expand Down
4 changes: 2 additions & 2 deletions avprobe.c
Original file line number Diff line number Diff line change
Expand Up @@ -630,8 +630,8 @@ static void show_stream(AVFormatContext *fmt_ctx, int stream_idx)
&display_aspect_ratio));
}
probe_str("pix_fmt",
dec_ctx->pix_fmt != PIX_FMT_NONE ? av_pix_fmt_descriptors[dec_ctx->pix_fmt].name
: "unknown");
dec_ctx->pix_fmt != AV_PIX_FMT_NONE ?
av_pix_fmt_descriptors[dec_ctx->pix_fmt].name : "unknown");
probe_int("level", dec_ctx->level);
break;

Expand Down
8 changes: 4 additions & 4 deletions cmdutils.c
Original file line number Diff line number Diff line change
Expand Up @@ -686,8 +686,8 @@ static void print_codec(const AVCodec *c)
}
printf("\n");
}
PRINT_CODEC_SUPPORTED(c, pix_fmts, enum PixelFormat, "pixel formats",
PIX_FMT_NONE, GET_PIX_FMT_NAME);
PRINT_CODEC_SUPPORTED(c, pix_fmts, enum AVPixelFormat, "pixel formats",
AV_PIX_FMT_NONE, GET_PIX_FMT_NAME);
PRINT_CODEC_SUPPORTED(c, supported_samplerates, int, "sample rates", 0,
GET_SAMPLE_RATE_NAME);
PRINT_CODEC_SUPPORTED(c, sample_fmts, enum AVSampleFormat, "sample formats",
Expand Down Expand Up @@ -866,7 +866,7 @@ int show_filters(void *optctx, const char *opt, const char *arg)

int show_pix_fmts(void *optctx, const char *opt, const char *arg)
{
enum PixelFormat pix_fmt;
enum AVPixelFormat pix_fmt;

printf("Pixel formats:\n"
"I.... = Supported Input format for conversion\n"
Expand All @@ -882,7 +882,7 @@ int show_pix_fmts(void *optctx, const char *opt, const char *arg)
# define sws_isSupportedOutput(x) 0
#endif

for (pix_fmt = 0; pix_fmt < PIX_FMT_NB; pix_fmt++) {
for (pix_fmt = 0; pix_fmt < AV_PIX_FMT_NB; pix_fmt++) {
const AVPixFmtDescriptor *pix_desc = &av_pix_fmt_descriptors[pix_fmt];
printf("%c%c%c%c%c %-16s %d %2d\n",
sws_isSupportedInput (pix_fmt) ? 'I' : '.',
Expand Down
2 changes: 1 addition & 1 deletion cmdutils.h
Original file line number Diff line number Diff line change
Expand Up @@ -416,7 +416,7 @@ typedef struct FrameBuffer {
int linesize[4];

int h, w;
enum PixelFormat pix_fmt;
enum AVPixelFormat pix_fmt;

int refcount;
struct FrameBuffer **pool; ///< head of the buffer pool
Expand Down
2 changes: 1 addition & 1 deletion doc/filters.texi
Original file line number Diff line number Diff line change
Expand Up @@ -2132,7 +2132,7 @@ will instruct the source to accept video frames with size 320x240 and
with format "yuv410p", assuming 1/24 as the timestamps timebase and
square pixels (1:1 sample aspect ratio).
Since the pixel format with name "yuv410p" corresponds to the number 6
(check the enum PixelFormat definition in @file{libavutil/pixfmt.h}),
(check the enum AVPixelFormat definition in @file{libavutil/pixfmt.h}),
this example corresponds to:
@example
buffer=320:240:6:1:24
Expand Down
4 changes: 2 additions & 2 deletions libavcodec/4xm.c
Original file line number Diff line number Diff line change
Expand Up @@ -900,9 +900,9 @@ static av_cold int decode_init(AVCodecContext *avctx)
init_vlcs(f);

if (f->version > 2)
avctx->pix_fmt = PIX_FMT_RGB565;
avctx->pix_fmt = AV_PIX_FMT_RGB565;
else
avctx->pix_fmt = PIX_FMT_BGR555;
avctx->pix_fmt = AV_PIX_FMT_BGR555;

return 0;
}
Expand Down
10 changes: 5 additions & 5 deletions libavcodec/8bps.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@
#include "avcodec.h"


static const enum PixelFormat pixfmt_rgb24[] = {
PIX_FMT_BGR24, PIX_FMT_RGB32, PIX_FMT_NONE };
static const enum AVPixelFormat pixfmt_rgb24[] = {
AV_PIX_FMT_BGR24, AV_PIX_FMT_RGB32, AV_PIX_FMT_NONE };

/*
* Decoder context
Expand Down Expand Up @@ -95,7 +95,7 @@ static int decode_frame(AVCodecContext *avctx, void *data,
if (planes == 4)
planes--;

px_inc = planes + (avctx->pix_fmt == PIX_FMT_RGB32);
px_inc = planes + (avctx->pix_fmt == AV_PIX_FMT_RGB32);

for (p = 0; p < planes; p++) {
/* Lines length pointer for this plane */
Expand Down Expand Up @@ -170,7 +170,7 @@ static av_cold int decode_init(AVCodecContext *avctx)

switch (avctx->bits_per_coded_sample) {
case 8:
avctx->pix_fmt = PIX_FMT_PAL8;
avctx->pix_fmt = AV_PIX_FMT_PAL8;
c->planes = 1;
c->planemap[0] = 0; // 1st plane is palette indexes
break;
Expand All @@ -182,7 +182,7 @@ static av_cold int decode_init(AVCodecContext *avctx)
c->planemap[2] = 0; // 3rd plane is blue
break;
case 32:
avctx->pix_fmt = PIX_FMT_RGB32;
avctx->pix_fmt = AV_PIX_FMT_RGB32;
c->planes = 4;
#if HAVE_BIGENDIAN
c->planemap[0] = 1; // 1st plane is red
Expand Down
4 changes: 2 additions & 2 deletions libavcodec/a64multienc.c
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,7 @@ AVCodec ff_a64multi_encoder = {
.init = a64multi_init_encoder,
.encode2 = a64multi_encode_frame,
.close = a64multi_close_encoder,
.pix_fmts = (const enum PixelFormat[]) {PIX_FMT_GRAY8, PIX_FMT_NONE},
.pix_fmts = (const enum AVPixelFormat[]) {AV_PIX_FMT_GRAY8, AV_PIX_FMT_NONE},
.long_name = NULL_IF_CONFIG_SMALL("Multicolor charset for Commodore 64"),
.capabilities = CODEC_CAP_DELAY,
};
Expand All @@ -392,7 +392,7 @@ AVCodec ff_a64multi5_encoder = {
.init = a64multi_init_encoder,
.encode2 = a64multi_encode_frame,
.close = a64multi_close_encoder,
.pix_fmts = (const enum PixelFormat[]) {PIX_FMT_GRAY8, PIX_FMT_NONE},
.pix_fmts = (const enum AVPixelFormat[]) {AV_PIX_FMT_GRAY8, AV_PIX_FMT_NONE},
.long_name = NULL_IF_CONFIG_SMALL("Multicolor charset for Commodore 64, extended with 5th color (colram)"),
.capabilities = CODEC_CAP_DELAY,
};
2 changes: 1 addition & 1 deletion libavcodec/aasc.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ static av_cold int aasc_decode_init(AVCodecContext *avctx)

s->avctx = avctx;

avctx->pix_fmt = PIX_FMT_BGR24;
avctx->pix_fmt = AV_PIX_FMT_BGR24;

return 0;
}
Expand Down
2 changes: 1 addition & 1 deletion libavcodec/anm.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ static av_cold int decode_init(AVCodecContext *avctx)
AnmContext *s = avctx->priv_data;
int i;

avctx->pix_fmt = PIX_FMT_PAL8;
avctx->pix_fmt = AV_PIX_FMT_PAL8;

s->frame.reference = 1;
bytestream2_init(&s->gb, avctx->extradata, avctx->extradata_size);
Expand Down
2 changes: 1 addition & 1 deletion libavcodec/ansi.c
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ typedef struct {
static av_cold int decode_init(AVCodecContext *avctx)
{
AnsiContext *s = avctx->priv_data;
avctx->pix_fmt = PIX_FMT_PAL8;
avctx->pix_fmt = AV_PIX_FMT_PAL8;

/* defaults */
s->font = ff_vga16_font;
Expand Down
2 changes: 1 addition & 1 deletion libavcodec/api-example.c
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,7 @@ static void video_encode_example(const char *filename)
c->time_base= (AVRational){1,25};
c->gop_size = 10; /* emit one intra frame every ten frames */
c->max_b_frames=1;
c->pix_fmt = PIX_FMT_YUV420P;
c->pix_fmt = AV_PIX_FMT_YUV420P;

/* open it */
if (avcodec_open2(c, codec, NULL) < 0) {
Expand Down
6 changes: 3 additions & 3 deletions libavcodec/asv1.c
Original file line number Diff line number Diff line change
Expand Up @@ -553,7 +553,7 @@ static av_cold int decode_init(AVCodecContext *avctx){
common_init(avctx);
init_vlcs(a);
ff_init_scantable(a->dsp.idct_permutation, &a->scantable, scantab);
avctx->pix_fmt= PIX_FMT_YUV420P;
avctx->pix_fmt= AV_PIX_FMT_YUV420P;

a->inv_qscale= avctx->extradata[0];
if(a->inv_qscale == 0){
Expand Down Expand Up @@ -649,7 +649,7 @@ AVCodec ff_asv1_encoder = {
.priv_data_size = sizeof(ASV1Context),
.init = encode_init,
.encode2 = encode_frame,
.pix_fmts = (const enum PixelFormat[]){ PIX_FMT_YUV420P, PIX_FMT_NONE },
.pix_fmts = (const enum AVPixelFormat[]){ AV_PIX_FMT_YUV420P, AV_PIX_FMT_NONE },
.long_name = NULL_IF_CONFIG_SMALL("ASUS V1"),
};
#endif
Expand All @@ -662,7 +662,7 @@ AVCodec ff_asv2_encoder = {
.priv_data_size = sizeof(ASV1Context),
.init = encode_init,
.encode2 = encode_frame,
.pix_fmts = (const enum PixelFormat[]){ PIX_FMT_YUV420P, PIX_FMT_NONE },
.pix_fmts = (const enum AVPixelFormat[]){ AV_PIX_FMT_YUV420P, AV_PIX_FMT_NONE },
.long_name = NULL_IF_CONFIG_SMALL("ASUS V2"),
};
#endif
2 changes: 1 addition & 1 deletion libavcodec/aura.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ static av_cold int aura_decode_init(AVCodecContext *avctx)
/* width needs to be divisible by 4 for this codec to work */
if (avctx->width & 0x3)
return -1;
avctx->pix_fmt = PIX_FMT_YUV422P;
avctx->pix_fmt = AV_PIX_FMT_YUV422P;

return 0;
}
Expand Down
Loading

0 comments on commit 716d413

Please sign in to comment.