diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-10-08 20:54:00 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-10-08 21:06:57 +0200 |
commit | ac627b3d38d370027406c93c2dcaac0b1712a7d4 (patch) | |
tree | d2d1f39e96a75d864681349c4fbd37692e558683 /libavfilter | |
parent | 89715a3cf187c271f7cf4c230b23cd6f6d638e32 (diff) | |
parent | 716d413c13981da15323c7a3821860536eefdbbb (diff) | |
download | ffmpeg-ac627b3d38d370027406c93c2dcaac0b1712a7d4.tar.gz |
Merge commit '716d413c13981da15323c7a3821860536eefdbbb'
* commit '716d413c13981da15323c7a3821860536eefdbbb':
Replace PIX_FMT_* -> AV_PIX_FMT_*, PixelFormat -> AVPixelFormat
Conflicts:
doc/examples/muxing.c
ffmpeg.h
ffmpeg_filter.c
ffmpeg_opt.c
ffplay.c
ffprobe.c
libavcodec/8bps.c
libavcodec/aasc.c
libavcodec/aura.c
libavcodec/avcodec.h
libavcodec/avs.c
libavcodec/bfi.c
libavcodec/bmp.c
libavcodec/bmpenc.c
libavcodec/c93.c
libavcodec/cscd.c
libavcodec/cyuv.c
libavcodec/dpx.c
libavcodec/dpxenc.c
libavcodec/eatgv.c
libavcodec/escape124.c
libavcodec/ffv1.c
libavcodec/flashsv.c
libavcodec/fraps.c
libavcodec/h264.c
libavcodec/huffyuv.c
libavcodec/iff.c
libavcodec/imgconvert.c
libavcodec/indeo3.c
libavcodec/kmvc.c
libavcodec/libopenjpegdec.c
libavcodec/libopenjpegenc.c
libavcodec/libx264.c
libavcodec/ljpegenc.c
libavcodec/mjpegdec.c
libavcodec/mjpegenc.c
libavcodec/motionpixels.c
libavcodec/mpeg12.c
libavcodec/mpeg12enc.c
libavcodec/mpeg4videodec.c
libavcodec/mpegvideo_enc.c
libavcodec/pamenc.c
libavcodec/pcxenc.c
libavcodec/pgssubdec.c
libavcodec/pngdec.c
libavcodec/pngenc.c
libavcodec/pnm.c
libavcodec/pnmdec.c
libavcodec/pnmenc.c
libavcodec/ptx.c
libavcodec/qdrw.c
libavcodec/qpeg.c
libavcodec/qtrleenc.c
libavcodec/raw.c
libavcodec/rawdec.c
libavcodec/rl2.c
libavcodec/sgidec.c
libavcodec/sgienc.c
libavcodec/snowdec.c
libavcodec/snowenc.c
libavcodec/sunrast.c
libavcodec/targa.c
libavcodec/targaenc.c
libavcodec/tiff.c
libavcodec/tiffenc.c
libavcodec/tmv.c
libavcodec/truemotion2.c
libavcodec/utils.c
libavcodec/vb.c
libavcodec/vp3.c
libavcodec/wnv1.c
libavcodec/xl.c
libavcodec/xwddec.c
libavcodec/xwdenc.c
libavcodec/yop.c
libavdevice/v4l2.c
libavdevice/x11grab.c
libavfilter/avfilter.c
libavfilter/avfilter.h
libavfilter/buffersrc.c
libavfilter/drawutils.c
libavfilter/formats.c
libavfilter/src_movie.c
libavfilter/vf_ass.c
libavfilter/vf_drawtext.c
libavfilter/vf_fade.c
libavfilter/vf_format.c
libavfilter/vf_hflip.c
libavfilter/vf_lut.c
libavfilter/vf_overlay.c
libavfilter/vf_pad.c
libavfilter/vf_scale.c
libavfilter/vf_transpose.c
libavfilter/vf_yadif.c
libavfilter/video.c
libavfilter/vsrc_testsrc.c
libavformat/movenc.c
libavformat/mxf.h
libavformat/utils.c
libavformat/yuv4mpeg.c
libavutil/imgutils.c
libavutil/pixdesc.c
libswscale/input.c
libswscale/output.c
libswscale/swscale_internal.h
libswscale/swscale_unscaled.c
libswscale/utils.c
libswscale/x86/swscale_template.c
libswscale/x86/yuv2rgb.c
libswscale/x86/yuv2rgb_template.c
libswscale/yuv2rgb.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavfilter')
65 files changed, 510 insertions, 510 deletions
diff --git a/libavfilter/avf_showspectrum.c b/libavfilter/avf_showspectrum.c index 3a5e0262e7..641c27f9bf 100644 --- a/libavfilter/avf_showspectrum.c +++ b/libavfilter/avf_showspectrum.c @@ -88,7 +88,7 @@ static int query_formats(AVFilterContext *ctx) AVFilterLink *inlink = ctx->inputs[0]; AVFilterLink *outlink = ctx->outputs[0]; static const enum AVSampleFormat sample_fmts[] = { AV_SAMPLE_FMT_S16P, -1 }; - static const enum PixelFormat pix_fmts[] = { PIX_FMT_RGB24, -1 }; + static const enum AVPixelFormat pix_fmts[] = { AV_PIX_FMT_RGB24, -1 }; /* set input audio formats */ formats = ff_make_format_list(sample_fmts); diff --git a/libavfilter/avf_showwaves.c b/libavfilter/avf_showwaves.c index dcbe8b8a61..2e3bfba458 100644 --- a/libavfilter/avf_showwaves.c +++ b/libavfilter/avf_showwaves.c @@ -88,7 +88,7 @@ static int query_formats(AVFilterContext *ctx) AVFilterLink *inlink = ctx->inputs[0]; AVFilterLink *outlink = ctx->outputs[0]; static const enum AVSampleFormat sample_fmts[] = { AV_SAMPLE_FMT_S16, -1 }; - static const enum PixelFormat pix_fmts[] = { PIX_FMT_GRAY8, -1 }; + static const enum AVPixelFormat pix_fmts[] = { AV_PIX_FMT_GRAY8, -1 }; /* set input audio formats */ formats = ff_make_format_list(sample_fmts); diff --git a/libavfilter/avfilter.c b/libavfilter/avfilter.c index 9f49a8b2b1..670a3a3dd0 100644 --- a/libavfilter/avfilter.c +++ b/libavfilter/avfilter.c @@ -142,7 +142,7 @@ int avfilter_link(AVFilterContext *src, unsigned srcpad, link->srcpad = &src->output_pads[srcpad]; link->dstpad = &dst->input_pads[dstpad]; link->type = src->output_pads[srcpad].type; - av_assert0(PIX_FMT_NONE == -1 && AV_SAMPLE_FMT_NONE == -1); + av_assert0(AV_PIX_FMT_NONE == -1 && AV_SAMPLE_FMT_NONE == -1); link->format = -1; return 0; diff --git a/libavfilter/avfilter.h b/libavfilter/avfilter.h index d66bc000be..510f28a8de 100644 --- a/libavfilter/avfilter.h +++ b/libavfilter/avfilter.h @@ -753,7 +753,7 @@ int avfilter_config_links(AVFilterContext *filter); */ AVFilterBufferRef * avfilter_get_video_buffer_ref_from_arrays(uint8_t * const data[4], const int linesize[4], int perms, - int w, int h, enum PixelFormat format); + int w, int h, enum AVPixelFormat format); /** * Create an audio buffer reference wrapped around an already diff --git a/libavfilter/avfiltergraph.c b/libavfilter/avfiltergraph.c index b745c3c991..ab37faeaf7 100644 --- a/libavfilter/avfiltergraph.c +++ b/libavfilter/avfiltergraph.c @@ -425,10 +425,10 @@ static int pick_format(AVFilterLink *link, AVFilterLink *ref) if (link->type == AVMEDIA_TYPE_VIDEO) { if(ref && ref->type == AVMEDIA_TYPE_VIDEO){ int has_alpha= av_pix_fmt_descriptors[ref->format].nb_components % 2 == 0; - enum PixelFormat best= PIX_FMT_NONE; + enum AVPixelFormat best= AV_PIX_FMT_NONE; int i; for (i=0; i<link->in_formats->format_count; i++) { - enum PixelFormat p = link->in_formats->formats[i]; + enum AVPixelFormat p = link->in_formats->formats[i]; best= avcodec_find_best_pix_fmt_of_2(best, p, ref->format, has_alpha, NULL); } av_log(link->src,AV_LOG_DEBUG, "picking %s out of %d ref:%s alpha:%d\n", diff --git a/libavfilter/buffersink.h b/libavfilter/buffersink.h index acafa76d6e..a4019375d9 100644 --- a/libavfilter/buffersink.h +++ b/libavfilter/buffersink.h @@ -30,7 +30,7 @@ * Struct to use for initializing a buffersink context. */ typedef struct { - const enum PixelFormat *pixel_fmts; ///< list of allowed pixel formats, terminated by PIX_FMT_NONE + const enum AVPixelFormat *pixel_fmts; ///< list of allowed pixel formats, terminated by AV_PIX_FMT_NONE } AVBufferSinkParams; /** diff --git a/libavfilter/buffersrc.c b/libavfilter/buffersrc.c index db2db3a482..85f7063669 100644 --- a/libavfilter/buffersrc.c +++ b/libavfilter/buffersrc.c @@ -48,7 +48,7 @@ typedef struct { /* video only */ int w, h; - enum PixelFormat pix_fmt; + enum AVPixelFormat pix_fmt; AVRational pixel_aspect; char *sws_param; diff --git a/libavfilter/drawutils.c b/libavfilter/drawutils.c index 08b26592bc..4214fc8413 100644 --- a/libavfilter/drawutils.c +++ b/libavfilter/drawutils.c @@ -30,19 +30,19 @@ enum { RED = 0, GREEN, BLUE, ALPHA }; -int ff_fill_rgba_map(uint8_t *rgba_map, enum PixelFormat pix_fmt) +int ff_fill_rgba_map(uint8_t *rgba_map, enum AVPixelFormat pix_fmt) { switch (pix_fmt) { - case PIX_FMT_0RGB: - case PIX_FMT_ARGB: rgba_map[ALPHA] = 0; rgba_map[RED ] = 1; rgba_map[GREEN] = 2; rgba_map[BLUE ] = 3; break; - case PIX_FMT_0BGR: - case PIX_FMT_ABGR: rgba_map[ALPHA] = 0; rgba_map[BLUE ] = 1; rgba_map[GREEN] = 2; rgba_map[RED ] = 3; break; - case PIX_FMT_RGB0: - case PIX_FMT_RGBA: - case PIX_FMT_RGB24: rgba_map[RED ] = 0; rgba_map[GREEN] = 1; rgba_map[BLUE ] = 2; rgba_map[ALPHA] = 3; break; - case PIX_FMT_BGRA: - case PIX_FMT_BGR0: - case PIX_FMT_BGR24: rgba_map[BLUE ] = 0; rgba_map[GREEN] = 1; rgba_map[RED ] = 2; rgba_map[ALPHA] = 3; break; + case AV_PIX_FMT_0RGB: + case AV_PIX_FMT_ARGB: rgba_map[ALPHA] = 0; rgba_map[RED ] = 1; rgba_map[GREEN] = 2; rgba_map[BLUE ] = 3; break; + case AV_PIX_FMT_0BGR: + case AV_PIX_FMT_ABGR: rgba_map[ALPHA] = 0; rgba_map[BLUE ] = 1; rgba_map[GREEN] = 2; rgba_map[RED ] = 3; break; + case AV_PIX_FMT_RGB0: + case AV_PIX_FMT_RGBA: + case AV_PIX_FMT_RGB24: rgba_map[RED ] = 0; rgba_map[GREEN] = 1; rgba_map[BLUE ] = 2; rgba_map[ALPHA] = 3; break; + case AV_PIX_FMT_BGRA: + case AV_PIX_FMT_BGR0: + case AV_PIX_FMT_BGR24: rgba_map[BLUE ] = 0; rgba_map[GREEN] = 1; rgba_map[RED ] = 2; rgba_map[ALPHA] = 3; break; default: /* unsupported */ return AVERROR(EINVAL); } @@ -50,7 +50,7 @@ int ff_fill_rgba_map(uint8_t *rgba_map, enum PixelFormat pix_fmt) } int ff_fill_line_with_color(uint8_t *line[4], int pixel_step[4], int w, uint8_t dst_color[4], - enum PixelFormat pix_fmt, uint8_t rgba_color[4], + enum AVPixelFormat pix_fmt, uint8_t rgba_color[4], int *is_packed_rgba, uint8_t rgba_map_ptr[4]) { uint8_t rgba_map[4] = {0}; @@ -132,7 +132,7 @@ void ff_copy_rectangle(uint8_t *dst[4], int dst_linesize[4], } } -int ff_draw_init(FFDrawContext *draw, enum PixelFormat format, unsigned flags) +int ff_draw_init(FFDrawContext *draw, enum AVPixelFormat format, unsigned flags) { const AVPixFmtDescriptor *desc = &av_pix_fmt_descriptors[format]; const AVComponentDescriptor *c; @@ -193,7 +193,7 @@ void ff_draw_color(FFDrawContext *draw, FFDrawColor *color, const uint8_t rgba[4 color->comp[1].u8[0] = RGB_TO_U_CCIR(rgba[0], rgba[1], rgba[2], 0); color->comp[2].u8[0] = RGB_TO_V_CCIR(rgba[0], rgba[1], rgba[2], 0); color->comp[3].u8[0] = rgba[3]; - } else if (draw->format == PIX_FMT_GRAY8 || draw->format == PIX_FMT_GRAY8A) { + } else if (draw->format == AV_PIX_FMT_GRAY8 || draw->format == AV_PIX_FMT_GRAY8A) { color->comp[0].u8[0] = RGB_TO_Y_CCIR(rgba[0], rgba[1], rgba[2]); color->comp[1].u8[0] = rgba[3]; } else { @@ -501,14 +501,14 @@ int ff_draw_round_to_sub(FFDrawContext *draw, int sub_dir, int round_dir, AVFilterFormats *ff_draw_supported_pixel_formats(unsigned flags) { - enum PixelFormat i, pix_fmts[PIX_FMT_NB + 1]; + enum AVPixelFormat i, pix_fmts[AV_PIX_FMT_NB + 1]; unsigned n = 0; FFDrawContext draw; - for (i = 0; i < PIX_FMT_NB; i++) + for (i = 0; i < AV_PIX_FMT_NB; i++) if (ff_draw_init(&draw, i, flags) >= 0) pix_fmts[n++] = i; - pix_fmts[n++] = PIX_FMT_NONE; + pix_fmts[n++] = AV_PIX_FMT_NONE; return ff_make_format_list(pix_fmts); } @@ -518,13 +518,13 @@ AVFilterFormats *ff_draw_supported_pixel_formats(unsigned flags) int main(void) { - enum PixelFormat f; + enum AVPixelFormat f; const AVPixFmtDescriptor *desc; FFDrawContext draw; FFDrawColor color; int r, i; - for (f = 0; f < PIX_FMT_NB; f++) { + for (f = 0; f < AV_PIX_FMT_NB; f++) { desc = &av_pix_fmt_descriptors[f]; if (!desc->name) continue; diff --git a/libavfilter/drawutils.h b/libavfilter/drawutils.h index 211810a203..df4169575b 100644 --- a/libavfilter/drawutils.h +++ b/libavfilter/drawutils.h @@ -28,11 +28,11 @@ #include "avfilter.h" #include "libavutil/pixfmt.h" -int ff_fill_rgba_map(uint8_t *rgba_map, enum PixelFormat pix_fmt); +int ff_fill_rgba_map(uint8_t *rgba_map, enum AVPixelFormat pix_fmt); int ff_fill_line_with_color(uint8_t *line[4], int pixel_step[4], int w, uint8_t dst_color[4], - enum PixelFormat pix_fmt, uint8_t rgba_color[4], + enum AVPixelFormat pix_fmt, uint8_t rgba_color[4], int *is_packed_rgba, uint8_t rgba_map[4]); void ff_draw_rectangle(uint8_t *dst[4], int dst_linesize[4], @@ -47,7 +47,7 @@ void ff_copy_rectangle(uint8_t *dst[4], int dst_linesize[4], typedef struct FFDrawContext { const struct AVPixFmtDescriptor *desc; - enum PixelFormat format; + enum AVPixelFormat format; unsigned nb_planes; int pixelstep[MAX_PLANES]; /*< offset between pixels */ uint8_t comp_mask[MAX_PLANES]; /*< bitmask of used non-alpha components */ @@ -74,7 +74,7 @@ typedef struct FFDrawColor { * No flags currently defined. * @return 0 for success, < 0 for error */ -int ff_draw_init(FFDrawContext *draw, enum PixelFormat format, unsigned flags); +int ff_draw_init(FFDrawContext *draw, enum AVPixelFormat format, unsigned flags); /** * Prepare a color. diff --git a/libavfilter/f_ebur128.c b/libavfilter/f_ebur128.c index ff403c8b05..5c5aecab9f 100644 --- a/libavfilter/f_ebur128.c +++ b/libavfilter/f_ebur128.c @@ -651,7 +651,7 @@ static int query_formats(AVFilterContext *ctx) static const enum AVSampleFormat sample_fmts[] = { AV_SAMPLE_FMT_DBL, -1 }; static const int input_srate[] = {48000, -1}; // ITU-R BS.1770 provides coeff only for 48kHz - static const enum PixelFormat pix_fmts[] = { PIX_FMT_RGB24, -1 }; + static const enum AVPixelFormat pix_fmts[] = { AV_PIX_FMT_RGB24, -1 }; /* set input audio formats */ formats = ff_make_format_list(sample_fmts); diff --git a/libavfilter/formats.c b/libavfilter/formats.c index 735f21b119..c90fb35d6f 100644 --- a/libavfilter/formats.c +++ b/libavfilter/formats.c @@ -265,7 +265,7 @@ AVFilterFormats *ff_all_formats(enum AVMediaType type) { AVFilterFormats *ret = NULL; int fmt; - int num_formats = type == AVMEDIA_TYPE_VIDEO ? PIX_FMT_NB : + int num_formats = type == AVMEDIA_TYPE_VIDEO ? AV_PIX_FMT_NB : type == AVMEDIA_TYPE_AUDIO ? AV_SAMPLE_FMT_NB : 0; for (fmt = 0; fmt < num_formats; fmt++) @@ -458,13 +458,13 @@ int ff_default_query_formats(AVFilterContext *ctx) /* internal functions for parsing audio format arguments */ -int ff_parse_pixel_format(enum PixelFormat *ret, const char *arg, void *log_ctx) +int ff_parse_pixel_format(enum AVPixelFormat *ret, const char *arg, void *log_ctx) { char *tail; int pix_fmt = av_get_pix_fmt(arg); - if (pix_fmt == PIX_FMT_NONE) { + if (pix_fmt == AV_PIX_FMT_NONE) { pix_fmt = strtol(arg, &tail, 0); - if (*tail || (unsigned)pix_fmt >= PIX_FMT_NB) { + if (*tail || (unsigned)pix_fmt >= AV_PIX_FMT_NB) { av_log(log_ctx, AV_LOG_ERROR, "Invalid pixel format '%s'\n", arg); return AVERROR(EINVAL); } diff --git a/libavfilter/internal.h b/libavfilter/internal.h index e82f04dbb9..8d03913d7e 100644 --- a/libavfilter/internal.h +++ b/libavfilter/internal.h @@ -223,7 +223,7 @@ int64_t *ff_copy_int64_list(const int64_t * const list); * @param log_ctx log context * @return 0 in case of success, a negative AVERROR code on error */ -int ff_parse_pixel_format(enum PixelFormat *ret, const char *arg, void *log_ctx); +int ff_parse_pixel_format(enum AVPixelFormat *ret, const char *arg, void *log_ctx); /** * Parse a sample rate. diff --git a/libavfilter/lavfutils.c b/libavfilter/lavfutils.c index 70f7e7169a..a4711f93d9 100644 --- a/libavfilter/lavfutils.c +++ b/libavfilter/lavfutils.c @@ -22,7 +22,7 @@ #include "lavfutils.h" int ff_load_image(uint8_t *data[4], int linesize[4], - int *w, int *h, enum PixelFormat *pix_fmt, + int *w, int *h, enum AVPixelFormat *pix_fmt, const char *filename, void *log_ctx) { AVInputFormat *iformat = NULL; diff --git a/libavfilter/lavfutils.h b/libavfilter/lavfutils.h index c0943e20f8..a310e83384 100644 --- a/libavfilter/lavfutils.h +++ b/libavfilter/lavfutils.h @@ -37,7 +37,7 @@ * @return 0 in case of success, a negative error code otherwise. */ int ff_load_image(uint8_t *data[4], int linesize[4], - int *w, int *h, enum PixelFormat *pix_fmt, + int *w, int *h, enum AVPixelFormat *pix_fmt, const char *filename, void *log_ctx); #endif /* AVFILTER_LAVFUTILS_H */ diff --git a/libavfilter/libmpcodecs/vf_mcdeint.c b/libavfilter/libmpcodecs/vf_mcdeint.c index 2679289f33..01a3cb30ba 100644 --- a/libavfilter/libmpcodecs/vf_mcdeint.c +++ b/libavfilter/libmpcodecs/vf_mcdeint.c @@ -202,7 +202,7 @@ static int config(struct vf_instance *vf, avctx_enc->time_base= (AVRational){1,25}; // meaningless avctx_enc->gop_size = 300; avctx_enc->max_b_frames= 0; - avctx_enc->pix_fmt = PIX_FMT_YUV420P; + avctx_enc->pix_fmt = AV_PIX_FMT_YUV420P; avctx_enc->flags = CODEC_FLAG_QSCALE | CODEC_FLAG_LOW_DELAY; avctx_enc->strict_std_compliance = FF_COMPLIANCE_EXPERIMENTAL; avctx_enc->global_quality= 1; diff --git a/libavfilter/libmpcodecs/vf_sab.c b/libavfilter/libmpcodecs/vf_sab.c index 4dadeb798e..807b726588 100644 --- a/libavfilter/libmpcodecs/vf_sab.c +++ b/libavfilter/libmpcodecs/vf_sab.c @@ -104,7 +104,7 @@ static int allocStuff(FilterParam *f, int width, int height){ swsF.lumH= swsF.lumV= vec; swsF.chrH= swsF.chrV= NULL; f->preFilterContext= sws_getContext( - width, height, PIX_FMT_GRAY8, width, height, PIX_FMT_GRAY8, SWS_POINT, &swsF, NULL, NULL); + width, height, AV_PIX_FMT_GRAY8, width, height, AV_PIX_FMT_GRAY8, SWS_POINT, &swsF, NULL, NULL); sws_freeVec(vec); vec = sws_getGaussianVec(f->strength, 5.0); diff --git a/libavfilter/libmpcodecs/vf_uspp.c b/libavfilter/libmpcodecs/vf_uspp.c index cc9a3db8dd..1c683f72cf 100644 --- a/libavfilter/libmpcodecs/vf_uspp.c +++ b/libavfilter/libmpcodecs/vf_uspp.c @@ -230,7 +230,7 @@ static int config(struct vf_instance *vf, avctx_enc->time_base= (AVRational){1,25}; // meaningless avctx_enc->gop_size = 300; avctx_enc->max_b_frames= 0; - avctx_enc->pix_fmt = PIX_FMT_YUV420P; + avctx_enc->pix_fmt = AV_PIX_FMT_YUV420P; avctx_enc->flags = CODEC_FLAG_QSCALE | CODEC_FLAG_LOW_DELAY; avctx_enc->strict_std_compliance = FF_COMPLIANCE_EXPERIMENTAL; avctx_enc->global_quality= 123; diff --git a/libavfilter/lswsutils.c b/libavfilter/lswsutils.c index 2c98f3a13e..6902ee9df7 100644 --- a/libavfilter/lswsutils.c +++ b/libavfilter/lswsutils.c @@ -20,9 +20,9 @@ #include "lswsutils.h" int ff_scale_image(uint8_t *dst_data[4], int dst_linesize[4], - int dst_w, int dst_h, enum PixelFormat dst_pix_fmt, + int dst_w, int dst_h, enum AVPixelFormat dst_pix_fmt, uint8_t * const src_data[4], int src_linesize[4], - int src_w, int src_h, enum PixelFormat src_pix_fmt, + int src_w, int src_h, enum AVPixelFormat src_pix_fmt, void *log_ctx) { int ret; diff --git a/libavfilter/lswsutils.h b/libavfilter/lswsutils.h index 060048319e..f5f5320247 100644 --- a/libavfilter/lswsutils.h +++ b/libavfilter/lswsutils.h @@ -30,9 +30,9 @@ * Scale image using libswscale. */ int ff_scale_image(uint8_t *dst_data[4], int dst_linesize[4], - int dst_w, int dst_h, enum PixelFormat dst_pix_fmt, + int dst_w, int dst_h, enum AVPixelFormat dst_pix_fmt, uint8_t *const src_data[4], int src_linesize[4], - int src_w, int src_h, enum PixelFormat src_pix_fmt, + int src_w, int src_h, enum AVPixelFormat src_pix_fmt, void *log_ctx); #endif /* AVFILTER_LSWSUTILS_H */ diff --git a/libavfilter/sink_buffer.c b/libavfilter/sink_buffer.c index 83e43cf396..7d3958856f 100644 --- a/libavfilter/sink_buffer.c +++ b/libavfilter/sink_buffer.c @@ -61,7 +61,7 @@ typedef struct { unsigned warning_limit; /* only used for video */ - enum PixelFormat *pixel_fmts; ///< list of accepted pixel formats, must be terminated with -1 + enum AVPixelFormat *pixel_fmts; ///< list of accepted pixel formats, must be terminated with -1 /* only used for audio */ enum AVSampleFormat *sample_fmts; ///< list of accepted sample formats, terminated by AV_SAMPLE_FMT_NONE diff --git a/libavfilter/src_buffer.c b/libavfilter/src_buffer.c index c88928710b..354a516e20 100644 --- a/libavfilter/src_buffer.c +++ b/libavfilter/src_buffer.c @@ -45,7 +45,7 @@ typedef struct { /* Video only */ AVFilterContext *scale; int h, w; - enum PixelFormat pix_fmt; + enum AVPixelFormat pix_fmt; AVRational sample_aspect_ratio; char sws_param[256]; diff --git a/libavfilter/vf_alphaextract.c b/libavfilter/vf_alphaextract.c index f6ce1b3a78..102af9d38a 100644 --- a/libavfilter/vf_alphaextract.c +++ b/libavfilter/vf_alphaextract.c @@ -40,12 +40,12 @@ typedef struct { static int query_formats(AVFilterContext *ctx) { - enum PixelFormat in_fmts[] = { - PIX_FMT_YUVA444P, PIX_FMT_YUVA422P, PIX_FMT_YUVA420P, - PIX_FMT_RGBA, PIX_FMT_BGRA, PIX_FMT_ARGB, PIX_FMT_ABGR, - PIX_FMT_NONE + enum AVPixelFormat in_fmts[] = { + AV_PIX_FMT_YUVA444P, AV_PIX_FMT_YUVA422P, AV_PIX_FMT_YUVA420P, + AV_PIX_FMT_RGBA, AV_PIX_FMT_BGRA, AV_PIX_FMT_ARGB, AV_PIX_FMT_ABGR, + AV_PIX_FMT_NONE }; - enum PixelFormat out_fmts[] = { PIX_FMT_GRAY8, PIX_FMT_NONE }; + enum AVPixelFormat out_fmts[] = { AV_PIX_FMT_GRAY8, AV_PIX_FMT_NONE }; ff_formats_ref(ff_make_format_list(in_fmts), &ctx->inputs[0]->out_formats); ff_formats_ref(ff_make_format_list(out_fmts), &ctx->outputs[0]->in_formats); return 0; diff --git a/libavfilter/vf_alphamerge.c b/libavfilter/vf_alphamerge.c index 613ca897d6..51868dee01 100644 --- a/libavfilter/vf_alphamerge.c +++ b/libavfilter/vf_alphamerge.c @@ -52,12 +52,12 @@ static av_cold void uninit(AVFilterContext *ctx) static int query_formats(AVFilterContext *ctx) { - enum PixelFormat main_fmts[] = { - PIX_FMT_YUVA444P, PIX_FMT_YUVA422P, PIX_FMT_YUVA420P, - PIX_FMT_RGBA, PIX_FMT_BGRA, PIX_FMT_ARGB, PIX_FMT_ABGR, - PIX_FMT_NONE + enum AVPixelFormat main_fmts[] = { + AV_PIX_FMT_YUVA444P, AV_PIX_FMT_YUVA422P, AV_PIX_FMT_YUVA420P, + AV_PIX_FMT_RGBA, AV_PIX_FMT_BGRA, AV_PIX_FMT_ARGB, AV_PIX_FMT_ABGR, + AV_PIX_FMT_NONE }; - enum PixelFormat alpha_fmts[] = { PIX_FMT_GRAY8, PIX_FMT_NONE }; + enum AVPixelFormat alpha_fmts[] = { AV_PIX_FMT_GRAY8, AV_PIX_FMT_NONE }; AVFilterFormats *main_formats = ff_make_format_list(main_fmts); AVFilterFormats *alpha_formats = ff_make_format_list(alpha_fmts); ff_formats_ref(main_formats, &ctx->inputs[0]->out_formats); diff --git a/libavfilter/vf_bbox.c b/libavfilter/vf_bbox.c index a3b8a23758..07ac5505bb 100644 --- a/libavfilter/vf_bbox.c +++ b/libavfilter/vf_bbox.c @@ -43,13 +43,13 @@ static av_cold int init(AVFilterContext *ctx, const char *args) static int query_formats(AVFilterContext *ctx) { - static const enum PixelFormat pix_fmts[] = { - PIX_FMT_YUV420P, - PIX_FMT_YUV444P, - PIX_FMT_YUV440P, - PIX_FMT_YUV422P, - PIX_FMT_YUV411P, - PIX_FMT_NONE, + static const enum AVPixelFormat pix_fmts[] = { + AV_PIX_FMT_YUV420P, + AV_PIX_FMT_YUV444P, + AV_PIX_FMT_YUV440P, + AV_PIX_FMT_YUV422P, + AV_PIX_FMT_YUV411P, + AV_PIX_FMT_NONE, }; ff_set_common_formats(ctx, ff_make_format_list(pix_fmts)); diff --git a/libavfilter/vf_blackdetect.c b/libavfilter/vf_blackdetect.c index cf1b9244b3..17f5acb04d 100644 --- a/libavfilter/vf_blackdetect.c +++ b/libavfilter/vf_blackdetect.c @@ -63,19 +63,19 @@ static const AVOption blackdetect_options[] = { AVFILTER_DEFINE_CLASS(blackdetect); #define YUVJ_FORMATS \ - PIX_FMT_YUVJ420P, PIX_FMT_YUVJ422P, PIX_FMT_YUVJ444P, PIX_FMT_YUVJ440P + AV_PIX_FMT_YUVJ420P, AV_PIX_FMT_YUVJ422P, AV_PIX_FMT_YUVJ444P, AV_PIX_FMT_YUVJ440P -static enum PixelFormat yuvj_formats[] = { - YUVJ_FORMATS, PIX_FMT_NONE +static enum AVPixelFormat yuvj_formats[] = { + YUVJ_FORMATS, AV_PIX_FMT_NONE }; static int query_formats(AVFilterContext *ctx) { - static const enum PixelFormat pix_fmts[] = { - PIX_FMT_YUV410P, PIX_FMT_YUV420P, PIX_FMT_GRAY8, PIX_FMT_NV12, - PIX_FMT_NV21, PIX_FMT_YUV444P, PIX_FMT_YUV422P, PIX_FMT_YUV411P, + static const enum AVPixelFormat pix_fmts[] = { + AV_PIX_FMT_YUV410P, AV_PIX_FMT_YUV420P, AV_PIX_FMT_GRAY8, AV_PIX_FMT_NV12, + AV_PIX_FMT_NV21, AV_PIX_FMT_YUV444P, AV_PIX_FMT_YUV422P, AV_PIX_FMT_YUV411P, YUVJ_FORMATS, - PIX_FMT_NONE + AV_PIX_FMT_NONE }; ff_set_common_formats(ctx, ff_make_format_list(pix_fmts)); diff --git a/libavfilter/vf_blackframe.c b/libavfilter/vf_blackframe.c index 5064040735..59beab94d3 100644 --- a/libavfilter/vf_blackframe.c +++ b/libavfilter/vf_blackframe.c @@ -47,10 +47,10 @@ typedef struct { static int query_formats(AVFilterContext *ctx) { - static const enum PixelFormat pix_fmts[] = { - PIX_FMT_YUV410P, PIX_FMT_YUV420P, PIX_FMT_GRAY8, PIX_FMT_NV12, - PIX_FMT_NV21, PIX_FMT_YUV444P, PIX_FMT_YUV422P, PIX_FMT_YUV411P, - PIX_FMT_NONE + static const enum AVPixelFormat pix_fmts[] = { + AV_PIX_FMT_YUV410P, AV_PIX_FMT_YUV420P, AV_PIX_FMT_GRAY8, AV_PIX_FMT_NV12, + AV_PIX_FMT_NV21, AV_PIX_FMT_YUV444P, AV_PIX_FMT_YUV422P, AV_PIX_FMT_YUV411P, + AV_PIX_FMT_NONE }; ff_set_common_formats(ctx, ff_make_format_list(pix_fmts)); diff --git a/libavfilter/vf_boxblur.c b/libavfilter/vf_boxblur.c index c5056c5732..4f1a52471a 100644 --- a/libavfilter/vf_boxblur.c +++ b/libavfilter/vf_boxblur.c @@ -124,13 +124,13 @@ static av_cold void uninit(AVFilterContext *ctx) static int query_formats(AVFilterContext *ctx) { - enum PixelFormat pix_fmts[] = { - PIX_FMT_YUV444P, PIX_FMT_YUV422P, PIX_FMT_YUV420P, - PIX_FMT_YUV411P, PIX_FMT_YUV410P, PIX_FMT_YUVA420P, - PIX_FMT_YUV440P, PIX_FMT_GRAY8, - PIX_FMT_YUVJ444P, PIX_FMT_YUVJ422P, PIX_FMT_YUVJ420P, - PIX_FMT_YUVJ440P, - PIX_FMT_NONE + enum AVPixelFormat pix_fmts[] = { + AV_PIX_FMT_YUV444P, AV_PIX_FMT_YUV422P, AV_PIX_FMT_YUV420P, + AV_PIX_FMT_YUV411P, AV_PIX_FMT_YUV410P, AV_PIX_FMT_YUVA420P, + AV_PIX_FMT_YUV440P, AV_PIX_FMT_GRAY8, + AV_PIX_FMT_YUVJ444P, AV_PIX_FMT_YUVJ422P, AV_PIX_FMT_YUVJ420P, + AV_PIX_FMT_YUVJ440P, + AV_PIX_FMT_NONE }; ff_set_common_formats(ctx, ff_make_format_list(pix_fmts)); diff --git a/libavfilter/vf_colormatrix.c b/libavfilter/vf_colormatrix.c index ca5a39d6ec..f331204482 100644 --- a/libavfilter/vf_colormatrix.c +++ b/libavfilter/vf_colormatrix.c @@ -320,11 +320,11 @@ static int config_input(AVFilterLink *inlink) static int query_formats(AVFilterContext *ctx) { - static const enum PixelFormat pix_fmts[] = { - PIX_FMT_YUV422P, - PIX_FMT_YUV420P, - PIX_FMT_UYVY422, - PIX_FMT_NONE + static const enum AVPixelFormat pix_fmts[] = { + AV_PIX_FMT_YUV422P, + AV_PIX_FMT_YUV420P, + AV_PIX_FMT_UYVY422, + AV_PIX_FMT_NONE }; ff_set_common_formats(ctx, ff_make_format_list(pix_fmts)); @@ -356,9 +356,9 @@ static int end_frame(AVFilterLink *link) ColorMatrixContext *color = ctx->priv; AVFilterBufferRef *out = color->outpicref; - if (link->cur_buf->format == PIX_FMT_YUV422P) + if (link->cur_buf->format == AV_PIX_FMT_YUV422P) process_frame_yuv422p(color, out, link->cur_buf); - else if (link->cur_buf->format == PIX_FMT_YUV420P) + else if (link->cur_buf->format == AV_PIX_FMT_YUV420P) process_frame_yuv420p(color, out, link->cur_buf); else process_frame_uyvy422(color, out, link->cur_buf); diff --git a/libavfilter/vf_crop.c b/libavfilter/vf_crop.c index 4e794df91e..40970b1266 100644 --- a/libavfilter/vf_crop.c +++ b/libavfilter/vf_crop.c @@ -92,30 +92,30 @@ typedef struct { static int query_formats(AVFilterContext *ctx) { - static const enum PixelFormat pix_fmts[] = { - PIX_FMT_RGB48BE, PIX_FMT_RGB48LE, - PIX_FMT_BGR48BE, PIX_FMT_BGR48LE, - PIX_FMT_ARGB, PIX_FMT_RGBA, - PIX_FMT_ABGR, PIX_FMT_BGRA, - PIX_FMT_RGB24, PIX_FMT_BGR24, - PIX_FMT_RGB565BE, PIX_FMT_RGB565LE, - PIX_FMT_RGB555BE, PIX_FMT_RGB555LE, - PIX_FMT_BGR565BE, PIX_FMT_BGR565LE, - PIX_FMT_BGR555BE, PIX_FMT_BGR555LE, - PIX_FMT_GRAY16BE, PIX_FMT_GRAY16LE, - PIX_FMT_YUV420P16LE, PIX_FMT_YUV420P16BE, - PIX_FMT_YUV422P16LE, PIX_FMT_YUV422P16BE, - PIX_FMT_YUV444P16LE, PIX_FMT_YUV444P16BE, - PIX_FMT_YUV444P, PIX_FMT_YUV422P, - PIX_FMT_YUV420P, PIX_FMT_YUV411P, - PIX_FMT_YUV410P, PIX_FMT_YUV440P, - PIX_FMT_YUVJ444P, PIX_FMT_YUVJ422P, - PIX_FMT_YUVJ420P, PIX_FMT_YUVJ440P, - PIX_FMT_YUVA420P, - PIX_FMT_RGB8, PIX_FMT_BGR8, - PIX_FMT_RGB4_BYTE, PIX_FMT_BGR4_BYTE, - PIX_FMT_PAL8, PIX_FMT_GRAY8, - PIX_FMT_NONE + static const enum AVPixelFormat pix_fmts[] = { + AV_PIX_FMT_RGB48BE, AV_PIX_FMT_RGB48LE, + AV_PIX_FMT_BGR48BE, AV_PIX_FMT_BGR48LE, + AV_PIX_FMT_ARGB, AV_PIX_FMT_RGBA, + AV_PIX_FMT_ABGR, AV_PIX_FMT_BGRA, + AV_PIX_FMT_RGB24, AV_PIX_FMT_BGR24, + AV_PIX_FMT_RGB565BE, AV_PIX_FMT_RGB565LE, + AV_PIX_FMT_RGB555BE, AV_PIX_FMT_RGB555LE, + AV_PIX_FMT_BGR565BE, AV_PIX_FMT_BGR565LE, + AV_PIX_FMT_BGR555BE, AV_PIX_FMT_BGR555LE, + AV_PIX_FMT_GRAY16BE, AV_PIX_FMT_GRAY16LE, + AV_PIX_FMT_YUV420P16LE, AV_PIX_FMT_YUV420P16BE, + AV_PIX_FMT_YUV422P16LE, AV_PIX_FMT_YUV422P16BE, + AV_PIX_FMT_YUV444P16LE, AV_PIX_FMT_YUV444P16BE, + AV_PIX_FMT_YUV444P, AV_PIX_FMT_YUV422P, + AV_PIX_FMT_YUV420P, AV_PIX_FMT_YUV411P, + AV_PIX_FMT_YUV410P, AV_PIX_FMT_YUV440P, + AV_PIX_FMT_YUVJ444P, AV_PIX_FMT_YUVJ422P, + AV_PIX_FMT_YUVJ420P, AV_PIX_FMT_YUVJ440P, + AV_PIX_FMT_YUVA420P, + AV_PIX_FMT_RGB8, AV_PIX_FMT_BGR8, + AV_PIX_FMT_RGB4_BYTE, AV_PIX_FMT_BGR4_BYTE, + AV_PIX_FMT_PAL8, AV_PIX_FMT_GRAY8, + AV_PIX_FMT_NONE }; ff_set_common_formats(ctx, ff_make_format_list(pix_fmts)); diff --git a/libavfilter/vf_cropdetect.c b/libavfilter/vf_cropdetect.c index bed4bfdd47..f0f1270af0 100644 --- a/libavfilter/vf_cropdetect.c +++ b/libavfilter/vf_cropdetect.c @@ -43,13 +43,13 @@ typedef struct { static int query_formats(AVFilterContext *ctx) { - static const enum PixelFormat pix_fmts[] = { - PIX_FMT_YUV420P, PIX_FMT_YUVJ420P, - PIX_FMT_YUV422P, PIX_FMT_YUVJ422P, - PIX_FMT_YUV444P, PIX_FMT_YUVJ444P, - PIX_FMT_YUV411P, PIX_FMT_GRAY8, - PIX_FMT_NV12, PIX_FMT_NV21, - PIX_FMT_NONE + static const enum AVPixelFormat pix_fmts[] = { + AV_PIX_FMT_YUV420P, AV_PIX_FMT_YUVJ420P, + AV_PIX_FMT_YUV422P, AV_PIX_FMT_YUVJ422P, + AV_PIX_FMT_YUV444P, AV_PIX_FMT_YUVJ444P, + AV_PIX_FMT_YUV411P, AV_PIX_FMT_GRAY8, + AV_PIX_FMT_NV12, AV_PIX_FMT_NV21, + AV_PIX_FMT_NONE }; ff_set_common_formats(ctx, ff_make_format_list(pix_fmts)); diff --git a/libavfilter/vf_decimate.c b/libavfilter/vf_decimate.c index bf3d7fe7a3..b4abfa3ddb 100644 --- a/libavfilter/vf_decimate.c +++ b/libavfilter/vf_decimate.c @@ -161,14 +161,14 @@ static av_cold void uninit(AVFilterContext *ctx) static int query_formats(AVFilterContext *ctx) { - static const enum PixelFormat pix_fmts[] = { - PIX_FMT_YUV444P, PIX_FMT_YUV422P, - PIX_FMT_YUV420P, PIX_FMT_YUV411P, - PIX_FMT_YUV410P, PIX_FMT_YUV440P, - PIX_FMT_YUVJ444P, PIX_FMT_YUVJ422P, - PIX_FMT_YUVJ420P, PIX_FMT_YUVJ440P, - PIX_FMT_YUVA420P, - PIX_FMT_NONE + static const enum AVPixelFormat pix_fmts[] = { + AV_PIX_FMT_YUV444P, AV_PIX_FMT_YUV422P, + AV_PIX_FMT_YUV420P, AV_PIX_FMT_YUV411P, + AV_PIX_FMT_YUV410P, AV_PIX_FMT_YUV440P, + AV_PIX_FMT_YUVJ444P, AV_PIX_FMT_YUVJ422P, + AV_PIX_FMT_YUVJ420P, AV_PIX_FMT_YUVJ440P, + AV_PIX_FMT_YUVA420P, + AV_PIX_FMT_NONE }; ff_set_common_formats(ctx, ff_make_format_list(pix_fmts)); diff --git a/libavfilter/vf_delogo.c b/libavfilter/vf_delogo.c index d4e9014b54..ca9a05ee6e 100644 --- a/libavfilter/vf_delogo.c +++ b/libavfilter/vf_delogo.c @@ -157,11 +157,11 @@ AVFILTER_DEFINE_CLASS(delogo); static int query_formats(AVFilterContext *ctx) { - enum PixelFormat pix_fmts[] = { - PIX_FMT_YUV444P, PIX_FMT_YUV422P, PIX_FMT_YUV420P, - PIX_FMT_YUV411P, PIX_FMT_YUV410P, PIX_FMT_YUV440P, - PIX_FMT_YUVA420P, PIX_FMT_GRAY8, - PIX_FMT_NONE + enum AVPixelFormat pix_fmts[] = { + AV_PIX_FMT_YUV444P, AV_PIX_FMT_YUV422P, AV_PIX_FMT_YUV420P, + AV_PIX_FMT_YUV411P, AV_PIX_FMT_YUV410P, AV_PIX_FMT_YUV440P, + AV_PIX_FMT_YUVA420P, AV_PIX_FMT_GRAY8, + AV_PIX_FMT_NONE }; ff_set_common_formats(ctx, ff_make_format_list(pix_fmts)); diff --git a/libavfilter/vf_deshake.c b/libavfilter/vf_deshake.c index ac0a0139c0..e86d5bc61e 100644 --- a/libavfilter/vf_deshake.c +++ b/libavfilter/vf_deshake.c @@ -386,10 +386,10 @@ static av_cold int init(AVFilterContext *ctx, const char *args) static int query_formats(AVFilterContext *ctx) { - enum PixelFormat pix_fmts[] = { - PIX_FMT_YUV420P, PIX_FMT_YUV422P, PIX_FMT_YUV444P, PIX_FMT_YUV410P, - PIX_FMT_YUV411P, PIX_FMT_YUV440P, PIX_FMT_YUVJ420P, PIX_FMT_YUVJ422P, - PIX_FMT_YUVJ444P, PIX_FMT_YUVJ440P, PIX_FMT_NONE + enum AVPixelFormat pix_fmts[] = { + AV_PIX_FMT_YUV420P, AV_PIX_FMT_YUV422P, AV_PIX_FMT_YUV444P, AV_PIX_FMT_YUV410P, + AV_PIX_FMT_YUV411P, AV_PIX_FMT_YUV440P, AV_PIX_FMT_YUVJ420P, AV_PIX_FMT_YUVJ422P, + AV_PIX_FMT_YUVJ444P, AV_PIX_FMT_YUVJ440P, AV_PIX_FMT_NONE }; ff_set_common_formats(ctx, ff_make_format_list(pix_fmts)); diff --git a/libavfilter/vf_drawbox.c b/libavfilter/vf_drawbox.c index 3067f21cff..a7d21928c1 100644 --- a/libavfilter/vf_drawbox.c +++ b/libavfilter/vf_drawbox.c @@ -66,12 +66,12 @@ static av_cold int init(AVFilterContext *ctx, const char *args) static int query_formats(AVFilterContext *ctx) { - enum PixelFormat pix_fmts[] = { - PIX_FMT_YUV444P, PIX_FMT_YUV422P, PIX_FMT_YUV420P, - PIX_FMT_YUV411P, PIX_FMT_YUV410P, - PIX_FMT_YUVJ444P, PIX_FMT_YUVJ422P, PIX_FMT_YUVJ420P, - PIX_FMT_YUV440P, PIX_FMT_YUVJ440P, - PIX_FMT_NONE + enum AVPixelFormat pix_fmts[] = { + AV_PIX_FMT_YUV444P, AV_PIX_FMT_YUV422P, AV_PIX_FMT_YUV420P, + AV_PIX_FMT_YUV411P, AV_PIX_FMT_YUV410P, + AV_PIX_FMT_YUVJ444P, AV_PIX_FMT_YUVJ422P, AV_PIX_FMT_YUVJ420P, + AV_PIX_FMT_YUV440P, AV_PIX_FMT_YUVJ440P, + AV_PIX_FMT_NONE }; ff_set_common_formats(ctx, ff_make_format_list(pix_fmts)); diff --git a/libavfilter/vf_edgedetect.c b/libavfilter/vf_edgedetect.c index 60112cb11c..d3d8ca1380 100644 --- a/libavfilter/vf_edgedetect.c +++ b/libavfilter/vf_edgedetect.c @@ -68,7 +68,7 @@ static av_cold int init(AVFilterContext *ctx, const char *args) static int query_formats(AVFilterContext *ctx) { - static const enum PixelFormat pix_fmts[] = {PIX_FMT_GRAY8, PIX_FMT_NONE}; + static const enum AVPixelFormat pix_fmts[] = {AV_PIX_FMT_GRAY8, AV_PIX_FMT_NONE}; ff_set_common_formats(ctx, ff_make_format_list(pix_fmts)); return 0; } diff --git a/libavfilter/vf_fade.c b/libavfilter/vf_fade.c index 3c5516e8b4..d80b4205cc 100644 --- a/libavfilter/vf_fade.c +++ b/libavfilter/vf_fade.c @@ -146,34 +146,34 @@ static av_cold void uninit(AVFilterContext *ctx) static int query_formats(AVFilterContext *ctx) { - static const enum PixelFormat pix_fmts[] = { - PIX_FMT_YUV444P, PIX_FMT_YUV422P, PIX_FMT_YUV420P, - PIX_FMT_YUV411P, PIX_FMT_YUV410P, - PIX_FMT_YUVJ444P, PIX_FMT_YUVJ422P, PIX_FMT_YUVJ420P, - PIX_FMT_YUV440P, PIX_FMT_YUVJ440P, - PIX_FMT_YUVA420P, - PIX_FMT_RGB24, PIX_FMT_BGR24, - PIX_FMT_ARGB, PIX_FMT_ABGR, - PIX_FMT_RGBA, PIX_FMT_BGRA, - PIX_FMT_NONE + static const enum AVPixelFormat pix_fmts[] = { + AV_PIX_FMT_YUV444P, AV_PIX_FMT_YUV422P, AV_PIX_FMT_YUV420P, + AV_PIX_FMT_YUV411P, AV_PIX_FMT_YUV410P, + AV_PIX_FMT_YUVJ444P, AV_PIX_FMT_YUVJ422P, AV_PIX_FMT_YUVJ420P, + AV_PIX_FMT_YUV440P, AV_PIX_FMT_YUVJ440P, + AV_PIX_FMT_YUVA420P, + AV_PIX_FMT_RGB24, AV_PIX_FMT_BGR24, + AV_PIX_FMT_ARGB, AV_PIX_FMT_ABGR, + AV_PIX_FMT_RGBA, AV_PIX_FMT_BGRA, + AV_PIX_FMT_NONE }; ff_set_common_formats(ctx, ff_make_format_list(pix_fmts)); return 0; } -const static enum PixelFormat studio_level_pix_fmts[] = { - PIX_FMT_YUV444P, PIX_FMT_YUV422P, PIX_FMT_YUV420P, - PIX_FMT_YUV411P, PIX_FMT_YUV410P, - PIX_FMT_YUV440P, - PIX_FMT_NONE +const static enum AVPixelFormat studio_level_pix_fmts[] = { + AV_PIX_FMT_YUV444P, AV_PIX_FMT_YUV422P, AV_PIX_FMT_YUV420P, + AV_PIX_FMT_YUV411P, AV_PIX_FMT_YUV410P, + AV_PIX_FMT_YUV440P, + AV_PIX_FMT_NONE }; -static enum PixelFormat alpha_pix_fmts[] = { - PIX_FMT_YUVA420P, - PIX_FMT_ARGB, PIX_FMT_ABGR, - PIX_FMT_RGBA, PIX_FMT_BGRA, - PIX_FMT_NONE +static enum AVPixelFormat alpha_pix_fmts[] = { + AV_PIX_FMT_YUVA420P, + AV_PIX_FMT_ARGB, AV_PIX_FMT_ABGR, + AV_PIX_FMT_RGBA, AV_PIX_FMT_BGRA, + AV_PIX_FMT_NONE }; static int config_props(AVFilterLink *inlink) diff --git a/libavfilter/vf_fieldorder.c b/libavfilter/vf_fieldorder.c index 8026580827..a722731dcf 100644 --- a/libavfilter/vf_fieldorder.c +++ b/libavfilter/vf_fieldorder.c @@ -71,14 +71,14 @@ static av_cold int init(AVFilterContext *ctx, const char *args) static int query_formats(AVFilterContext *ctx) { AVFilterFormats *formats; - enum PixelFormat pix_fmt; + enum AVPixelFormat pix_fmt; int ret; /** accept any input pixel format that is not hardware accelerated, not * a bitstream format, and does not have vertically sub-sampled chroma */ if (ctx->inputs[0]) { formats = NULL; - for (pix_fmt = 0; pix_fmt < PIX_FMT_NB; pix_fmt++) + for (pix_fmt = 0; pix_fmt < AV_PIX_FMT_NB; pix_fmt++) if (!( av_pix_fmt_descriptors[pix_fmt].flags & PIX_FMT_HWACCEL || av_pix_fmt_descriptors[pix_fmt].flags & PIX_FMT_BITSTREAM) && av_pix_fmt_descriptors[pix_fmt].nb_components diff --git a/libavfilter/vf_format.c b/libavfilter/vf_format.c index ccd829f13c..56dacdb1da 100644 --- a/libavfilter/vf_format.c +++ b/libavfilter/vf_format.c @@ -39,18 +39,18 @@ typedef struct { * List of flags telling if a given image format has been listed * as argument to the filter. */ - int listed_pix_fmt_flags[PIX_FMT_NB]; + int listed_pix_fmt_flags[AV_PIX_FMT_NB]; } FormatContext; -#define PIX_FMT_NAME_MAXSIZE 32 +#define AV_PIX_FMT_NAME_MAXSIZE 32 static av_cold int init(AVFilterContext *ctx, const char *args) { FormatContext *format = ctx->priv; const char *cur, *sep; - char pix_fmt_name[PIX_FMT_NAME_MAXSIZE]; + char pix_fmt_name[AV_PIX_FMT_NAME_MAXSIZE]; int pix_fmt_name_len, ret; - enum PixelFormat pix_fmt; + enum AVPixelFormat pix_fmt; /* parse the list of formats */ for (cur = args; cur; cur = sep ? sep+1 : NULL) { @@ -58,7 +58,7 @@ static av_cold int init(AVFilterContext *ctx, const char *args) pix_fmt_name_len = strlen(cur); else pix_fmt_name_len = sep - cur; - if (pix_fmt_name_len >= PIX_FMT_NAME_MAXSIZE) { + if (pix_fmt_name_len >= AV_PIX_FMT_NAME_MAXSIZE) { av_log(ctx, AV_LOG_ERROR, "Format name too long\n"); return -1; } @@ -78,12 +78,12 @@ static av_cold int init(AVFilterContext *ctx, const char *args) static AVFilterFormats *make_format_list(FormatContext *format, int flag) { AVFilterFormats *formats; - enum PixelFormat pix_fmt; + enum AVPixelFormat pix_fmt; formats = av_mallocz(sizeof(AVFilterFormats)); - formats->formats = av_malloc(sizeof(enum PixelFormat) * PIX_FMT_NB); + formats->formats = av_malloc(sizeof(enum AVPixelFormat) * AV_PIX_FMT_NB); - for (pix_fmt = 0; pix_fmt < PIX_FMT_NB; pix_fmt++) + for (pix_fmt = 0; pix_fmt < AV_PIX_FMT_NB; pix_fmt++) if (format->listed_pix_fmt_flags[pix_fmt] == flag) formats->formats[formats->format_count++] = pix_fmt; diff --git a/libavfilter/vf_frei0r.c b/libavfilter/vf_frei0r.c index cd0cd6b778..0845702238 100644 --- a/libavfilter/vf_frei0r.c +++ b/libavfilter/vf_frei0r.c @@ -329,12 +329,12 @@ static int query_formats(AVFilterContext *ctx) AVFilterFormats *formats = NULL; if (frei0r->plugin_info.color_model == F0R_COLOR_MODEL_BGRA8888) { - ff_add_format(&formats, PIX_FMT_BGRA); + ff_add_format(&formats, AV_PIX_FMT_BGRA); } else if (frei0r->plugin_info.color_model == F0R_COLOR_MODEL_RGBA8888) { - ff_add_format(&formats, PIX_FMT_RGBA); + ff_add_format(&formats, AV_PIX_FMT_RGBA); } else { /* F0R_COLOR_MODEL_PACKED32 */ - static const enum PixelFormat pix_fmts[] = { - PIX_FMT_BGRA, PIX_FMT_ARGB, PIX_FMT_ABGR, PIX_FMT_ARGB, PIX_FMT_NONE + static const enum AVPixelFormat pix_fmts[] = { + AV_PIX_FMT_BGRA, AV_PIX_FMT_ARGB, AV_PIX_FMT_ABGR, AV_PIX_FMT_ARGB, AV_PIX_FMT_NONE }; formats = ff_make_format_list(pix_fmts); } diff --git a/libavfilter/vf_gradfun.c b/libavfilter/vf_gradfun.c index 5c49060c9d..c403331972 100644 --- a/libavfilter/vf_gradfun.c +++ b/libavfilter/vf_gradfun.c @@ -151,12 +151,12 @@ static av_cold void uninit(AVFilterContext *ctx) static int query_formats(AVFilterContext *ctx) { - static const enum PixelFormat pix_fmts[] = { - PIX_FMT_YUV410P, PIX_FMT_YUV420P, - PIX_FMT_GRAY8, PIX_FMT_NV12, - PIX_FMT_NV21, PIX_FMT_YUV444P, - PIX_FMT_YUV422P, PIX_FMT_YUV411P, - PIX_FMT_NONE + static const enum AVPixelFormat pix_fmts[] = { + AV_PIX_FMT_YUV410P, AV_PIX_FMT_YUV420P, + AV_PIX_FMT_GRAY8, AV_PIX_FMT_NV12, + AV_PIX_FMT_NV21, AV_PIX_FMT_YUV444P, + AV_PIX_FMT_YUV422P, AV_PIX_FMT_YUV411P, + AV_PIX_FMT_NONE }; ff_set_common_formats(ctx, ff_make_format_list(pix_fmts)); diff --git a/libavfilter/vf_hflip.c b/libavfilter/vf_hflip.c index eada9a03ac..ed42f9298c 100644 --- a/libavfilter/vf_hflip.c +++ b/libavfilter/vf_hflip.c @@ -42,32 +42,32 @@ typedef struct { static int query_formats(AVFilterContext *ctx) { - static const enum PixelFormat pix_fmts[] = { - PIX_FMT_RGB48BE, PIX_FMT_RGB48LE, - PIX_FMT_BGR48BE, PIX_FMT_BGR48LE, - PIX_FMT_ARGB, PIX_FMT_RGBA, - PIX_FMT_ABGR, PIX_FMT_BGRA, - PIX_FMT_RGB24, PIX_FMT_BGR24, - PIX_FMT_RGB565BE, PIX_FMT_RGB565LE, - PIX_FMT_RGB555BE, PIX_FMT_RGB555LE, - PIX_FMT_RGB444BE, PIX_FMT_RGB444LE, - PIX_FMT_BGR565BE, PIX_FMT_BGR565LE, - PIX_FMT_BGR555BE, PIX_FMT_BGR555LE, - PIX_FMT_BGR444BE, PIX_FMT_BGR444LE, - PIX_FMT_GRAY16BE, PIX_FMT_GRAY16LE, - PIX_FMT_YUV420P16LE, PIX_FMT_YUV420P16BE, - PIX_FMT_YUV422P16LE, PIX_FMT_YUV422P16BE, - PIX_FMT_YUV444P16LE, PIX_FMT_YUV444P16BE, - PIX_FMT_YUV444P, PIX_FMT_YUV422P, - PIX_FMT_YUV420P, PIX_FMT_YUV411P, - PIX_FMT_YUV410P, PIX_FMT_YUV440P, - PIX_FMT_YUVJ444P, PIX_FMT_YUVJ422P, - PIX_FMT_YUVJ420P, PIX_FMT_YUVJ440P, - PIX_FMT_YUVA420P, - PIX_FMT_RGB8, PIX_FMT_BGR8, - PIX_FMT_RGB4_BYTE, PIX_FMT_BGR4_BYTE, - PIX_FMT_PAL8, PIX_FMT_GRAY8, - PIX_FMT_NONE + static const enum AVPixelFormat pix_fmts[] = { + AV_PIX_FMT_RGB48BE, AV_PIX_FMT_RGB48LE, + AV_PIX_FMT_BGR48BE, AV_PIX_FMT_BGR48LE, + AV_PIX_FMT_ARGB, AV_PIX_FMT_RGBA, + AV_PIX_FMT_ABGR, AV_PIX_FMT_BGRA, + AV_PIX_FMT_RGB24, AV_PIX_FMT_BGR24, + AV_PIX_FMT_RGB565BE, AV_PIX_FMT_RGB565LE, + AV_PIX_FMT_RGB555BE, AV_PIX_FMT_RGB555LE, + AV_PIX_FMT_RGB444BE, AV_PIX_FMT_RGB444LE, + AV_PIX_FMT_BGR565BE, AV_PIX_FMT_BGR565LE, + AV_PIX_FMT_BGR555BE, AV_PIX_FMT_BGR555LE, + AV_PIX_FMT_BGR444BE, AV_PIX_FMT_BGR444LE, + AV_PIX_FMT_GRAY16BE, AV_PIX_FMT_GRAY16LE, + AV_PIX_FMT_YUV420P16LE, AV_PIX_FMT_YUV420P16BE, + AV_PIX_FMT_YUV422P16LE, AV_PIX_FMT_YUV422P16BE, + AV_PIX_FMT_YUV444P16LE, AV_PIX_FMT_YUV444P16BE, + AV_PIX_FMT_YUV444P, AV_PIX_FMT_YUV422P, + AV_PIX_FMT_YUV420P, AV_PIX_FMT_YUV411P, + AV_PIX_FMT_YUV410P, AV_PIX_FMT_YUV440P, + AV_PIX_FMT_YUVJ444P, AV_PIX_FMT_YUVJ422P, + AV_PIX_FMT_YUVJ420P, AV_PIX_FMT_YUVJ440P, + AV_PIX_FMT_YUVA420P, + AV_PIX_FMT_RGB8, AV_PIX_FMT_BGR8, + AV_PIX_FMT_RGB4_BYTE, AV_PIX_FMT_BGR4_BYTE, + AV_PIX_FMT_PAL8, AV_PIX_FMT_GRAY8, + AV_PIX_FMT_NONE }; ff_set_common_formats(ctx, ff_make_format_list(pix_fmts)); diff --git a/libavfilter/vf_hqdn3d.c b/libavfilter/vf_hqdn3d.c index 2fe70563a1..a454207b61 100644 --- a/libavfilter/vf_hqdn3d.c +++ b/libavfilter/vf_hqdn3d.c @@ -263,27 +263,27 @@ static void uninit(AVFilterContext *ctx) static int query_formats(AVFilterContext *ctx) { - static const enum PixelFormat pix_fmts[] = { - PIX_FMT_YUV420P, - PIX_FMT_YUV422P, - PIX_FMT_YUV444P, - PIX_FMT_YUV410P, - PIX_FMT_YUV411P, - PIX_FMT_YUV440P, - PIX_FMT_YUVJ420P, - PIX_FMT_YUVJ422P, - PIX_FMT_YUVJ444P, - PIX_FMT_YUVJ440P, - AV_NE( PIX_FMT_YUV420P9BE, PIX_FMT_YUV420P9LE ), - AV_NE( PIX_FMT_YUV422P9BE, PIX_FMT_YUV422P9LE ), - AV_NE( PIX_FMT_YUV444P9BE, PIX_FMT_YUV444P9LE ), - AV_NE( PIX_FMT_YUV420P10BE, PIX_FMT_YUV420P10LE ), - AV_NE( PIX_FMT_YUV422P10BE, PIX_FMT_YUV422P10LE ), - AV_NE( PIX_FMT_YUV444P10BE, PIX_FMT_YUV444P10LE ), - AV_NE( PIX_FMT_YUV420P16BE, PIX_FMT_YUV420P16LE ), - AV_NE( PIX_FMT_YUV422P16BE, PIX_FMT_YUV422P16LE ), - AV_NE( PIX_FMT_YUV444P16BE, PIX_FMT_YUV444P16LE ), - PIX_FMT_NONE + static const enum AVPixelFormat pix_fmts[] = { + AV_PIX_FMT_YUV420P, + AV_PIX_FMT_YUV422P, + AV_PIX_FMT_YUV444P, + AV_PIX_FMT_YUV410P, + AV_PIX_FMT_YUV411P, + AV_PIX_FMT_YUV440P, + AV_PIX_FMT_YUVJ420P, + AV_PIX_FMT_YUVJ422P, + AV_PIX_FMT_YUVJ444P, + AV_PIX_FMT_YUVJ440P, + AV_NE( AV_PIX_FMT_YUV420P9BE, AV_PIX_FMT_YUV420P9LE ), + AV_NE( AV_PIX_FMT_YUV422P9BE, AV_PIX_FMT_YUV422P9LE ), + AV_NE( AV_PIX_FMT_YUV444P9BE, AV_PIX_FMT_YUV444P9LE ), + AV_NE( AV_PIX_FMT_YUV420P10BE, AV_PIX_FMT_YUV420P10LE ), + AV_NE( AV_PIX_FMT_YUV422P10BE, AV_PIX_FMT_YUV422P10LE ), + AV_NE( AV_PIX_FMT_YUV444P10BE, AV_PIX_FMT_YUV444P10LE ), + AV_NE( AV_PIX_FMT_YUV420P16BE, AV_PIX_FMT_YUV420P16LE ), + AV_NE( AV_PIX_FMT_YUV422P16BE, AV_PIX_FMT_YUV422P16LE ), + AV_NE( AV_PIX_FMT_YUV444P16BE, AV_PIX_FMT_YUV444P16LE ), + AV_PIX_FMT_NONE }; ff_set_common_formats(ctx, ff_make_format_list(pix_fmts)); diff --git a/libavfilter/vf_hue.c b/libavfilter/vf_hue.c index 3048a596ca..71d5cc88ad 100644 --- a/libavfilter/vf_hue.c +++ b/libavfilter/vf_hue.c @@ -236,12 +236,12 @@ static av_cold void uninit(AVFilterContext *ctx) static int query_formats(AVFilterContext *ctx) { - static const enum PixelFormat pix_fmts[] = { - PIX_FMT_YUV444P, PIX_FMT_YUV422P, - PIX_FMT_YUV420P, PIX_FMT_YUV411P, - PIX_FMT_YUV410P, PIX_FMT_YUV440P, - PIX_FMT_YUVA420P, - PIX_FMT_NONE + static const enum AVPixelFormat pix_fmts[] = { + AV_PIX_FMT_YUV444P, AV_PIX_FMT_YUV422P, + AV_PIX_FMT_YUV420P, AV_PIX_FMT_YUV411P, + AV_PIX_FMT_YUV410P, AV_PIX_FMT_YUV440P, + AV_PIX_FMT_YUVA420P, + AV_PIX_FMT_NONE }; ff_set_common_formats(ctx, ff_make_format_list(pix_fmts)); diff --git a/libavfilter/vf_idet.c b/libavfilter/vf_idet.c index 8942ced4f3..4d14241bb5 100644 --- a/libavfilter/vf_idet.c +++ b/libavfilter/vf_idet.c @@ -261,27 +261,27 @@ static av_cold void uninit(AVFilterContext *ctx) static int query_formats(AVFilterContext *ctx) { - static const enum PixelFormat pix_fmts[] = { - PIX_FMT_YUV420P, - PIX_FMT_YUV422P, - PIX_FMT_YUV444P, - PIX_FMT_YUV410P, - PIX_FMT_YUV411P, - PIX_FMT_GRAY8, - PIX_FMT_YUVJ420P, - PIX_FMT_YUVJ422P, - PIX_FMT_YUVJ444P, - AV_NE( PIX_FMT_GRAY16BE, PIX_FMT_GRAY16LE ), - PIX_FMT_YUV440P, - PIX_FMT_YUVJ440P, - AV_NE( PIX_FMT_YUV420P10BE, PIX_FMT_YUV420P10LE ), - AV_NE( PIX_FMT_YUV422P10BE, PIX_FMT_YUV422P10LE ), - AV_NE( PIX_FMT_YUV444P10BE, PIX_FMT_YUV444P10LE ), - AV_NE( PIX_FMT_YUV420P16BE, PIX_FMT_YUV420P16LE ), - AV_NE( PIX_FMT_YUV422P16BE, PIX_FMT_YUV422P16LE ), - AV_NE( PIX_FMT_YUV444P16BE, PIX_FMT_YUV444P16LE ), - PIX_FMT_YUVA420P, - PIX_FMT_NONE + static const enum AVPixelFormat pix_fmts[] = { + AV_PIX_FMT_YUV420P, + AV_PIX_FMT_YUV422P, + AV_PIX_FMT_YUV444P, + AV_PIX_FMT_YUV410P, + AV_PIX_FMT_YUV411P, + AV_PIX_FMT_GRAY8, + AV_PIX_FMT_YUVJ420P, + AV_PIX_FMT_YUVJ422P, + AV_PIX_FMT_YUVJ444P, + AV_NE( AV_PIX_FMT_GRAY16BE, AV_PIX_FMT_GRAY16LE ), + AV_PIX_FMT_YUV440P, + AV_PIX_FMT_YUVJ440P, + AV_NE( AV_PIX_FMT_YUV420P10BE, AV_PIX_FMT_YUV420P10LE ), + AV_NE( AV_PIX_FMT_YUV422P10BE, AV_PIX_FMT_YUV422P10LE ), + AV_NE( AV_PIX_FMT_YUV444P10BE, AV_PIX_FMT_YUV444P10LE ), + AV_NE( AV_PIX_FMT_YUV420P16BE, AV_PIX_FMT_YUV420P16LE ), + AV_NE( AV_PIX_FMT_YUV422P16BE, AV_PIX_FMT_YUV422P16LE ), + AV_NE( AV_PIX_FMT_YUV444P16BE, AV_PIX_FMT_YUV444P16LE ), + AV_PIX_FMT_YUVA420P, + AV_PIX_FMT_NONE }; ff_set_common_formats(ctx, ff_make_format_list(pix_fmts)); diff --git a/libavfilter/vf_libopencv.c b/libavfilter/vf_libopencv.c index e0041a7c4e..62c79de946 100644 --- a/libavfilter/vf_libopencv.c +++ b/libavfilter/vf_libopencv.c @@ -34,14 +34,14 @@ #include "formats.h" #include "video.h" -static void fill_iplimage_from_picref(IplImage *img, const AVFilterBufferRef *picref, enum PixelFormat pixfmt) +static void fill_iplimage_from_picref(IplImage *img, const AVFilterBufferRef *picref, enum AVPixelFormat pixfmt) { IplImage *tmpimg; int depth, channels_nb; - if (pixfmt == PIX_FMT_GRAY8) { depth = IPL_DEPTH_8U; channels_nb = 1; } - else if (pixfmt == PIX_FMT_BGRA) { depth = IPL_DEPTH_8U; channels_nb = 4; } - else if (pixfmt == PIX_FMT_BGR24) { depth = IPL_DEPTH_8U; channels_nb = 3; } + if (pixfmt == AV_PIX_FMT_GRAY8) { depth = IPL_DEPTH_8U; channels_nb = 1; } + else if (pixfmt == AV_PIX_FMT_BGRA) { depth = IPL_DEPTH_8U; channels_nb = 4; } + else if (pixfmt == AV_PIX_FMT_BGR24) { depth = IPL_DEPTH_8U; channels_nb = 3; } else return; tmpimg = cvCreateImageHeader((CvSize){picref->video->w, picref->video->h}, depth, channels_nb); @@ -52,7 +52,7 @@ static void fill_iplimage_from_picref(IplImage *img, const AVFilterBufferRef *pi img->widthStep = picref->linesize[0]; } -static void fill_picref_from_iplimage(AVFilterBufferRef *picref, const IplImage *img, enum PixelFormat pixfmt) +static void fill_picref_from_iplimage(AVFilterBufferRef *picref, const IplImage *img, enum AVPixelFormat pixfmt) { picref->linesize[0] = img->widthStep; picref->data[0] = img->imageData; @@ -60,8 +60,8 @@ static void fill_picref_from_iplimage(AVFilterBufferRef *picref, const IplImage static int query_formats(AVFilterContext *ctx) { - static const enum PixelFormat pix_fmts[] = { - PIX_FMT_BGR24, PIX_FMT_BGRA, PIX_FMT_GRAY8, PIX_FMT_NONE + static const enum AVPixelFormat pix_fmts[] = { + AV_PIX_FMT_BGR24, AV_PIX_FMT_BGRA, AV_PIX_FMT_GRAY8, AV_PIX_FMT_NONE }; ff_set_common_formats(ctx, ff_make_format_list(pix_fmts)); diff --git a/libavfilter/vf_lut.c b/libavfilter/vf_lut.c index 4a7bf62238..6fa9e3637e 100644 --- a/libavfilter/vf_lut.c +++ b/libavfilter/vf_lut.c @@ -106,26 +106,26 @@ static av_cold void uninit(AVFilterContext *ctx) } #define YUV_FORMATS \ - PIX_FMT_YUV444P, PIX_FMT_YUV422P, PIX_FMT_YUV420P, \ - PIX_FMT_YUV411P, PIX_FMT_YUV410P, PIX_FMT_YUV440P, \ - PIX_FMT_YUVA420P, \ - PIX_FMT_YUVJ444P, PIX_FMT_YUVJ422P, PIX_FMT_YUVJ420P, \ - PIX_FMT_YUVJ440P + AV_PIX_FMT_YUV444P, AV_PIX_FMT_YUV422P, AV_PIX_FMT_YUV420P, \ + AV_PIX_FMT_YUV411P, AV_PIX_FMT_YUV410P, AV_PIX_FMT_YUV440P, \ + AV_PIX_FMT_YUVA420P, \ + AV_PIX_FMT_YUVJ444P, AV_PIX_FMT_YUVJ422P, AV_PIX_FMT_YUVJ420P, \ + AV_PIX_FMT_YUVJ440P #define RGB_FORMATS \ - PIX_FMT_ARGB, PIX_FMT_RGBA, \ - PIX_FMT_ABGR, PIX_FMT_BGRA, \ - PIX_FMT_RGB24, PIX_FMT_BGR24 + AV_PIX_FMT_ARGB, AV_PIX_FMT_RGBA, \ + AV_PIX_FMT_ABGR, AV_PIX_FMT_BGRA, \ + AV_PIX_FMT_RGB24, AV_PIX_FMT_BGR24 -static const enum PixelFormat yuv_pix_fmts[] = { YUV_FORMATS, PIX_FMT_NONE }; -static const enum PixelFormat rgb_pix_fmts[] = { RGB_FORMATS, PIX_FMT_NONE }; -static const enum PixelFormat all_pix_fmts[] = { RGB_FORMATS, YUV_FORMATS, PIX_FMT_NONE }; +static const enum AVPixelFormat yuv_pix_fmts[] = { YUV_FORMATS, AV_PIX_FMT_NONE }; +static const enum AVPixelFormat rgb_pix_fmts[] = { RGB_FORMATS, AV_PIX_FMT_NONE }; +static const enum AVPixelFormat all_pix_fmts[] = { RGB_FORMATS, YUV_FORMATS, AV_PIX_FMT_NONE }; static int query_formats(AVFilterContext *ctx) { LutContext *lut = ctx->priv; - const enum PixelFormat *pix_fmts = lut->is_rgb ? rgb_pix_fmts : + const enum AVPixelFormat *pix_fmts = lut->is_rgb ? rgb_pix_fmts : lut->is_yuv ? yuv_pix_fmts : all_pix_fmts; ff_set_common_formats(ctx, ff_make_format_list(pix_fmts)); @@ -186,13 +186,13 @@ static int config_props(AVFilterLink *inlink) lut->var_values[VAR_H] = inlink->h; switch (inlink->format) { - case PIX_FMT_YUV410P: - case PIX_FMT_YUV411P: - case PIX_FMT_YUV420P: - case PIX_FMT_YUV422P: - case PIX_FMT_YUV440P: - case PIX_FMT_YUV444P: - case PIX_FMT_YUVA420P: + case AV_PIX_FMT_YUV410P: + case AV_PIX_FMT_YUV411P: + case AV_PIX_FMT_YUV420P: + case AV_PIX_FMT_YUV422P: + case AV_PIX_FMT_YUV440P: + case AV_PIX_FMT_YUV444P: + case AV_PIX_FMT_YUVA420P: min[Y] = min[U] = min[V] = 16; max[Y] = 235; max[U] = max[V] = 240; @@ -209,12 +209,12 @@ static int config_props(AVFilterLink *inlink) if (lut->is_rgb) { switch (inlink->format) { - case PIX_FMT_ARGB: rgba_map[0] = A; rgba_map[1] = R; rgba_map[2] = G; rgba_map[3] = B; break; - case PIX_FMT_ABGR: rgba_map[0] = A; rgba_map[1] = B; rgba_map[2] = G; rgba_map[3] = R; break; - case PIX_FMT_RGBA: - case PIX_FMT_RGB24: rgba_map[0] = R; rgba_map[1] = G; rgba_map[2] = B; rgba_map[3] = A; break; - case PIX_FMT_BGRA: - case PIX_FMT_BGR24: rgba_map[0] = B; rgba_map[1] = G; rgba_map[2] = R; rgba_map[3] = A; break; + case AV_PIX_FMT_ARGB: rgba_map[0] = A; rgba_map[1] = R; rgba_map[2] = G; rgba_map[3] = B; break; + case AV_PIX_FMT_ABGR: rgba_map[0] = A; rgba_map[1] = B; rgba_map[2] = G; rgba_map[3] = R; break; + case AV_PIX_FMT_RGBA: + case AV_PIX_FMT_RGB24: rgba_map[0] = R; rgba_map[1] = G; rgba_map[2] = B; rgba_map[3] = A; break; + case AV_PIX_FMT_BGRA: + case AV_PIX_FMT_BGR24: rgba_map[0] = B; rgba_map[1] = G; rgba_map[2] = R; rgba_map[3] = A; break; } lut->step = av_get_bits_per_pixel(desc) >> 3; } diff --git a/libavfilter/vf_mp.c b/libavfilter/vf_mp.c index d57a6fe521..377a8b54eb 100644 --- a/libavfilter/vf_mp.c +++ b/libavfilter/vf_mp.c @@ -47,79 +47,79 @@ //XXX: identical pix_fmt must be following with each others static const struct { int fmt; - enum PixelFormat pix_fmt; + enum AVPixelFormat pix_fmt; } conversion_map[] = { - {IMGFMT_ARGB, PIX_FMT_ARGB}, - {IMGFMT_BGRA, PIX_FMT_BGRA}, - {IMGFMT_BGR24, PIX_FMT_BGR24}, - {IMGFMT_BGR16BE, PIX_FMT_RGB565BE}, - {IMGFMT_BGR16LE, PIX_FMT_RGB565LE}, - {IMGFMT_BGR15BE, PIX_FMT_RGB555BE}, - {IMGFMT_BGR15LE, PIX_FMT_RGB555LE}, - {IMGFMT_BGR12BE, PIX_FMT_RGB444BE}, - {IMGFMT_BGR12LE, PIX_FMT_RGB444LE}, - {IMGFMT_BGR8, PIX_FMT_RGB8}, - {IMGFMT_BGR4, PIX_FMT_RGB4}, - {IMGFMT_BGR1, PIX_FMT_MONOBLACK}, - {IMGFMT_RGB1, PIX_FMT_MONOBLACK}, - {IMGFMT_RG4B, PIX_FMT_BGR4_BYTE}, - {IMGFMT_BG4B, PIX_FMT_RGB4_BYTE}, - {IMGFMT_RGB48LE, PIX_FMT_RGB48LE}, - {IMGFMT_RGB48BE, PIX_FMT_RGB48BE}, - {IMGFMT_ABGR, PIX_FMT_ABGR}, - {IMGFMT_RGBA, PIX_FMT_RGBA}, - {IMGFMT_RGB24, PIX_FMT_RGB24}, - {IMGFMT_RGB16BE, PIX_FMT_BGR565BE}, - {IMGFMT_RGB16LE, PIX_FMT_BGR565LE}, - {IMGFMT_RGB15BE, PIX_FMT_BGR555BE}, - {IMGFMT_RGB15LE, PIX_FMT_BGR555LE}, - {IMGFMT_RGB12BE, PIX_FMT_BGR444BE}, - {IMGFMT_RGB12LE, PIX_FMT_BGR444LE}, - {IMGFMT_RGB8, PIX_FMT_BGR8}, - {IMGFMT_RGB4, PIX_FMT_BGR4}, - {IMGFMT_BGR8, PIX_FMT_PAL8}, - {IMGFMT_YUY2, PIX_FMT_YUYV422}, - {IMGFMT_UYVY, PIX_FMT_UYVY422}, - {IMGFMT_NV12, PIX_FMT_NV12}, - {IMGFMT_NV21, PIX_FMT_NV21}, - {IMGFMT_Y800, PIX_FMT_GRAY8}, - {IMGFMT_Y8, PIX_FMT_GRAY8}, - {IMGFMT_YVU9, PIX_FMT_YUV410P}, - {IMGFMT_IF09, PIX_FMT_YUV410P}, - {IMGFMT_YV12, PIX_FMT_YUV420P}, - {IMGFMT_I420, PIX_FMT_YUV420P}, - {IMGFMT_IYUV, PIX_FMT_YUV420P}, - {IMGFMT_411P, PIX_FMT_YUV411P}, - {IMGFMT_422P, PIX_FMT_YUV422P}, - {IMGFMT_444P, PIX_FMT_YUV444P}, - {IMGFMT_440P, PIX_FMT_YUV440P}, - - {IMGFMT_420A, PIX_FMT_YUVA420P}, - - {IMGFMT_420P16_LE, PIX_FMT_YUV420P16LE}, - {IMGFMT_420P16_BE, PIX_FMT_YUV420P16BE}, - {IMGFMT_422P16_LE, PIX_FMT_YUV422P16LE}, - {IMGFMT_422P16_BE, PIX_FMT_YUV422P16BE}, - {IMGFMT_444P16_LE, PIX_FMT_YUV444P16LE}, - {IMGFMT_444P16_BE, PIX_FMT_YUV444P16BE}, + {IMGFMT_ARGB, AV_PIX_FMT_ARGB}, + {IMGFMT_BGRA, AV_PIX_FMT_BGRA}, + {IMGFMT_BGR24, AV_PIX_FMT_BGR24}, + {IMGFMT_BGR16BE, AV_PIX_FMT_RGB565BE}, + {IMGFMT_BGR16LE, AV_PIX_FMT_RGB565LE}, + {IMGFMT_BGR15BE, AV_PIX_FMT_RGB555BE}, + {IMGFMT_BGR15LE, AV_PIX_FMT_RGB555LE}, + {IMGFMT_BGR12BE, AV_PIX_FMT_RGB444BE}, + {IMGFMT_BGR12LE, AV_PIX_FMT_RGB444LE}, + {IMGFMT_BGR8, AV_PIX_FMT_RGB8}, + {IMGFMT_BGR4, AV_PIX_FMT_RGB4}, + {IMGFMT_BGR1, AV_PIX_FMT_MONOBLACK}, + {IMGFMT_RGB1, AV_PIX_FMT_MONOBLACK}, + {IMGFMT_RG4B, AV_PIX_FMT_BGR4_BYTE}, + {IMGFMT_BG4B, AV_PIX_FMT_RGB4_BYTE}, + {IMGFMT_RGB48LE, AV_PIX_FMT_RGB48LE}, + {IMGFMT_RGB48BE, AV_PIX_FMT_RGB48BE}, + {IMGFMT_ABGR, AV_PIX_FMT_ABGR}, + {IMGFMT_RGBA, AV_PIX_FMT_RGBA}, + {IMGFMT_RGB24, AV_PIX_FMT_RGB24}, + {IMGFMT_RGB16BE, AV_PIX_FMT_BGR565BE}, + {IMGFMT_RGB16LE, AV_PIX_FMT_BGR565LE}, + {IMGFMT_RGB15BE, AV_PIX_FMT_BGR555BE}, + {IMGFMT_RGB15LE, AV_PIX_FMT_BGR555LE}, + {IMGFMT_RGB12BE, AV_PIX_FMT_BGR444BE}, + {IMGFMT_RGB12LE, AV_PIX_FMT_BGR444LE}, + {IMGFMT_RGB8, AV_PIX_FMT_BGR8}, + {IMGFMT_RGB4, AV_PIX_FMT_BGR4}, + {IMGFMT_BGR8, AV_PIX_FMT_PAL8}, + {IMGFMT_YUY2, AV_PIX_FMT_YUYV422}, + {IMGFMT_UYVY, AV_PIX_FMT_UYVY422}, + {IMGFMT_NV12, AV_PIX_FMT_NV12}, + {IMGFMT_NV21, AV_PIX_FMT_NV21}, + {IMGFMT_Y800, AV_PIX_FMT_GRAY8}, + {IMGFMT_Y8, AV_PIX_FMT_GRAY8}, + {IMGFMT_YVU9, AV_PIX_FMT_YUV410P}, + {IMGFMT_IF09, AV_PIX_FMT_YUV410P}, + {IMGFMT_YV12, AV_PIX_FMT_YUV420P}, + {IMGFMT_I420, AV_PIX_FMT_YUV420P}, + {IMGFMT_IYUV, AV_PIX_FMT_YUV420P}, + {IMGFMT_411P, AV_PIX_FMT_YUV411P}, + {IMGFMT_422P, AV_PIX_FMT_YUV422P}, + {IMGFMT_444P, AV_PIX_FMT_YUV444P}, + {IMGFMT_440P, AV_PIX_FMT_YUV440P}, + + {IMGFMT_420A, AV_PIX_FMT_YUVA420P}, + + {IMGFMT_420P16_LE, AV_PIX_FMT_YUV420P16LE}, + {IMGFMT_420P16_BE, AV_PIX_FMT_YUV420P16BE}, + {IMGFMT_422P16_LE, AV_PIX_FMT_YUV422P16LE}, + {IMGFMT_422P16_BE, AV_PIX_FMT_YUV422P16BE}, + {IMGFMT_444P16_LE, AV_PIX_FMT_YUV444P16LE}, + {IMGFMT_444P16_BE, AV_PIX_FMT_YUV444P16BE}, // YUVJ are YUV formats that use the full Y range and not just // 16 - 235 (see colorspaces.txt). // Currently they are all treated the same way. - {IMGFMT_YV12, PIX_FMT_YUVJ420P}, - {IMGFMT_422P, PIX_FMT_YUVJ422P}, - {IMGFMT_444P, PIX_FMT_YUVJ444P}, - {IMGFMT_440P, PIX_FMT_YUVJ440P}, - - {IMGFMT_XVMC_MOCO_MPEG2, PIX_FMT_XVMC_MPEG2_MC}, - {IMGFMT_XVMC_IDCT_MPEG2, PIX_FMT_XVMC_MPEG2_IDCT}, - {IMGFMT_VDPAU_MPEG1, PIX_FMT_VDPAU_MPEG1}, - {IMGFMT_VDPAU_MPEG2, PIX_FMT_VDPAU_MPEG2}, - {IMGFMT_VDPAU_H264, PIX_FMT_VDPAU_H264}, - {IMGFMT_VDPAU_WMV3, PIX_FMT_VDPAU_WMV3}, - {IMGFMT_VDPAU_VC1, PIX_FMT_VDPAU_VC1}, - {IMGFMT_VDPAU_MPEG4, PIX_FMT_VDPAU_MPEG4}, - {0, PIX_FMT_NONE} + {IMGFMT_YV12, AV_PIX_FMT_YUVJ420P}, + {IMGFMT_422P, AV_PIX_FMT_YUVJ422P}, + {IMGFMT_444P, AV_PIX_FMT_YUVJ444P}, + {IMGFMT_440P, AV_PIX_FMT_YUVJ440P}, + + {IMGFMT_XVMC_MOCO_MPEG2, AV_PIX_FMT_XVMC_MPEG2_MC}, + {IMGFMT_XVMC_IDCT_MPEG2, AV_PIX_FMT_XVMC_MPEG2_IDCT}, + {IMGFMT_VDPAU_MPEG1, AV_PIX_FMT_VDPAU_MPEG1}, + {IMGFMT_VDPAU_MPEG2, AV_PIX_FMT_VDPAU_MPEG2}, + {IMGFMT_VDPAU_H264, AV_PIX_FMT_VDPAU_H264}, + {IMGFMT_VDPAU_WMV3, AV_PIX_FMT_VDPAU_WMV3}, + {IMGFMT_VDPAU_VC1, AV_PIX_FMT_VDPAU_VC1}, + {IMGFMT_VDPAU_MPEG4, AV_PIX_FMT_VDPAU_MPEG4}, + {0, AV_PIX_FMT_NONE} }; //copied from vf.c @@ -301,14 +301,14 @@ struct SwsContext *sws_getContextFromCmdLine(int srcW, int srcH, int srcFormat, { int flags, i; SwsFilter *dstFilterParam, *srcFilterParam; - enum PixelFormat dfmt, sfmt; + enum AVPixelFormat dfmt, sfmt; for(i=0; conversion_map[i].fmt && dstFormat != conversion_map[i].fmt; i++); dfmt= conversion_map[i].pix_fmt; for(i=0; conversion_map[i].fmt && srcFormat != conversion_map[i].fmt; i++); sfmt= conversion_map[i].pix_fmt; - if (srcFormat == IMGFMT_RGB8 || srcFormat == IMGFMT_BGR8) sfmt = PIX_FMT_PAL8; + if (srcFormat == IMGFMT_RGB8 || srcFormat == IMGFMT_BGR8) sfmt = AV_PIX_FMT_PAL8; sws_getFlagsAndFilterFromCmdLine(&flags, &srcFilterParam, &dstFilterParam); return sws_getContext(srcW, srcH, sfmt, dstW, dstH, dfmt, flags , srcFilterParam, dstFilterParam, NULL); @@ -773,7 +773,7 @@ static int query_formats(AVFilterContext *ctx) { AVFilterFormats *avfmts=NULL; MPContext *m = ctx->priv; - enum PixelFormat lastpixfmt = PIX_FMT_NONE; + enum AVPixelFormat lastpixfmt = AV_PIX_FMT_NONE; int i; for(i=0; conversion_map[i].fmt; i++){ diff --git a/libavfilter/vf_overlay.c b/libavfilter/vf_overlay.c index c4bdcb78a6..b44c9f2b3e 100644 --- a/libavfilter/vf_overlay.c +++ b/libavfilter/vf_overlay.c @@ -157,18 +157,18 @@ static int query_formats(AVFilterContext *ctx) OverlayContext *over = ctx->priv; /* overlay formats contains alpha, for avoiding conversion with alpha information loss */ - const enum PixelFormat main_pix_fmts_yuv[] = { PIX_FMT_YUV420P, PIX_FMT_NONE }; - const enum PixelFormat overlay_pix_fmts_yuv[] = { PIX_FMT_YUVA420P, PIX_FMT_NONE }; - const enum PixelFormat main_pix_fmts_rgb[] = { - PIX_FMT_ARGB, PIX_FMT_RGBA, - PIX_FMT_ABGR, PIX_FMT_BGRA, - PIX_FMT_RGB24, PIX_FMT_BGR24, - PIX_FMT_NONE + const enum AVPixelFormat main_pix_fmts_yuv[] = { AV_PIX_FMT_YUV420P, AV_PIX_FMT_NONE }; + const enum AVPixelFormat overlay_pix_fmts_yuv[] = { AV_PIX_FMT_YUVA420P, AV_PIX_FMT_NONE }; + const enum AVPixelFormat main_pix_fmts_rgb[] = { + AV_PIX_FMT_ARGB, AV_PIX_FMT_RGBA, + AV_PIX_FMT_ABGR, AV_PIX_FMT_BGRA, + AV_PIX_FMT_RGB24, AV_PIX_FMT_BGR24, + AV_PIX_FMT_NONE }; - const enum PixelFormat overlay_pix_fmts_rgb[] = { - PIX_FMT_ARGB, PIX_FMT_RGBA, - PIX_FMT_ABGR, PIX_FMT_BGRA, - PIX_FMT_NONE + const enum AVPixelFormat overlay_pix_fmts_rgb[] = { + AV_PIX_FMT_ARGB, AV_PIX_FMT_RGBA, + AV_PIX_FMT_ABGR, AV_PIX_FMT_BGRA, + AV_PIX_FMT_NONE }; AVFilterFormats *main_formats; @@ -189,9 +189,9 @@ static int query_formats(AVFilterContext *ctx) return 0; } -static const enum PixelFormat alpha_pix_fmts[] = { - PIX_FMT_YUVA420P, PIX_FMT_ARGB, PIX_FMT_ABGR, PIX_FMT_RGBA, - PIX_FMT_BGRA, PIX_FMT_NONE +static const enum AVPixelFormat alpha_pix_fmts[] = { + AV_PIX_FMT_YUVA420P, AV_PIX_FMT_ARGB, AV_PIX_FMT_ABGR, AV_PIX_FMT_RGBA, + AV_PIX_FMT_BGRA, AV_PIX_FMT_NONE }; static int config_input_main(AVFilterLink *inlink) diff --git a/libavfilter/vf_removelogo.c b/libavfilter/vf_removelogo.c index 7154a54984..1b0201801d 100644 --- a/libavfilter/vf_removelogo.c +++ b/libavfilter/vf_removelogo.c @@ -191,7 +191,7 @@ static void convert_mask_to_strength_mask(uint8_t *data, int linesize, static int query_formats(AVFilterContext *ctx) { - enum PixelFormat pix_fmts[] = { PIX_FMT_YUV420P, PIX_FMT_NONE }; + enum AVPixelFormat pix_fmts[] = { AV_PIX_FMT_YUV420P, AV_PIX_FMT_NONE }; ff_set_common_formats(ctx, ff_make_format_list(pix_fmts)); return 0; } @@ -200,7 +200,7 @@ static int load_mask(uint8_t **mask, int *w, int *h, const char *filename, void *log_ctx) { int ret; - enum PixelFormat pix_fmt; + enum AVPixelFormat pix_fmt; uint8_t *src_data[4], *gray_data[4]; int src_linesize[4], gray_linesize[4]; @@ -209,7 +209,7 @@ static int load_mask(uint8_t **mask, int *w, int *h, return ret; /* convert the image to GRAY8 */ - if ((ret = ff_scale_image(gray_data, gray_linesize, *w, *h, PIX_FMT_GRAY8, + if ((ret = ff_scale_image(gray_data, gray_linesize, *w, *h, AV_PIX_FMT_GRAY8, src_data, src_linesize, *w, *h, pix_fmt, log_ctx)) < 0) goto end; diff --git a/libavfilter/vf_scale.c b/libavfilter/vf_scale.c index c7cbdfe2c8..5bc00d52a5 100644 --- a/libavfilter/vf_scale.c +++ b/libavfilter/vf_scale.c @@ -130,12 +130,12 @@ static av_cold void uninit(AVFilterContext *ctx) static int query_formats(AVFilterContext *ctx) { AVFilterFormats *formats; - enum PixelFormat pix_fmt; + enum AVPixelFormat pix_fmt; int ret; if (ctx->inputs[0]) { formats = NULL; - for (pix_fmt = 0; pix_fmt < PIX_FMT_NB; pix_fmt++) + for (pix_fmt = 0; pix_fmt < AV_PIX_FMT_NB; pix_fmt++) if ( sws_isSupportedInput(pix_fmt) && (ret = ff_add_format(&formats, pix_fmt)) < 0) { ff_formats_unref(&formats); @@ -145,8 +145,8 @@ static int query_formats(AVFilterContext *ctx) } if (ctx->outputs[0]) { formats = NULL; - for (pix_fmt = 0; pix_fmt < PIX_FMT_NB; pix_fmt++) - if ( (sws_isSupportedOutput(pix_fmt) || pix_fmt == PIX_FMT_PAL8) + for (pix_fmt = 0; pix_fmt < AV_PIX_FMT_NB; pix_fmt++) + if ( (sws_isSupportedOutput(pix_fmt) || pix_fmt == AV_PIX_FMT_PAL8) && (ret = ff_add_format(&formats, pix_fmt)) < 0) { ff_formats_unref(&formats); return ret; @@ -161,7 +161,7 @@ static int config_props(AVFilterLink *outlink) { AVFilterContext *ctx = outlink->src; AVFilterLink *inlink = outlink->src->inputs[0]; - enum PixelFormat outfmt = outlink->format; + enum AVPixelFormat outfmt = outlink->format; ScaleContext *scale = ctx->priv; int64_t w, h; double var_values[VARS_NB], res; @@ -228,7 +228,7 @@ static int config_props(AVFilterLink *outlink) scale->input_is_pal = av_pix_fmt_descriptors[inlink->format].flags & PIX_FMT_PAL || av_pix_fmt_descriptors[inlink->format].flags & PIX_FMT_PSEUDOPAL; - if (outfmt == PIX_FMT_PAL8) outfmt = PIX_FMT_BGR8; + if (outfmt == AV_PIX_FMT_PAL8) outfmt = AV_PIX_FMT_BGR8; scale->output_is_pal = av_pix_fmt_descriptors[outfmt].flags & PIX_FMT_PAL || av_pix_fmt_descriptors[outfmt].flags & PIX_FMT_PSEUDOPAL; @@ -318,7 +318,7 @@ static int start_frame(AVFilterLink *link, AVFilterBufferRef *picref) outpicref->video->h = outlink->h; if(scale->output_is_pal) - ff_set_systematic_pal2((uint32_t*)outpicref->data[1], outlink->format == PIX_FMT_PAL8 ? PIX_FMT_BGR8 : outlink->format); + ff_set_systematic_pal2((uint32_t*)outpicref->data[1], outlink->format == AV_PIX_FMT_PAL8 ? AV_PIX_FMT_BGR8 : outlink->format); av_reduce(&outpicref->video->sample_aspect_ratio.num, &outpicref->video->sample_aspect_ratio.den, (int64_t)picref->video->sample_aspect_ratio.num * outlink->h * link->w, diff --git a/libavfilter/vf_select.c b/libavfilter/vf_select.c index 52b03b134b..c68618f002 100644 --- a/libavfilter/vf_select.c +++ b/libavfilter/vf_select.c @@ -408,9 +408,9 @@ static int query_formats(AVFilterContext *ctx) if (!select->do_scene_detect) { return ff_default_query_formats(ctx); } else { - static const enum PixelFormat pix_fmts[] = { - PIX_FMT_RGB24, PIX_FMT_BGR24, - PIX_FMT_NONE + static const enum AVPixelFormat pix_fmts[] = { + AV_PIX_FMT_RGB24, AV_PIX_FMT_BGR24, + AV_PIX_FMT_NONE }; ff_set_common_formats(ctx, ff_make_format_list(pix_fmts)); } diff --git a/libavfilter/vf_smartblur.c b/libavfilter/vf_smartblur.c index 73eb1c983f..e1f27ec21b 100644 --- a/libavfilter/vf_smartblur.c +++ b/libavfilter/vf_smartblur.c @@ -126,12 +126,12 @@ static av_cold void uninit(AVFilterContext *ctx) static int query_formats(AVFilterContext *ctx) { - static const enum PixelFormat pix_fmts[] = { - PIX_FMT_YUV444P, PIX_FMT_YUV422P, - PIX_FMT_YUV420P, PIX_FMT_YUV411P, - PIX_FMT_YUV410P, PIX_FMT_YUV440P, - PIX_FMT_GRAY8, - PIX_FMT_NONE + static const enum AVPixelFormat pix_fmts[] = { + AV_PIX_FMT_YUV444P, AV_PIX_FMT_YUV422P, + AV_PIX_FMT_YUV420P, AV_PIX_FMT_YUV411P, + AV_PIX_FMT_YUV410P, AV_PIX_FMT_YUV440P, + AV_PIX_FMT_GRAY8, + AV_PIX_FMT_NONE }; ff_set_common_formats(ctx, ff_make_format_list(pix_fmts)); @@ -154,8 +154,8 @@ static int alloc_sws_context(FilterParam *f, int width, int height, unsigned int sws_filter.lumH = sws_filter.lumV = vec; sws_filter.chrH = sws_filter.chrV = NULL; f->filter_context = sws_getCachedContext(NULL, - width, height, PIX_FMT_GRAY8, - width, height, PIX_FMT_GRAY8, + width, height, AV_PIX_FMT_GRAY8, + width, height, AV_PIX_FMT_GRAY8, flags, &sws_filter, NULL, NULL); sws_freeVec(vec); diff --git a/libavfilter/vf_super2xsai.c b/libavfilter/vf_super2xsai.c index 0b48155b12..f85674c1c5 100644 --- a/libavfilter/vf_super2xsai.c +++ b/libavfilter/vf_super2xsai.c @@ -232,12 +232,12 @@ static void super2xsai(AVFilterContext *ctx, static int query_formats(AVFilterContext *ctx) { - static const enum PixelFormat pix_fmts[] = { - PIX_FMT_RGBA, PIX_FMT_BGRA, PIX_FMT_ARGB, PIX_FMT_ABGR, - PIX_FMT_RGB24, PIX_FMT_BGR24, - PIX_FMT_RGB565BE, PIX_FMT_BGR565BE, PIX_FMT_RGB555BE, PIX_FMT_BGR555BE, - PIX_FMT_RGB565LE, PIX_FMT_BGR565LE, PIX_FMT_RGB555LE, PIX_FMT_BGR555LE, - PIX_FMT_NONE + static const enum AVPixelFormat pix_fmts[] = { + AV_PIX_FMT_RGBA, AV_PIX_FMT_BGRA, AV_PIX_FMT_ARGB, AV_PIX_FMT_ABGR, + AV_PIX_FMT_RGB24, AV_PIX_FMT_BGR24, + AV_PIX_FMT_RGB565BE, AV_PIX_FMT_BGR565BE, AV_PIX_FMT_RGB555BE, AV_PIX_FMT_BGR555BE, + AV_PIX_FMT_RGB565LE, AV_PIX_FMT_BGR565LE, AV_PIX_FMT_RGB555LE, AV_PIX_FMT_BGR555LE, + AV_PIX_FMT_NONE }; ff_set_common_formats(ctx, ff_make_format_list(pix_fmts)); @@ -255,16 +255,16 @@ static int config_input(AVFilterLink *inlink) sai->bpp = 4; switch (inlink->format) { - case PIX_FMT_RGB24: - case PIX_FMT_BGR24: + case AV_PIX_FMT_RGB24: + case AV_PIX_FMT_BGR24: sai->bpp = 3; break; - case PIX_FMT_RGB565BE: - case PIX_FMT_BGR565BE: + case AV_PIX_FMT_RGB565BE: + case AV_PIX_FMT_BGR565BE: sai->is_be = 1; - case PIX_FMT_RGB565LE: - case PIX_FMT_BGR565LE: + case AV_PIX_FMT_RGB565LE: + case AV_PIX_FMT_BGR565LE: sai->hi_pixel_mask = 0xF7DEF7DE; sai->lo_pixel_mask = 0x08210821; sai->q_hi_pixel_mask = 0xE79CE79C; @@ -272,11 +272,11 @@ static int config_input(AVFilterLink *inlink) sai->bpp = 2; break; - case PIX_FMT_BGR555BE: - case PIX_FMT_RGB555BE: + case AV_PIX_FMT_BGR555BE: + case AV_PIX_FMT_RGB555BE: sai->is_be = 1; - case PIX_FMT_BGR555LE: - case PIX_FMT_RGB555LE: + case AV_PIX_FMT_BGR555LE: + case AV_PIX_FMT_RGB555LE: sai->hi_pixel_mask = 0x7BDE7BDE; sai->lo_pixel_mask = 0x04210421; sai->q_hi_pixel_mask = 0x739C739C; diff --git a/libavfilter/vf_swapuv.c b/libavfilter/vf_swapuv.c index 94015d9811..bfe71e80d9 100644 --- a/libavfilter/vf_swapuv.c +++ b/libavfilter/vf_swapuv.c @@ -61,13 +61,13 @@ static int start_frame(AVFilterLink *link, AVFilterBufferRef *inpicref) static int query_formats(AVFilterContext *ctx) { - static const enum PixelFormat pix_fmts[] = { - PIX_FMT_YUV420P, PIX_FMT_YUVJ420P, PIX_FMT_YUVA420P, - PIX_FMT_YUV444P, PIX_FMT_YUVJ444P, PIX_FMT_YUVA444P, - PIX_FMT_YUV440P, PIX_FMT_YUVJ440P, - PIX_FMT_YUV422P, PIX_FMT_YUVJ422P, - PIX_FMT_YUV411P, - PIX_FMT_NONE, + static const enum AVPixelFormat pix_fmts[] = { + AV_PIX_FMT_YUV420P, AV_PIX_FMT_YUVJ420P, AV_PIX_FMT_YUVA420P, + AV_PIX_FMT_YUV444P, AV_PIX_FMT_YUVJ444P, AV_PIX_FMT_YUVA444P, + AV_PIX_FMT_YUV440P, AV_PIX_FMT_YUVJ440P, + AV_PIX_FMT_YUV422P, AV_PIX_FMT_YUVJ422P, + AV_PIX_FMT_YUV411P, + AV_PIX_FMT_NONE, }; ff_set_common_formats(ctx, ff_make_format_list(pix_fmts)); diff --git a/libavfilter/vf_thumbnail.c b/libavfilter/vf_thumbnail.c index 67ffc5168a..5936a1936d 100644 --- a/libavfilter/vf_thumbnail.c +++ b/libavfilter/vf_thumbnail.c @@ -211,9 +211,9 @@ static int poll_frame(AVFilterLink *link) static int query_formats(AVFilterContext *ctx) { - static const enum PixelFormat pix_fmts[] = { - PIX_FMT_RGB24, PIX_FMT_BGR24, - PIX_FMT_NONE + static const enum AVPixelFormat pix_fmts[] = { + AV_PIX_FMT_RGB24, AV_PIX_FMT_BGR24, + AV_PIX_FMT_NONE }; ff_set_common_formats(ctx, ff_make_format_list(pix_fmts)); return 0; diff --git a/libavfilter/vf_tinterlace.c b/libavfilter/vf_tinterlace.c index d41889afbd..0bfccfb267 100644 --- a/libavfilter/vf_tinterlace.c +++ b/libavfilter/vf_tinterlace.c @@ -62,19 +62,19 @@ typedef struct { } TInterlaceContext; #define FULL_SCALE_YUVJ_FORMATS \ - PIX_FMT_YUVJ420P, PIX_FMT_YUVJ422P, PIX_FMT_YUVJ444P, PIX_FMT_YUVJ440P + AV_PIX_FMT_YUVJ420P, AV_PIX_FMT_YUVJ422P, AV_PIX_FMT_YUVJ444P, AV_PIX_FMT_YUVJ440P -static enum PixelFormat full_scale_yuvj_pix_fmts[] = { - FULL_SCALE_YUVJ_FORMATS, PIX_FMT_NONE +static enum AVPixelFormat full_scale_yuvj_pix_fmts[] = { + FULL_SCALE_YUVJ_FORMATS, AV_PIX_FMT_NONE }; static int query_formats(AVFilterContext *ctx) { - static const enum PixelFormat pix_fmts[] = { - PIX_FMT_YUV420P, PIX_FMT_YUV422P, PIX_FMT_YUV444P, - PIX_FMT_YUV444P, PIX_FMT_YUV410P, PIX_FMT_YUVA420P, - PIX_FMT_GRAY8, FULL_SCALE_YUVJ_FORMATS, - PIX_FMT_NONE + static const enum AVPixelFormat pix_fmts[] = { + AV_PIX_FMT_YUV420P, AV_PIX_FMT_YUV422P, AV_PIX_FMT_YUV444P, + AV_PIX_FMT_YUV444P, AV_PIX_FMT_YUV410P, AV_PIX_FMT_YUVA420P, + AV_PIX_FMT_GRAY8, FULL_SCALE_YUVJ_FORMATS, + AV_PIX_FMT_NONE }; ff_set_common_formats(ctx, ff_make_format_list(pix_fmts)); @@ -176,7 +176,7 @@ static int config_out_props(AVFilterLink *outlink) static inline void copy_picture_field(uint8_t *dst[4], int dst_linesize[4], const uint8_t *src[4], int src_linesize[4], - enum PixelFormat format, int w, int src_h, + enum AVPixelFormat format, int w, int src_h, int src_field, int interleave, int dst_field) { const AVPixFmtDescriptor *desc = &av_pix_fmt_descriptors[format]; diff --git a/libavfilter/vf_transpose.c b/libavfilter/vf_transpose.c index 2671c584b0..dab5cc6030 100644 --- a/libavfilter/vf_transpose.c +++ b/libavfilter/vf_transpose.c @@ -86,25 +86,25 @@ static av_cold int init(AVFilterContext *ctx, const char *args) static int query_formats(AVFilterContext *ctx) { - enum PixelFormat pix_fmts[] = { - PIX_FMT_ARGB, PIX_FMT_RGBA, - PIX_FMT_ABGR, PIX_FMT_BGRA, - PIX_FMT_RGB24, PIX_FMT_BGR24, - PIX_FMT_RGB565BE, PIX_FMT_RGB565LE, - PIX_FMT_RGB555BE, PIX_FMT_RGB555LE, - PIX_FMT_BGR565BE, PIX_FMT_BGR565LE, - PIX_FMT_BGR555BE, PIX_FMT_BGR555LE, - PIX_FMT_GRAY16BE, PIX_FMT_GRAY16LE, - PIX_FMT_YUV420P16LE, PIX_FMT_YUV420P16BE, - PIX_FMT_YUV444P16LE, PIX_FMT_YUV444P16BE, - PIX_FMT_NV12, PIX_FMT_NV21, - PIX_FMT_RGB8, PIX_FMT_BGR8, - PIX_FMT_RGB4_BYTE, PIX_FMT_BGR4_BYTE, - PIX_FMT_YUV444P, PIX_FMT_YUVJ444P, - PIX_FMT_YUV420P, PIX_FMT_YUVJ420P, - PIX_FMT_YUV410P, - PIX_FMT_YUVA420P, PIX_FMT_GRAY8, - PIX_FMT_NONE + enum AVPixelFormat pix_fmts[] = { + AV_PIX_FMT_ARGB, AV_PIX_FMT_RGBA, + AV_PIX_FMT_ABGR, AV_PIX_FMT_BGRA, + AV_PIX_FMT_RGB24, AV_PIX_FMT_BGR24, + AV_PIX_FMT_RGB565BE, AV_PIX_FMT_RGB565LE, + AV_PIX_FMT_RGB555BE, AV_PIX_FMT_RGB555LE, + AV_PIX_FMT_BGR565BE, AV_PIX_FMT_BGR565LE, + AV_PIX_FMT_BGR555BE, AV_PIX_FMT_BGR555LE, + AV_PIX_FMT_GRAY16BE, AV_PIX_FMT_GRAY16LE, + AV_PIX_FMT_YUV420P16LE, AV_PIX_FMT_YUV420P16BE, + AV_PIX_FMT_YUV444P16LE, AV_PIX_FMT_YUV444P16BE, + AV_PIX_FMT_NV12, AV_PIX_FMT_NV21, + AV_PIX_FMT_RGB8, AV_PIX_FMT_BGR8, + AV_PIX_FMT_RGB4_BYTE, AV_PIX_FMT_BGR4_BYTE, + AV_PIX_FMT_YUV444P, AV_PIX_FMT_YUVJ444P, + AV_PIX_FMT_YUV420P, AV_PIX_FMT_YUVJ420P, + AV_PIX_FMT_YUV410P, + AV_PIX_FMT_YUVA420P, AV_PIX_FMT_GRAY8, + AV_PIX_FMT_NONE }; ff_set_common_formats(ctx, ff_make_format_list(pix_fmts)); diff --git a/libavfilter/vf_unsharp.c b/libavfilter/vf_unsharp.c index 13fa108ed2..6943c65579 100644 --- a/libavfilter/vf_unsharp.c +++ b/libavfilter/vf_unsharp.c @@ -159,10 +159,10 @@ static av_cold int init(AVFilterContext *ctx, const char *args) static int query_formats(AVFilterContext *ctx) { - enum PixelFormat pix_fmts[] = { - PIX_FMT_YUV420P, PIX_FMT_YUV422P, PIX_FMT_YUV444P, PIX_FMT_YUV410P, - PIX_FMT_YUV411P, PIX_FMT_YUV440P, PIX_FMT_YUVJ420P, PIX_FMT_YUVJ422P, - PIX_FMT_YUVJ444P, PIX_FMT_YUVJ440P, PIX_FMT_NONE + enum AVPixelFormat pix_fmts[] = { + AV_PIX_FMT_YUV420P, AV_PIX_FMT_YUV422P, AV_PIX_FMT_YUV444P, AV_PIX_FMT_YUV410P, + AV_PIX_FMT_YUV411P, AV_PIX_FMT_YUV440P, AV_PIX_FMT_YUVJ420P, AV_PIX_FMT_YUVJ422P, + AV_PIX_FMT_YUVJ444P, AV_PIX_FMT_YUVJ440P, AV_PIX_FMT_NONE }; ff_set_common_formats(ctx, ff_make_format_list(pix_fmts)); diff --git a/libavfilter/vf_yadif.c b/libavfilter/vf_yadif.c index 7a21eb46fa..f14d9d7a29 100644 --- a/libavfilter/vf_yadif.c +++ b/libavfilter/vf_yadif.c @@ -367,29 +367,29 @@ static av_cold void uninit(AVFilterContext *ctx) static int query_formats(AVFilterContext *ctx) { - static const enum PixelFormat pix_fmts[] = { - PIX_FMT_YUV420P, - PIX_FMT_YUV422P, - PIX_FMT_YUV444P, - PIX_FMT_YUV410P, - PIX_FMT_YUV411P, - PIX_FMT_GRAY8, - PIX_FMT_YUVJ420P, - PIX_FMT_YUVJ422P, - PIX_FMT_YUVJ444P, - AV_NE( PIX_FMT_GRAY16BE, PIX_FMT_GRAY16LE ), - PIX_FMT_YUV440P, - PIX_FMT_YUVJ440P, - AV_NE( PIX_FMT_YUV420P10BE, PIX_FMT_YUV420P10LE ), - AV_NE( PIX_FMT_YUV422P10BE, PIX_FMT_YUV422P10LE ), - AV_NE( PIX_FMT_YUV444P10BE, PIX_FMT_YUV444P10LE ), - AV_NE( PIX_FMT_YUV420P16BE, PIX_FMT_YUV420P16LE ), - AV_NE( PIX_FMT_YUV422P16BE, PIX_FMT_YUV422P16LE ), - AV_NE( PIX_FMT_YUV444P16BE, PIX_FMT_YUV444P16LE ), - PIX_FMT_YUVA420P, - PIX_FMT_YUVA422P, - PIX_FMT_YUVA444P, - PIX_FMT_NONE + static const enum AVPixelFormat pix_fmts[] = { + AV_PIX_FMT_YUV420P, + AV_PIX_FMT_YUV422P, + AV_PIX_FMT_YUV444P, + AV_PIX_FMT_YUV410P, + AV_PIX_FMT_YUV411P, + AV_PIX_FMT_GRAY8, + AV_PIX_FMT_YUVJ420P, + AV_PIX_FMT_YUVJ422P, + AV_PIX_FMT_YUVJ444P, + AV_NE( AV_PIX_FMT_GRAY16BE, AV_PIX_FMT_GRAY16LE ), + AV_PIX_FMT_YUV440P, + AV_PIX_FMT_YUVJ440P, + AV_NE( AV_PIX_FMT_YUV420P10BE, AV_PIX_FMT_YUV420P10LE ), + AV_NE( AV_PIX_FMT_YUV422P10BE, AV_PIX_FMT_YUV422P10LE ), + AV_NE( AV_PIX_FMT_YUV444P10BE, AV_PIX_FMT_YUV444P10LE ), + AV_NE( AV_PIX_FMT_YUV420P16BE, AV_PIX_FMT_YUV420P16LE ), + AV_NE( AV_PIX_FMT_YUV422P16BE, AV_PIX_FMT_YUV422P16LE ), + AV_NE( AV_PIX_FMT_YUV444P16BE, AV_PIX_FMT_YUV444P16LE ), + AV_PIX_FMT_YUVA420P, + AV_PIX_FMT_YUVA422P, + AV_PIX_FMT_YUVA444P, + AV_PIX_FMT_NONE }; ff_set_common_formats(ctx, ff_make_format_list(pix_fmts)); diff --git a/libavfilter/video.c b/libavfilter/video.c index d0c95cd148..7bab974c66 100644 --- a/libavfilter/video.c +++ b/libavfilter/video.c @@ -94,7 +94,7 @@ AVFilterBufferRef *ff_default_get_video_buffer(AVFilterLink *link, int perms, in AVFilterBufferRef * avfilter_get_video_buffer_ref_from_arrays(uint8_t * const data[4], const int linesize[4], int perms, - int w, int h, enum PixelFormat format) + int w, int h, enum AVPixelFormat format) { AVFilterBuffer *pic = av_mallocz(sizeof(AVFilterBuffer)); AVFilterBufferRef *picref = av_mallocz(sizeof(AVFilterBufferRef)); diff --git a/libavfilter/vsrc_cellauto.c b/libavfilter/vsrc_cellauto.c index bfd44a158e..3a4726b553 100644 --- a/libavfilter/vsrc_cellauto.c +++ b/libavfilter/vsrc_cellauto.c @@ -330,7 +330,7 @@ static int request_frame(AVFilterLink *outlink) static int query_formats(AVFilterContext *ctx) { - static const enum PixelFormat pix_fmts[] = { PIX_FMT_MONOBLACK, PIX_FMT_NONE }; + static const enum AVPixelFormat pix_fmts[] = { AV_PIX_FMT_MONOBLACK, AV_PIX_FMT_NONE }; ff_set_common_formats(ctx, ff_make_format_list(pix_fmts)); return 0; } diff --git a/libavfilter/vsrc_life.c b/libavfilter/vsrc_life.c index 344f0fffb7..9ea41475c1 100644 --- a/libavfilter/vsrc_life.c +++ b/libavfilter/vsrc_life.c @@ -451,13 +451,13 @@ static int request_frame(AVFilterLink *outlink) static int query_formats(AVFilterContext *ctx) { LifeContext *life = ctx->priv; - enum PixelFormat pix_fmts[] = { PIX_FMT_NONE, PIX_FMT_NONE }; + enum AVPixelFormat pix_fmts[] = { AV_PIX_FMT_NONE, AV_PIX_FMT_NONE }; if (life->mold || memcmp(life-> life_color, "\xff\xff\xff", 3) || memcmp(life->death_color, "\x00\x00\x00", 3)) { - pix_fmts[0] = PIX_FMT_RGB24; + pix_fmts[0] = AV_PIX_FMT_RGB24; life->draw = fill_picture_rgb; } else { - pix_fmts[0] = PIX_FMT_MONOBLACK; + pix_fmts[0] = AV_PIX_FMT_MONOBLACK; life->draw = fill_picture_monoblack; } ff_set_common_formats(ctx, ff_make_format_list(pix_fmts)); diff --git a/libavfilter/vsrc_mandelbrot.c b/libavfilter/vsrc_mandelbrot.c index 6bed9ce070..1fbf828085 100644 --- a/libavfilter/vsrc_mandelbrot.c +++ b/libavfilter/vsrc_mandelbrot.c @@ -153,9 +153,9 @@ static av_cold void uninit(AVFilterContext *ctx) static int query_formats(AVFilterContext *ctx) { - static const enum PixelFormat pix_fmts[] = { - PIX_FMT_BGR32, - PIX_FMT_NONE + static const enum AVPixelFormat pix_fmts[] = { + AV_PIX_FMT_BGR32, + AV_PIX_FMT_NONE }; ff_set_common_formats(ctx, ff_make_format_list(pix_fmts)); diff --git a/libavfilter/vsrc_mptestsrc.c b/libavfilter/vsrc_mptestsrc.c index febcbc84e3..9589b519ad 100644 --- a/libavfilter/vsrc_mptestsrc.c +++ b/libavfilter/vsrc_mptestsrc.c @@ -312,8 +312,8 @@ static int config_props(AVFilterLink *outlink) static int query_formats(AVFilterContext *ctx) { - static const enum PixelFormat pix_fmts[] = { - PIX_FMT_YUV420P, PIX_FMT_NONE + static const enum AVPixelFormat pix_fmts[] = { + AV_PIX_FMT_YUV420P, AV_PIX_FMT_NONE }; ff_set_common_formats(ctx, ff_make_format_list(pix_fmts)); diff --git a/libavfilter/vsrc_testsrc.c b/libavfilter/vsrc_testsrc.c index 85d3789cec..38824b59d4 100644 --- a/libavfilter/vsrc_testsrc.c +++ b/libavfilter/vsrc_testsrc.c @@ -518,8 +518,8 @@ static av_cold int test_init(AVFilterContext *ctx, const char *args) static int test_query_formats(AVFilterContext *ctx) { - static const enum PixelFormat pix_fmts[] = { - PIX_FMT_RGB24, PIX_FMT_NONE + static const enum AVPixelFormat pix_fmts[] = { + AV_PIX_FMT_RGB24, AV_PIX_FMT_NONE }; ff_set_common_formats(ctx, ff_make_format_list(pix_fmts)); return 0; @@ -557,29 +557,29 @@ AVFILTER_DEFINE_CLASS(rgbtestsrc); #define A 3 static void rgbtest_put_pixel(uint8_t *dst, int dst_linesize, - int x, int y, int r, int g, int b, enum PixelFormat fmt, + int x, int y, int r, int g, int b, enum AVPixelFormat fmt, uint8_t rgba_map[4]) { int32_t v; uint8_t *p; switch (fmt) { - case PIX_FMT_BGR444: ((uint16_t*)(dst + y*dst_linesize))[x] = ((r >> 4) << 8) | ((g >> 4) << 4) | (b >> 4); break; - case PIX_FMT_RGB444: ((uint16_t*)(dst + y*dst_linesize))[x] = ((b >> 4) << 8) | ((g >> 4) << 4) | (r >> 4); break; - case PIX_FMT_BGR555: ((uint16_t*)(dst + y*dst_linesize))[x] = ((r>>3)<<10) | ((g>>3)<<5) | (b>>3); break; - case PIX_FMT_RGB555: ((uint16_t*)(dst + y*dst_linesize))[x] = ((b>>3)<<10) | ((g>>3)<<5) | (r>>3); break; - case PIX_FMT_BGR565: ((uint16_t*)(dst + y*dst_linesize))[x] = ((r>>3)<<11) | ((g>>2)<<5) | (b>>3); break; - case PIX_FMT_RGB565: ((uint16_t*)(dst + y*dst_linesize))[x] = ((b>>3)<<11) | ((g>>2)<<5) | (r>>3); break; - case PIX_FMT_RGB24: - case PIX_FMT_BGR24: + case AV_PIX_FMT_BGR444: ((uint16_t*)(dst + y*dst_linesize))[x] = ((r >> 4) << 8) | ((g >> 4) << 4) | (b >> 4); break; + case AV_PIX_FMT_RGB444: ((uint16_t*)(dst + y*dst_linesize))[x] = ((b >> 4) << 8) | ((g >> 4) << 4) | (r >> 4); break; + case AV_PIX_FMT_BGR555: ((uint16_t*)(dst + y*dst_linesize))[x] = ((r>>3)<<10) | ((g>>3)<<5) | (b>>3); break; + case AV_PIX_FMT_RGB555: ((uint16_t*)(dst + y*dst_linesize))[x] = ((b>>3)<<10) | ((g>>3)<<5) | (r>>3); break; + case AV_PIX_FMT_BGR565: ((uint16_t*)(dst + y*dst_linesize))[x] = ((r>>3)<<11) | ((g>>2)<<5) | (b>>3); break; + case AV_PIX_FMT_RGB565: ((uint16_t*)(dst + y*dst_linesize))[x] = ((b>>3)<<11) | ((g>>2)<<5) | (r>>3); break; + case AV_PIX_FMT_RGB24: + case AV_PIX_FMT_BGR24: v = (r << (rgba_map[R]*8)) + (g << (rgba_map[G]*8)) + (b << (rgba_map[B]*8)); p = dst + 3*x + y*dst_linesize; AV_WL24(p, v); break; - case PIX_FMT_RGBA: - case PIX_FMT_BGRA: - case PIX_FMT_ARGB: - case PIX_FMT_ABGR: + case AV_PIX_FMT_RGBA: + case AV_PIX_FMT_BGRA: + case AV_PIX_FMT_ARGB: + case AV_PIX_FMT_ABGR: v = (r << (rgba_map[R]*8)) + (g << (rgba_map[G]*8)) + (b << (rgba_map[B]*8)) + (255 << (rgba_map[A]*8)); p = dst + 4*x + y*dst_linesize; AV_WL32(p, v); @@ -619,13 +619,13 @@ static av_cold int rgbtest_init(AVFilterContext *ctx, const char *args) static int rgbtest_query_formats(AVFilterContext *ctx) { - static const enum PixelFormat pix_fmts[] = { - PIX_FMT_RGBA, PIX_FMT_ARGB, PIX_FMT_BGRA, PIX_FMT_ABGR, - PIX_FMT_BGR24, PIX_FMT_RGB24, - PIX_FMT_RGB444, PIX_FMT_BGR444, - PIX_FMT_RGB565, PIX_FMT_BGR565, - PIX_FMT_RGB555, PIX_FMT_BGR555, - PIX_FMT_NONE + static const enum AVPixelFormat pix_fmts[] = { + AV_PIX_FMT_RGBA, AV_PIX_FMT_ARGB, AV_PIX_FMT_BGRA, AV_PIX_FMT_ABGR, + AV_PIX_FMT_BGR24, AV_PIX_FMT_RGB24, + AV_PIX_FMT_RGB444, AV_PIX_FMT_BGR444, + AV_PIX_FMT_RGB565, AV_PIX_FMT_BGR565, + AV_PIX_FMT_RGB555, AV_PIX_FMT_BGR555, + AV_PIX_FMT_NONE }; ff_set_common_formats(ctx, ff_make_format_list(pix_fmts)); return 0; |