Unified · Split
| @@ -299,7 +299,7 @@ typedef struct OutputStream { · 298 unmodified lines | ||
| 299 | 299 | const char *attachment_filename; |
| 300 | 300 | int copy_initial_nonkeyframes; |
| 301 | 301 | |
| 302 | − enum PixelFormat pix_fmts[2]; | |
| 302 | + enum AVPixelFormat pix_fmts[2]; | |
| 303 | 303 | } OutputStream; |
| 304 | 304 | |
| 305 | 305 | typedef struct OutputFile { |
| @@ -59,7 +59,7 @@ static char *choose_ ## var ## s(OutputStream *ost) \ · 58 unmodified lines | ||
| 59 | 59 | return NULL; \ |
| 60 | 60 | } |
| 61 | 61 | |
| 62 | −DEF_CHOOSE_FORMAT(enum PixelFormat, pix_fmt, pix_fmts, PIX_FMT_NONE, | |
| 62 | +DEF_CHOOSE_FORMAT(enum AVPixelFormat, pix_fmt, pix_fmts, AV_PIX_FMT_NONE, | |
| 63 | 63 | GET_PIX_FMT_NAME, ":") |
| 64 | 64 | |
| 65 | 65 | DEF_CHOOSE_FORMAT(enum AVSampleFormat, sample_fmt, sample_fmts, |
| @@ -846,7 +846,7 @@ static OutputStream *new_output_stream(OptionsContext *o, AVFormatContext *oc, e · 845 unmodified lines | ||
| 846 | 846 | |
| 847 | 847 | av_opt_get_int(sws_opts, "sws_flags", 0, &ost->sws_flags); |
| 848 | 848 | |
| 849 | − ost->pix_fmts[0] = ost->pix_fmts[1] = PIX_FMT_NONE; | |
| 849 | + ost->pix_fmts[0] = ost->pix_fmts[1] = AV_PIX_FMT_NONE; | |
| 850 | 850 | |
| 851 | 851 | return ost; |
| 852 | 852 | } |
| @@ -904,7 +904,7 @@ static OutputStream *new_video_stream(OptionsContext *o, AVFormatContext *oc) · 51 unmodified lines | ||
| 904 | 904 | ost->frame_aspect_ratio = parse_frame_aspect_ratio(frame_aspect_ratio); |
| 905 | 905 | |
| 906 | 906 | MATCH_PER_STREAM_OPT(frame_pix_fmts, str, frame_pix_fmt, oc, st); |
| 907 | − if (frame_pix_fmt && (video_enc->pix_fmt = av_get_pix_fmt(frame_pix_fmt)) == PIX_FMT_NONE) { | |
| 907 | + if (frame_pix_fmt && (video_enc->pix_fmt = av_get_pix_fmt(frame_pix_fmt)) == AV_PIX_FMT_NONE) { | |
| 908 | 908 | av_log(NULL, AV_LOG_FATAL, "Unknown pixel format requested: %s.\n", frame_pix_fmt); |
| 909 | 909 | exit(1); |
| 910 | 910 | } |
| @@ -106,7 +106,7 @@ typedef struct VideoPicture { · 105 unmodified lines | ||
| 106 | 106 | int width, height; /* source height & width */ |
| 107 | 107 | int allocated; |
| 108 | 108 | int reallocate; |
| 109 | − enum PixelFormat pix_fmt; | |
| 109 | + enum AVPixelFormat pix_fmt; | |
| 110 | 110 | |
| 111 | 111 | #if CONFIG_AVFILTER |
| 112 | 112 | AVFilterBufferRef *picref; |
| @@ -1316,7 +1316,7 @@ static int queue_picture(VideoState *is, AVFrame *src_frame, double pts, int64_t · 1203 unmodified lines | ||
| 1316 | 1316 | #if CONFIG_AVFILTER |
| 1317 | 1317 | AVPicture pict_src; |
| 1318 | 1318 | #else |
| 1319 | − int dst_pix_fmt = PIX_FMT_YUV420P; | |
| 1319 | + int dst_pix_fmt = AV_PIX_FMT_YUV420P; | |
| 1320 | 1320 | #endif |
| 1321 | 1321 | /* wait until we have space to put a new picture */ |
| 1322 | 1322 | SDL_LockMutex(is->pictq_mutex); |
| @@ -630,8 +630,8 @@ static void show_stream(AVFormatContext *fmt_ctx, int stream_idx) · 629 unmodified lines | ||
| 630 | 630 | &display_aspect_ratio)); |
| 631 | 631 | } |
| 632 | 632 | probe_str("pix_fmt", |
| 633 | − dec_ctx->pix_fmt != PIX_FMT_NONE ? av_pix_fmt_descriptors[dec_ctx->pix_fmt].name | |
| 634 | − : "unknown"); | |
| 633 | + dec_ctx->pix_fmt != AV_PIX_FMT_NONE ? | |
| 634 | + av_pix_fmt_descriptors[dec_ctx->pix_fmt].name : "unknown"); | |
| 635 | 635 | probe_int("level", dec_ctx->level); |
| 636 | 636 | break; |
| 637 | 637 | |
| @@ -686,8 +686,8 @@ static void print_codec(const AVCodec *c) · 685 unmodified lines | ||
| 686 | 686 | } |
| 687 | 687 | printf("\n"); |
| 688 | 688 | } |
| 689 | − PRINT_CODEC_SUPPORTED(c, pix_fmts, enum PixelFormat, "pixel formats", | |
| 690 | − PIX_FMT_NONE, GET_PIX_FMT_NAME); | |
| 689 | + PRINT_CODEC_SUPPORTED(c, pix_fmts, enum AVPixelFormat, "pixel formats", | |
| 690 | + AV_PIX_FMT_NONE, GET_PIX_FMT_NAME); | |
| 691 | 691 | PRINT_CODEC_SUPPORTED(c, supported_samplerates, int, "sample rates", 0, |
| 692 | 692 | GET_SAMPLE_RATE_NAME); |
| 693 | 693 | PRINT_CODEC_SUPPORTED(c, sample_fmts, enum AVSampleFormat, "sample formats", |
| @@ -866,7 +866,7 @@ int show_filters(void *optctx, const char *opt, const char *arg) · 172 unmodified lines | ||
| 866 | 866 | |
| 867 | 867 | int show_pix_fmts(void *optctx, const char *opt, const char *arg) |
| 868 | 868 | { |
| 869 | − enum PixelFormat pix_fmt; | |
| 869 | + enum AVPixelFormat pix_fmt; | |
| 870 | 870 | |
| 871 | 871 | printf("Pixel formats:\n" |
| 872 | 872 | "I.... = Supported Input format for conversion\n" |
| @@ -882,7 +882,7 @@ int show_pix_fmts(void *optctx, const char *opt, const char *arg) · 9 unmodified lines | ||
| 882 | 882 | # define sws_isSupportedOutput(x) 0 |
| 883 | 883 | #endif |
| 884 | 884 | |
| 885 | − for (pix_fmt = 0; pix_fmt < PIX_FMT_NB; pix_fmt++) { | |
| 885 | + for (pix_fmt = 0; pix_fmt < AV_PIX_FMT_NB; pix_fmt++) { | |
| 886 | 886 | const AVPixFmtDescriptor *pix_desc = &av_pix_fmt_descriptors[pix_fmt]; |
| 887 | 887 | printf("%c%c%c%c%c %-16s %d %2d\n", |
| 888 | 888 | sws_isSupportedInput (pix_fmt) ? 'I' : '.', |
| @@ -416,7 +416,7 @@ typedef struct FrameBuffer { · 415 unmodified lines | ||
| 416 | 416 | int linesize[4]; |
| 417 | 417 | |
| 418 | 418 | int h, w; |
| 419 | − enum PixelFormat pix_fmt; | |
| 419 | + enum AVPixelFormat pix_fmt; | |
| 420 | 420 | |
| 421 | 421 | int refcount; |
| 422 | 422 | struct FrameBuffer **pool; ///< head of the buffer pool |
| @@ -2132,7 +2132,7 @@ will instruct the source to accept video frames with size 320x240 and · 2131 unmodified lines | ||
| 2132 | 2132 | with format "yuv410p", assuming 1/24 as the timestamps timebase and |
| 2133 | 2133 | square pixels (1:1 sample aspect ratio). |
| 2134 | 2134 | Since the pixel format with name "yuv410p" corresponds to the number 6 |
| 2135 | −(check the enum PixelFormat definition in @file{libavutil/pixfmt.h}), | |
| 2135 | +(check the enum AVPixelFormat definition in @file{libavutil/pixfmt.h}), | |
| 2136 | 2136 | this example corresponds to: |
| 2137 | 2137 | @example |
| 2138 | 2138 | buffer=320:240:6:1:24 |
| @@ -900,9 +900,9 @@ static av_cold int decode_init(AVCodecContext *avctx) · 899 unmodified lines | ||
| 900 | 900 | init_vlcs(f); |
| 901 | 901 | |
| 902 | 902 | if (f->version > 2) |
| 903 | − avctx->pix_fmt = PIX_FMT_RGB565; | |
| 903 | + avctx->pix_fmt = AV_PIX_FMT_RGB565; | |
| 904 | 904 | else |
| 905 | − avctx->pix_fmt = PIX_FMT_BGR555; | |
| 905 | + avctx->pix_fmt = AV_PIX_FMT_BGR555; | |
| 906 | 906 | |
| 907 | 907 | return 0; |
| 908 | 908 | } |
| @@ -40,8 +40,8 @@ · 39 unmodified lines | ||
| 40 | 40 | #include "avcodec.h" |
| 41 | 41 | |
| 42 | 42 | |
| 43 | −static const enum PixelFormat pixfmt_rgb24[] = { | |
| 44 | − PIX_FMT_BGR24, PIX_FMT_RGB32, PIX_FMT_NONE }; | |
| 43 | +static const enum AVPixelFormat pixfmt_rgb24[] = { | |
| 44 | + AV_PIX_FMT_BGR24, AV_PIX_FMT_RGB32, AV_PIX_FMT_NONE }; | |
| 45 | 45 | |
| 46 | 46 | /* |
| 47 | 47 | * Decoder context |
| @@ -95,7 +95,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, · 47 unmodified lines | ||
| 95 | 95 | if (planes == 4) |
| 96 | 96 | planes--; |
| 97 | 97 | |
| 98 | − px_inc = planes + (avctx->pix_fmt == PIX_FMT_RGB32); | |
| 98 | + px_inc = planes + (avctx->pix_fmt == AV_PIX_FMT_RGB32); | |
| 99 | 99 | |
| 100 | 100 | for (p = 0; p < planes; p++) { |
| 101 | 101 | /* Lines length pointer for this plane */ |
| @@ -170,7 +170,7 @@ static av_cold int decode_init(AVCodecContext *avctx) · 68 unmodified lines | ||
| 170 | 170 | |
| 171 | 171 | switch (avctx->bits_per_coded_sample) { |
| 172 | 172 | case 8: |
| 173 | − avctx->pix_fmt = PIX_FMT_PAL8; | |
| 173 | + avctx->pix_fmt = AV_PIX_FMT_PAL8; | |
| 174 | 174 | c->planes = 1; |
| 175 | 175 | c->planemap[0] = 0; // 1st plane is palette indexes |
| 176 | 176 | break; |
| @@ -182,7 +182,7 @@ static av_cold int decode_init(AVCodecContext *avctx) · 5 unmodified lines | ||
| 182 | 182 | c->planemap[2] = 0; // 3rd plane is blue |
| 183 | 183 | break; |
| 184 | 184 | case 32: |
| 185 | − avctx->pix_fmt = PIX_FMT_RGB32; | |
| 185 | + avctx->pix_fmt = AV_PIX_FMT_RGB32; | |
| 186 | 186 | c->planes = 4; |
| 187 | 187 | #if HAVE_BIGENDIAN |
| 188 | 188 | c->planemap[0] = 1; // 1st plane is red |
| @@ -379,7 +379,7 @@ AVCodec ff_a64multi_encoder = { · 378 unmodified lines | ||
| 379 | 379 | .init = a64multi_init_encoder, |
| 380 | 380 | .encode2 = a64multi_encode_frame, |
| 381 | 381 | .close = a64multi_close_encoder, |
| 382 | − .pix_fmts = (const enum PixelFormat[]) {PIX_FMT_GRAY8, PIX_FMT_NONE}, | |
| 382 | + .pix_fmts = (const enum AVPixelFormat[]) {AV_PIX_FMT_GRAY8, AV_PIX_FMT_NONE}, | |
| 383 | 383 | .long_name = NULL_IF_CONFIG_SMALL("Multicolor charset for Commodore 64"), |
| 384 | 384 | .capabilities = CODEC_CAP_DELAY, |
| 385 | 385 | }; |
| @@ -392,7 +392,7 @@ AVCodec ff_a64multi5_encoder = { · 6 unmodified lines | ||
| 392 | 392 | .init = a64multi_init_encoder, |
| 393 | 393 | .encode2 = a64multi_encode_frame, |
| 394 | 394 | .close = a64multi_close_encoder, |
| 395 | − .pix_fmts = (const enum PixelFormat[]) {PIX_FMT_GRAY8, PIX_FMT_NONE}, | |
| 395 | + .pix_fmts = (const enum AVPixelFormat[]) {AV_PIX_FMT_GRAY8, AV_PIX_FMT_NONE}, | |
| 396 | 396 | .long_name = NULL_IF_CONFIG_SMALL("Multicolor charset for Commodore 64, extended with 5th color (colram)"), |
| 397 | 397 | .capabilities = CODEC_CAP_DELAY, |
| 398 | 398 | }; |
| @@ -44,7 +44,7 @@ static av_cold int aasc_decode_init(AVCodecContext *avctx) · 43 unmodified lines | ||
| 44 | 44 | |
| 45 | 45 | s->avctx = avctx; |
| 46 | 46 | |
| 47 | − avctx->pix_fmt = PIX_FMT_BGR24; | |
| 47 | + avctx->pix_fmt = AV_PIX_FMT_BGR24; | |
| 48 | 48 | |
| 49 | 49 | return 0; |
| 50 | 50 | } |
| @@ -39,7 +39,7 @@ static av_cold int decode_init(AVCodecContext *avctx) · 38 unmodified lines | ||
| 39 | 39 | AnmContext *s = avctx->priv_data; |
| 40 | 40 | int i; |
| 41 | 41 | |
| 42 | − avctx->pix_fmt = PIX_FMT_PAL8; | |
| 42 | + avctx->pix_fmt = AV_PIX_FMT_PAL8; | |
| 43 | 43 | |
| 44 | 44 | s->frame.reference = 1; |
| 45 | 45 | bytestream2_init(&s->gb, avctx->extradata, avctx->extradata_size); |
| @@ -74,7 +74,7 @@ typedef struct { · 73 unmodified lines | ||
| 74 | 74 | static av_cold int decode_init(AVCodecContext *avctx) |
| 75 | 75 | { |
| 76 | 76 | AnsiContext *s = avctx->priv_data; |
| 77 | − avctx->pix_fmt = PIX_FMT_PAL8; | |
| 77 | + avctx->pix_fmt = AV_PIX_FMT_PAL8; | |
| 78 | 78 | |
| 79 | 79 | /* defaults */ |
| 80 | 80 | s->font = ff_vga16_font; |
| @@ -345,7 +345,7 @@ static void video_encode_example(const char *filename) · 344 unmodified lines | ||
| 345 | 345 | c->time_base= (AVRational){1,25}; |
| 346 | 346 | c->gop_size = 10; /* emit one intra frame every ten frames */ |
| 347 | 347 | c->max_b_frames=1; |
| 348 | − c->pix_fmt = PIX_FMT_YUV420P; | |
| 348 | + c->pix_fmt = AV_PIX_FMT_YUV420P; | |
| 349 | 349 | |
| 350 | 350 | /* open it */ |
| 351 | 351 | if (avcodec_open2(c, codec, NULL) < 0) { |
| @@ -553,7 +553,7 @@ static av_cold int decode_init(AVCodecContext *avctx){ · 552 unmodified lines | ||
| 553 | 553 | common_init(avctx); |
| 554 | 554 | init_vlcs(a); |
| 555 | 555 | ff_init_scantable(a->dsp.idct_permutation, &a->scantable, scantab); |
| 556 | − avctx->pix_fmt= PIX_FMT_YUV420P; | |
| 556 | + avctx->pix_fmt= AV_PIX_FMT_YUV420P; | |
| 557 | 557 | |
| 558 | 558 | a->inv_qscale= avctx->extradata[0]; |
| 559 | 559 | if(a->inv_qscale == 0){ |
| @@ -649,7 +649,7 @@ AVCodec ff_asv1_encoder = { · 89 unmodified lines | ||
| 649 | 649 | .priv_data_size = sizeof(ASV1Context), |
| 650 | 650 | .init = encode_init, |
| 651 | 651 | .encode2 = encode_frame, |
| 652 | − .pix_fmts = (const enum PixelFormat[]){ PIX_FMT_YUV420P, PIX_FMT_NONE }, | |
| 652 | + .pix_fmts = (const enum AVPixelFormat[]){ AV_PIX_FMT_YUV420P, AV_PIX_FMT_NONE }, | |
| 653 | 653 | .long_name = NULL_IF_CONFIG_SMALL("ASUS V1"), |
| 654 | 654 | }; |
| 655 | 655 | #endif |
| @@ -662,7 +662,7 @@ AVCodec ff_asv2_encoder = { · 6 unmodified lines | ||
| 662 | 662 | .priv_data_size = sizeof(ASV1Context), |
| 663 | 663 | .init = encode_init, |
| 664 | 664 | .encode2 = encode_frame, |
| 665 | − .pix_fmts = (const enum PixelFormat[]){ PIX_FMT_YUV420P, PIX_FMT_NONE }, | |
| 665 | + .pix_fmts = (const enum AVPixelFormat[]){ AV_PIX_FMT_YUV420P, AV_PIX_FMT_NONE }, | |
| 666 | 666 | .long_name = NULL_IF_CONFIG_SMALL("ASUS V2"), |
| 667 | 667 | }; |
| 668 | 668 | #endif |
| @@ -39,7 +39,7 @@ static av_cold int aura_decode_init(AVCodecContext *avctx) · 38 unmodified lines | ||
| 39 | 39 | /* width needs to be divisible by 4 for this codec to work */ |
| 40 | 40 | if (avctx->width & 0x3) |
| 41 | 41 | return -1; |
| 42 | − avctx->pix_fmt = PIX_FMT_YUV422P; | |
| 42 | + avctx->pix_fmt = AV_PIX_FMT_YUV422P; | |
| 43 | 43 | |
| 44 | 44 | return 0; |
| 45 | 45 | } |
| @@ -1011,7 +1011,7 @@ typedef struct AVFrame { · 1010 unmodified lines | ||
| 1011 | 1011 | |
| 1012 | 1012 | /** |
| 1013 | 1013 | * format of the frame, -1 if unknown or unset |
| 1014 | − * Values correspond to enum PixelFormat for video frames, | |
| 1014 | + * Values correspond to enum AVPixelFormat for video frames, | |
| 1015 | 1015 | * enum AVSampleFormat for audio) |
| 1016 | 1016 | * - encoding: unused |
| 1017 | 1017 | * - decoding: Read by user. |
| @@ -1492,13 +1492,13 @@ typedef struct AVCodecContext { · 474 unmodified lines | ||
| 1492 | 1492 | int gop_size; |
| 1493 | 1493 | |
| 1494 | 1494 | /** |
| 1495 | − * Pixel format, see PIX_FMT_xxx. | |
| 1495 | + * Pixel format, see AV_PIX_FMT_xxx. | |
| 1496 | 1496 | * May be set by the demuxer if known from headers. |
| 1497 | 1497 | * May be overriden by the decoder if it knows better. |
| 1498 | 1498 | * - encoding: Set by user. |
| 1499 | 1499 | * - decoding: Set by user if known, overridden by libavcodec if known |
| 1500 | 1500 | */ |
| 1501 | − enum PixelFormat pix_fmt; | |
| 1501 | + enum AVPixelFormat pix_fmt; | |
| 1502 | 1502 | |
| 1503 | 1503 | /** |
| 1504 | 1504 | * Motion estimation algorithm used for video coding. |
| @@ -1545,7 +1545,7 @@ typedef struct AVCodecContext { · 40 unmodified lines | ||
| 1545 | 1545 | * - encoding: unused |
| 1546 | 1546 | * - decoding: Set by user, if not set the native format will be chosen. |
| 1547 | 1547 | */ |
| 1548 | − enum PixelFormat (*get_format)(struct AVCodecContext *s, const enum PixelFormat * fmt); | |
| 1548 | + enum AVPixelFormat (*get_format)(struct AVCodecContext *s, const enum AVPixelFormat * fmt); | |
| 1549 | 1549 | |
| 1550 | 1550 | /** |
| 1551 | 1551 | * maximum number of B-frames between non-B-frames |
| @@ -2931,7 +2931,7 @@ typedef struct AVCodec { · 1379 unmodified lines | ||
| 2931 | 2931 | */ |
| 2932 | 2932 | int capabilities; |
| 2933 | 2933 | const AVRational *supported_framerates; ///< array of supported framerates, or NULL if any, array is terminated by {0,0} |
| 2934 | − const enum PixelFormat *pix_fmts; ///< array of supported pixel formats, or NULL if unknown, array is terminated by -1 | |
| 2934 | + const enum AVPixelFormat *pix_fmts; ///< array of supported pixel formats, or NULL if unknown, array is terminated by -1 | |
| 2935 | 2935 | const int *supported_samplerates; ///< array of supported audio samplerates, or NULL if unknown, array is terminated by 0 |
| 2936 | 2936 | const enum AVSampleFormat *sample_fmts; ///< array of supported sample formats, or NULL if unknown, array is terminated by -1 |
| 2937 | 2937 | const uint64_t *channel_layouts; ///< array of support channel layouts, or NULL if unknown. array is terminated by 0 |
| @@ -3032,7 +3032,7 @@ typedef struct AVHWAccel { · 94 unmodified lines | ||
| 3032 | 3032 | * |
| 3033 | 3033 | * Only hardware accelerated formats are supported here. |
| 3034 | 3034 | */ |
| 3035 | − enum PixelFormat pix_fmt; | |
| 3035 | + enum AVPixelFormat pix_fmt; | |
| 3036 | 3036 | |
| 3037 | 3037 | /** |
| 3038 | 3038 | * Hardware accelerated codec capabilities. |
| @@ -4135,7 +4135,7 @@ void av_resample_close(struct AVResampleContext *c); · 1096 unmodified lines | ||
| 4135 | 4135 | * @param height the height of the picture |
| 4136 | 4136 | * @return zero if successful, a negative value if not |
| 4137 | 4137 | */ |
| 4138 | −int avpicture_alloc(AVPicture *picture, enum PixelFormat pix_fmt, int width, int height); | |
| 4138 | +int avpicture_alloc(AVPicture *picture, enum AVPixelFormat pix_fmt, int width, int height); | |
| 4139 | 4139 | |
| 4140 | 4140 | /** |
| 4141 | 4141 | * Free a picture previously allocated by avpicture_alloc(). |
| @@ -4167,7 +4167,7 @@ void avpicture_free(AVPicture *picture); · 25 unmodified lines | ||
| 4167 | 4167 | * @return size of the image data in bytes |
| 4168 | 4168 | */ |
| 4169 | 4169 | int avpicture_fill(AVPicture *picture, uint8_t *ptr, |
| 4170 | − enum PixelFormat pix_fmt, int width, int height); | |
| 4170 | + enum AVPixelFormat pix_fmt, int width, int height); | |
| 4171 | 4171 | |
| 4172 | 4172 | /** |
| 4173 | 4173 | * Copy pixel data from an AVPicture into a buffer. |
| @@ -4184,7 +4184,8 @@ int avpicture_fill(AVPicture *picture, uint8_t *ptr, · 10 unmodified lines | ||
| 4184 | 4184 | * @param[in] dest_size The size of 'dest'. |
| 4185 | 4185 | * @return The number of bytes written to dest, or a negative value (error code) on error. |
| 4186 | 4186 | */ |
| 4187 | −int avpicture_layout(const AVPicture* src, enum PixelFormat pix_fmt, int width, int height, | |
| 4187 | +int avpicture_layout(const AVPicture* src, enum AVPixelFormat pix_fmt, | |
| 4188 | + int width, int height, | |
| 4188 | 4189 | unsigned char *dest, int dest_size); |
| 4189 | 4190 | |
| 4190 | 4191 | /** |
| @@ -4199,29 +4200,29 @@ int avpicture_layout(const AVPicture* src, enum PixelFormat pix_fmt, int width, · 8 unmodified lines | ||
| 4199 | 4200 | * @param height the height of the image |
| 4200 | 4201 | * @return Image data size in bytes or -1 on error (e.g. too large dimensions). |
| 4201 | 4202 | */ |
| 4202 | −int avpicture_get_size(enum PixelFormat pix_fmt, int width, int height); | |
| 4203 | +int avpicture_get_size(enum AVPixelFormat pix_fmt, int width, int height); | |
| 4203 | 4204 | |
| 4204 | 4205 | /** |
| 4205 | 4206 | * deinterlace - if not supported return -1 |
| 4206 | 4207 | */ |
| 4207 | 4208 | int avpicture_deinterlace(AVPicture *dst, const AVPicture *src, |
| 4208 | − enum PixelFormat pix_fmt, int width, int height); | |
| 4209 | + enum AVPixelFormat pix_fmt, int width, int height); | |
| 4209 | 4210 | /** |
| 4210 | 4211 | * Copy image src to dst. Wraps av_picture_data_copy() above. |
| 4211 | 4212 | */ |
| 4212 | 4213 | void av_picture_copy(AVPicture *dst, const AVPicture *src, |
| 4213 | − enum PixelFormat pix_fmt, int width, int height); | |
| 4214 | + enum AVPixelFormat pix_fmt, int width, int height); | |
| 4214 | 4215 | |
| 4215 | 4216 | /** |
| 4216 | 4217 | * Crop image top and left side. |
| 4217 | 4218 | */ |
| 4218 | 4219 | int av_picture_crop(AVPicture *dst, const AVPicture *src, |
| 4219 | − enum PixelFormat pix_fmt, int top_band, int left_band); | |
| 4220 | + enum AVPixelFormat pix_fmt, int top_band, int left_band); | |
| 4220 | 4221 | |
| 4221 | 4222 | /** |
| 4222 | 4223 | * Pad image. |
| 4223 | 4224 | */ |
| 4224 | −int av_picture_pad(AVPicture *dst, const AVPicture *src, int height, int width, enum PixelFormat pix_fmt, | |
| 4225 | +int av_picture_pad(AVPicture *dst, const AVPicture *src, int height, int width, enum AVPixelFormat pix_fmt, | |
| 4225 | 4226 | int padtop, int padbottom, int padleft, int padright, int *color); |
| 4226 | 4227 | |
| 4227 | 4228 | /** |
| @@ -4244,14 +4245,14 @@ int av_picture_pad(AVPicture *dst, const AVPicture *src, int height, int width, · 16 unmodified lines | ||
| 4244 | 4245 | * @{ |
| 4245 | 4246 | */ |
| 4246 | 4247 | |
| 4247 | −void avcodec_get_chroma_sub_sample(enum PixelFormat pix_fmt, int *h_shift, int *v_shift); | |
| 4248 | +void avcodec_get_chroma_sub_sample(enum AVPixelFormat pix_fmt, int *h_shift, int *v_shift); | |
| 4248 | 4249 | |
| 4249 | 4250 | /** |
| 4250 | 4251 | * Return a value representing the fourCC code associated to the |
| 4251 | 4252 | * pixel format pix_fmt, or 0 if no associated fourCC code can be |
| 4252 | 4253 | * found. |
| 4253 | 4254 | */ |
| 4254 | −unsigned int avcodec_pix_fmt_to_codec_tag(enum PixelFormat pix_fmt); | |
| 4255 | +unsigned int avcodec_pix_fmt_to_codec_tag(enum AVPixelFormat pix_fmt); | |
| 4255 | 4256 | |
| 4256 | 4257 | #define FF_LOSS_RESOLUTION 0x0001 /**< loss due to resolution change */ |
| 4257 | 4258 | #define FF_LOSS_DEPTH 0x0002 /**< loss due to color depth change */ |
| @@ -4277,7 +4278,7 @@ unsigned int avcodec_pix_fmt_to_codec_tag(enum PixelFormat pix_fmt); · 19 unmodified lines | ||
| 4277 | 4278 | * @param[in] has_alpha Whether the source pixel format alpha channel is used. |
| 4278 | 4279 | * @return Combination of flags informing you what kind of losses will occur. |
| 4279 | 4280 | */ |
| 4280 | −int avcodec_get_pix_fmt_loss(enum PixelFormat dst_pix_fmt, enum PixelFormat src_pix_fmt, | |
| 4281 | +int avcodec_get_pix_fmt_loss(enum AVPixelFormat dst_pix_fmt, enum AVPixelFormat src_pix_fmt, | |
| 4281 | 4282 | int has_alpha); |
| 4282 | 4283 | |
| 4283 | 4284 | #if FF_API_FIND_BEST_PIX_FMT |
| @@ -4294,8 +4295,8 @@ int avcodec_get_pix_fmt_loss(enum PixelFormat dst_pix_fmt, enum PixelFormat src_ · 10 unmodified lines | ||
| 4294 | 4295 | * pix_fmt_mask parameter. |
| 4295 | 4296 | * |
| 4296 | 4297 | * @code |
| 4297 | − * src_pix_fmt = PIX_FMT_YUV420P; | |
| 4298 | − * pix_fmt_mask = (1 << PIX_FMT_YUV422P) || (1 << PIX_FMT_RGB24); | |
| 4298 | + * src_pix_fmt = AV_PIX_FMT_YUV420P; | |
| 4299 | + * pix_fmt_mask = (1 << AV_PIX_FMT_YUV422P) || (1 << AV_PIX_FMT_RGB24); | |
| 4299 | 4300 | * dst_pix_fmt = avcodec_find_best_pix_fmt(pix_fmt_mask, src_pix_fmt, alpha, &loss); |
| 4300 | 4301 | * @endcode |
| 4301 | 4302 | * |
| @@ -4306,7 +4307,7 @@ int avcodec_get_pix_fmt_loss(enum PixelFormat dst_pix_fmt, enum PixelFormat src_ · 4 unmodified lines | ||
| 4306 | 4307 | * @return The best pixel format to convert to or -1 if none was found. |
| 4307 | 4308 | */ |
| 4308 | 4309 | attribute_deprecated |
| 4309 | −enum PixelFormat avcodec_find_best_pix_fmt(int64_t pix_fmt_mask, enum PixelFormat src_pix_fmt, | |
| 4310 | +enum AVPixelFormat avcodec_find_best_pix_fmt(int64_t pix_fmt_mask, enum AVPixelFormat src_pix_fmt, | |
| 4310 | 4311 | int has_alpha, int *loss_ptr); |
| 4311 | 4312 | #endif /* FF_API_FIND_BEST_PIX_FMT */ |
| 4312 | 4313 | |
| @@ -4321,17 +4322,17 @@ enum PixelFormat avcodec_find_best_pix_fmt(int64_t pix_fmt_mask, enum PixelForma · 8 unmodified lines | ||
| 4321 | 4322 | * pix_fmt_list parameter. |
| 4322 | 4323 | * |
| 4323 | 4324 | * |
| 4324 | − * @param[in] pix_fmt_list PIX_FMT_NONE terminated array of pixel formats to choose from | |
| 4325 | + * @param[in] pix_fmt_list AV_PIX_FMT_NONE terminated array of pixel formats to choose from | |
| 4325 | 4326 | * @param[in] src_pix_fmt source pixel format |
| 4326 | 4327 | * @param[in] has_alpha Whether the source pixel format alpha channel is used. |
| 4327 | 4328 | * @param[out] loss_ptr Combination of flags informing you what kind of losses will occur. |
| 4328 | 4329 | * @return The best pixel format to convert to or -1 if none was found. |
| 4329 | 4330 | */ |
| 4330 | −enum PixelFormat avcodec_find_best_pix_fmt2(enum PixelFormat *pix_fmt_list, | |
| 4331 | − enum PixelFormat src_pix_fmt, | |
| 4332 | − int has_alpha, int *loss_ptr); | |
| 4331 | +enum AVPixelFormat avcodec_find_best_pix_fmt2(enum AVPixelFormat *pix_fmt_list, | |
| 4332 | + enum AVPixelFormat src_pix_fmt, | |
| 4333 | + int has_alpha, int *loss_ptr); | |
| 4333 | 4334 | |
| 4334 | −enum PixelFormat avcodec_default_get_format(struct AVCodecContext *s, const enum PixelFormat * fmt); | |
| 4335 | +enum AVPixelFormat avcodec_default_get_format(struct AVCodecContext *s, const enum AVPixelFormat * fmt); | |
| 4335 | 4336 | |
| 4336 | 4337 | /** |
| 4337 | 4338 | * @} |
| @@ -157,7 +157,7 @@ avs_decode_frame(AVCodecContext * avctx, · 156 unmodified lines | ||
| 157 | 157 | |
| 158 | 158 | static av_cold int avs_decode_init(AVCodecContext * avctx) |
| 159 | 159 | { |
| 160 | − avctx->pix_fmt = PIX_FMT_PAL8; | |
| 160 | + avctx->pix_fmt = AV_PIX_FMT_PAL8; | |
| 161 | 161 | avcodec_set_dimensions(avctx, 318, 198); |
| 162 | 162 | return 0; |
| 163 | 163 | } |
| @@ -43,7 +43,7 @@ static av_cold int bethsoftvid_decode_init(AVCodecContext *avctx) · 42 unmodified lines | ||
| 43 | 43 | vid->frame.reference = 1; |
| 44 | 44 | vid->frame.buffer_hints = FF_BUFFER_HINTS_VALID | |
| 45 | 45 | FF_BUFFER_HINTS_PRESERVE | FF_BUFFER_HINTS_REUSABLE; |
| 46 | − avctx->pix_fmt = PIX_FMT_PAL8; | |
| 46 | + avctx->pix_fmt = AV_PIX_FMT_PAL8; | |
| 47 | 47 | return 0; |
| 48 | 48 | } |
| 49 | 49 | |
| @@ -39,7 +39,7 @@ typedef struct BFIContext { · 38 unmodified lines | ||
| 39 | 39 | static av_cold int bfi_decode_init(AVCodecContext *avctx) |
| 40 | 40 | { |
| 41 | 41 | BFIContext *bfi = avctx->priv_data; |
| 42 | − avctx->pix_fmt = PIX_FMT_PAL8; | |
| 42 | + avctx->pix_fmt = AV_PIX_FMT_PAL8; | |
| 43 | 43 | bfi->dst = av_mallocz(avctx->width * avctx->height); |
| 44 | 44 | return 0; |
| 45 | 45 | } |
| @@ -1296,7 +1296,7 @@ static av_cold int decode_init(AVCodecContext *avctx) · 1295 unmodified lines | ||
| 1296 | 1296 | return 1; |
| 1297 | 1297 | } |
| 1298 | 1298 | |
| 1299 | − avctx->pix_fmt = c->has_alpha ? PIX_FMT_YUVA420P : PIX_FMT_YUV420P; | |
| 1299 | + avctx->pix_fmt = c->has_alpha ? AV_PIX_FMT_YUVA420P : AV_PIX_FMT_YUV420P; | |
| 1300 | 1300 | |
| 1301 | 1301 | avctx->idct_algo = FF_IDCT_BINK; |
| 1302 | 1302 | ff_dsputil_init(&c->dsp, avctx); |
| @@ -136,7 +136,7 @@ static int bmp_decode_frame(AVCodecContext *avctx, · 135 unmodified lines | ||
| 136 | 136 | avctx->width = width; |
| 137 | 137 | avctx->height = height > 0? height: -height; |
| 138 | 138 | |
| 139 | − avctx->pix_fmt = PIX_FMT_NONE; | |
| 139 | + avctx->pix_fmt = AV_PIX_FMT_NONE; | |
| 140 | 140 | |
| 141 | 141 | switch(depth){ |
| 142 | 142 | case 32: |
| @@ -155,21 +155,21 @@ static int bmp_decode_frame(AVCodecContext *avctx, · 12 unmodified lines | ||
| 155 | 155 | rgb[2] = 0; |
| 156 | 156 | } |
| 157 | 157 | |
| 158 | − avctx->pix_fmt = PIX_FMT_BGR24; | |
| 158 | + avctx->pix_fmt = AV_PIX_FMT_BGR24; | |
| 159 | 159 | break; |
| 160 | 160 | case 24: |
| 161 | − avctx->pix_fmt = PIX_FMT_BGR24; | |
| 161 | + avctx->pix_fmt = AV_PIX_FMT_BGR24; | |
| 162 | 162 | break; |
| 163 | 163 | case 16: |
| 164 | 164 | if(comp == BMP_RGB) |
| 165 | − avctx->pix_fmt = PIX_FMT_RGB555; | |
| 165 | + avctx->pix_fmt = AV_PIX_FMT_RGB555; | |
| 166 | 166 | else if (comp == BMP_BITFIELDS) { |
| 167 | 167 | if (rgb[0] == 0xF800 && rgb[1] == 0x07E0 && rgb[2] == 0x001F) |
| 168 | − avctx->pix_fmt = PIX_FMT_RGB565; | |
| 168 | + avctx->pix_fmt = AV_PIX_FMT_RGB565; | |
| 169 | 169 | else if (rgb[0] == 0x7C00 && rgb[1] == 0x03E0 && rgb[2] == 0x001F) |
| 170 | − avctx->pix_fmt = PIX_FMT_RGB555; | |
| 170 | + avctx->pix_fmt = AV_PIX_FMT_RGB555; | |
| 171 | 171 | else if (rgb[0] == 0x0F00 && rgb[1] == 0x00F0 && rgb[2] == 0x000F) |
| 172 | − avctx->pix_fmt = PIX_FMT_RGB444; | |
| 172 | + avctx->pix_fmt = AV_PIX_FMT_RGB444; | |
| 173 | 173 | else { |
| 174 | 174 | av_log(avctx, AV_LOG_ERROR, "Unknown bitfields %0X %0X %0X\n", rgb[0], rgb[1], rgb[2]); |
| 175 | 175 | return AVERROR(EINVAL); |
| @@ -178,14 +178,14 @@ static int bmp_decode_frame(AVCodecContext *avctx, · 2 unmodified lines | ||
| 178 | 178 | break; |
| 179 | 179 | case 8: |
| 180 | 180 | if(hsize - ihsize - 14 > 0) |
| 181 | − avctx->pix_fmt = PIX_FMT_PAL8; | |
| 181 | + avctx->pix_fmt = AV_PIX_FMT_PAL8; | |
| 182 | 182 | else |
| 183 | − avctx->pix_fmt = PIX_FMT_GRAY8; | |
| 183 | + avctx->pix_fmt = AV_PIX_FMT_GRAY8; | |
| 184 | 184 | break; |
| 185 | 185 | case 1: |
| 186 | 186 | case 4: |
| 187 | 187 | if(hsize - ihsize - 14 > 0){ |
| 188 | − avctx->pix_fmt = PIX_FMT_PAL8; | |
| 188 | + avctx->pix_fmt = AV_PIX_FMT_PAL8; | |
| 189 | 189 | }else{ |
| 190 | 190 | av_log(avctx, AV_LOG_ERROR, "Unknown palette for %d-colour BMP\n", 1<<depth); |
| 191 | 191 | return -1; |
| @@ -196,7 +196,7 @@ static int bmp_decode_frame(AVCodecContext *avctx, · 4 unmodified lines | ||
| 196 | 196 | return -1; |
| 197 | 197 | } |
| 198 | 198 | |
| 199 | − if(avctx->pix_fmt == PIX_FMT_NONE){ | |
| 199 | + if(avctx->pix_fmt == AV_PIX_FMT_NONE){ | |
| 200 | 200 | av_log(avctx, AV_LOG_ERROR, "unsupported pixel format\n"); |
| 201 | 201 | return -1; |
| 202 | 202 | } |
| @@ -236,7 +236,7 @@ static int bmp_decode_frame(AVCodecContext *avctx, · 33 unmodified lines | ||
| 236 | 236 | linesize = p->linesize[0]; |
| 237 | 237 | } |
| 238 | 238 | |
| 239 | − if(avctx->pix_fmt == PIX_FMT_PAL8){ | |
| 239 | + if(avctx->pix_fmt == AV_PIX_FMT_PAL8){ | |
| 240 | 240 | int colors = 1 << depth; |
| 241 | 241 | |
| 242 | 242 | memset(p->data[1], 0, 1024); |
| @@ -37,23 +37,23 @@ static av_cold int bmp_encode_init(AVCodecContext *avctx){ · 36 unmodified lines | ||
| 37 | 37 | avctx->coded_frame = &s->picture; |
| 38 | 38 | |
| 39 | 39 | switch (avctx->pix_fmt) { |
| 40 | − case PIX_FMT_BGR24: | |
| 40 | + case AV_PIX_FMT_BGR24: | |
| 41 | 41 | avctx->bits_per_coded_sample = 24; |
| 42 | 42 | break; |
| 43 | − case PIX_FMT_RGB555: | |
| 44 | − case PIX_FMT_RGB565: | |
| 45 | − case PIX_FMT_RGB444: | |
| 43 | + case AV_PIX_FMT_RGB555: | |
| 44 | + case AV_PIX_FMT_RGB565: | |
| 45 | + case AV_PIX_FMT_RGB444: | |
| 46 | 46 | avctx->bits_per_coded_sample = 16; |
| 47 | 47 | break; |
| 48 | − case PIX_FMT_RGB8: | |
| 49 | − case PIX_FMT_BGR8: | |
| 50 | − case PIX_FMT_RGB4_BYTE: | |
| 51 | − case PIX_FMT_BGR4_BYTE: | |
| 52 | − case PIX_FMT_GRAY8: | |
| 53 | − case PIX_FMT_PAL8: | |
| 48 | + case AV_PIX_FMT_RGB8: | |
| 49 | + case AV_PIX_FMT_BGR8: | |
| 50 | + case AV_PIX_FMT_RGB4_BYTE: | |
| 51 | + case AV_PIX_FMT_BGR4_BYTE: | |
| 52 | + case AV_PIX_FMT_GRAY8: | |
| 53 | + case AV_PIX_FMT_PAL8: | |
| 54 | 54 | avctx->bits_per_coded_sample = 8; |
| 55 | 55 | break; |
| 56 | − case PIX_FMT_MONOBLACK: | |
| 56 | + case AV_PIX_FMT_MONOBLACK: | |
| 57 | 57 | avctx->bits_per_coded_sample = 1; |
| 58 | 58 | break; |
| 59 | 59 | default: |
| @@ -78,26 +78,26 @@ static int bmp_encode_frame(AVCodecContext *avctx, AVPacket *pkt, · 18 unmodified lines | ||
| 78 | 78 | p->pict_type= AV_PICTURE_TYPE_I; |
| 79 | 79 | p->key_frame= 1; |
| 80 | 80 | switch (avctx->pix_fmt) { |
| 81 | − case PIX_FMT_RGB444: | |
| 81 | + case AV_PIX_FMT_RGB444: | |
| 82 | 82 | compression = BMP_BITFIELDS; |
| 83 | 83 | pal = rgb444_masks; // abuse pal to hold color masks |
| 84 | 84 | pal_entries = 3; |
| 85 | 85 | break; |
| 86 | − case PIX_FMT_RGB565: | |
| 86 | + case AV_PIX_FMT_RGB565: | |
| 87 | 87 | compression = BMP_BITFIELDS; |
| 88 | 88 | pal = rgb565_masks; // abuse pal to hold color masks |
| 89 | 89 | pal_entries = 3; |
| 90 | 90 | break; |
| 91 | − case PIX_FMT_RGB8: | |
| 92 | − case PIX_FMT_BGR8: | |
| 93 | − case PIX_FMT_RGB4_BYTE: | |
| 94 | − case PIX_FMT_BGR4_BYTE: | |
| 95 | − case PIX_FMT_GRAY8: | |
| 91 | + case AV_PIX_FMT_RGB8: | |
| 92 | + case AV_PIX_FMT_BGR8: | |
| 93 | + case AV_PIX_FMT_RGB4_BYTE: | |
| 94 | + case AV_PIX_FMT_BGR4_BYTE: | |
| 95 | + case AV_PIX_FMT_GRAY8: | |
| 96 | 96 | ff_set_systematic_pal2((uint32_t*)p->data[1], avctx->pix_fmt); |
| 97 | − case PIX_FMT_PAL8: | |
| 97 | + case AV_PIX_FMT_PAL8: | |
| 98 | 98 | pal = (uint32_t *)p->data[1]; |
| 99 | 99 | break; |
| 100 | − case PIX_FMT_MONOBLACK: | |
| 100 | + case AV_PIX_FMT_MONOBLACK: | |
| 101 | 101 | pal = monoblack_pal; |
| 102 | 102 | break; |
| 103 | 103 | } |
| @@ -166,12 +166,12 @@ AVCodec ff_bmp_encoder = { · 62 unmodified lines | ||
| 166 | 166 | .priv_data_size = sizeof(BMPContext), |
| 167 | 167 | .init = bmp_encode_init, |
| 168 | 168 | .encode2 = bmp_encode_frame, |
| 169 | − .pix_fmts = (const enum PixelFormat[]){ | |
| 170 | − PIX_FMT_BGR24, | |
| 171 | − PIX_FMT_RGB555, PIX_FMT_RGB444, PIX_FMT_RGB565, | |
| 172 | − PIX_FMT_RGB8, PIX_FMT_BGR8, PIX_FMT_RGB4_BYTE, PIX_FMT_BGR4_BYTE, PIX_FMT_GRAY8, PIX_FMT_PAL8, | |
| 173 | − PIX_FMT_MONOBLACK, | |
| 174 | − PIX_FMT_NONE | |
| 169 | + .pix_fmts = (const enum AVPixelFormat[]){ | |
| 170 | + AV_PIX_FMT_BGR24, | |
| 171 | + AV_PIX_FMT_RGB555, AV_PIX_FMT_RGB444, AV_PIX_FMT_RGB565, | |
| 172 | + AV_PIX_FMT_RGB8, AV_PIX_FMT_BGR8, AV_PIX_FMT_RGB4_BYTE, AV_PIX_FMT_BGR4_BYTE, AV_PIX_FMT_GRAY8, AV_PIX_FMT_PAL8, | |
| 173 | + AV_PIX_FMT_MONOBLACK, | |
| 174 | + AV_PIX_FMT_NONE | |
| 175 | 175 | }, |
| 176 | 176 | .long_name = NULL_IF_CONFIG_SMALL("BMP (Windows and OS/2 bitmap)"), |
| 177 | 177 | }; |
| @@ -266,7 +266,7 @@ static av_cold int decode_init(AVCodecContext *avctx) · 265 unmodified lines | ||
| 266 | 266 | BMVDecContext * const c = avctx->priv_data; |
| 267 | 267 | |
| 268 | 268 | c->avctx = avctx; |
| 269 | − avctx->pix_fmt = PIX_FMT_PAL8; | |
| 269 | + avctx->pix_fmt = AV_PIX_FMT_PAL8; | |
| 270 | 270 | |
| 271 | 271 | c->pic.reference = 1; |
| 272 | 272 | if (avctx->get_buffer(avctx, &c->pic) < 0) { |
| @@ -47,7 +47,7 @@ typedef enum { · 46 unmodified lines | ||
| 47 | 47 | |
| 48 | 48 | static av_cold int decode_init(AVCodecContext *avctx) |
| 49 | 49 | { |
| 50 | − avctx->pix_fmt = PIX_FMT_PAL8; | |
| 50 | + avctx->pix_fmt = AV_PIX_FMT_PAL8; | |
| 51 | 51 | return 0; |
| 52 | 52 | } |
| 53 | 53 | |
| @@ -712,7 +712,7 @@ av_cold int ff_cavs_init(AVCodecContext *avctx) { · 711 unmodified lines | ||
| 712 | 712 | ff_cavsdsp_init(&h->cdsp, avctx); |
| 713 | 713 | s->avctx = avctx; |
| 714 | 714 | |
| 715 | − avctx->pix_fmt= PIX_FMT_YUV420P; | |
| 715 | + avctx->pix_fmt= AV_PIX_FMT_YUV420P; | |
| 716 | 716 | |
| 717 | 717 | h->luma_scan[0] = 0; |
| 718 | 718 | h->luma_scan[1] = 8; |
| @@ -86,7 +86,7 @@ static av_cold int cdg_decode_init(AVCodecContext *avctx) · 85 unmodified lines | ||
| 86 | 86 | |
| 87 | 87 | avctx->width = CDG_FULL_WIDTH; |
| 88 | 88 | avctx->height = CDG_FULL_HEIGHT; |
| 89 | − avctx->pix_fmt = PIX_FMT_PAL8; | |
| 89 | + avctx->pix_fmt = AV_PIX_FMT_PAL8; | |
| 90 | 90 | |
| 91 | 91 | return 0; |
| 92 | 92 | } |
| @@ -247,11 +247,11 @@ static int cdxl_decode_frame(AVCodecContext *avctx, void *data, · 246 unmodified lines | ||
| 247 | 247 | if (c->video_size < aligned_width * avctx->height * c->bpp / 8) |
| 248 | 248 | return AVERROR_INVALIDDATA; |
| 249 | 249 | if (!encoding && c->palette_size && c->bpp <= 8) { |
| 250 | − avctx->pix_fmt = PIX_FMT_PAL8; | |
| 250 | + avctx->pix_fmt = AV_PIX_FMT_PAL8; | |
| 251 | 251 | } else if (encoding == 1 && (c->bpp == 6 || c->bpp == 8)) { |
| 252 | 252 | if (c->palette_size != (1 << (c->bpp - 1))) |
| 253 | 253 | return AVERROR_INVALIDDATA; |
| 254 | − avctx->pix_fmt = PIX_FMT_BGR24; | |
| 254 | + avctx->pix_fmt = AV_PIX_FMT_BGR24; | |
| 255 | 255 | } else { |
| 256 | 256 | av_log_ask_for_sample(avctx, "unsupported encoding %d and bpp %d\n", |
| 257 | 257 | encoding, c->bpp); |
| @@ -407,10 +407,10 @@ static av_cold int cinepak_decode_init(AVCodecContext *avctx) · 406 unmodified lines | ||
| 407 | 407 | // check for paletted data |
| 408 | 408 | if (avctx->bits_per_coded_sample != 8) { |
| 409 | 409 | s->palette_video = 0; |
| 410 | − avctx->pix_fmt = PIX_FMT_YUV420P; | |
| 410 | + avctx->pix_fmt = AV_PIX_FMT_YUV420P; | |
| 411 | 411 | } else { |
| 412 | 412 | s->palette_video = 1; |
| 413 | − avctx->pix_fmt = PIX_FMT_PAL8; | |
| 413 | + avctx->pix_fmt = AV_PIX_FMT_PAL8; | |
| 414 | 414 | } |
| 415 | 415 | |
| 416 | 416 | s->frame.data[0] = NULL; |
| @@ -102,7 +102,7 @@ static int decode_frame(AVCodecContext *avctx, · 101 unmodified lines | ||
| 102 | 102 | |
| 103 | 103 | static av_cold int decode_init(AVCodecContext *avctx) |
| 104 | 104 | { |
| 105 | − avctx->pix_fmt = PIX_FMT_YUV411P; | |
| 105 | + avctx->pix_fmt = AV_PIX_FMT_YUV411P; | |
| 106 | 106 | return common_init(avctx); |
| 107 | 107 | } |
| 108 | 108 | |
| @@ -175,8 +175,8 @@ AVCodec ff_cljr_encoder = { · 66 unmodified lines | ||
| 175 | 175 | .priv_data_size = sizeof(CLJRContext), |
| 176 | 176 | .init = common_init, |
| 177 | 177 | .encode2 = encode_frame, |
| 178 | − .pix_fmts = (const enum PixelFormat[]) { PIX_FMT_YUV411P, | |
| 179 | − PIX_FMT_NONE }, | |
| 178 | + .pix_fmts = (const enum AVPixelFormat[]) { AV_PIX_FMT_YUV411P, | |
| 179 | + AV_PIX_FMT_NONE }, | |
| 180 | 180 | .long_name = NULL_IF_CONFIG_SMALL("Cirrus Logic AccuPak"), |
| 181 | 181 | }; |
| 182 | 182 | #endif |
| @@ -330,7 +330,7 @@ static int cllc_decode_frame(AVCodecContext *avctx, void *data, · 329 unmodified lines | ||
| 330 | 330 | switch (coding_type) { |
| 331 | 331 | case 1: |
| 332 | 332 | case 2: |
| 333 | − avctx->pix_fmt = PIX_FMT_RGB24; | |
| 333 | + avctx->pix_fmt = AV_PIX_FMT_RGB24; | |
| 334 | 334 | avctx->bits_per_raw_sample = 8; |
| 335 | 335 | |
| 336 | 336 | ret = avctx->get_buffer(avctx, pic); |
| @@ -345,7 +345,7 @@ static int cllc_decode_frame(AVCodecContext *avctx, void *data, · 8 unmodified lines | ||
| 345 | 345 | |
| 346 | 346 | break; |
| 347 | 347 | case 3: |
| 348 | − avctx->pix_fmt = PIX_FMT_ARGB; | |
| 348 | + avctx->pix_fmt = AV_PIX_FMT_ARGB; | |
| 349 | 349 | avctx->bits_per_raw_sample = 8; |
| 350 | 350 | |
| 351 | 351 | ret = avctx->get_buffer(avctx, pic); |
| @@ -222,9 +222,9 @@ static av_cold int decode_init(AVCodecContext *avctx) { · 221 unmodified lines | ||
| 222 | 222 | CamStudioContext *c = avctx->priv_data; |
| 223 | 223 | int stride; |
| 224 | 224 | switch (avctx->bits_per_coded_sample) { |
| 225 | − case 16: avctx->pix_fmt = PIX_FMT_RGB555; break; | |
| 226 | − case 24: avctx->pix_fmt = PIX_FMT_BGR24; break; | |
| 227 | − case 32: avctx->pix_fmt = PIX_FMT_RGB32; break; | |
| 225 | + case 16: avctx->pix_fmt = AV_PIX_FMT_RGB555; break; | |
| 226 | + case 24: avctx->pix_fmt = AV_PIX_FMT_BGR24; break; | |
| 227 | + case 32: avctx->pix_fmt = AV_PIX_FMT_RGB32; break; | |
| 228 | 228 | default: |
| 229 | 229 | av_log(avctx, AV_LOG_ERROR, |
| 230 | 230 | "CamStudio codec error: invalid depth %i bpp\n", |
| @@ -53,7 +53,7 @@ static av_cold int cyuv_decode_init(AVCodecContext *avctx) · 52 unmodified lines | ||
| 53 | 53 | if (s->width & 0x3) |
| 54 | 54 | return -1; |
| 55 | 55 | s->height = avctx->height; |
| 56 | − avctx->pix_fmt = PIX_FMT_YUV411P; | |
| 56 | + avctx->pix_fmt = AV_PIX_FMT_YUV411P; | |
| 57 | 57 | |
| 58 | 58 | return 0; |
| 59 | 59 | } |
| @@ -38,7 +38,7 @@ static av_cold int dfa_decode_init(AVCodecContext *avctx) · 37 unmodified lines | ||
| 38 | 38 | DfaContext *s = avctx->priv_data; |
| 39 | 39 | int ret; |
| 40 | 40 | |
| 41 | − avctx->pix_fmt = PIX_FMT_PAL8; | |
| 41 | + avctx->pix_fmt = AV_PIX_FMT_PAL8; | |
| 42 | 42 | |
| 43 | 43 | if ((ret = av_image_check_size(avctx->width, avctx->height, 0, avctx)) < 0) |
| 44 | 44 | return ret; |
| @@ -107,9 +107,9 @@ static const struct { · 106 unmodified lines | ||
| 107 | 107 | }; |
| 108 | 108 | |
| 109 | 109 | /* [DIRAC_STD] Table 10.2 Supported chroma sampling formats + luma Offset */ |
| 110 | −static const enum PixelFormat dirac_pix_fmt[2][3] = { | |
| 111 | − { PIX_FMT_YUV444P, PIX_FMT_YUV422P, PIX_FMT_YUV420P }, | |
| 112 | − { PIX_FMT_YUVJ444P, PIX_FMT_YUVJ422P, PIX_FMT_YUVJ420P }, | |
| 110 | +static const enum AVPixelFormat dirac_pix_fmt[2][3] = { | |
| 111 | + { AV_PIX_FMT_YUV444P, AV_PIX_FMT_YUV422P, AV_PIX_FMT_YUV420P }, | |
| 112 | + { AV_PIX_FMT_YUVJ444P, AV_PIX_FMT_YUVJ422P, AV_PIX_FMT_YUVJ420P }, | |
| 113 | 113 | }; |
| 114 | 114 | |
| 115 | 115 | /* [DIRAC_STD] 10.3 Parse Source Parameters. |
| @@ -124,7 +124,7 @@ static int dnxhd_decode_header(DNXHDContext *ctx, const uint8_t *buf, int buf_si · 123 unmodified lines | ||
| 124 | 124 | av_dlog(ctx->avctx, "width %d, height %d\n", ctx->width, ctx->height); |
| 125 | 125 | |
| 126 | 126 | if (buf[0x21] & 0x40) { |
| 127 | − ctx->avctx->pix_fmt = PIX_FMT_YUV422P10; | |
| 127 | + ctx->avctx->pix_fmt = AV_PIX_FMT_YUV422P10; | |
| 128 | 128 | ctx->avctx->bits_per_raw_sample = 10; |
| 129 | 129 | if (ctx->bit_depth != 10) { |
| 130 | 130 | ff_dsputil_init(&ctx->dsp, ctx->avctx); |
| @@ -132,7 +132,7 @@ static int dnxhd_decode_header(DNXHDContext *ctx, const uint8_t *buf, int buf_si · 1 unmodified line | ||
| 132 | 132 | ctx->decode_dct_block = dnxhd_decode_dct_block_10; |
| 133 | 133 | } |
| 134 | 134 | } else { |
| 135 | − ctx->avctx->pix_fmt = PIX_FMT_YUV422P; | |
| 135 | + ctx->avctx->pix_fmt = AV_PIX_FMT_YUV422P; | |
| 136 | 136 | ctx->avctx->bits_per_raw_sample = 8; |
| 137 | 137 | if (ctx->bit_depth != 8) { |
| 138 | 138 | ff_dsputil_init(&ctx->dsp, ctx->avctx); |
| @@ -233,10 +233,10 @@ static int dnxhd_encode_init(AVCodecContext *avctx) · 232 unmodified lines | ||
| 233 | 233 | int i, index, bit_depth; |
| 234 | 234 | |
| 235 | 235 | switch (avctx->pix_fmt) { |
| 236 | − case PIX_FMT_YUV422P: | |
| 236 | + case AV_PIX_FMT_YUV422P: | |
| 237 | 237 | bit_depth = 8; |
| 238 | 238 | break; |
| 239 | − case PIX_FMT_YUV422P10: | |
| 239 | + case AV_PIX_FMT_YUV422P10: | |
| 240 | 240 | bit_depth = 10; |
| 241 | 241 | break; |
| 242 | 242 | default: |
| @@ -1005,9 +1005,9 @@ AVCodec ff_dnxhd_encoder = { · 762 unmodified lines | ||
| 1005 | 1005 | .encode2 = dnxhd_encode_picture, |
| 1006 | 1006 | .close = dnxhd_encode_end, |
| 1007 | 1007 | .capabilities = CODEC_CAP_SLICE_THREADS, |
| 1008 | − .pix_fmts = (const enum PixelFormat[]){ PIX_FMT_YUV422P, | |
| 1009 | − PIX_FMT_YUV422P10, | |
| 1010 | − PIX_FMT_NONE }, | |
| 1008 | + .pix_fmts = (const enum AVPixelFormat[]){ AV_PIX_FMT_YUV422P, | |
| 1009 | + AV_PIX_FMT_YUV422P10, | |
| 1010 | + AV_PIX_FMT_NONE }, | |
| 1011 | 1011 | .long_name = NULL_IF_CONFIG_SMALL("VC3/DNxHD"), |
| 1012 | 1012 | .priv_class = &class, |
| 1013 | 1013 | }; |
| @@ -126,24 +126,24 @@ static int decode_frame(AVCodecContext *avctx, · 125 unmodified lines | ||
| 126 | 126 | switch (bits_per_color) { |
| 127 | 127 | case 8: |
| 128 | 128 | if (elements == 4) { |
| 129 | − avctx->pix_fmt = PIX_FMT_RGBA; | |
| 129 | + avctx->pix_fmt = AV_PIX_FMT_RGBA; | |
| 130 | 130 | } else { |
| 131 | − avctx->pix_fmt = PIX_FMT_RGB24; | |
| 131 | + avctx->pix_fmt = AV_PIX_FMT_RGB24; | |
| 132 | 132 | } |
| 133 | 133 | source_packet_size = elements; |
| 134 | 134 | target_packet_size = elements; |
| 135 | 135 | break; |
| 136 | 136 | case 10: |
| 137 | − avctx->pix_fmt = PIX_FMT_RGB48; | |
| 137 | + avctx->pix_fmt = AV_PIX_FMT_RGB48; | |
| 138 | 138 | target_packet_size = 6; |
| 139 | 139 | source_packet_size = 4; |
| 140 | 140 | break; |
| 141 | 141 | case 12: |
| 142 | 142 | case 16: |
| 143 | 143 | if (endian) { |
| 144 | − avctx->pix_fmt = PIX_FMT_RGB48BE; | |
| 144 | + avctx->pix_fmt = AV_PIX_FMT_RGB48BE; | |
| 145 | 145 | } else { |
| 146 | − avctx->pix_fmt = PIX_FMT_RGB48LE; | |
| 146 | + avctx->pix_fmt = AV_PIX_FMT_RGB48LE; | |
| 147 | 147 | } |
| 148 | 148 | target_packet_size = 6; |
| 149 | 149 | source_packet_size = elements * 2; |
| @@ -45,14 +45,14 @@ static av_cold int encode_init(AVCodecContext *avctx) · 44 unmodified lines | ||
| 45 | 45 | s->descriptor = 50; /* RGB */ |
| 46 | 46 | |
| 47 | 47 | switch (avctx->pix_fmt) { |
| 48 | − case PIX_FMT_RGB24: | |
| 48 | + case AV_PIX_FMT_RGB24: | |
| 49 | 49 | break; |
| 50 | − case PIX_FMT_RGBA: | |
| 50 | + case AV_PIX_FMT_RGBA: | |
| 51 | 51 | s->descriptor = 51; /* RGBA */ |
| 52 | 52 | break; |
| 53 | − case PIX_FMT_RGB48LE: | |
| 53 | + case AV_PIX_FMT_RGB48LE: | |
| 54 | 54 | s->big_endian = 0; |
| 55 | − case PIX_FMT_RGB48BE: | |
| 55 | + case AV_PIX_FMT_RGB48BE: | |
| 56 | 56 | s->bits_per_component = avctx->bits_per_raw_sample ? avctx->bits_per_raw_sample : 16; |
| 57 | 57 | break; |
| 58 | 58 | default: |
| @@ -180,11 +180,11 @@ AVCodec ff_dpx_encoder = { · 121 unmodified lines | ||
| 180 | 180 | .priv_data_size = sizeof(DPXContext), |
| 181 | 181 | .init = encode_init, |
| 182 | 182 | .encode2 = encode_frame, |
| 183 | − .pix_fmts = (const enum PixelFormat[]){ | |
| 184 | − PIX_FMT_RGB24, | |
| 185 | − PIX_FMT_RGBA, | |
| 186 | − PIX_FMT_RGB48LE, | |
| 187 | − PIX_FMT_RGB48BE, | |
| 188 | − PIX_FMT_NONE}, | |
| 183 | + .pix_fmts = (const enum AVPixelFormat[]){ | |
| 184 | + AV_PIX_FMT_RGB24, | |
| 185 | + AV_PIX_FMT_RGBA, | |
| 186 | + AV_PIX_FMT_RGB48LE, | |
| 187 | + AV_PIX_FMT_RGB48BE, | |
| 188 | + AV_PIX_FMT_NONE}, | |
| 189 | 189 | .long_name = NULL_IF_CONFIG_SMALL("DPX image"), |
| 190 | 190 | }; |
| @@ -93,7 +93,7 @@ static av_cold int cinvideo_decode_init(AVCodecContext *avctx) · 92 unmodified lines | ||
| 93 | 93 | unsigned int i; |
| 94 | 94 | |
| 95 | 95 | cin->avctx = avctx; |
| 96 | − avctx->pix_fmt = PIX_FMT_PAL8; | |
| 96 | + avctx->pix_fmt = AV_PIX_FMT_PAL8; | |
| 97 | 97 | |
| 98 | 98 | cin->frame.data[0] = NULL; |
| 99 | 99 | |
| @@ -137,19 +137,19 @@ static inline void dv_calc_mb_coordinates(const DVprofile *d, int chan, int seq, · 136 unmodified lines | ||
| 137 | 137 | break; |
| 138 | 138 | case 720: |
| 139 | 139 | switch (d->pix_fmt) { |
| 140 | − case PIX_FMT_YUV422P: | |
| 140 | + case AV_PIX_FMT_YUV422P: | |
| 141 | 141 | x = shuf3[m] + slot/3; |
| 142 | 142 | y = serpent1[slot] + |
| 143 | 143 | ((((seq + off[m]) % d->difseg_size)<<1) + chan)*3; |
| 144 | 144 | tbl[m] = (x<<1)|(y<<8); |
| 145 | 145 | break; |
| 146 | − case PIX_FMT_YUV420P: | |
| 146 | + case AV_PIX_FMT_YUV420P: | |
| 147 | 147 | x = shuf3[m] + slot/3; |
| 148 | 148 | y = serpent1[slot] + |
| 149 | 149 | ((seq + off[m]) % d->difseg_size)*3; |
| 150 | 150 | tbl[m] = (x<<1)|(y<<9); |
| 151 | 151 | break; |
| 152 | − case PIX_FMT_YUV411P: | |
| 152 | + case AV_PIX_FMT_YUV411P: | |
| 153 | 153 | i = (seq + off[m]) % d->difseg_size; |
| 154 | 154 | k = slot + ((m==1||m==2)?3:0); |
| 155 | 155 | |
| @@ -677,8 +677,8 @@ static int dv_encode_video_segment(AVCodecContext *avctx, void *arg) · 521 unmodified lines | ||
| 677 | 677 | dv_calculate_mb_xy(s, work_chunk, mb_index, &mb_x, &mb_y); |
| 678 | 678 | |
| 679 | 679 | /* initializing luminance blocks */ |
| 680 | − if ((s->sys->pix_fmt == PIX_FMT_YUV420P) || | |
| 681 | − (s->sys->pix_fmt == PIX_FMT_YUV411P && mb_x >= (704 / 8)) || | |
| 680 | + if ((s->sys->pix_fmt == AV_PIX_FMT_YUV420P) || | |
| 681 | + (s->sys->pix_fmt == AV_PIX_FMT_YUV411P && mb_x >= (704 / 8)) || | |
| 682 | 682 | (s->sys->height >= 720 && mb_y != 134)) { |
| 683 | 683 | y_stride = s->picture.linesize[0] << 3; |
| 684 | 684 | } else { |
| @@ -703,13 +703,13 @@ static int dv_encode_video_segment(AVCodecContext *avctx, void *arg) · 18 unmodified lines | ||
| 703 | 703 | enc_blk += 4; |
| 704 | 704 | |
| 705 | 705 | /* initializing chrominance blocks */ |
| 706 | − c_offset = (((mb_y >> (s->sys->pix_fmt == PIX_FMT_YUV420P)) * s->picture.linesize[1] + | |
| 707 | − (mb_x >> ((s->sys->pix_fmt == PIX_FMT_YUV411P) ? 2 : 1))) << 3); | |
| 706 | + c_offset = (((mb_y >> (s->sys->pix_fmt == AV_PIX_FMT_YUV420P)) * s->picture.linesize[1] + | |
| 707 | + (mb_x >> ((s->sys->pix_fmt == AV_PIX_FMT_YUV411P) ? 2 : 1))) << 3); | |
| 708 | 708 | for (j = 2; j; j--) { |
| 709 | 709 | uint8_t *c_ptr = s->picture.data[j] + c_offset; |
| 710 | 710 | linesize = s->picture.linesize[j]; |
| 711 | 711 | y_stride = (mb_y == 134) ? 8 : (s->picture.linesize[j] << 3); |
| 712 | − if (s->sys->pix_fmt == PIX_FMT_YUV411P && mb_x >= (704 / 8)) { | |
| 712 | + if (s->sys->pix_fmt == AV_PIX_FMT_YUV411P && mb_x >= (704 / 8)) { | |
| 713 | 713 | uint8_t* d; |
| 714 | 714 | uint8_t* b = scratch; |
| 715 | 715 | for (i = 0; i < 8; i++) { |
| @@ -806,7 +806,7 @@ static inline int dv_write_pack(enum dv_pack_type pack_id, DVVideoContext *c, · 90 unmodified lines | ||
| 806 | 806 | * 2. It is not at all clear what STYPE is used for 4:2:0 PAL |
| 807 | 807 | * compression scheme (if any). |
| 808 | 808 | */ |
| 809 | − int apt = (c->sys->pix_fmt == PIX_FMT_YUV420P ? 0 : 1); | |
| 809 | + int apt = (c->sys->pix_fmt == AV_PIX_FMT_YUV420P ? 0 : 1); | |
| 810 | 810 | |
| 811 | 811 | uint8_t aspect = 0; |
| 812 | 812 | if ((int)(av_q2d(c->avctx->sample_aspect_ratio) * c->avctx->width / c->avctx->height * 10) >= 17) /* 16:9 */ |
| @@ -984,8 +984,8 @@ AVCodec ff_dvvideo_encoder = { · 171 unmodified lines | ||
| 984 | 984 | .init = dvvideo_init_encoder, |
| 985 | 985 | .encode2 = dvvideo_encode_frame, |
| 986 | 986 | .capabilities = CODEC_CAP_SLICE_THREADS, |
| 987 | − .pix_fmts = (const enum PixelFormat[]) { | |
| 988 | − PIX_FMT_YUV411P, PIX_FMT_YUV422P, PIX_FMT_YUV420P, PIX_FMT_NONE | |
| 987 | + .pix_fmts = (const enum AVPixelFormat[]) { | |
| 988 | + AV_PIX_FMT_YUV411P, AV_PIX_FMT_YUV422P, AV_PIX_FMT_YUV420P, AV_PIX_FMT_NONE | |
| 989 | 989 | }, |
| 990 | 990 | .long_name = NULL_IF_CONFIG_SMALL("DV (Digital Video)"), |
| 991 | 991 | }; |
| @@ -90,7 +90,7 @@ static const DVprofile dv_profiles[] = { · 89 unmodified lines | ||
| 90 | 90 | .sar = {{8, 9}, {32, 27}}, |
| 91 | 91 | .work_chunks = &work_chunks_dv25ntsc[0], |
| 92 | 92 | .idct_factor = &dv_idct_factor_sd[0], |
| 93 | − .pix_fmt = PIX_FMT_YUV411P, | |
| 93 | + .pix_fmt = AV_PIX_FMT_YUV411P, | |
| 94 | 94 | .bpm = 6, |
| 95 | 95 | .block_sizes = block_sizes_dv2550, |
| 96 | 96 | .audio_stride = 90, |
| @@ -110,7 +110,7 @@ static const DVprofile dv_profiles[] = { · 13 unmodified lines | ||
| 110 | 110 | .sar = {{16, 15}, {64, 45}}, |
| 111 | 111 | .work_chunks = &work_chunks_dv25pal[0], |
| 112 | 112 | .idct_factor = &dv_idct_factor_sd[0], |
| 113 | − .pix_fmt = PIX_FMT_YUV420P, | |
| 113 | + .pix_fmt = AV_PIX_FMT_YUV420P, | |
| 114 | 114 | .bpm = 6, |
| 115 | 115 | .block_sizes = block_sizes_dv2550, |
| 116 | 116 | .audio_stride = 108, |
| @@ -130,7 +130,7 @@ static const DVprofile dv_profiles[] = { · 13 unmodified lines | ||
| 130 | 130 | .sar = {{16, 15}, {64, 45}}, |
| 131 | 131 | .work_chunks = &work_chunks_dv25pal411[0], |
| 132 | 132 | .idct_factor = &dv_idct_factor_sd[0], |
| 133 | − .pix_fmt = PIX_FMT_YUV411P, | |
| 133 | + .pix_fmt = AV_PIX_FMT_YUV411P, | |
| 134 | 134 | .bpm = 6, |
| 135 | 135 | .block_sizes = block_sizes_dv2550, |
| 136 | 136 | .audio_stride = 108, |
| @@ -150,7 +150,7 @@ static const DVprofile dv_profiles[] = { · 13 unmodified lines | ||
| 150 | 150 | .sar = {{8, 9}, {32, 27}}, |
| 151 | 151 | .work_chunks = &work_chunks_dv50ntsc[0], |
| 152 | 152 | .idct_factor = &dv_idct_factor_sd[0], |
| 153 | − .pix_fmt = PIX_FMT_YUV422P, | |
| 153 | + .pix_fmt = AV_PIX_FMT_YUV422P, | |
| 154 | 154 | .bpm = 6, |
| 155 | 155 | .block_sizes = block_sizes_dv2550, |
| 156 | 156 | .audio_stride = 90, |
| @@ -170,7 +170,7 @@ static const DVprofile dv_profiles[] = { · 13 unmodified lines | ||
| 170 | 170 | .sar = {{16, 15}, {64, 45}}, |
| 171 | 171 | .work_chunks = &work_chunks_dv50pal[0], |
| 172 | 172 | .idct_factor = &dv_idct_factor_sd[0], |
| 173 | − .pix_fmt = PIX_FMT_YUV422P, | |
| 173 | + .pix_fmt = AV_PIX_FMT_YUV422P, | |
| 174 | 174 | .bpm = 6, |
| 175 | 175 | .block_sizes = block_sizes_dv2550, |
| 176 | 176 | .audio_stride = 108, |
| @@ -190,7 +190,7 @@ static const DVprofile dv_profiles[] = { · 13 unmodified lines | ||
| 190 | 190 | .sar = {{1, 1}, {3, 2}}, |
| 191 | 191 | .work_chunks = &work_chunks_dv100ntsci[0], |
| 192 | 192 | .idct_factor = &dv_idct_factor_hd1080[0], |
| 193 | − .pix_fmt = PIX_FMT_YUV422P, | |
| 193 | + .pix_fmt = AV_PIX_FMT_YUV422P, | |
| 194 | 194 | .bpm = 8, |
| 195 | 195 | .block_sizes = block_sizes_dv100, |
| 196 | 196 | .audio_stride = 90, |
| @@ -210,7 +210,7 @@ static const DVprofile dv_profiles[] = { · 13 unmodified lines | ||
| 210 | 210 | .sar = {{1, 1}, {4, 3}}, |
| 211 | 211 | .work_chunks = &work_chunks_dv100pali[0], |
| 212 | 212 | .idct_factor = &dv_idct_factor_hd1080[0], |
| 213 | − .pix_fmt = PIX_FMT_YUV422P, | |
| 213 | + .pix_fmt = AV_PIX_FMT_YUV422P, | |
| 214 | 214 | .bpm = 8, |
| 215 | 215 | .block_sizes = block_sizes_dv100, |
| 216 | 216 | .audio_stride = 108, |
| @@ -230,7 +230,7 @@ static const DVprofile dv_profiles[] = { · 13 unmodified lines | ||
| 230 | 230 | .sar = {{1, 1}, {4, 3}}, |
| 231 | 231 | .work_chunks = &work_chunks_dv100ntscp[0], |
| 232 | 232 | .idct_factor = &dv_idct_factor_hd720[0], |
| 233 | − .pix_fmt = PIX_FMT_YUV422P, | |
| 233 | + .pix_fmt = AV_PIX_FMT_YUV422P, | |
| 234 | 234 | .bpm = 8, |
| 235 | 235 | .block_sizes = block_sizes_dv100, |
| 236 | 236 | .audio_stride = 90, |
| @@ -250,7 +250,7 @@ static const DVprofile dv_profiles[] = { · 13 unmodified lines | ||
| 250 | 250 | .sar = {{1, 1}, {4, 3}}, |
| 251 | 251 | .work_chunks = &work_chunks_dv100palp[0], |
| 252 | 252 | .idct_factor = &dv_idct_factor_hd720[0], |
| 253 | − .pix_fmt = PIX_FMT_YUV422P, | |
| 253 | + .pix_fmt = AV_PIX_FMT_YUV422P, | |
| 254 | 254 | .bpm = 8, |
| 255 | 255 | .block_sizes = block_sizes_dv100, |
| 256 | 256 | .audio_stride = 90, |
| @@ -270,7 +270,7 @@ static const DVprofile dv_profiles[] = { · 13 unmodified lines | ||
| 270 | 270 | .sar = {{16, 15}, {64, 45}}, |
| 271 | 271 | .work_chunks = &work_chunks_dv25pal[0], |
| 272 | 272 | .idct_factor = &dv_idct_factor_sd[0], |
| 273 | − .pix_fmt = PIX_FMT_YUV420P, | |
| 273 | + .pix_fmt = AV_PIX_FMT_YUV420P, | |
| 274 | 274 | .bpm = 6, |
| 275 | 275 | .block_sizes = block_sizes_dv2550, |
| 276 | 276 | .audio_stride = 108, |
| @@ -49,7 +49,7 @@ typedef struct DVprofile { · 48 unmodified lines | ||
| 49 | 49 | AVRational sar[2]; /* sample aspect ratios for 4:3 and 16:9 */ |
| 50 | 50 | DVwork_chunk *work_chunks; /* each thread gets its own chunk of frame to work on */ |
| 51 | 51 | uint32_t *idct_factor; /* set of iDCT factor tables */ |
| 52 | − enum PixelFormat pix_fmt; /* picture pixel format */ | |
| 52 | + enum AVPixelFormat pix_fmt; /* picture pixel format */ | |
| 53 | 53 | int bpm; /* blocks per macroblock */ |
| 54 | 54 | const uint8_t *block_sizes; /* AC block sizes, in bits */ |
| 55 | 55 | int audio_stride; /* size of audio_shuffle table */ |
| @@ -253,8 +253,8 @@ static int dv_decode_video_segment(AVCodecContext *avctx, void *arg) · 252 unmodified lines | ||
| 253 | 253 | dv_calculate_mb_xy(s, work_chunk, mb_index, &mb_x, &mb_y); |
| 254 | 254 | |
| 255 | 255 | /* idct_put'ting luminance */ |
| 256 | − if ((s->sys->pix_fmt == PIX_FMT_YUV420P) || | |
| 257 | − (s->sys->pix_fmt == PIX_FMT_YUV411P && mb_x >= (704 / 8)) || | |
| 256 | + if ((s->sys->pix_fmt == AV_PIX_FMT_YUV420P) || | |
| 257 | + (s->sys->pix_fmt == AV_PIX_FMT_YUV411P && mb_x >= (704 / 8)) || | |
| 258 | 258 | (s->sys->height >= 720 && mb_y != 134)) { |
| 259 | 259 | y_stride = (s->picture.linesize[0] << ((!is_field_mode[mb_index]) * log2_blocksize)); |
| 260 | 260 | } else { |
| @@ -274,11 +274,11 @@ static int dv_decode_video_segment(AVCodecContext *avctx, void *arg) · 13 unmodified lines | ||
| 274 | 274 | block += 4*64; |
| 275 | 275 | |
| 276 | 276 | /* idct_put'ting chrominance */ |
| 277 | − c_offset = (((mb_y >> (s->sys->pix_fmt == PIX_FMT_YUV420P)) * s->picture.linesize[1] + | |
| 278 | − (mb_x >> ((s->sys->pix_fmt == PIX_FMT_YUV411P) ? 2 : 1))) << log2_blocksize); | |
| 277 | + c_offset = (((mb_y >> (s->sys->pix_fmt == AV_PIX_FMT_YUV420P)) * s->picture.linesize[1] + | |
| 278 | + (mb_x >> ((s->sys->pix_fmt == AV_PIX_FMT_YUV411P) ? 2 : 1))) << log2_blocksize); | |
| 279 | 279 | for (j = 2; j; j--) { |
| 280 | 280 | uint8_t *c_ptr = s->picture.data[j] + c_offset; |
| 281 | − if (s->sys->pix_fmt == PIX_FMT_YUV411P && mb_x >= (704 / 8)) { | |
| 281 | + if (s->sys->pix_fmt == AV_PIX_FMT_YUV411P && mb_x >= (704 / 8)) { | |
| 282 | 282 | uint64_t aligned_pixels[64/8]; |
| 283 | 283 | uint8_t *pixels = (uint8_t*)aligned_pixels; |
| 284 | 284 | uint8_t *c_ptr1, *ptr1; |
| @@ -292,7 +292,7 @@ static av_cold int decode_init(AVCodecContext *avctx) · 291 unmodified lines | ||
| 292 | 292 | { |
| 293 | 293 | DxaDecContext * const c = avctx->priv_data; |
| 294 | 294 | |
| 295 | − avctx->pix_fmt = PIX_FMT_PAL8; | |
| 295 | + avctx->pix_fmt = AV_PIX_FMT_PAL8; | |
| 296 | 296 | |
| 297 | 297 | c->dsize = avctx->width * avctx->height * 2; |
| 298 | 298 | if((c->decomp_buf = av_malloc(c->dsize)) == NULL) { |
| @@ -26,7 +26,7 @@ · 25 unmodified lines | ||
| 26 | 26 | |
| 27 | 27 | static av_cold int decode_init(AVCodecContext *avctx) |
| 28 | 28 | { |
| 29 | − avctx->pix_fmt = PIX_FMT_YUV420P; | |
| 29 | + avctx->pix_fmt = AV_PIX_FMT_YUV420P; | |
| 30 | 30 | avctx->coded_frame = avcodec_alloc_frame(); |
| 31 | 31 | if (!avctx->coded_frame) |
| 32 | 32 | return AVERROR(ENOMEM); |
| @@ -443,7 +443,7 @@ AVHWAccel ff_h264_dxva2_hwaccel = { · 442 unmodified lines | ||
| 443 | 443 | .name = "h264_dxva2", |
| 444 | 444 | .type = AVMEDIA_TYPE_VIDEO, |
| 445 | 445 | .id = AV_CODEC_ID_H264, |
| 446 | − .pix_fmt = PIX_FMT_DXVA2_VLD, | |
| 446 | + .pix_fmt = AV_PIX_FMT_DXVA2_VLD, | |
| 447 | 447 | .start_frame = start_frame, |
| 448 | 448 | .decode_slice = decode_slice, |
| 449 | 449 | .end_frame = end_frame, |
| @@ -264,7 +264,7 @@ AVHWAccel ff_mpeg2_dxva2_hwaccel = { · 263 unmodified lines | ||
| 264 | 264 | .name = "mpeg2_dxva2", |
| 265 | 265 | .type = AVMEDIA_TYPE_VIDEO, |
| 266 | 266 | .id = AV_CODEC_ID_MPEG2VIDEO, |
| 267 | − .pix_fmt = PIX_FMT_DXVA2_VLD, | |
| 267 | + .pix_fmt = AV_PIX_FMT_DXVA2_VLD, | |
| 268 | 268 | .start_frame = start_frame, |
| 269 | 269 | .decode_slice = decode_slice, |
| 270 | 270 | .end_frame = end_frame, |
| @@ -269,7 +269,7 @@ AVHWAccel ff_wmv3_dxva2_hwaccel = { · 268 unmodified lines | ||
| 269 | 269 | .name = "wmv3_dxva2", |
| 270 | 270 | .type = AVMEDIA_TYPE_VIDEO, |
| 271 | 271 | .id = AV_CODEC_ID_WMV3, |
| 272 | − .pix_fmt = PIX_FMT_DXVA2_VLD, | |
| 272 | + .pix_fmt = AV_PIX_FMT_DXVA2_VLD, | |
| 273 | 273 | .start_frame = start_frame, |
| 274 | 274 | .decode_slice = decode_slice, |
| 275 | 275 | .end_frame = end_frame, |
| @@ -281,7 +281,7 @@ AVHWAccel ff_vc1_dxva2_hwaccel = { · 5 unmodified lines | ||
| 281 | 281 | .name = "vc1_dxva2", |
| 282 | 282 | .type = AVMEDIA_TYPE_VIDEO, |
| 283 | 283 | .id = AV_CODEC_ID_VC1, |
| 284 | − .pix_fmt = PIX_FMT_DXVA2_VLD, | |
| 284 | + .pix_fmt = AV_PIX_FMT_DXVA2_VLD, | |
| 285 | 285 | .start_frame = start_frame, |
| 286 | 286 | .decode_slice = decode_slice, |
| 287 | 287 | .end_frame = end_frame, |
| @@ -45,7 +45,7 @@ typedef struct CmvContext { · 44 unmodified lines | ||
| 45 | 45 | static av_cold int cmv_decode_init(AVCodecContext *avctx){ |
| 46 | 46 | CmvContext *s = avctx->priv_data; |
| 47 | 47 | s->avctx = avctx; |
| 48 | − avctx->pix_fmt = PIX_FMT_PAL8; | |
| 48 | + avctx->pix_fmt = AV_PIX_FMT_PAL8; | |
| 49 | 49 | return 0; |
| 50 | 50 | } |
| 51 | 51 | |
| @@ -61,7 +61,7 @@ static av_cold int decode_init(AVCodecContext *avctx) · 60 unmodified lines | ||
| 61 | 61 | { |
| 62 | 62 | MadContext *s = avctx->priv_data; |
| 63 | 63 | s->avctx = avctx; |
| 64 | − avctx->pix_fmt = PIX_FMT_YUV420P; | |
| 64 | + avctx->pix_fmt = AV_PIX_FMT_YUV420P; | |
| 65 | 65 | ff_dsputil_init(&s->dsp, avctx); |
| 66 | 66 | ff_init_scantable_permutation(s->dsp.idct_permutation, FF_NO_IDCT_PERM); |
| 67 | 67 | ff_init_scantable(s->dsp.idct_permutation, &s->scantable, ff_zigzag_direct); |
| @@ -53,7 +53,7 @@ static av_cold int tgq_decode_init(AVCodecContext *avctx){ · 52 unmodified lines | ||
| 53 | 53 | ff_init_scantable_permutation(idct_permutation, FF_NO_IDCT_PERM); |
| 54 | 54 | ff_init_scantable(idct_permutation, &s->scantable, ff_zigzag_direct); |
| 55 | 55 | avctx->time_base = (AVRational){1, 15}; |
| 56 | − avctx->pix_fmt = PIX_FMT_YUV420P; | |
| 56 | + avctx->pix_fmt = AV_PIX_FMT_YUV420P; | |
| 57 | 57 | return 0; |
| 58 | 58 | } |
| 59 | 59 | |
| @@ -54,7 +54,7 @@ static av_cold int tgv_decode_init(AVCodecContext *avctx){ · 53 unmodified lines | ||
| 54 | 54 | TgvContext *s = avctx->priv_data; |
| 55 | 55 | s->avctx = avctx; |
| 56 | 56 | avctx->time_base = (AVRational){1, 15}; |
| 57 | − avctx->pix_fmt = PIX_FMT_PAL8; | |
| 57 | + avctx->pix_fmt = AV_PIX_FMT_PAL8; | |
| 58 | 58 | return 0; |
| 59 | 59 | } |
| 60 | 60 | |
| @@ -52,7 +52,7 @@ static av_cold int tqi_decode_init(AVCodecContext *avctx) · 51 unmodified lines | ||
| 52 | 52 | ff_init_scantable(s->dsp.idct_permutation, &s->intra_scantable, ff_zigzag_direct); |
| 53 | 53 | s->qscale = 1; |
| 54 | 54 | avctx->time_base = (AVRational){1, 15}; |
| 55 | − avctx->pix_fmt = PIX_FMT_YUV420P; | |
| 55 | + avctx->pix_fmt = AV_PIX_FMT_YUV420P; | |
| 56 | 56 | ff_mpeg12_init_vlcs(); |
| 57 | 57 | return 0; |
| 58 | 58 | } |
| @@ -61,7 +61,7 @@ static av_cold int escape124_decode_init(AVCodecContext *avctx) · 60 unmodified lines | ||
| 61 | 61 | { |
| 62 | 62 | Escape124Context *s = avctx->priv_data; |
| 63 | 63 | |
| 64 | − avctx->pix_fmt = PIX_FMT_RGB555; | |
| 64 | + avctx->pix_fmt = AV_PIX_FMT_RGB555; | |
| 65 | 65 | |
| 66 | 66 | s->num_superblocks = ((unsigned)avctx->width / 8) * |
| 67 | 67 | ((unsigned)avctx->height / 8); |
| @@ -901,9 +901,9 @@ static av_cold int encode_init(AVCodecContext *avctx) · 900 unmodified lines | ||
| 901 | 901 | |
| 902 | 902 | avctx->coded_frame= &s->picture; |
| 903 | 903 | switch(avctx->pix_fmt){ |
| 904 | − case PIX_FMT_YUV444P16: | |
| 905 | − case PIX_FMT_YUV422P16: | |
| 906 | − case PIX_FMT_YUV420P16: | |
| 904 | + case AV_PIX_FMT_YUV444P16: | |
| 905 | + case AV_PIX_FMT_YUV422P16: | |
| 906 | + case AV_PIX_FMT_YUV420P16: | |
| 907 | 907 | if(avctx->bits_per_raw_sample <=8){ |
| 908 | 908 | av_log(avctx, AV_LOG_ERROR, "bits_per_raw_sample invalid\n"); |
| 909 | 909 | return -1; |
| @@ -913,14 +913,14 @@ static av_cold int encode_init(AVCodecContext *avctx) · 3 unmodified lines | ||
| 913 | 913 | return -1; |
| 914 | 914 | } |
| 915 | 915 | s->version= FFMAX(s->version, 1); |
| 916 | − case PIX_FMT_YUV444P: | |
| 917 | − case PIX_FMT_YUV422P: | |
| 918 | − case PIX_FMT_YUV420P: | |
| 919 | − case PIX_FMT_YUV411P: | |
| 920 | − case PIX_FMT_YUV410P: | |
| 916 | + case AV_PIX_FMT_YUV444P: | |
| 917 | + case AV_PIX_FMT_YUV422P: | |
| 918 | + case AV_PIX_FMT_YUV420P: | |
| 919 | + case AV_PIX_FMT_YUV411P: | |
| 920 | + case AV_PIX_FMT_YUV410P: | |
| 921 | 921 | s->colorspace= 0; |
| 922 | 922 | break; |
| 923 | − case PIX_FMT_RGB32: | |
| 923 | + case AV_PIX_FMT_RGB32: | |
| 924 | 924 | s->colorspace= 1; |
| 925 | 925 | break; |
| 926 | 926 | default: |
| @@ -1547,20 +1547,20 @@ static int read_header(FFV1Context *f){ · 620 unmodified lines | ||
| 1547 | 1547 | if(f->colorspace==0){ |
| 1548 | 1548 | if(f->avctx->bits_per_raw_sample<=8){ |
| 1549 | 1549 | switch(16*f->chroma_h_shift + f->chroma_v_shift){ |
| 1550 | − case 0x00: f->avctx->pix_fmt= PIX_FMT_YUV444P; break; | |
| 1551 | − case 0x10: f->avctx->pix_fmt= PIX_FMT_YUV422P; break; | |
| 1552 | − case 0x11: f->avctx->pix_fmt= PIX_FMT_YUV420P; break; | |
| 1553 | − case 0x20: f->avctx->pix_fmt= PIX_FMT_YUV411P; break; | |
| 1554 | − case 0x22: f->avctx->pix_fmt= PIX_FMT_YUV410P; break; | |
| 1550 | + case 0x00: f->avctx->pix_fmt= AV_PIX_FMT_YUV444P; break; | |
| 1551 | + case 0x10: f->avctx->pix_fmt= AV_PIX_FMT_YUV422P; break; | |
| 1552 | + case 0x11: f->avctx->pix_fmt= AV_PIX_FMT_YUV420P; break; | |
| 1553 | + case 0x20: f->avctx->pix_fmt= AV_PIX_FMT_YUV411P; break; | |
| 1554 | + case 0x22: f->avctx->pix_fmt= AV_PIX_FMT_YUV410P; break; | |
| 1555 | 1555 | default: |
| 1556 | 1556 | av_log(f->avctx, AV_LOG_ERROR, "format not supported\n"); |
| 1557 | 1557 | return -1; |
| 1558 | 1558 | } |
| 1559 | 1559 | }else{ |
| 1560 | 1560 | switch(16*f->chroma_h_shift + f->chroma_v_shift){ |
| 1561 | − case 0x00: f->avctx->pix_fmt= PIX_FMT_YUV444P16; break; | |
| 1562 | − case 0x10: f->avctx->pix_fmt= PIX_FMT_YUV422P16; break; | |
| 1563 | − case 0x11: f->avctx->pix_fmt= PIX_FMT_YUV420P16; break; | |
| 1561 | + case 0x00: f->avctx->pix_fmt= AV_PIX_FMT_YUV444P16; break; | |
| 1562 | + case 0x10: f->avctx->pix_fmt= AV_PIX_FMT_YUV422P16; break; | |
| 1563 | + case 0x11: f->avctx->pix_fmt= AV_PIX_FMT_YUV420P16; break; | |
| 1564 | 1564 | default: |
| 1565 | 1565 | av_log(f->avctx, AV_LOG_ERROR, "format not supported\n"); |
| 1566 | 1566 | return -1; |
| @@ -1571,7 +1571,7 @@ static int read_header(FFV1Context *f){ · 4 unmodified lines | ||
| 1571 | 1571 | av_log(f->avctx, AV_LOG_ERROR, "chroma subsampling not supported in this colorspace\n"); |
| 1572 | 1572 | return -1; |
| 1573 | 1573 | } |
| 1574 | − f->avctx->pix_fmt= PIX_FMT_RGB32; | |
| 1574 | + f->avctx->pix_fmt= AV_PIX_FMT_RGB32; | |
| 1575 | 1575 | }else{ |
| 1576 | 1576 | av_log(f->avctx, AV_LOG_ERROR, "colorspace not supported\n"); |
| 1577 | 1577 | return -1; |
| @@ -1759,10 +1759,10 @@ AVCodec ff_ffv1_encoder = { · 181 unmodified lines | ||
| 1759 | 1759 | .encode2 = encode_frame, |
| 1760 | 1760 | .close = common_end, |
| 1761 | 1761 | .capabilities = CODEC_CAP_SLICE_THREADS, |
| 1762 | − .pix_fmts = (const enum PixelFormat[]){ | |
| 1763 | − PIX_FMT_YUV420P, PIX_FMT_YUV444P, PIX_FMT_YUV422P, PIX_FMT_YUV411P, | |
| 1764 | − PIX_FMT_YUV410P, PIX_FMT_RGB32, PIX_FMT_YUV420P16, PIX_FMT_YUV422P16, | |
| 1765 | − PIX_FMT_YUV444P16, PIX_FMT_NONE | |
| 1762 | + .pix_fmts = (const enum AVPixelFormat[]){ | |
| 1763 | + AV_PIX_FMT_YUV420P, AV_PIX_FMT_YUV444P, AV_PIX_FMT_YUV422P, AV_PIX_FMT_YUV411P, | |
| 1764 | + AV_PIX_FMT_YUV410P, AV_PIX_FMT_RGB32, AV_PIX_FMT_YUV420P16, AV_PIX_FMT_YUV422P16, | |
| 1765 | + AV_PIX_FMT_YUV444P16, AV_PIX_FMT_NONE | |
| 1766 | 1766 | }, |
| 1767 | 1767 | .long_name = NULL_IF_CONFIG_SMALL("FFmpeg video codec #1"), |
| 1768 | 1768 | }; |
| @@ -114,7 +114,7 @@ static av_cold int flashsv_decode_init(AVCodecContext *avctx) · 113 unmodified lines | ||
| 114 | 114 | av_log(avctx, AV_LOG_ERROR, "Inflate init error: %d\n", zret); |
| 115 | 115 | return 1; |
| 116 | 116 | } |
| 117 | − avctx->pix_fmt = PIX_FMT_BGR24; | |
| 117 | + avctx->pix_fmt = AV_PIX_FMT_BGR24; | |
| 118 | 118 | s->frame.data[0] = NULL; |
| 119 | 119 | |
| 120 | 120 | return 0; |
| @@ -461,7 +461,7 @@ AVCodec ff_flashsv_decoder = { · 340 unmodified lines | ||
| 461 | 461 | .close = flashsv_decode_end, |
| 462 | 462 | .decode = flashsv_decode_frame, |
| 463 | 463 | .capabilities = CODEC_CAP_DR1, |
| 464 | − .pix_fmts = (const enum PixelFormat[]){ PIX_FMT_BGR24, PIX_FMT_NONE }, | |
| 464 | + .pix_fmts = (const enum AVPixelFormat[]){ AV_PIX_FMT_BGR24, AV_PIX_FMT_NONE }, | |
| 465 | 465 | .long_name = NULL_IF_CONFIG_SMALL("Flash Screen Video v1"), |
| 466 | 466 | }; |
| 467 | 467 | #endif /* CONFIG_FLASHSV_DECODER */ |
| @@ -524,7 +524,7 @@ AVCodec ff_flashsv2_decoder = { · 56 unmodified lines | ||
| 524 | 524 | .close = flashsv2_decode_end, |
| 525 | 525 | .decode = flashsv_decode_frame, |
| 526 | 526 | .capabilities = CODEC_CAP_DR1, |
| 527 | − .pix_fmts = (const enum PixelFormat[]){ PIX_FMT_BGR24, PIX_FMT_NONE }, | |
| 527 | + .pix_fmts = (const enum AVPixelFormat[]){ AV_PIX_FMT_BGR24, AV_PIX_FMT_NONE }, | |
| 528 | 528 | .long_name = NULL_IF_CONFIG_SMALL("Flash Screen Video v2"), |
| 529 | 529 | }; |
| 530 | 530 | #endif /* CONFIG_FLASHSV2_DECODER */ |
| @@ -287,6 +287,6 @@ AVCodec ff_flashsv_encoder = { · 286 unmodified lines | ||
| 287 | 287 | .init = flashsv_encode_init, |
| 288 | 288 | .encode2 = flashsv_encode_frame, |
| 289 | 289 | .close = flashsv_encode_end, |
| 290 | − .pix_fmts = (const enum PixelFormat[]){ PIX_FMT_BGR24, PIX_FMT_NONE }, | |
| 290 | + .pix_fmts = (const enum AVPixelFormat[]){ AV_PIX_FMT_BGR24, AV_PIX_FMT_NONE }, | |
| 291 | 291 | .long_name = NULL_IF_CONFIG_SMALL("Flash Screen Video"), |
| 292 | 292 | }; |
| @@ -111,10 +111,10 @@ static av_cold int flic_decode_init(AVCodecContext *avctx) · 110 unmodified lines | ||
| 111 | 111 | } |
| 112 | 112 | |
| 113 | 113 | switch (depth) { |
| 114 | − case 8 : avctx->pix_fmt = PIX_FMT_PAL8; break; | |
| 115 | − case 15 : avctx->pix_fmt = PIX_FMT_RGB555; break; | |
| 116 | − case 16 : avctx->pix_fmt = PIX_FMT_RGB565; break; | |
| 117 | − case 24 : avctx->pix_fmt = PIX_FMT_BGR24; /* Supposedly BGR, but havent any files to test with */ | |
| 114 | + case 8 : avctx->pix_fmt = AV_PIX_FMT_PAL8; break; | |
| 115 | + case 15 : avctx->pix_fmt = AV_PIX_FMT_RGB555; break; | |
| 116 | + case 16 : avctx->pix_fmt = AV_PIX_FMT_RGB565; break; | |
| 117 | + case 24 : avctx->pix_fmt = AV_PIX_FMT_BGR24; /* Supposedly BGR, but havent any files to test with */ | |
| 118 | 118 | av_log(avctx, AV_LOG_ERROR, "24Bpp FLC/FLX is unsupported due to no test files.\n"); |
| 119 | 119 | return -1; |
| 120 | 120 | default : |
| @@ -701,16 +701,16 @@ static int flic_decode_frame(AVCodecContext *avctx, · 580 unmodified lines | ||
| 701 | 701 | { |
| 702 | 702 | const uint8_t *buf = avpkt->data; |
| 703 | 703 | int buf_size = avpkt->size; |
| 704 | − if (avctx->pix_fmt == PIX_FMT_PAL8) { | |
| 704 | + if (avctx->pix_fmt == AV_PIX_FMT_PAL8) { | |
| 705 | 705 | return flic_decode_frame_8BPP(avctx, data, data_size, |
| 706 | 706 | buf, buf_size); |
| 707 | 707 | } |
| 708 | − else if ((avctx->pix_fmt == PIX_FMT_RGB555) || | |
| 709 | − (avctx->pix_fmt == PIX_FMT_RGB565)) { | |
| 708 | + else if ((avctx->pix_fmt == AV_PIX_FMT_RGB555) || | |
| 709 | + (avctx->pix_fmt == AV_PIX_FMT_RGB565)) { | |
| 710 | 710 | return flic_decode_frame_15_16BPP(avctx, data, data_size, |
| 711 | 711 | buf, buf_size); |
| 712 | 712 | } |
| 713 | − else if (avctx->pix_fmt == PIX_FMT_BGR24) { | |
| 713 | + else if (avctx->pix_fmt == AV_PIX_FMT_BGR24) { | |
| 714 | 714 | return flic_decode_frame_24BPP(avctx, data, data_size, |
| 715 | 715 | buf, buf_size); |
| 716 | 716 | } |
| @@ -94,7 +94,7 @@ AVCodec ff_flv_encoder = { · 93 unmodified lines | ||
| 94 | 94 | .init = ff_MPV_encode_init, |
| 95 | 95 | .encode2 = ff_MPV_encode_picture, |
| 96 | 96 | .close = ff_MPV_encode_end, |
| 97 | − .pix_fmts = (const enum PixelFormat[]){ PIX_FMT_YUV420P, PIX_FMT_NONE }, | |
| 97 | + .pix_fmts = (const enum AVPixelFormat[]){ AV_PIX_FMT_YUV420P, AV_PIX_FMT_NONE }, | |
| 98 | 98 | .long_name = NULL_IF_CONFIG_SMALL("FLV / Sorenson Spark / Sorenson H.263 (Flash Video)"), |
| 99 | 99 | .priv_class = &flv_class, |
| 100 | 100 | }; |
| @@ -61,7 +61,7 @@ static av_cold int decode_init(AVCodecContext *avctx) · 60 unmodified lines | ||
| 61 | 61 | FrapsContext * const s = avctx->priv_data; |
| 62 | 62 | |
| 63 | 63 | avctx->coded_frame = &s->frame; |
| 64 | − avctx->pix_fmt= PIX_FMT_NONE; /* set in decode_frame */ | |
| 64 | + avctx->pix_fmt= AV_PIX_FMT_NONE; /* set in decode_frame */ | |
| 65 | 65 | |
| 66 | 66 | s->avctx = avctx; |
| 67 | 67 | s->tmpbuf = NULL; |
| @@ -139,7 +139,7 @@ static int decode_frame(AVCodecContext *avctx, · 71 unmodified lines | ||
| 139 | 139 | uint32_t *luma1,*luma2,*cb,*cr; |
| 140 | 140 | uint32_t offs[4]; |
| 141 | 141 | int i, j, is_chroma, planes; |
| 142 | − enum PixelFormat pix_fmt; | |
| 142 | + enum AVPixelFormat pix_fmt; | |
| 143 | 143 | |
| 144 | 144 | header = AV_RL32(buf); |
| 145 | 145 | version = header & 0xff; |
| @@ -156,7 +156,7 @@ static int decode_frame(AVCodecContext *avctx, · 10 unmodified lines | ||
| 156 | 156 | if (header_size == 8) |
| 157 | 157 | buf+=4; |
| 158 | 158 | |
| 159 | − pix_fmt = version & 1 ? PIX_FMT_BGR24 : PIX_FMT_YUVJ420P; | |
| 159 | + pix_fmt = version & 1 ? AV_PIX_FMT_BGR24 : AV_PIX_FMT_YUVJ420P; | |
| 160 | 160 | if (avctx->pix_fmt != pix_fmt && f->data[0]) { |
| 161 | 161 | avctx->release_buffer(avctx, f); |
| 162 | 162 | } |
| @@ -29,7 +29,7 @@ static av_cold int decode_init(AVCodecContext *avctx) · 28 unmodified lines | ||
| 29 | 29 | av_log(avctx, AV_LOG_ERROR, "frwu needs even width\n"); |
| 30 | 30 | return AVERROR(EINVAL); |
| 31 | 31 | } |
| 32 | − avctx->pix_fmt = PIX_FMT_UYVY422; | |
| 32 | + avctx->pix_fmt = AV_PIX_FMT_UYVY422; | |
| 33 | 33 | |
| 34 | 34 | avctx->coded_frame = avcodec_alloc_frame(); |
| 35 | 35 | if (!avctx->coded_frame) |
| @@ -187,9 +187,9 @@ AVCodec ff_gif_encoder = { · 186 unmodified lines | ||
| 187 | 187 | .init = gif_encode_init, |
| 188 | 188 | .encode2 = gif_encode_frame, |
| 189 | 189 | .close = gif_encode_close, |
| 190 | − .pix_fmts = (const enum PixelFormat[]){ | |
| 191 | − PIX_FMT_RGB8, PIX_FMT_BGR8, PIX_FMT_RGB4_BYTE, PIX_FMT_BGR4_BYTE, | |
| 192 | − PIX_FMT_GRAY8, PIX_FMT_PAL8, PIX_FMT_NONE | |
| 190 | + .pix_fmts = (const enum AVPixelFormat[]){ | |
| 191 | + AV_PIX_FMT_RGB8, AV_PIX_FMT_BGR8, AV_PIX_FMT_RGB4_BYTE, AV_PIX_FMT_BGR4_BYTE, | |
| 192 | + AV_PIX_FMT_GRAY8, AV_PIX_FMT_PAL8, AV_PIX_FMT_NONE | |
| 193 | 193 | }, |
| 194 | 194 | .long_name = NULL_IF_CONFIG_SMALL("GIF (Graphics Interchange Format)"), |
| 195 | 195 | }; |
| @@ -294,7 +294,7 @@ static int gif_decode_frame(AVCodecContext *avctx, void *data, int *data_size, A · 293 unmodified lines | ||
| 294 | 294 | if (gif_read_header1(s) < 0) |
| 295 | 295 | return -1; |
| 296 | 296 | |
| 297 | − avctx->pix_fmt = PIX_FMT_PAL8; | |
| 297 | + avctx->pix_fmt = AV_PIX_FMT_PAL8; | |
| 298 | 298 | if (av_image_check_size(s->screen_width, s->screen_height, 0, avctx)) |
| 299 | 299 | return -1; |
| 300 | 300 | avcodec_set_dimensions(avctx, s->screen_width, s->screen_height); |
| @@ -85,7 +85,7 @@ static av_cold int h261_decode_init(AVCodecContext *avctx){ · 84 unmodified lines | ||
| 85 | 85 | |
| 86 | 86 | s->out_format = FMT_H261; |
| 87 | 87 | s->low_delay= 1; |
| 88 | − avctx->pix_fmt= PIX_FMT_YUV420P; | |
| 88 | + avctx->pix_fmt= AV_PIX_FMT_YUV420P; | |
| 89 | 89 | |
| 90 | 90 | s->codec_id= avctx->codec->id; |
| 91 | 91 | |
| @@ -331,7 +331,7 @@ AVCodec ff_h261_encoder = { · 330 unmodified lines | ||
| 331 | 331 | .init = ff_MPV_encode_init, |
| 332 | 332 | .encode2 = ff_MPV_encode_picture, |
| 333 | 333 | .close = ff_MPV_encode_end, |
| 334 | − .pix_fmts = (const enum PixelFormat[]){ PIX_FMT_YUV420P, PIX_FMT_NONE }, | |
| 334 | + .pix_fmts = (const enum AVPixelFormat[]){ AV_PIX_FMT_YUV420P, AV_PIX_FMT_NONE }, | |
| 335 | 335 | .long_name = NULL_IF_CONFIG_SMALL("H.261"), |
| 336 | 336 | .priv_class = &h261_class, |
| 337 | 337 | }; |
| @@ -59,7 +59,7 @@ av_cold int ff_h263_decode_init(AVCodecContext *avctx) · 58 unmodified lines | ||
| 59 | 59 | s->decode_mb= ff_h263_decode_mb; |
| 60 | 60 | s->low_delay= 1; |
| 61 | 61 | if (avctx->codec->id == AV_CODEC_ID_MSS2) |
| 62 | − avctx->pix_fmt = PIX_FMT_YUV420P; | |
| 62 | + avctx->pix_fmt = AV_PIX_FMT_YUV420P; | |
| 63 | 63 | else |
| 64 | 64 | avctx->pix_fmt = avctx->get_format(avctx, avctx->codec->pix_fmts); |
| 65 | 65 | s->unrestricted_mv= 1; |
| @@ -59,12 +59,12 @@ static const uint8_t div6[QP_MAX_NUM + 1] = { · 58 unmodified lines | ||
| 59 | 59 | 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 10, 10, 10, 10, |
| 60 | 60 | }; |
| 61 | 61 | |
| 62 | −static const enum PixelFormat hwaccel_pixfmt_list_h264_jpeg_420[] = { | |
| 63 | − PIX_FMT_DXVA2_VLD, | |
| 64 | − PIX_FMT_VAAPI_VLD, | |
| 65 | − PIX_FMT_VDA_VLD, | |
| 66 | − PIX_FMT_YUVJ420P, | |
| 67 | − PIX_FMT_NONE | |
| 62 | +static const enum AVPixelFormat hwaccel_pixfmt_list_h264_jpeg_420[] = { | |
| 63 | + AV_PIX_FMT_DXVA2_VLD, | |
| 64 | + AV_PIX_FMT_VAAPI_VLD, | |
| 65 | + AV_PIX_FMT_VDA_VLD, | |
| 66 | + AV_PIX_FMT_YUVJ420P, | |
| 67 | + AV_PIX_FMT_NONE | |
| 68 | 68 | }; |
| 69 | 69 | |
| 70 | 70 | /** |
| @@ -2502,35 +2502,35 @@ static int decode_slice_header(H264Context *h, H264Context *h0) · 2431 unmodified lines | ||
| 2502 | 2502 | case 9: |
| 2503 | 2503 | if (CHROMA444) { |
| 2504 | 2504 | if (s->avctx->colorspace == AVCOL_SPC_RGB) { |
| 2505 | − s->avctx->pix_fmt = PIX_FMT_GBRP9; | |
| 2505 | + s->avctx->pix_fmt = AV_PIX_FMT_GBRP9; | |
| 2506 | 2506 | } else |
| 2507 | − s->avctx->pix_fmt = PIX_FMT_YUV444P9; | |
| 2507 | + s->avctx->pix_fmt = AV_PIX_FMT_YUV444P9; | |
| 2508 | 2508 | } else if (CHROMA422) |
| 2509 | − s->avctx->pix_fmt = PIX_FMT_YUV422P9; | |
| 2509 | + s->avctx->pix_fmt = AV_PIX_FMT_YUV422P9; | |
| 2510 | 2510 | else |
| 2511 | − s->avctx->pix_fmt = PIX_FMT_YUV420P9; | |
| 2511 | + s->avctx->pix_fmt = AV_PIX_FMT_YUV420P9; | |
| 2512 | 2512 | break; |
| 2513 | 2513 | case 10: |
| 2514 | 2514 | if (CHROMA444) { |
| 2515 | 2515 | if (s->avctx->colorspace == AVCOL_SPC_RGB) { |
| 2516 | − s->avctx->pix_fmt = PIX_FMT_GBRP10; | |
| 2516 | + s->avctx->pix_fmt = AV_PIX_FMT_GBRP10; | |
| 2517 | 2517 | } else |
| 2518 | − s->avctx->pix_fmt = PIX_FMT_YUV444P10; | |
| 2518 | + s->avctx->pix_fmt = AV_PIX_FMT_YUV444P10; | |
| 2519 | 2519 | } else if (CHROMA422) |
| 2520 | − s->avctx->pix_fmt = PIX_FMT_YUV422P10; | |
| 2520 | + s->avctx->pix_fmt = AV_PIX_FMT_YUV422P10; | |
| 2521 | 2521 | else |
| 2522 | − s->avctx->pix_fmt = PIX_FMT_YUV420P10; | |
| 2522 | + s->avctx->pix_fmt = AV_PIX_FMT_YUV420P10; | |
| 2523 | 2523 | break; |
| 2524 | 2524 | case 8: |
| 2525 | 2525 | if (CHROMA444) { |
| 2526 | 2526 | if (s->avctx->colorspace == AVCOL_SPC_RGB) { |
| 2527 | − s->avctx->pix_fmt = PIX_FMT_GBRP; | |
| 2527 | + s->avctx->pix_fmt = AV_PIX_FMT_GBRP; | |
| 2528 | 2528 | } else |
| 2529 | − s->avctx->pix_fmt = s->avctx->color_range == AVCOL_RANGE_JPEG ? PIX_FMT_YUVJ444P | |
| 2530 | − : PIX_FMT_YUV444P; | |
| 2529 | + s->avctx->pix_fmt = s->avctx->color_range == AVCOL_RANGE_JPEG ? AV_PIX_FMT_YUVJ444P | |
| 2530 | + : AV_PIX_FMT_YUV444P; | |
| 2531 | 2531 | } else if (CHROMA422) { |
| 2532 | − s->avctx->pix_fmt = s->avctx->color_range == AVCOL_RANGE_JPEG ? PIX_FMT_YUVJ422P | |
| 2533 | − : PIX_FMT_YUV422P; | |
| 2532 | + s->avctx->pix_fmt = s->avctx->color_range == AVCOL_RANGE_JPEG ? AV_PIX_FMT_YUVJ422P | |
| 2533 | + : AV_PIX_FMT_YUV422P; | |
| 2534 | 2534 | } else { |
| 2535 | 2535 | s->avctx->pix_fmt = s->avctx->get_format(s->avctx, |
| 2536 | 2536 | s->avctx->codec->pix_fmts ? |
| @@ -4125,8 +4125,8 @@ AVCodec ff_h264_vdpau_decoder = { · 1588 unmodified lines | ||
| 4125 | 4125 | .capabilities = CODEC_CAP_DR1 | CODEC_CAP_DELAY | CODEC_CAP_HWACCEL_VDPAU, |
| 4126 | 4126 | .flush = flush_dpb, |
| 4127 | 4127 | .long_name = NULL_IF_CONFIG_SMALL("H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 (VDPAU acceleration)"), |
| 4128 | − .pix_fmts = (const enum PixelFormat[]) { PIX_FMT_VDPAU_H264, | |
| 4129 | − PIX_FMT_NONE}, | |
| 4128 | + .pix_fmts = (const enum AVPixelFormat[]) { AV_PIX_FMT_VDPAU_H264, | |
| 4129 | + AV_PIX_FMT_NONE}, | |
| 4130 | 4130 | .profiles = NULL_IF_CONFIG_SMALL(profiles), |
| 4131 | 4131 | }; |
| 4132 | 4132 | #endif |
| @@ -456,21 +456,21 @@ static av_cold int decode_init(AVCodecContext *avctx) · 455 unmodified lines | ||
| 456 | 456 | |
| 457 | 457 | switch (s->bitstream_bpp) { |
| 458 | 458 | case 12: |
| 459 | − avctx->pix_fmt = PIX_FMT_YUV420P; | |
| 459 | + avctx->pix_fmt = AV_PIX_FMT_YUV420P; | |
| 460 | 460 | break; |
| 461 | 461 | case 16: |
| 462 | 462 | if (s->yuy2) { |
| 463 | − avctx->pix_fmt = PIX_FMT_YUYV422; | |
| 463 | + avctx->pix_fmt = AV_PIX_FMT_YUYV422; | |
| 464 | 464 | } else { |
| 465 | − avctx->pix_fmt = PIX_FMT_YUV422P; | |
| 465 | + avctx->pix_fmt = AV_PIX_FMT_YUV422P; | |
| 466 | 466 | } |
| 467 | 467 | break; |
| 468 | 468 | case 24: |
| 469 | 469 | case 32: |
| 470 | 470 | if (s->bgr32) { |
| 471 | − avctx->pix_fmt = PIX_FMT_RGB32; | |
| 471 | + avctx->pix_fmt = AV_PIX_FMT_RGB32; | |
| 472 | 472 | } else { |
| 473 | − avctx->pix_fmt = PIX_FMT_BGR24; | |
| 473 | + avctx->pix_fmt = AV_PIX_FMT_BGR24; | |
| 474 | 474 | } |
| 475 | 475 | break; |
| 476 | 476 | default: |
| @@ -545,13 +545,13 @@ static av_cold int encode_init(AVCodecContext *avctx) · 68 unmodified lines | ||
| 545 | 545 | avctx->coded_frame = &s->picture; |
| 546 | 546 | |
| 547 | 547 | switch (avctx->pix_fmt) { |
| 548 | − case PIX_FMT_YUV420P: | |
| 548 | + case AV_PIX_FMT_YUV420P: | |
| 549 | 549 | s->bitstream_bpp = 12; |
| 550 | 550 | break; |
| 551 | − case PIX_FMT_YUV422P: | |
| 551 | + case AV_PIX_FMT_YUV422P: | |
| 552 | 552 | s->bitstream_bpp = 16; |
| 553 | 553 | break; |
| 554 | − case PIX_FMT_RGB32: | |
| 554 | + case AV_PIX_FMT_RGB32: | |
| 555 | 555 | s->bitstream_bpp = 24; |
| 556 | 556 | break; |
| 557 | 557 | default: |
| @@ -573,7 +573,7 @@ static av_cold int encode_init(AVCodecContext *avctx) · 15 unmodified lines | ||
| 573 | 573 | }else s->context= 0; |
| 574 | 574 | |
| 575 | 575 | if (avctx->codec->id == AV_CODEC_ID_HUFFYUV) { |
| 576 | − if (avctx->pix_fmt == PIX_FMT_YUV420P) { | |
| 576 | + if (avctx->pix_fmt == AV_PIX_FMT_YUV420P) { | |
| 577 | 577 | av_log(avctx, AV_LOG_ERROR, |
| 578 | 578 | "Error: YV12 is not supported by huffyuv; use " |
| 579 | 579 | "vcodec=ffvhuff or format=422p\n"); |
| @@ -1256,8 +1256,8 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt, · 676 unmodified lines | ||
| 1256 | 1256 | |
| 1257 | 1257 | init_put_bits(&s->pb, pkt->data + size, pkt->size - size); |
| 1258 | 1258 | |
| 1259 | − if (avctx->pix_fmt == PIX_FMT_YUV422P || | |
| 1260 | − avctx->pix_fmt == PIX_FMT_YUV420P) { | |
| 1259 | + if (avctx->pix_fmt == AV_PIX_FMT_YUV422P || | |
| 1260 | + avctx->pix_fmt == AV_PIX_FMT_YUV420P) { | |
| 1261 | 1261 | int lefty, leftu, leftv, y, cy; |
| 1262 | 1262 | |
| 1263 | 1263 | put_bits(&s->pb, 8, leftv = p->data[2][0]); |
| @@ -1361,7 +1361,7 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt, · 97 unmodified lines | ||
| 1361 | 1361 | encode_422_bitstream(s, 0, width); |
| 1362 | 1362 | } |
| 1363 | 1363 | } |
| 1364 | − } else if(avctx->pix_fmt == PIX_FMT_RGB32) { | |
| 1364 | + } else if(avctx->pix_fmt == AV_PIX_FMT_RGB32) { | |
| 1365 | 1365 | uint8_t *data = p->data[0] + (height - 1) * p->linesize[0]; |
| 1366 | 1366 | const int stride = -p->linesize[0]; |
| 1367 | 1367 | const int fake_stride = -fake_ystride; |
| @@ -1479,8 +1479,8 @@ AVCodec ff_huffyuv_encoder = { · 111 unmodified lines | ||
| 1479 | 1479 | .init = encode_init, |
| 1480 | 1480 | .encode2 = encode_frame, |
| 1481 | 1481 | .close = encode_end, |
| 1482 | − .pix_fmts = (const enum PixelFormat[]){ | |
| 1483 | − PIX_FMT_YUV422P, PIX_FMT_RGB32, PIX_FMT_NONE | |
| 1482 | + .pix_fmts = (const enum AVPixelFormat[]){ | |
| 1483 | + AV_PIX_FMT_YUV422P, AV_PIX_FMT_RGB32, AV_PIX_FMT_NONE | |
| 1484 | 1484 | }, |
| 1485 | 1485 | .long_name = NULL_IF_CONFIG_SMALL("Huffyuv / HuffYUV"), |
| 1486 | 1486 | }; |
| @@ -1495,8 +1495,8 @@ AVCodec ff_ffvhuff_encoder = { · 8 unmodified lines | ||
| 1495 | 1495 | .init = encode_init, |
| 1496 | 1496 | .encode2 = encode_frame, |
| 1497 | 1497 | .close = encode_end, |
| 1498 | − .pix_fmts = (const enum PixelFormat[]){ | |
| 1499 | − PIX_FMT_YUV420P, PIX_FMT_YUV422P, PIX_FMT_RGB32, PIX_FMT_NONE | |
| 1498 | + .pix_fmts = (const enum AVPixelFormat[]){ | |
| 1499 | + AV_PIX_FMT_YUV420P, AV_PIX_FMT_YUV422P, AV_PIX_FMT_RGB32, AV_PIX_FMT_NONE | |
| 1500 | 1500 | }, |
| 1501 | 1501 | .long_name = NULL_IF_CONFIG_SMALL("Huffyuv FFmpeg variant"), |
| 1502 | 1502 | }; |
| @@ -151,7 +151,7 @@ static av_cold int idcin_decode_init(AVCodecContext *avctx) · 150 unmodified lines | ||
| 151 | 151 | unsigned char *histograms; |
| 152 | 152 | |
| 153 | 153 | s->avctx = avctx; |
| 154 | − avctx->pix_fmt = PIX_FMT_PAL8; | |
| 154 | + avctx->pix_fmt = AV_PIX_FMT_PAL8; | |
| 155 | 155 | |
| 156 | 156 | /* make sure the Huffman tables make it */ |
| 157 | 157 | if (s->avctx->extradata_size != HUFFMAN_TABLE_SIZE) { |
| @@ -152,10 +152,10 @@ static av_cold int decode_init(AVCodecContext *avctx) · 151 unmodified lines | ||
| 152 | 152 | |
| 153 | 153 | if (avctx->bits_per_coded_sample <= 8) { |
| 154 | 154 | avctx->pix_fmt = (avctx->bits_per_coded_sample < 8 || |
| 155 | − avctx->extradata_size) ? PIX_FMT_PAL8 | |
| 156 | − : PIX_FMT_GRAY8; | |
| 155 | + avctx->extradata_size) ? AV_PIX_FMT_PAL8 | |
| 156 | + : AV_PIX_FMT_GRAY8; | |
| 157 | 157 | } else if (avctx->bits_per_coded_sample <= 32) { |
| 158 | − avctx->pix_fmt = PIX_FMT_BGR32; | |
| 158 | + avctx->pix_fmt = AV_PIX_FMT_BGR32; | |
| 159 | 159 | } else { |
| 160 | 160 | return AVERROR_INVALIDDATA; |
| 161 | 161 | } |
| @@ -263,14 +263,14 @@ static int decode_frame_ilbm(AVCodecContext *avctx, · 101 unmodified lines | ||
| 263 | 263 | } else if ((res = avctx->get_buffer(avctx, &s->frame)) < 0) { |
| 264 | 264 | av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n"); |
| 265 | 265 | return res; |
| 266 | − } else if (avctx->bits_per_coded_sample <= 8 && avctx->pix_fmt != PIX_FMT_GRAY8) { | |
| 266 | + } else if (avctx->bits_per_coded_sample <= 8 && avctx->pix_fmt != AV_PIX_FMT_GRAY8) { | |
| 267 | 267 | if ((res = ff_cmap_read_palette(avctx, (uint32_t*)s->frame.data[1])) < 0) |
| 268 | 268 | return res; |
| 269 | 269 | } |
| 270 | 270 | s->init = 1; |
| 271 | 271 | |
| 272 | 272 | if (avctx->codec_tag == MKTAG('I','L','B','M')) { // interleaved |
| 273 | − if (avctx->pix_fmt == PIX_FMT_PAL8 || avctx->pix_fmt == PIX_FMT_GRAY8) { | |
| 273 | + if (avctx->pix_fmt == AV_PIX_FMT_PAL8 || avctx->pix_fmt == AV_PIX_FMT_GRAY8) { | |
| 274 | 274 | for(y = 0; y < avctx->height; y++ ) { |
| 275 | 275 | uint8_t *row = &s->frame.data[0][ y*s->frame.linesize[0] ]; |
| 276 | 276 | memset(row, 0, avctx->width); |
| @@ -279,7 +279,7 @@ static int decode_frame_ilbm(AVCodecContext *avctx, · 2 unmodified lines | ||
| 279 | 279 | buf += s->planesize; |
| 280 | 280 | } |
| 281 | 281 | } |
| 282 | − } else { // PIX_FMT_BGR32 | |
| 282 | + } else { // AV_PIX_FMT_BGR32 | |
| 283 | 283 | for(y = 0; y < avctx->height; y++ ) { |
| 284 | 284 | uint8_t *row = &s->frame.data[0][y*s->frame.linesize[0]]; |
| 285 | 285 | memset(row, 0, avctx->width << 2); |
| @@ -289,7 +289,7 @@ static int decode_frame_ilbm(AVCodecContext *avctx, · 3 unmodified lines | ||
| 289 | 289 | } |
| 290 | 290 | } |
| 291 | 291 | } |
| 292 | − } else if (avctx->pix_fmt == PIX_FMT_PAL8 || avctx->pix_fmt == PIX_FMT_GRAY8) { // IFF-PBM | |
| 292 | + } else if (avctx->pix_fmt == AV_PIX_FMT_PAL8 || avctx->pix_fmt == AV_PIX_FMT_GRAY8) { // IFF-PBM | |
| 293 | 293 | for(y = 0; y < avctx->height; y++ ) { |
| 294 | 294 | uint8_t *row = &s->frame.data[0][y * s->frame.linesize[0]]; |
| 295 | 295 | memcpy(row, buf, FFMIN(avctx->width, buf_end - buf)); |
| @@ -320,14 +320,14 @@ static int decode_frame_byterun1(AVCodecContext *avctx, · 24 unmodified lines | ||
| 320 | 320 | } else if ((res = avctx->get_buffer(avctx, &s->frame)) < 0) { |
| 321 | 321 | av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n"); |
| 322 | 322 | return res; |
| 323 | − } else if (avctx->bits_per_coded_sample <= 8 && avctx->pix_fmt != PIX_FMT_GRAY8) { | |
| 323 | + } else if (avctx->bits_per_coded_sample <= 8 && avctx->pix_fmt != AV_PIX_FMT_GRAY8) { | |
| 324 | 324 | if ((res = ff_cmap_read_palette(avctx, (uint32_t*)s->frame.data[1])) < 0) |
| 325 | 325 | return res; |
| 326 | 326 | } |
| 327 | 327 | s->init = 1; |
| 328 | 328 | |
| 329 | 329 | if (avctx->codec_tag == MKTAG('I','L','B','M')) { //interleaved |
| 330 | − if (avctx->pix_fmt == PIX_FMT_PAL8 || avctx->pix_fmt == PIX_FMT_GRAY8) { | |
| 330 | + if (avctx->pix_fmt == AV_PIX_FMT_PAL8 || avctx->pix_fmt == AV_PIX_FMT_GRAY8) { | |
| 331 | 331 | for(y = 0; y < avctx->height ; y++ ) { |
| 332 | 332 | uint8_t *row = &s->frame.data[0][ y*s->frame.linesize[0] ]; |
| 333 | 333 | memset(row, 0, avctx->width); |
| @@ -336,7 +336,7 @@ static int decode_frame_byterun1(AVCodecContext *avctx, · 2 unmodified lines | ||
| 336 | 336 | decodeplane8(row, s->planebuf, s->planesize, plane); |
| 337 | 337 | } |
| 338 | 338 | } |
| 339 | − } else { //PIX_FMT_BGR32 | |
| 339 | + } else { //AV_PIX_FMT_BGR32 | |
| 340 | 340 | for(y = 0; y < avctx->height ; y++ ) { |
| 341 | 341 | uint8_t *row = &s->frame.data[0][y*s->frame.linesize[0]]; |
| 342 | 342 | memset(row, 0, avctx->width << 2); |
| @@ -68,87 +68,87 @@ typedef struct PixFmtInfo { · 67 unmodified lines | ||
| 68 | 68 | } PixFmtInfo; |
| 69 | 69 | |
| 70 | 70 | /* this table gives more information about formats */ |
| 71 | −static const PixFmtInfo pix_fmt_info[PIX_FMT_NB] = { | |
| 71 | +static const PixFmtInfo pix_fmt_info[AV_PIX_FMT_NB] = { | |
| 72 | 72 | /* YUV formats */ |
| 73 | − [PIX_FMT_YUV420P] = { | |
| 73 | + [AV_PIX_FMT_YUV420P] = { | |
| 74 | 74 | .nb_channels = 3, |
| 75 | 75 | .color_type = FF_COLOR_YUV, |
| 76 | 76 | .pixel_type = FF_PIXEL_PLANAR, |
| 77 | 77 | .depth = 8, |
| 78 | 78 | }, |
| 79 | − [PIX_FMT_YUV422P] = { | |
| 79 | + [AV_PIX_FMT_YUV422P] = { | |
| 80 | 80 | .nb_channels = 3, |
| 81 | 81 | .color_type = FF_COLOR_YUV, |
| 82 | 82 | .pixel_type = FF_PIXEL_PLANAR, |
| 83 | 83 | .depth = 8, |
| 84 | 84 | }, |
| 85 | − [PIX_FMT_YUV444P] = { | |
| 85 | + [AV_PIX_FMT_YUV444P] = { | |
| 86 | 86 | .nb_channels = 3, |
| 87 | 87 | .color_type = FF_COLOR_YUV, |
| 88 | 88 | .pixel_type = FF_PIXEL_PLANAR, |
| 89 | 89 | .depth = 8, |
| 90 | 90 | }, |
| 91 | − [PIX_FMT_YUYV422] = { | |
| 91 | + [AV_PIX_FMT_YUYV422] = { | |
| 92 | 92 | .nb_channels = 1, |
| 93 | 93 | .color_type = FF_COLOR_YUV, |
| 94 | 94 | .pixel_type = FF_PIXEL_PACKED, |
| 95 | 95 | .depth = 8, |
| 96 | 96 | }, |
| 97 | − [PIX_FMT_UYVY422] = { | |
| 97 | + [AV_PIX_FMT_UYVY422] = { | |
| 98 | 98 | .nb_channels = 1, |
| 99 | 99 | .color_type = FF_COLOR_YUV, |
| 100 | 100 | .pixel_type = FF_PIXEL_PACKED, |
| 101 | 101 | .depth = 8, |
| 102 | 102 | }, |
| 103 | − [PIX_FMT_YUV410P] = { | |
| 103 | + [AV_PIX_FMT_YUV410P] = { | |
| 104 | 104 | .nb_channels = 3, |
| 105 | 105 | .color_type = FF_COLOR_YUV, |
| 106 | 106 | .pixel_type = FF_PIXEL_PLANAR, |
| 107 | 107 | .depth = 8, |
| 108 | 108 | }, |
| 109 | − [PIX_FMT_YUV411P] = { | |
| 109 | + [AV_PIX_FMT_YUV411P] = { | |
| 110 | 110 | .nb_channels = 3, |
| 111 | 111 | .color_type = FF_COLOR_YUV, |
| 112 | 112 | .pixel_type = FF_PIXEL_PLANAR, |
| 113 | 113 | .depth = 8, |
| 114 | 114 | }, |
| 115 | − [PIX_FMT_YUV440P] = { | |
| 115 | + [AV_PIX_FMT_YUV440P] = { | |
| 116 | 116 | .nb_channels = 3, |
| 117 | 117 | .color_type = FF_COLOR_YUV, |
| 118 | 118 | .pixel_type = FF_PIXEL_PLANAR, |
| 119 | 119 | .depth = 8, |
| 120 | 120 | }, |
| 121 | − [PIX_FMT_YUV420P16LE] = { | |
| 121 | + [AV_PIX_FMT_YUV420P16LE] = { | |
| 122 | 122 | .nb_channels = 3, |
| 123 | 123 | .color_type = FF_COLOR_YUV, |
| 124 | 124 | .pixel_type = FF_PIXEL_PLANAR, |
| 125 | 125 | .depth = 16, |
| 126 | 126 | }, |
| 127 | − [PIX_FMT_YUV422P16LE] = { | |
| 127 | + [AV_PIX_FMT_YUV422P16LE] = { | |
| 128 | 128 | .nb_channels = 3, |
| 129 | 129 | .color_type = FF_COLOR_YUV, |
| 130 | 130 | .pixel_type = FF_PIXEL_PLANAR, |
| 131 | 131 | .depth = 16, |
| 132 | 132 | }, |
| 133 | − [PIX_FMT_YUV444P16LE] = { | |
| 133 | + [AV_PIX_FMT_YUV444P16LE] = { | |
| 134 | 134 | .nb_channels = 3, |
| 135 | 135 | .color_type = FF_COLOR_YUV, |
| 136 | 136 | .pixel_type = FF_PIXEL_PLANAR, |
| 137 | 137 | .depth = 16, |
| 138 | 138 | }, |
| 139 | − [PIX_FMT_YUV420P16BE] = { | |
| 139 | + [AV_PIX_FMT_YUV420P16BE] = { | |
| 140 | 140 | .nb_channels = 3, |
| 141 | 141 | .color_type = FF_COLOR_YUV, |
| 142 | 142 | .pixel_type = FF_PIXEL_PLANAR, |
| 143 | 143 | .depth = 16, |
| 144 | 144 | }, |
| 145 | − [PIX_FMT_YUV422P16BE] = { | |
| 145 | + [AV_PIX_FMT_YUV422P16BE] = { | |
| 146 | 146 | .nb_channels = 3, |
| 147 | 147 | .color_type = FF_COLOR_YUV, |
| 148 | 148 | .pixel_type = FF_PIXEL_PLANAR, |
| 149 | 149 | .depth = 16, |
| 150 | 150 | }, |
| 151 | − [PIX_FMT_YUV444P16BE] = { | |
| 151 | + [AV_PIX_FMT_YUV444P16BE] = { | |
| 152 | 152 | .nb_channels = 3, |
| 153 | 153 | .color_type = FF_COLOR_YUV, |
| 154 | 154 | .pixel_type = FF_PIXEL_PLANAR, |
| @@ -157,7 +157,7 @@ static const PixFmtInfo pix_fmt_info[PIX_FMT_NB] = { · 2 unmodified lines | ||
| 157 | 157 | |
| 158 | 158 | |
| 159 | 159 | /* YUV formats with alpha plane */ |
| 160 | − [PIX_FMT_YUVA420P] = { | |
| 160 | + [AV_PIX_FMT_YUVA420P] = { | |
| 161 | 161 | .nb_channels = 4, |
| 162 | 162 | .color_type = FF_COLOR_YUV, |
| 163 | 163 | .pixel_type = FF_PIXEL_PLANAR, |
| @@ -165,25 +165,25 @@ static const PixFmtInfo pix_fmt_info[PIX_FMT_NB] = { · 1 unmodified line | ||
| 165 | 165 | }, |
| 166 | 166 | |
| 167 | 167 | /* JPEG YUV */ |
| 168 | − [PIX_FMT_YUVJ420P] = { | |
| 168 | + [AV_PIX_FMT_YUVJ420P] = { | |
| 169 | 169 | .nb_channels = 3, |
| 170 | 170 | .color_type = FF_COLOR_YUV_JPEG, |
| 171 | 171 | .pixel_type = FF_PIXEL_PLANAR, |
| 172 | 172 | .depth = 8, |
| 173 | 173 | }, |
| 174 | − [PIX_FMT_YUVJ422P] = { | |
| 174 | + [AV_PIX_FMT_YUVJ422P] = { | |
| 175 | 175 | .nb_channels = 3, |
| 176 | 176 | .color_type = FF_COLOR_YUV_JPEG, |
| 177 | 177 | .pixel_type = FF_PIXEL_PLANAR, |
| 178 | 178 | .depth = 8, |
| 179 | 179 | }, |
| 180 | − [PIX_FMT_YUVJ444P] = { | |
| 180 | + [AV_PIX_FMT_YUVJ444P] = { | |
| 181 | 181 | .nb_channels = 3, |
| 182 | 182 | .color_type = FF_COLOR_YUV_JPEG, |
| 183 | 183 | .pixel_type = FF_PIXEL_PLANAR, |
| 184 | 184 | .depth = 8, |
| 185 | 185 | }, |
| 186 | − [PIX_FMT_YUVJ440P] = { | |
| 186 | + [AV_PIX_FMT_YUVJ440P] = { | |
| 187 | 187 | .nb_channels = 3, |
| 188 | 188 | .color_type = FF_COLOR_YUV_JPEG, |
| 189 | 189 | .pixel_type = FF_PIXEL_PLANAR, |
| @@ -191,67 +191,67 @@ static const PixFmtInfo pix_fmt_info[PIX_FMT_NB] = { · 1 unmodified line | ||
| 191 | 191 | }, |
| 192 | 192 | |
| 193 | 193 | /* RGB formats */ |
| 194 | − [PIX_FMT_RGB24] = { | |
| 194 | + [AV_PIX_FMT_RGB24] = { | |
| 195 | 195 | .nb_channels = 3, |
| 196 | 196 | .color_type = FF_COLOR_RGB, |
| 197 | 197 | .pixel_type = FF_PIXEL_PACKED, |
| 198 | 198 | .depth = 8, |
| 199 | 199 | }, |
| 200 | − [PIX_FMT_BGR24] = { | |
| 200 | + [AV_PIX_FMT_BGR24] = { | |
| 201 | 201 | .nb_channels = 3, |
| 202 | 202 | .color_type = FF_COLOR_RGB, |
| 203 | 203 | .pixel_type = FF_PIXEL_PACKED, |
| 204 | 204 | .depth = 8, |
| 205 | 205 | }, |
| 206 | − [PIX_FMT_ARGB] = { | |
| 206 | + [AV_PIX_FMT_ARGB] = { | |
| 207 | 207 | .nb_channels = 4, .is_alpha = 1, |
| 208 | 208 | .color_type = FF_COLOR_RGB, |
| 209 | 209 | .pixel_type = FF_PIXEL_PACKED, |
| 210 | 210 | .depth = 8, |
| 211 | 211 | }, |
| 212 | − [PIX_FMT_RGB48BE] = { | |
| 212 | + [AV_PIX_FMT_RGB48BE] = { | |
| 213 | 213 | .nb_channels = 3, |
| 214 | 214 | .color_type = FF_COLOR_RGB, |
| 215 | 215 | .pixel_type = FF_PIXEL_PACKED, |
| 216 | 216 | .depth = 16, |
| 217 | 217 | }, |
| 218 | − [PIX_FMT_RGB48LE] = { | |
| 218 | + [AV_PIX_FMT_RGB48LE] = { | |
| 219 | 219 | .nb_channels = 3, |
| 220 | 220 | .color_type = FF_COLOR_RGB, |
| 221 | 221 | .pixel_type = FF_PIXEL_PACKED, |
| 222 | 222 | .depth = 16, |
| 223 | 223 | }, |
| 224 | − [PIX_FMT_RGB565BE] = { | |
| 224 | + [AV_PIX_FMT_RGB565BE] = { | |
| 225 | 225 | .nb_channels = 3, |
| 226 | 226 | .color_type = FF_COLOR_RGB, |
| 227 | 227 | .pixel_type = FF_PIXEL_PACKED, |
| 228 | 228 | .depth = 5, |
| 229 | 229 | }, |
| 230 | − [PIX_FMT_RGB565LE] = { | |
| 230 | + [AV_PIX_FMT_RGB565LE] = { | |
| 231 | 231 | .nb_channels = 3, |
| 232 | 232 | .color_type = FF_COLOR_RGB, |
| 233 | 233 | .pixel_type = FF_PIXEL_PACKED, |
| 234 | 234 | .depth = 5, |
| 235 | 235 | }, |
| 236 | − [PIX_FMT_RGB555BE] = { | |
| 236 | + [AV_PIX_FMT_RGB555BE] = { | |
| 237 | 237 | .nb_channels = 3, |
| 238 | 238 | .color_type = FF_COLOR_RGB, |
| 239 | 239 | .pixel_type = FF_PIXEL_PACKED, |
| 240 | 240 | .depth = 5, |
| 241 | 241 | }, |
| 242 | − [PIX_FMT_RGB555LE] = { | |
| 242 | + [AV_PIX_FMT_RGB555LE] = { | |
| 243 | 243 | .nb_channels = 3, |
| 244 | 244 | .color_type = FF_COLOR_RGB, |
| 245 | 245 | .pixel_type = FF_PIXEL_PACKED, |
| 246 | 246 | .depth = 5, |
| 247 | 247 | }, |
| 248 | − [PIX_FMT_RGB444BE] = { | |
| 248 | + [AV_PIX_FMT_RGB444BE] = { | |
| 249 | 249 | .nb_channels = 3, |
| 250 | 250 | .color_type = FF_COLOR_RGB, |
| 251 | 251 | .pixel_type = FF_PIXEL_PACKED, |
| 252 | 252 | .depth = 4, |
| 253 | 253 | }, |
| 254 | − [PIX_FMT_RGB444LE] = { | |
| 254 | + [AV_PIX_FMT_RGB444LE] = { | |
| 255 | 255 | .nb_channels = 3, |
| 256 | 256 | .color_type = FF_COLOR_RGB, |
| 257 | 257 | .pixel_type = FF_PIXEL_PACKED, |
| @@ -259,31 +259,31 @@ static const PixFmtInfo pix_fmt_info[PIX_FMT_NB] = { · 1 unmodified line | ||
| 259 | 259 | }, |
| 260 | 260 | |
| 261 | 261 | /* gray / mono formats */ |
| 262 | − [PIX_FMT_GRAY16BE] = { | |
| 262 | + [AV_PIX_FMT_GRAY16BE] = { | |
| 263 | 263 | .nb_channels = 1, |
| 264 | 264 | .color_type = FF_COLOR_GRAY, |
| 265 | 265 | .pixel_type = FF_PIXEL_PLANAR, |
| 266 | 266 | .depth = 16, |
| 267 | 267 | }, |
| 268 | − [PIX_FMT_GRAY16LE] = { | |
| 268 | + [AV_PIX_FMT_GRAY16LE] = { | |
| 269 | 269 | .nb_channels = 1, |
| 270 | 270 | .color_type = FF_COLOR_GRAY, |
| 271 | 271 | .pixel_type = FF_PIXEL_PLANAR, |
| 272 | 272 | .depth = 16, |
| 273 | 273 | }, |
| 274 | − [PIX_FMT_GRAY8] = { | |
| 274 | + [AV_PIX_FMT_GRAY8] = { | |
| 275 | 275 | .nb_channels = 1, |
| 276 | 276 | .color_type = FF_COLOR_GRAY, |
| 277 | 277 | .pixel_type = FF_PIXEL_PLANAR, |
| 278 | 278 | .depth = 8, |
| 279 | 279 | }, |
| 280 | − [PIX_FMT_MONOWHITE] = { | |
| 280 | + [AV_PIX_FMT_MONOWHITE] = { | |
| 281 | 281 | .nb_channels = 1, |
| 282 | 282 | .color_type = FF_COLOR_GRAY, |
| 283 | 283 | .pixel_type = FF_PIXEL_PLANAR, |
| 284 | 284 | .depth = 1, |
| 285 | 285 | }, |
| 286 | − [PIX_FMT_MONOBLACK] = { | |
| 286 | + [AV_PIX_FMT_MONOBLACK] = { | |
| 287 | 287 | .nb_channels = 1, |
| 288 | 288 | .color_type = FF_COLOR_GRAY, |
| 289 | 289 | .pixel_type = FF_PIXEL_PLANAR, |
| @@ -291,116 +291,116 @@ static const PixFmtInfo pix_fmt_info[PIX_FMT_NB] = { · 1 unmodified line | ||
| 291 | 291 | }, |
| 292 | 292 | |
| 293 | 293 | /* paletted formats */ |
| 294 | − [PIX_FMT_PAL8] = { | |
| 294 | + [AV_PIX_FMT_PAL8] = { | |
| 295 | 295 | .nb_channels = 4, .is_alpha = 1, |
| 296 | 296 | .color_type = FF_COLOR_RGB, |
| 297 | 297 | .pixel_type = FF_PIXEL_PALETTE, |
| 298 | 298 | .depth = 8, |
| 299 | 299 | }, |
| 300 | − [PIX_FMT_UYYVYY411] = { | |
| 300 | + [AV_PIX_FMT_UYYVYY411] = { | |
| 301 | 301 | .nb_channels = 1, |
| 302 | 302 | .color_type = FF_COLOR_YUV, |
| 303 | 303 | .pixel_type = FF_PIXEL_PACKED, |
| 304 | 304 | .depth = 8, |
| 305 | 305 | }, |
| 306 | − [PIX_FMT_ABGR] = { | |
| 306 | + [AV_PIX_FMT_ABGR] = { | |
| 307 | 307 | .nb_channels = 4, .is_alpha = 1, |
| 308 | 308 | .color_type = FF_COLOR_RGB, |
| 309 | 309 | .pixel_type = FF_PIXEL_PACKED, |
| 310 | 310 | .depth = 8, |
| 311 | 311 | }, |
| 312 | − [PIX_FMT_BGR565BE] = { | |
| 312 | + [AV_PIX_FMT_BGR565BE] = { | |
| 313 | 313 | .nb_channels = 3, |
| 314 | 314 | .color_type = FF_COLOR_RGB, |
| 315 | 315 | .pixel_type = FF_PIXEL_PACKED, |
| 316 | 316 | .depth = 5, |
| 317 | 317 | }, |
| 318 | − [PIX_FMT_BGR565LE] = { | |
| 318 | + [AV_PIX_FMT_BGR565LE] = { | |
| 319 | 319 | .nb_channels = 3, |
| 320 | 320 | .color_type = FF_COLOR_RGB, |
| 321 | 321 | .pixel_type = FF_PIXEL_PACKED, |
| 322 | 322 | .depth = 5, |
| 323 | 323 | }, |
| 324 | − [PIX_FMT_BGR555BE] = { | |
| 324 | + [AV_PIX_FMT_BGR555BE] = { | |
| 325 | 325 | .nb_channels = 3, |
| 326 | 326 | .color_type = FF_COLOR_RGB, |
| 327 | 327 | .pixel_type = FF_PIXEL_PACKED, |
| 328 | 328 | .depth = 5, |
| 329 | 329 | }, |
| 330 | − [PIX_FMT_BGR555LE] = { | |
| 330 | + [AV_PIX_FMT_BGR555LE] = { | |
| 331 | 331 | .nb_channels = 3, |
| 332 | 332 | .color_type = FF_COLOR_RGB, |
| 333 | 333 | .pixel_type = FF_PIXEL_PACKED, |
| 334 | 334 | .depth = 5, |
| 335 | 335 | }, |
| 336 | − [PIX_FMT_BGR444BE] = { | |
| 336 | + [AV_PIX_FMT_BGR444BE] = { | |
| 337 | 337 | .nb_channels = 3, |
| 338 | 338 | .color_type = FF_COLOR_RGB, |
| 339 | 339 | .pixel_type = FF_PIXEL_PACKED, |
| 340 | 340 | .depth = 4, |
| 341 | 341 | }, |
| 342 | − [PIX_FMT_BGR444LE] = { | |
| 342 | + [AV_PIX_FMT_BGR444LE] = { | |
| 343 | 343 | .nb_channels = 3, |
| 344 | 344 | .color_type = FF_COLOR_RGB, |
| 345 | 345 | .pixel_type = FF_PIXEL_PACKED, |
| 346 | 346 | .depth = 4, |
| 347 | 347 | }, |
| 348 | − [PIX_FMT_RGB8] = { | |
| 348 | + [AV_PIX_FMT_RGB8] = { | |
| 349 | 349 | .nb_channels = 1, |
| 350 | 350 | .color_type = FF_COLOR_RGB, |
| 351 | 351 | .pixel_type = FF_PIXEL_PACKED, |
| 352 | 352 | .depth = 8, |
| 353 | 353 | }, |
| 354 | − [PIX_FMT_RGB4] = { | |
| 354 | + [AV_PIX_FMT_RGB4] = { | |
| 355 | 355 | .nb_channels = 1, |
| 356 | 356 | .color_type = FF_COLOR_RGB, |
| 357 | 357 | .pixel_type = FF_PIXEL_PACKED, |
| 358 | 358 | .depth = 4, |
| 359 | 359 | }, |
| 360 | − [PIX_FMT_RGB4_BYTE] = { | |
| 360 | + [AV_PIX_FMT_RGB4_BYTE] = { | |
| 361 | 361 | .nb_channels = 1, |
| 362 | 362 | .color_type = FF_COLOR_RGB, |
| 363 | 363 | .pixel_type = FF_PIXEL_PACKED, |
| 364 | 364 | .depth = 8, |
| 365 | 365 | }, |
| 366 | − [PIX_FMT_BGR8] = { | |
| 366 | + [AV_PIX_FMT_BGR8] = { | |
| 367 | 367 | .nb_channels = 1, |
| 368 | 368 | .color_type = FF_COLOR_RGB, |
| 369 | 369 | .pixel_type = FF_PIXEL_PACKED, |
| 370 | 370 | .depth = 8, |
| 371 | 371 | }, |
| 372 | − [PIX_FMT_BGR4] = { | |
| 372 | + [AV_PIX_FMT_BGR4] = { | |
| 373 | 373 | .nb_channels = 1, |
| 374 | 374 | .color_type = FF_COLOR_RGB, |
| 375 | 375 | .pixel_type = FF_PIXEL_PACKED, |
| 376 | 376 | .depth = 4, |
| 377 | 377 | }, |
| 378 | − [PIX_FMT_BGR4_BYTE] = { | |
| 378 | + [AV_PIX_FMT_BGR4_BYTE] = { | |
| 379 | 379 | .nb_channels = 1, |
| 380 | 380 | .color_type = FF_COLOR_RGB, |
| 381 | 381 | .pixel_type = FF_PIXEL_PACKED, |
| 382 | 382 | .depth = 8, |
| 383 | 383 | }, |
| 384 | − [PIX_FMT_NV12] = { | |
| 384 | + [AV_PIX_FMT_NV12] = { | |
| 385 | 385 | .nb_channels = 2, |
| 386 | 386 | .color_type = FF_COLOR_YUV, |
| 387 | 387 | .pixel_type = FF_PIXEL_PLANAR, |
| 388 | 388 | .depth = 8, |
| 389 | 389 | }, |
| 390 | − [PIX_FMT_NV21] = { | |
| 390 | + [AV_PIX_FMT_NV21] = { | |
| 391 | 391 | .nb_channels = 2, |
| 392 | 392 | .color_type = FF_COLOR_YUV, |
| 393 | 393 | .pixel_type = FF_PIXEL_PLANAR, |
| 394 | 394 | .depth = 8, |
| 395 | 395 | }, |
| 396 | 396 | |
| 397 | − [PIX_FMT_BGRA] = { | |
| 397 | + [AV_PIX_FMT_BGRA] = { | |
| 398 | 398 | .nb_channels = 4, .is_alpha = 1, |
| 399 | 399 | .color_type = FF_COLOR_RGB, |
| 400 | 400 | .pixel_type = FF_PIXEL_PACKED, |
| 401 | 401 | .depth = 8, |
| 402 | 402 | }, |
| 403 | − [PIX_FMT_RGBA] = { | |
| 403 | + [AV_PIX_FMT_RGBA] = { | |
| 404 | 404 | .nb_channels = 4, .is_alpha = 1, |
| 405 | 405 | .color_type = FF_COLOR_RGB, |
| 406 | 406 | .pixel_type = FF_PIXEL_PACKED, |
| @@ -408,19 +408,19 @@ static const PixFmtInfo pix_fmt_info[PIX_FMT_NB] = { · 1 unmodified line | ||
| 408 | 408 | }, |
| 409 | 409 | }; |
| 410 | 410 | |
| 411 | −void avcodec_get_chroma_sub_sample(enum PixelFormat pix_fmt, int *h_shift, int *v_shift) | |
| 411 | +void avcodec_get_chroma_sub_sample(enum AVPixelFormat pix_fmt, int *h_shift, int *v_shift) | |
| 412 | 412 | { |
| 413 | 413 | *h_shift = av_pix_fmt_descriptors[pix_fmt].log2_chroma_w; |
| 414 | 414 | *v_shift = av_pix_fmt_descriptors[pix_fmt].log2_chroma_h; |
| 415 | 415 | } |
| 416 | 416 | |
| 417 | −int ff_is_hwaccel_pix_fmt(enum PixelFormat pix_fmt) | |
| 417 | +int ff_is_hwaccel_pix_fmt(enum AVPixelFormat pix_fmt) | |
| 418 | 418 | { |
| 419 | 419 | return av_pix_fmt_descriptors[pix_fmt].flags & PIX_FMT_HWACCEL; |
| 420 | 420 | } |
| 421 | 421 | |
| 422 | 422 | int avpicture_fill(AVPicture *picture, uint8_t *ptr, |
| 423 | − enum PixelFormat pix_fmt, int width, int height) | |
| 423 | + enum AVPixelFormat pix_fmt, int width, int height) | |
| 424 | 424 | { |
| 425 | 425 | int ret; |
| 426 | 426 | |
| @@ -433,7 +433,7 @@ int avpicture_fill(AVPicture *picture, uint8_t *ptr, · 6 unmodified lines | ||
| 433 | 433 | return av_image_fill_pointers(picture->data, pix_fmt, height, ptr, picture->linesize); |
| 434 | 434 | } |
| 435 | 435 | |
| 436 | −int avpicture_layout(const AVPicture* src, enum PixelFormat pix_fmt, int width, int height, | |
| 436 | +int avpicture_layout(const AVPicture* src, enum AVPixelFormat pix_fmt, int width, int height, | |
| 437 | 437 | unsigned char *dest, int dest_size) |
| 438 | 438 | { |
| 439 | 439 | int i, j, nb_planes = 0, linesizes[4]; |
| @@ -466,7 +466,7 @@ int avpicture_layout(const AVPicture* src, enum PixelFormat pix_fmt, int width, · 26 unmodified lines | ||
| 466 | 466 | return size; |
| 467 | 467 | } |
| 468 | 468 | |
| 469 | −int avpicture_get_size(enum PixelFormat pix_fmt, int width, int height) | |
| 469 | +int avpicture_get_size(enum AVPixelFormat pix_fmt, int width, int height) | |
| 470 | 470 | { |
| 471 | 471 | AVPicture dummy_pict; |
| 472 | 472 | if(av_image_check_size(width, height, 0, NULL)) |
| @@ -477,7 +477,7 @@ int avpicture_get_size(enum PixelFormat pix_fmt, int width, int height) · 4 unmodified lines | ||
| 477 | 477 | return avpicture_fill(&dummy_pict, NULL, pix_fmt, width, height); |
| 478 | 478 | } |
| 479 | 479 | |
| 480 | −int avcodec_get_pix_fmt_loss(enum PixelFormat dst_pix_fmt, enum PixelFormat src_pix_fmt, | |
| 480 | +int avcodec_get_pix_fmt_loss(enum AVPixelFormat dst_pix_fmt, enum AVPixelFormat src_pix_fmt, | |
| 481 | 481 | int has_alpha) |
| 482 | 482 | { |
| 483 | 483 | const PixFmtInfo *pf, *ps; |
| @@ -491,10 +491,10 @@ int avcodec_get_pix_fmt_loss(enum PixelFormat dst_pix_fmt, enum PixelFormat src_ · 7 unmodified lines | ||
| 491 | 491 | loss = 0; |
| 492 | 492 | pf = &pix_fmt_info[dst_pix_fmt]; |
| 493 | 493 | if (pf->depth < ps->depth || |
| 494 | − ((dst_pix_fmt == PIX_FMT_RGB555BE || dst_pix_fmt == PIX_FMT_RGB555LE || | |
| 495 | − dst_pix_fmt == PIX_FMT_BGR555BE || dst_pix_fmt == PIX_FMT_BGR555LE) && | |
| 496 | − (src_pix_fmt == PIX_FMT_RGB565BE || src_pix_fmt == PIX_FMT_RGB565LE || | |
| 497 | − src_pix_fmt == PIX_FMT_BGR565BE || src_pix_fmt == PIX_FMT_BGR565LE))) | |
| 494 | + ((dst_pix_fmt == AV_PIX_FMT_RGB555BE || dst_pix_fmt == AV_PIX_FMT_RGB555LE || | |
| 495 | + dst_pix_fmt == AV_PIX_FMT_BGR555BE || dst_pix_fmt == AV_PIX_FMT_BGR555LE) && | |
| 496 | + (src_pix_fmt == AV_PIX_FMT_RGB565BE || src_pix_fmt == AV_PIX_FMT_RGB565LE || | |
| 497 | + src_pix_fmt == AV_PIX_FMT_BGR565BE || src_pix_fmt == AV_PIX_FMT_BGR565LE))) | |
| 498 | 498 | loss |= FF_LOSS_DEPTH; |
| 499 | 499 | if (dst_desc->log2_chroma_w > src_desc->log2_chroma_w || |
| 500 | 500 | dst_desc->log2_chroma_h > src_desc->log2_chroma_h) |
| @@ -536,7 +536,7 @@ int avcodec_get_pix_fmt_loss(enum PixelFormat dst_pix_fmt, enum PixelFormat src_ · 35 unmodified lines | ||
| 536 | 536 | return loss; |
| 537 | 537 | } |
| 538 | 538 | |
| 539 | −static int avg_bits_per_pixel(enum PixelFormat pix_fmt) | |
| 539 | +static int avg_bits_per_pixel(enum AVPixelFormat pix_fmt) | |
| 540 | 540 | { |
| 541 | 541 | int bits; |
| 542 | 542 | const PixFmtInfo *pf; |
| @@ -546,23 +546,23 @@ static int avg_bits_per_pixel(enum PixelFormat pix_fmt) · 3 unmodified lines | ||
| 546 | 546 | switch(pf->pixel_type) { |
| 547 | 547 | case FF_PIXEL_PACKED: |
| 548 | 548 | switch(pix_fmt) { |
| 549 | − case PIX_FMT_YUYV422: | |
| 550 | − case PIX_FMT_UYVY422: | |
| 551 | − case PIX_FMT_RGB565BE: | |
| 552 | − case PIX_FMT_RGB565LE: | |
| 553 | − case PIX_FMT_RGB555BE: | |
| 554 | − case PIX_FMT_RGB555LE: | |
| 555 | − case PIX_FMT_RGB444BE: | |
| 556 | − case PIX_FMT_RGB444LE: | |
| 557 | − case PIX_FMT_BGR565BE: | |
| 558 | − case PIX_FMT_BGR565LE: | |
| 559 | − case PIX_FMT_BGR555BE: | |
| 560 | − case PIX_FMT_BGR555LE: | |
| 561 | − case PIX_FMT_BGR444BE: | |
| 562 | − case PIX_FMT_BGR444LE: | |
| 549 | + case AV_PIX_FMT_YUYV422: | |
| 550 | + case AV_PIX_FMT_UYVY422: | |
| 551 | + case AV_PIX_FMT_RGB565BE: | |
| 552 | + case AV_PIX_FMT_RGB565LE: | |
| 553 | + case AV_PIX_FMT_RGB555BE: | |
| 554 | + case AV_PIX_FMT_RGB555LE: | |
| 555 | + case AV_PIX_FMT_RGB444BE: | |
| 556 | + case AV_PIX_FMT_RGB444LE: | |
| 557 | + case AV_PIX_FMT_BGR565BE: | |
| 558 | + case AV_PIX_FMT_BGR565LE: | |
| 559 | + case AV_PIX_FMT_BGR555BE: | |
| 560 | + case AV_PIX_FMT_BGR555LE: | |
| 561 | + case AV_PIX_FMT_BGR444BE: | |
| 562 | + case AV_PIX_FMT_BGR444LE: | |
| 563 | 563 | bits = 16; |
| 564 | 564 | break; |
| 565 | − case PIX_FMT_UYYVYY411: | |
| 565 | + case AV_PIX_FMT_UYYVYY411: | |
| 566 | 566 | bits = 12; |
| 567 | 567 | break; |
| 568 | 568 | default: |
| @@ -588,25 +588,25 @@ static int avg_bits_per_pixel(enum PixelFormat pix_fmt) · 19 unmodified lines | ||
| 588 | 588 | return bits; |
| 589 | 589 | } |
| 590 | 590 | |
| 591 | −static enum PixelFormat avcodec_find_best_pix_fmt1(enum PixelFormat *pix_fmt_list, | |
| 592 | − enum PixelFormat src_pix_fmt, | |
| 591 | +static enum AVPixelFormat avcodec_find_best_pix_fmt1(enum AVPixelFormat *pix_fmt_list, | |
| 592 | + enum AVPixelFormat src_pix_fmt, | |
| 593 | 593 | int has_alpha, |
| 594 | 594 | int loss_mask) |
| 595 | 595 | { |
| 596 | 596 | int dist, i, loss, min_dist; |
| 597 | − enum PixelFormat dst_pix_fmt; | |
| 597 | + enum AVPixelFormat dst_pix_fmt; | |
| 598 | 598 | |
| 599 | 599 | /* find exact color match with smallest size */ |
| 600 | − dst_pix_fmt = PIX_FMT_NONE; | |
| 600 | + dst_pix_fmt = AV_PIX_FMT_NONE; | |
| 601 | 601 | min_dist = 0x7fffffff; |
| 602 | 602 | i = 0; |
| 603 | − while (pix_fmt_list[i] != PIX_FMT_NONE) { | |
| 604 | − enum PixelFormat pix_fmt = pix_fmt_list[i]; | |
| 603 | + while (pix_fmt_list[i] != AV_PIX_FMT_NONE) { | |
| 604 | + enum AVPixelFormat pix_fmt = pix_fmt_list[i]; | |
| 605 | 605 | |
| 606 | − if (i > PIX_FMT_NB) { | |
| 606 | + if (i > AV_PIX_FMT_NB) { | |
| 607 | 607 | av_log(NULL, AV_LOG_ERROR, "Pixel format list longer than expected, " |
| 608 | 608 | "it is either not properly terminated or contains duplicates\n"); |
| 609 | − return PIX_FMT_NONE; | |
| 609 | + return AV_PIX_FMT_NONE; | |
| 610 | 610 | } |
| 611 | 611 | |
| 612 | 612 | loss = avcodec_get_pix_fmt_loss(pix_fmt, src_pix_fmt, has_alpha) & loss_mask; |
| @@ -623,10 +623,10 @@ static enum PixelFormat avcodec_find_best_pix_fmt1(enum PixelFormat *pix_fmt_lis · 10 unmodified lines | ||
| 623 | 623 | } |
| 624 | 624 | |
| 625 | 625 | #if FF_API_FIND_BEST_PIX_FMT |
| 626 | −enum PixelFormat avcodec_find_best_pix_fmt(int64_t pix_fmt_mask, enum PixelFormat src_pix_fmt, | |
| 626 | +enum AVPixelFormat avcodec_find_best_pix_fmt(int64_t pix_fmt_mask, enum AVPixelFormat src_pix_fmt, | |
| 627 | 627 | int has_alpha, int *loss_ptr) |
| 628 | 628 | { |
| 629 | − enum PixelFormat list[64]; | |
| 629 | + enum AVPixelFormat list[64]; | |
| 630 | 630 | int i, j = 0; |
| 631 | 631 | |
| 632 | 632 | // test only the first 64 pixel formats to avoid undefined behaviour |
| @@ -634,17 +634,17 @@ enum PixelFormat avcodec_find_best_pix_fmt(int64_t pix_fmt_mask, enum PixelForma · 1 unmodified line | ||
| 634 | 634 | if (pix_fmt_mask & (1ULL << i)) |
| 635 | 635 | list[j++] = i; |
| 636 | 636 | } |
| 637 | − list[j] = PIX_FMT_NONE; | |
| 637 | + list[j] = AV_PIX_FMT_NONE; | |
| 638 | 638 | |
| 639 | 639 | return avcodec_find_best_pix_fmt2(list, src_pix_fmt, has_alpha, loss_ptr); |
| 640 | 640 | } |
| 641 | 641 | #endif /* FF_API_FIND_BEST_PIX_FMT */ |
| 642 | 642 | |
| 643 | −enum PixelFormat avcodec_find_best_pix_fmt2(enum PixelFormat *pix_fmt_list, | |
| 644 | − enum PixelFormat src_pix_fmt, | |
| 643 | +enum AVPixelFormat avcodec_find_best_pix_fmt2(enum AVPixelFormat *pix_fmt_list, | |
| 644 | + enum AVPixelFormat src_pix_fmt, | |
| 645 | 645 | int has_alpha, int *loss_ptr) |
| 646 | 646 | { |
| 647 | − enum PixelFormat dst_pix_fmt; | |
| 647 | + enum AVPixelFormat dst_pix_fmt; | |
| 648 | 648 | int loss_mask, i; |
| 649 | 649 | static const int loss_mask_order[] = { |
| 650 | 650 | ~0, /* no loss first */ |
| @@ -667,7 +667,7 @@ enum PixelFormat avcodec_find_best_pix_fmt2(enum PixelFormat *pix_fmt_list, · 16 unmodified lines | ||
| 667 | 667 | if (loss_mask == 0) |
| 668 | 668 | break; |
| 669 | 669 | } |
| 670 | − return PIX_FMT_NONE; | |
| 670 | + return AV_PIX_FMT_NONE; | |
| 671 | 671 | found: |
| 672 | 672 | if (loss_ptr) |
| 673 | 673 | *loss_ptr = avcodec_get_pix_fmt_loss(dst_pix_fmt, src_pix_fmt, has_alpha); |
| @@ -675,7 +675,7 @@ enum PixelFormat avcodec_find_best_pix_fmt2(enum PixelFormat *pix_fmt_list, · 1 unmodified line | ||
| 675 | 675 | } |
| 676 | 676 | |
| 677 | 677 | void av_picture_copy(AVPicture *dst, const AVPicture *src, |
| 678 | − enum PixelFormat pix_fmt, int width, int height) | |
| 678 | + enum AVPixelFormat pix_fmt, int width, int height) | |
| 679 | 679 | { |
| 680 | 680 | av_image_copy(dst->data, dst->linesize, src->data, |
| 681 | 681 | src->linesize, pix_fmt, width, height); |
| @@ -769,7 +769,7 @@ void ff_shrink88(uint8_t *dst, int dst_wrap, · 87 unmodified lines | ||
| 769 | 769 | |
| 770 | 770 | |
| 771 | 771 | int avpicture_alloc(AVPicture *picture, |
| 772 | − enum PixelFormat pix_fmt, int width, int height) | |
| 772 | + enum AVPixelFormat pix_fmt, int width, int height) | |
| 773 | 773 | { |
| 774 | 774 | int ret; |
| 775 | 775 | |
| @@ -795,12 +795,12 @@ static inline int is_yuv_planar(const PixFmtInfo *ps) · 19 unmodified lines | ||
| 795 | 795 | } |
| 796 | 796 | |
| 797 | 797 | int av_picture_crop(AVPicture *dst, const AVPicture *src, |
| 798 | − enum PixelFormat pix_fmt, int top_band, int left_band) | |
| 798 | + enum AVPixelFormat pix_fmt, int top_band, int left_band) | |
| 799 | 799 | { |
| 800 | 800 | int y_shift; |
| 801 | 801 | int x_shift; |
| 802 | 802 | |
| 803 | − if (pix_fmt < 0 || pix_fmt >= PIX_FMT_NB || !is_yuv_planar(&pix_fmt_info[pix_fmt])) | |
| 803 | + if (pix_fmt < 0 || pix_fmt >= AV_PIX_FMT_NB || !is_yuv_planar(&pix_fmt_info[pix_fmt])) | |
| 804 | 804 | return -1; |
| 805 | 805 | |
| 806 | 806 | y_shift = av_pix_fmt_descriptors[pix_fmt].log2_chroma_h; |
| @@ -817,7 +817,7 @@ int av_picture_crop(AVPicture *dst, const AVPicture *src, · 10 unmodified lines | ||
| 817 | 817 | } |
| 818 | 818 | |
| 819 | 819 | int av_picture_pad(AVPicture *dst, const AVPicture *src, int height, int width, |
| 820 | − enum PixelFormat pix_fmt, int padtop, int padbottom, int padleft, int padright, | |
| 820 | + enum AVPixelFormat pix_fmt, int padtop, int padbottom, int padleft, int padright, | |
| 821 | 821 | int *color) |
| 822 | 822 | { |
| 823 | 823 | uint8_t *optr; |
| @@ -826,7 +826,7 @@ int av_picture_pad(AVPicture *dst, const AVPicture *src, int height, int width, · 2 unmodified lines | ||
| 826 | 826 | int yheight; |
| 827 | 827 | int i, y; |
| 828 | 828 | |
| 829 | − if (pix_fmt < 0 || pix_fmt >= PIX_FMT_NB || | |
| 829 | + if (pix_fmt < 0 || pix_fmt >= AV_PIX_FMT_NB || | |
| 830 | 830 | !is_yuv_planar(&pix_fmt_info[pix_fmt])) return -1; |
| 831 | 831 | |
| 832 | 832 | for (i = 0; i < 3; i++) { |
| @@ -985,17 +985,17 @@ static void deinterlace_bottom_field_inplace(uint8_t *src1, int src_wrap, · 152 unmodified lines | ||
| 985 | 985 | } |
| 986 | 986 | |
| 987 | 987 | int avpicture_deinterlace(AVPicture *dst, const AVPicture *src, |
| 988 | − enum PixelFormat pix_fmt, int width, int height) | |
| 988 | + enum AVPixelFormat pix_fmt, int width, int height) | |
| 989 | 989 | { |
| 990 | 990 | int i; |
| 991 | 991 | |
| 992 | − if (pix_fmt != PIX_FMT_YUV420P && | |
| 993 | − pix_fmt != PIX_FMT_YUVJ420P && | |
| 994 | − pix_fmt != PIX_FMT_YUV422P && | |
| 995 | − pix_fmt != PIX_FMT_YUVJ422P && | |
| 996 | − pix_fmt != PIX_FMT_YUV444P && | |
| 997 | − pix_fmt != PIX_FMT_YUV411P && | |
| 998 | − pix_fmt != PIX_FMT_GRAY8) | |
| 992 | + if (pix_fmt != AV_PIX_FMT_YUV420P && | |
| 993 | + pix_fmt != AV_PIX_FMT_YUVJ420P && | |
| 994 | + pix_fmt != AV_PIX_FMT_YUV422P && | |
| 995 | + pix_fmt != AV_PIX_FMT_YUVJ422P && | |
| 996 | + pix_fmt != AV_PIX_FMT_YUV444P && | |
| 997 | + pix_fmt != AV_PIX_FMT_YUV411P && | |
| 998 | + pix_fmt != AV_PIX_FMT_GRAY8) | |
| 999 | 999 | return -1; |
| 1000 | 1000 | if ((width & 3) != 0 || (height & 3) != 0) |
| 1001 | 1001 | return -1; |
| @@ -1003,22 +1003,22 @@ int avpicture_deinterlace(AVPicture *dst, const AVPicture *src, · 1 unmodified line | ||
| 1003 | 1003 | for(i=0;i<3;i++) { |
| 1004 | 1004 | if (i == 1) { |
| 1005 | 1005 | switch(pix_fmt) { |
| 1006 | − case PIX_FMT_YUVJ420P: | |
| 1007 | − case PIX_FMT_YUV420P: | |
| 1006 | + case AV_PIX_FMT_YUVJ420P: | |
| 1007 | + case AV_PIX_FMT_YUV420P: | |
| 1008 | 1008 | width >>= 1; |
| 1009 | 1009 | height >>= 1; |
| 1010 | 1010 | break; |
| 1011 | − case PIX_FMT_YUV422P: | |
| 1012 | − case PIX_FMT_YUVJ422P: | |
| 1011 | + case AV_PIX_FMT_YUV422P: | |
| 1012 | + case AV_PIX_FMT_YUVJ422P: | |
| 1013 | 1013 | width >>= 1; |
| 1014 | 1014 | break; |
| 1015 | − case PIX_FMT_YUV411P: | |
| 1015 | + case AV_PIX_FMT_YUV411P: | |
| 1016 | 1016 | width >>= 2; |
| 1017 | 1017 | break; |
| 1018 | 1018 | default: |
| 1019 | 1019 | break; |
| 1020 | 1020 | } |
| 1021 | − if (pix_fmt == PIX_FMT_GRAY8) { | |
| 1021 | + if (pix_fmt == AV_PIX_FMT_GRAY8) { | |
| 1022 | 1022 | break; |
| 1023 | 1023 | } |
| 1024 | 1024 | } |
| @@ -203,7 +203,7 @@ static av_cold int ir2_decode_init(AVCodecContext *avctx){ · 202 unmodified lines | ||
| 203 | 203 | |
| 204 | 204 | ic->avctx = avctx; |
| 205 | 205 | |
| 206 | − avctx->pix_fmt= PIX_FMT_YUV410P; | |
| 206 | + avctx->pix_fmt= AV_PIX_FMT_YUV410P; | |
| 207 | 207 | |
| 208 | 208 | ir2_vlc.table = vlc_tables; |
| 209 | 209 | ir2_vlc.table_allocated = 1 << CODE_VLC_BITS; |
| @@ -1009,7 +1009,7 @@ static av_cold int decode_init(AVCodecContext *avctx) · 1008 unmodified lines | ||
| 1009 | 1009 | ctx->avctx = avctx; |
| 1010 | 1010 | ctx->width = avctx->width; |
| 1011 | 1011 | ctx->height = avctx->height; |
| 1012 | − avctx->pix_fmt = PIX_FMT_YUV410P; | |
| 1012 | + avctx->pix_fmt = AV_PIX_FMT_YUV410P; | |
| 1013 | 1013 | |
| 1014 | 1014 | build_requant_tab(); |
| 1015 | 1015 | |
| @@ -586,7 +586,7 @@ static av_cold int decode_init(AVCodecContext *avctx) · 585 unmodified lines | ||
| 586 | 586 | ctx->pic_conf.pic_width = 0; |
| 587 | 587 | ctx->pic_conf.pic_height = 0; |
| 588 | 588 | |
| 589 | − avctx->pix_fmt = PIX_FMT_YUV410P; | |
| 589 | + avctx->pix_fmt = AV_PIX_FMT_YUV410P; | |
| 590 | 590 | |
| 591 | 591 | ctx->decode_pic_hdr = decode_pic_hdr; |
| 592 | 592 | ctx->decode_band_hdr = decode_band_hdr; |
| @@ -627,7 +627,7 @@ static av_cold int decode_init(AVCodecContext *avctx) · 626 unmodified lines | ||
| 627 | 627 | ctx->switch_buffers = switch_buffers; |
| 628 | 628 | ctx->is_nonnull_frame = is_nonnull_frame; |
| 629 | 629 | |
| 630 | − avctx->pix_fmt = PIX_FMT_YUV410P; | |
| 630 | + avctx->pix_fmt = AV_PIX_FMT_YUV410P; | |
| 631 | 631 | |
| 632 | 632 | return 0; |
| 633 | 633 | } |
| @@ -36,7 +36,7 @@ typedef struct InternalBuffer { · 35 unmodified lines | ||
| 36 | 36 | int linesize[AV_NUM_DATA_POINTERS]; |
| 37 | 37 | int width; |
| 38 | 38 | int height; |
| 39 | − enum PixelFormat pix_fmt; | |
| 39 | + enum AVPixelFormat pix_fmt; | |
| 40 | 40 | uint8_t **extended_data; |
| 41 | 41 | int audio_data_size; |
| 42 | 42 | int nb_channels; |
| @@ -86,7 +86,7 @@ struct AVCodecDefault { · 43 unmodified lines | ||
| 86 | 86 | /** |
| 87 | 87 | * Determine whether pix_fmt is a hardware accelerated format. |
| 88 | 88 | */ |
| 89 | −int ff_is_hwaccel_pix_fmt(enum PixelFormat pix_fmt); | |
| 89 | +int ff_is_hwaccel_pix_fmt(enum AVPixelFormat pix_fmt); | |
| 90 | 90 | |
| 91 | 91 | /** |
| 92 | 92 | * Return the hardware accelerated codec for codec codec_id and |
| @@ -96,7 +96,7 @@ int ff_is_hwaccel_pix_fmt(enum PixelFormat pix_fmt); · 3 unmodified lines | ||
| 96 | 96 | * @param pix_fmt the pixel format to match |
| 97 | 97 | * @return the hardware accelerated codec, or NULL if none was found. |
| 98 | 98 | */ |
| 99 | −AVHWAccel *ff_find_hwaccel(enum AVCodecID codec_id, enum PixelFormat pix_fmt); | |
| 99 | +AVHWAccel *ff_find_hwaccel(enum AVCodecID codec_id, enum AVPixelFormat pix_fmt); | |
| 100 | 100 | |
| 101 | 101 | /** |
| 102 | 102 | * Return the index into tab at which {a,b} match elements {[0],[1]} of tab. |
| @@ -941,7 +941,7 @@ static av_cold int ipvideo_decode_init(AVCodecContext *avctx) · 940 unmodified lines | ||
| 941 | 941 | s->avctx = avctx; |
| 942 | 942 | |
| 943 | 943 | s->is_16bpp = avctx->bits_per_coded_sample == 16; |
| 944 | − avctx->pix_fmt = s->is_16bpp ? PIX_FMT_RGB555 : PIX_FMT_PAL8; | |
| 944 | + avctx->pix_fmt = s->is_16bpp ? AV_PIX_FMT_RGB555 : AV_PIX_FMT_PAL8; | |
| 945 | 945 | |
| 946 | 946 | ff_dsputil_init(&s->dsp, avctx); |
| 947 | 947 | |
| @@ -244,7 +244,7 @@ static int encode_picture_ls(AVCodecContext *avctx, AVPacket *pkt, · 243 unmodified lines | ||
| 244 | 244 | p->pict_type= AV_PICTURE_TYPE_I; |
| 245 | 245 | p->key_frame= 1; |
| 246 | 246 | |
| 247 | − if(avctx->pix_fmt == PIX_FMT_GRAY8 || avctx->pix_fmt == PIX_FMT_GRAY16) | |
| 247 | + if(avctx->pix_fmt == AV_PIX_FMT_GRAY8 || avctx->pix_fmt == AV_PIX_FMT_GRAY16) | |
| 248 | 248 | comps = 1; |
| 249 | 249 | else |
| 250 | 250 | comps = 3; |
| @@ -264,7 +264,7 @@ static int encode_picture_ls(AVCodecContext *avctx, AVPacket *pkt, · 13 unmodified lines | ||
| 264 | 264 | put_marker(&pb, SOI); |
| 265 | 265 | put_marker(&pb, SOF48); |
| 266 | 266 | put_bits(&pb, 16, 8 + comps * 3); // header size depends on components |
| 267 | − put_bits(&pb, 8, (avctx->pix_fmt == PIX_FMT_GRAY16) ? 16 : 8); // bpp | |
| 267 | + put_bits(&pb, 8, (avctx->pix_fmt == AV_PIX_FMT_GRAY16) ? 16 : 8); // bpp | |
| 268 | 268 | put_bits(&pb, 16, avctx->height); |
| 269 | 269 | put_bits(&pb, 16, avctx->width); |
| 270 | 270 | put_bits(&pb, 8, comps); // components |
| @@ -288,7 +288,7 @@ static int encode_picture_ls(AVCodecContext *avctx, AVPacket *pkt, · 17 unmodified lines | ||
| 288 | 288 | state = av_mallocz(sizeof(JLSState)); |
| 289 | 289 | /* initialize JPEG-LS state from JPEG parameters */ |
| 290 | 290 | state->near = near; |
| 291 | − state->bpp = (avctx->pix_fmt == PIX_FMT_GRAY16) ? 16 : 8; | |
| 291 | + state->bpp = (avctx->pix_fmt == AV_PIX_FMT_GRAY16) ? 16 : 8; | |
| 292 | 292 | ff_jpegls_reset_coding_parameters(state, 0); |
| 293 | 293 | ff_jpegls_init_state(state); |
| 294 | 294 | |
| @@ -297,7 +297,7 @@ static int encode_picture_ls(AVCodecContext *avctx, AVPacket *pkt, · 2 unmodified lines | ||
| 297 | 297 | zero = av_mallocz(p->linesize[0]); |
| 298 | 298 | last = zero; |
| 299 | 299 | cur = p->data[0]; |
| 300 | − if(avctx->pix_fmt == PIX_FMT_GRAY8){ | |
| 300 | + if(avctx->pix_fmt == AV_PIX_FMT_GRAY8){ | |
| 301 | 301 | int t = 0; |
| 302 | 302 | |
| 303 | 303 | for(i = 0; i < avctx->height; i++) { |
| @@ -306,7 +306,7 @@ static int encode_picture_ls(AVCodecContext *avctx, AVPacket *pkt, · 2 unmodified lines | ||
| 306 | 306 | last = cur; |
| 307 | 307 | cur += p->linesize[0]; |
| 308 | 308 | } |
| 309 | − }else if(avctx->pix_fmt == PIX_FMT_GRAY16){ | |
| 309 | + }else if(avctx->pix_fmt == AV_PIX_FMT_GRAY16){ | |
| 310 | 310 | int t = 0; |
| 311 | 311 | |
| 312 | 312 | for(i = 0; i < avctx->height; i++) { |
| @@ -315,7 +315,7 @@ static int encode_picture_ls(AVCodecContext *avctx, AVPacket *pkt, · 2 unmodified lines | ||
| 315 | 315 | last = cur; |
| 316 | 316 | cur += p->linesize[0]; |
| 317 | 317 | } |
| 318 | − }else if(avctx->pix_fmt == PIX_FMT_RGB24){ | |
| 318 | + }else if(avctx->pix_fmt == AV_PIX_FMT_RGB24){ | |
| 319 | 319 | int j, width; |
| 320 | 320 | int Rc[3] = {0, 0, 0}; |
| 321 | 321 | |
| @@ -328,7 +328,7 @@ static int encode_picture_ls(AVCodecContext *avctx, AVPacket *pkt, · 6 unmodified lines | ||
| 328 | 328 | last = cur; |
| 329 | 329 | cur += s->picture.linesize[0]; |
| 330 | 330 | } |
| 331 | − }else if(avctx->pix_fmt == PIX_FMT_BGR24){ | |
| 331 | + }else if(avctx->pix_fmt == AV_PIX_FMT_BGR24){ | |
| 332 | 332 | int j, width; |
| 333 | 333 | int Rc[3] = {0, 0, 0}; |
| 334 | 334 | |
| @@ -385,7 +385,7 @@ static av_cold int encode_init_ls(AVCodecContext *ctx) { · 50 unmodified lines | ||
| 385 | 385 | c->avctx = ctx; |
| 386 | 386 | ctx->coded_frame = &c->picture; |
| 387 | 387 | |
| 388 | − if(ctx->pix_fmt != PIX_FMT_GRAY8 && ctx->pix_fmt != PIX_FMT_GRAY16 && ctx->pix_fmt != PIX_FMT_RGB24 && ctx->pix_fmt != PIX_FMT_BGR24){ | |
| 388 | + if(ctx->pix_fmt != AV_PIX_FMT_GRAY8 && ctx->pix_fmt != AV_PIX_FMT_GRAY16 && ctx->pix_fmt != AV_PIX_FMT_RGB24 && ctx->pix_fmt != AV_PIX_FMT_BGR24){ | |
| 389 | 389 | av_log(ctx, AV_LOG_ERROR, "Only grayscale and RGB24/BGR24 images are supported\n"); |
| 390 | 390 | return -1; |
| 391 | 391 | } |
| @@ -399,9 +399,9 @@ AVCodec ff_jpegls_encoder = { //FIXME avoid MPV_* lossless JPEG should not need · 7 unmodified lines | ||
| 399 | 399 | .priv_data_size = sizeof(JpeglsContext), |
| 400 | 400 | .init = encode_init_ls, |
| 401 | 401 | .encode2 = encode_picture_ls, |
| 402 | − .pix_fmts = (const enum PixelFormat[]){ | |
| 403 | − PIX_FMT_BGR24, PIX_FMT_RGB24, PIX_FMT_GRAY8, PIX_FMT_GRAY16, | |
| 404 | − PIX_FMT_NONE | |
| 402 | + .pix_fmts = (const enum AVPixelFormat[]){ | |
| 403 | + AV_PIX_FMT_BGR24, AV_PIX_FMT_RGB24, AV_PIX_FMT_GRAY8, AV_PIX_FMT_GRAY16, | |
| 404 | + AV_PIX_FMT_NONE | |
| 405 | 405 | }, |
| 406 | 406 | .long_name = NULL_IF_CONFIG_SMALL("JPEG-LS"), |
| 407 | 407 | }; |
| @@ -40,7 +40,7 @@ typedef struct JvContext { · 39 unmodified lines | ||
| 40 | 40 | static av_cold int decode_init(AVCodecContext *avctx) |
| 41 | 41 | { |
| 42 | 42 | JvContext *s = avctx->priv_data; |
| 43 | − avctx->pix_fmt = PIX_FMT_PAL8; | |
| 43 | + avctx->pix_fmt = AV_PIX_FMT_PAL8; | |
| 44 | 44 | ff_dsputil_init(&s->dsp, avctx); |
| 45 | 45 | return 0; |
| 46 | 46 | } |
| @@ -169,7 +169,7 @@ static av_cold int decode_init(AVCodecContext *avctx) · 168 unmodified lines | ||
| 169 | 169 | KgvContext * const c = avctx->priv_data; |
| 170 | 170 | |
| 171 | 171 | c->avctx = avctx; |
| 172 | − avctx->pix_fmt = PIX_FMT_RGB555; | |
| 172 | + avctx->pix_fmt = AV_PIX_FMT_RGB555; | |
| 173 | 173 | avctx->flags |= CODEC_FLAG_EMU_EDGE; |
| 174 | 174 | |
| 175 | 175 | return 0; |
| @@ -397,7 +397,7 @@ static av_cold int decode_init(AVCodecContext * avctx) · 396 unmodified lines | ||
| 397 | 397 | c->setpal = 1; |
| 398 | 398 | } |
| 399 | 399 | |
| 400 | − avctx->pix_fmt = PIX_FMT_PAL8; | |
| 400 | + avctx->pix_fmt = AV_PIX_FMT_PAL8; | |
| 401 | 401 | |
| 402 | 402 | return 0; |
| 403 | 403 | } |
| @@ -259,7 +259,7 @@ static void lag_pred_line(LagarithContext *l, uint8_t *buf, · 258 unmodified lines | ||
| 259 | 259 | if (line == 1) { |
| 260 | 260 | /* Second line, left predict first pixel, the rest of the line is median predicted |
| 261 | 261 | * NOTE: In the case of RGB this pixel is top predicted */ |
| 262 | − TL = l->avctx->pix_fmt == PIX_FMT_YUV420P ? buf[-stride] : L; | |
| 262 | + TL = l->avctx->pix_fmt == AV_PIX_FMT_YUV420P ? buf[-stride] : L; | |
| 263 | 263 | } else { |
| 264 | 264 | /* Top left is 2 rows back, last pixel */ |
| 265 | 265 | TL = buf[width - (2 * stride) - 1]; |
| @@ -472,7 +472,7 @@ static int lag_decode_arith_plane(LagarithContext *l, uint8_t *dst, · 206 unmodified lines | ||
| 472 | 472 | return -1; |
| 473 | 473 | } |
| 474 | 474 | |
| 475 | − if (l->avctx->pix_fmt != PIX_FMT_YUV422P) { | |
| 475 | + if (l->avctx->pix_fmt != AV_PIX_FMT_YUV422P) { | |
| 476 | 476 | for (i = 0; i < height; i++) { |
| 477 | 477 | lag_pred_line(l, dst, width, stride, i); |
| 478 | 478 | dst += stride; |
| @@ -524,7 +524,7 @@ static int lag_decode_frame(AVCodecContext *avctx, · 45 unmodified lines | ||
| 524 | 524 | |
| 525 | 525 | switch (frametype) { |
| 526 | 526 | case FRAME_SOLID_RGBA: |
| 527 | − avctx->pix_fmt = PIX_FMT_RGB32; | |
| 527 | + avctx->pix_fmt = AV_PIX_FMT_RGB32; | |
| 528 | 528 | |
| 529 | 529 | if (ff_thread_get_buffer(avctx, p) < 0) { |
| 530 | 530 | av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n"); |
| @@ -539,14 +539,14 @@ static int lag_decode_frame(AVCodecContext *avctx, · 8 unmodified lines | ||
| 539 | 539 | } |
| 540 | 540 | break; |
| 541 | 541 | case FRAME_ARITH_RGBA: |
| 542 | − avctx->pix_fmt = PIX_FMT_RGB32; | |
| 542 | + avctx->pix_fmt = AV_PIX_FMT_RGB32; | |
| 543 | 543 | planes = 4; |
| 544 | 544 | offset_ry += 4; |
| 545 | 545 | offs[3] = AV_RL32(buf + 9); |
| 546 | 546 | case FRAME_ARITH_RGB24: |
| 547 | 547 | case FRAME_U_RGB24: |
| 548 | 548 | if (frametype == FRAME_ARITH_RGB24 || frametype == FRAME_U_RGB24) |
| 549 | − avctx->pix_fmt = PIX_FMT_RGB24; | |
| 549 | + avctx->pix_fmt = AV_PIX_FMT_RGB24; | |
| 550 | 550 | |
| 551 | 551 | if (ff_thread_get_buffer(avctx, p) < 0) { |
| 552 | 552 | av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n"); |
| @@ -606,7 +606,7 @@ static int lag_decode_frame(AVCodecContext *avctx, · 53 unmodified lines | ||
| 606 | 606 | } |
| 607 | 607 | break; |
| 608 | 608 | case FRAME_ARITH_YUY2: |
| 609 | − avctx->pix_fmt = PIX_FMT_YUV422P; | |
| 609 | + avctx->pix_fmt = AV_PIX_FMT_YUV422P; | |
| 610 | 610 | |
| 611 | 611 | if (ff_thread_get_buffer(avctx, p) < 0) { |
| 612 | 612 | av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n"); |
| @@ -632,7 +632,7 @@ static int lag_decode_frame(AVCodecContext *avctx, · 19 unmodified lines | ||
| 632 | 632 | buf + offset_bv, buf_size - offset_bv); |
| 633 | 633 | break; |
| 634 | 634 | case FRAME_ARITH_YV12: |
| 635 | − avctx->pix_fmt = PIX_FMT_YUV420P; | |
| 635 | + avctx->pix_fmt = AV_PIX_FMT_YUV420P; | |
| 636 | 636 | |
| 637 | 637 | if (ff_thread_get_buffer(avctx, p) < 0) { |
| 638 | 638 | av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n"); |
| @@ -495,37 +495,37 @@ static av_cold int decode_init(AVCodecContext *avctx) · 494 unmodified lines | ||
| 495 | 495 | case IMGTYPE_YUV111: |
| 496 | 496 | c->decomp_size = basesize * 3; |
| 497 | 497 | max_decomp_size = max_basesize * 3; |
| 498 | − avctx->pix_fmt = PIX_FMT_YUV444P; | |
| 498 | + avctx->pix_fmt = AV_PIX_FMT_YUV444P; | |
| 499 | 499 | av_log(avctx, AV_LOG_DEBUG, "Image type is YUV 1:1:1.\n"); |
| 500 | 500 | break; |
| 501 | 501 | case IMGTYPE_YUV422: |
| 502 | 502 | c->decomp_size = basesize * 2; |
| 503 | 503 | max_decomp_size = max_basesize * 2; |
| 504 | − avctx->pix_fmt = PIX_FMT_YUV422P; | |
| 504 | + avctx->pix_fmt = AV_PIX_FMT_YUV422P; | |
| 505 | 505 | av_log(avctx, AV_LOG_DEBUG, "Image type is YUV 4:2:2.\n"); |
| 506 | 506 | break; |
| 507 | 507 | case IMGTYPE_RGB24: |
| 508 | 508 | c->decomp_size = basesize * 3; |
| 509 | 509 | max_decomp_size = max_basesize * 3; |
| 510 | − avctx->pix_fmt = PIX_FMT_BGR24; | |
| 510 | + avctx->pix_fmt = AV_PIX_FMT_BGR24; | |
| 511 | 511 | av_log(avctx, AV_LOG_DEBUG, "Image type is RGB 24.\n"); |
| 512 | 512 | break; |
| 513 | 513 | case IMGTYPE_YUV411: |
| 514 | 514 | c->decomp_size = basesize / 2 * 3; |
| 515 | 515 | max_decomp_size = max_basesize / 2 * 3; |
| 516 | − avctx->pix_fmt = PIX_FMT_YUV411P; | |
| 516 | + avctx->pix_fmt = AV_PIX_FMT_YUV411P; | |
| 517 | 517 | av_log(avctx, AV_LOG_DEBUG, "Image type is YUV 4:1:1.\n"); |
| 518 | 518 | break; |
| 519 | 519 | case IMGTYPE_YUV211: |
| 520 | 520 | c->decomp_size = basesize * 2; |
| 521 | 521 | max_decomp_size = max_basesize * 2; |
| 522 | − avctx->pix_fmt = PIX_FMT_YUV422P; | |
| 522 | + avctx->pix_fmt = AV_PIX_FMT_YUV422P; | |
| 523 | 523 | av_log(avctx, AV_LOG_DEBUG, "Image type is YUV 2:1:1.\n"); |
| 524 | 524 | break; |
| 525 | 525 | case IMGTYPE_YUV420: |
| 526 | 526 | c->decomp_size = basesize / 2 * 3; |
| 527 | 527 | max_decomp_size = max_basesize / 2 * 3; |
| 528 | − avctx->pix_fmt = PIX_FMT_YUV420P; | |
| 528 | + avctx->pix_fmt = AV_PIX_FMT_YUV420P; | |
| 529 | 529 | av_log(avctx, AV_LOG_DEBUG, "Image type is YUV 4:2:0.\n"); |
| 530 | 530 | break; |
| 531 | 531 | default: |
| @@ -89,7 +89,7 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt, · 88 unmodified lines | ||
| 89 | 89 | p->pict_type= AV_PICTURE_TYPE_I; |
| 90 | 90 | p->key_frame= 1; |
| 91 | 91 | |
| 92 | − if(avctx->pix_fmt != PIX_FMT_BGR24){ | |
| 92 | + if(avctx->pix_fmt != AV_PIX_FMT_BGR24){ | |
| 93 | 93 | av_log(avctx, AV_LOG_ERROR, "Format not supported!\n"); |
| 94 | 94 | return -1; |
| 95 | 95 | } |
| @@ -192,6 +192,6 @@ AVCodec ff_zlib_encoder = { · 96 unmodified lines | ||
| 192 | 192 | .init = encode_init, |
| 193 | 193 | .encode2 = encode_frame, |
| 194 | 194 | .close = encode_end, |
| 195 | − .pix_fmts = (const enum PixelFormat[]) { PIX_FMT_BGR24, PIX_FMT_NONE }, | |
| 195 | + .pix_fmts = (const enum AVPixelFormat[]) { AV_PIX_FMT_BGR24, AV_PIX_FMT_NONE }, | |
| 196 | 196 | .long_name = NULL_IF_CONFIG_SMALL("LCL (LossLess Codec Library) ZLIB"), |
| 197 | 197 | }; |
| @@ -40,27 +40,27 @@ · 39 unmodified lines | ||
| 40 | 40 | |
| 41 | 41 | // pix_fmts with lower bpp have to be listed before |
| 42 | 42 | // similar pix_fmts with higher bpp. |
| 43 | −#define RGB_PIXEL_FORMATS PIX_FMT_RGB24, PIX_FMT_RGBA, \ | |
| 44 | − PIX_FMT_RGB48 | |
| 45 | − | |
| 46 | −#define GRAY_PIXEL_FORMATS PIX_FMT_GRAY8, PIX_FMT_Y400A, \ | |
| 47 | − PIX_FMT_GRAY16 | |
| 48 | − | |
| 49 | −#define YUV_PIXEL_FORMATS PIX_FMT_YUV410P, PIX_FMT_YUV411P, \ | |
| 50 | − PIX_FMT_YUVA420P, \ | |
| 51 | − PIX_FMT_YUV420P, PIX_FMT_YUV422P, \ | |
| 52 | − PIX_FMT_YUV440P, PIX_FMT_YUV444P, \ | |
| 53 | − PIX_FMT_YUV420P9, PIX_FMT_YUV422P9, \ | |
| 54 | − PIX_FMT_YUV444P9, \ | |
| 55 | − PIX_FMT_YUV420P10, PIX_FMT_YUV422P10, \ | |
| 56 | − PIX_FMT_YUV444P10, \ | |
| 57 | − PIX_FMT_YUV420P16, PIX_FMT_YUV422P16, \ | |
| 58 | − PIX_FMT_YUV444P16 | |
| 59 | − | |
| 60 | −static const enum PixelFormat rgb_pix_fmts[] = {RGB_PIXEL_FORMATS}; | |
| 61 | −static const enum PixelFormat gray_pix_fmts[] = {GRAY_PIXEL_FORMATS}; | |
| 62 | −static const enum PixelFormat yuv_pix_fmts[] = {YUV_PIXEL_FORMATS}; | |
| 63 | −static const enum PixelFormat any_pix_fmts[] = {RGB_PIXEL_FORMATS, | |
| 43 | +#define RGB_PIXEL_FORMATS AV_PIX_FMT_RGB24, AV_PIX_FMT_RGBA, \ | |
| 44 | + AV_PIX_FMT_RGB48 | |
| 45 | + | |
| 46 | +#define GRAY_PIXEL_FORMATS AV_PIX_FMT_GRAY8, AV_PIX_FMT_Y400A, \ | |
| 47 | + AV_PIX_FMT_GRAY16 | |
| 48 | + | |
| 49 | +#define YUV_PIXEL_FORMATS AV_PIX_FMT_YUV410P, AV_PIX_FMT_YUV411P, \ | |
| 50 | + AV_PIX_FMT_YUVA420P, \ | |
| 51 | + AV_PIX_FMT_YUV420P, AV_PIX_FMT_YUV422P, \ | |
| 52 | + AV_PIX_FMT_YUV440P, AV_PIX_FMT_YUV444P, \ | |
| 53 | + AV_PIX_FMT_YUV420P9, AV_PIX_FMT_YUV422P9, \ | |
| 54 | + AV_PIX_FMT_YUV444P9, \ | |
| 55 | + AV_PIX_FMT_YUV420P10, AV_PIX_FMT_YUV422P10, \ | |
| 56 | + AV_PIX_FMT_YUV444P10, \ | |
| 57 | + AV_PIX_FMT_YUV420P16, AV_PIX_FMT_YUV422P16, \ | |
| 58 | + AV_PIX_FMT_YUV444P16 | |
| 59 | + | |
| 60 | +static const enum AVPixelFormat rgb_pix_fmts[] = {RGB_PIXEL_FORMATS}; | |
| 61 | +static const enum AVPixelFormat gray_pix_fmts[] = {GRAY_PIXEL_FORMATS}; | |
| 62 | +static const enum AVPixelFormat yuv_pix_fmts[] = {YUV_PIXEL_FORMATS}; | |
| 63 | +static const enum AVPixelFormat any_pix_fmts[] = {RGB_PIXEL_FORMATS, | |
| 64 | 64 | GRAY_PIXEL_FORMATS, |
| 65 | 65 | YUV_PIXEL_FORMATS}; |
| 66 | 66 | |
| @@ -73,7 +73,7 @@ typedef struct { · 6 unmodified lines | ||
| 73 | 73 | } LibOpenJPEGContext; |
| 74 | 74 | |
| 75 | 75 | static int libopenjpeg_matches_pix_fmt(const opj_image_t *img, |
| 76 | − enum PixelFormat pix_fmt) | |
| 76 | + enum AVPixelFormat pix_fmt) | |
| 77 | 77 | { |
| 78 | 78 | AVPixFmtDescriptor des = av_pix_fmt_descriptors[pix_fmt]; |
| 79 | 79 | int match = 1; |
| @@ -110,10 +110,10 @@ static int libopenjpeg_matches_pix_fmt(const opj_image_t *img, · 30 unmodified lines | ||
| 110 | 110 | return match; |
| 111 | 111 | } |
| 112 | 112 | |
| 113 | −static enum PixelFormat libopenjpeg_guess_pix_fmt(const opj_image_t *image) | |
| 113 | +static enum AVPixelFormat libopenjpeg_guess_pix_fmt(const opj_image_t *image) | |
| 114 | 114 | { |
| 115 | 115 | int index; |
| 116 | − const enum PixelFormat *possible_fmts = NULL; | |
| 116 | + const enum AVPixelFormat *possible_fmts = NULL; | |
| 117 | 117 | int possible_fmts_nb = 0; |
| 118 | 118 | |
| 119 | 119 | switch (image->color_space) { |
| @@ -141,14 +141,14 @@ static enum PixelFormat libopenjpeg_guess_pix_fmt(const opj_image_t *image) · 21 unmodified lines | ||
| 141 | 141 | } |
| 142 | 142 | } |
| 143 | 143 | |
| 144 | − return PIX_FMT_NONE; | |
| 144 | + return AV_PIX_FMT_NONE; | |
| 145 | 145 | } |
| 146 | 146 | |
| 147 | −static inline int libopenjpeg_ispacked(enum PixelFormat pix_fmt) | |
| 147 | +static inline int libopenjpeg_ispacked(enum AVPixelFormat pix_fmt) | |
| 148 | 148 | { |
| 149 | 149 | int i, component_plane; |
| 150 | 150 | |
| 151 | − if (pix_fmt == PIX_FMT_GRAY16) | |
| 151 | + if (pix_fmt == AV_PIX_FMT_GRAY16) | |
| 152 | 152 | return 0; |
| 153 | 153 | |
| 154 | 154 | component_plane = av_pix_fmt_descriptors[pix_fmt].comp[0].plane; |
| @@ -328,14 +328,14 @@ static int libopenjpeg_decode_frame(AVCodecContext *avctx, · 173 unmodified lines | ||
| 328 | 328 | |
| 329 | 329 | avcodec_set_dimensions(avctx, width, height); |
| 330 | 330 | |
| 331 | − if (avctx->pix_fmt != PIX_FMT_NONE) | |
| 331 | + if (avctx->pix_fmt != AV_PIX_FMT_NONE) | |
| 332 | 332 | if (!libopenjpeg_matches_pix_fmt(image, avctx->pix_fmt)) |
| 333 | − avctx->pix_fmt = PIX_FMT_NONE; | |
| 333 | + avctx->pix_fmt = AV_PIX_FMT_NONE; | |
| 334 | 334 | |
| 335 | − if (avctx->pix_fmt == PIX_FMT_NONE) | |
| 335 | + if (avctx->pix_fmt == AV_PIX_FMT_NONE) | |
| 336 | 336 | avctx->pix_fmt = libopenjpeg_guess_pix_fmt(image); |
| 337 | 337 | |
| 338 | − if (avctx->pix_fmt == PIX_FMT_NONE) { | |
| 338 | + if (avctx->pix_fmt == AV_PIX_FMT_NONE) { | |
| 339 | 339 | av_log(avctx, AV_LOG_ERROR, "Unable to determine pixel format\n"); |
| 340 | 340 | ret = AVERROR_INVALIDDATA; |
| 341 | 341 | goto done; |
| @@ -87,32 +87,32 @@ static opj_image_t *libopenjpeg_create_image(AVCodecContext *avctx, · 86 unmodified lines | ||
| 87 | 87 | sub_dy[2] = 1 << av_pix_fmt_descriptors[avctx->pix_fmt].log2_chroma_h; |
| 88 | 88 | |
| 89 | 89 | switch (avctx->pix_fmt) { |
| 90 | − case PIX_FMT_GRAY8: | |
| 91 | − case PIX_FMT_GRAY16: | |
| 92 | − case PIX_FMT_Y400A: | |
| 90 | + case AV_PIX_FMT_GRAY8: | |
| 91 | + case AV_PIX_FMT_GRAY16: | |
| 92 | + case AV_PIX_FMT_Y400A: | |
| 93 | 93 | color_space = CLRSPC_GRAY; |
| 94 | 94 | break; |
| 95 | − case PIX_FMT_RGB24: | |
| 96 | − case PIX_FMT_RGBA: | |
| 97 | − case PIX_FMT_RGB48: | |
| 95 | + case AV_PIX_FMT_RGB24: | |
| 96 | + case AV_PIX_FMT_RGBA: | |
| 97 | + case AV_PIX_FMT_RGB48: | |
| 98 | 98 | color_space = CLRSPC_SRGB; |
| 99 | 99 | break; |
| 100 | − case PIX_FMT_YUV410P: | |
| 101 | − case PIX_FMT_YUV411P: | |
| 102 | − case PIX_FMT_YUV420P: | |
| 103 | − case PIX_FMT_YUV422P: | |
| 104 | − case PIX_FMT_YUV440P: | |
| 105 | − case PIX_FMT_YUV444P: | |
| 106 | − case PIX_FMT_YUVA420P: | |
| 107 | − case PIX_FMT_YUV420P9: | |
| 108 | − case PIX_FMT_YUV422P9: | |
| 109 | − case PIX_FMT_YUV444P9: | |
| 110 | − case PIX_FMT_YUV420P10: | |
| 111 | − case PIX_FMT_YUV422P10: | |
| 112 | − case PIX_FMT_YUV444P10: | |
| 113 | − case PIX_FMT_YUV420P16: | |
| 114 | − case PIX_FMT_YUV422P16: | |
| 115 | − case PIX_FMT_YUV444P16: | |
| 100 | + case AV_PIX_FMT_YUV410P: | |
| 101 | + case AV_PIX_FMT_YUV411P: | |
| 102 | + case AV_PIX_FMT_YUV420P: | |
| 103 | + case AV_PIX_FMT_YUV422P: | |
| 104 | + case AV_PIX_FMT_YUV440P: | |
| 105 | + case AV_PIX_FMT_YUV444P: | |
| 106 | + case AV_PIX_FMT_YUVA420P: | |
| 107 | + case AV_PIX_FMT_YUV420P9: | |
| 108 | + case AV_PIX_FMT_YUV422P9: | |
| 109 | + case AV_PIX_FMT_YUV444P9: | |
| 110 | + case AV_PIX_FMT_YUV420P10: | |
| 111 | + case AV_PIX_FMT_YUV422P10: | |
| 112 | + case AV_PIX_FMT_YUV444P10: | |
| 113 | + case AV_PIX_FMT_YUV420P16: | |
| 114 | + case AV_PIX_FMT_YUV422P16: | |
| 115 | + case AV_PIX_FMT_YUV444P16: | |
| 116 | 116 | color_space = CLRSPC_SYCC; |
| 117 | 117 | break; |
| 118 | 118 | default: |
| @@ -302,34 +302,34 @@ static int libopenjpeg_encode_frame(AVCodecContext *avctx, AVPacket *pkt, · 183 unmodified lines | ||
| 302 | 302 | image->y1 = (avctx->height - 1) * ctx->enc_params.subsampling_dy + 1; |
| 303 | 303 | |
| 304 | 304 | switch (avctx->pix_fmt) { |
| 305 | − case PIX_FMT_RGB24: | |
| 306 | − case PIX_FMT_RGBA: | |
| 307 | − case PIX_FMT_Y400A: | |
| 305 | + case AV_PIX_FMT_RGB24: | |
| 306 | + case AV_PIX_FMT_RGBA: | |
| 307 | + case AV_PIX_FMT_Y400A: | |
| 308 | 308 | libopenjpeg_copy_packed8(avctx, frame, image); |
| 309 | 309 | break; |
| 310 | − case PIX_FMT_RGB48: | |
| 310 | + case AV_PIX_FMT_RGB48: | |
| 311 | 311 | libopenjpeg_copy_packed16(avctx, frame, image); |
| 312 | 312 | break; |
| 313 | − case PIX_FMT_GRAY8: | |
| 314 | − case PIX_FMT_YUV410P: | |
| 315 | − case PIX_FMT_YUV411P: | |
| 316 | − case PIX_FMT_YUV420P: | |
| 317 | − case PIX_FMT_YUV422P: | |
| 318 | − case PIX_FMT_YUV440P: | |
| 319 | − case PIX_FMT_YUV444P: | |
| 320 | − case PIX_FMT_YUVA420P: | |
| 313 | + case AV_PIX_FMT_GRAY8: | |
| 314 | + case AV_PIX_FMT_YUV410P: | |
| 315 | + case AV_PIX_FMT_YUV411P: | |
| 316 | + case AV_PIX_FMT_YUV420P: | |
| 317 | + case AV_PIX_FMT_YUV422P: | |
| 318 | + case AV_PIX_FMT_YUV440P: | |
| 319 | + case AV_PIX_FMT_YUV444P: | |
| 320 | + case AV_PIX_FMT_YUVA420P: | |
| 321 | 321 | libopenjpeg_copy_unpacked8(avctx, frame, image); |
| 322 | 322 | break; |
| 323 | − case PIX_FMT_GRAY16: | |
| 324 | − case PIX_FMT_YUV420P9: | |
| 325 | − case PIX_FMT_YUV422P9: | |
| 326 | − case PIX_FMT_YUV444P9: | |
| 327 | − case PIX_FMT_YUV444P10: | |
| 328 | − case PIX_FMT_YUV422P10: | |
| 329 | − case PIX_FMT_YUV420P10: | |
| 330 | − case PIX_FMT_YUV444P16: | |
| 331 | − case PIX_FMT_YUV422P16: | |
| 332 | − case PIX_FMT_YUV420P16: | |
| 323 | + case AV_PIX_FMT_GRAY16: | |
| 324 | + case AV_PIX_FMT_YUV420P9: | |
| 325 | + case AV_PIX_FMT_YUV422P9: | |
| 326 | + case AV_PIX_FMT_YUV444P9: | |
| 327 | + case AV_PIX_FMT_YUV444P10: | |
| 328 | + case AV_PIX_FMT_YUV422P10: | |
| 329 | + case AV_PIX_FMT_YUV420P10: | |
| 330 | + case AV_PIX_FMT_YUV444P16: | |
| 331 | + case AV_PIX_FMT_YUV422P16: | |
| 332 | + case AV_PIX_FMT_YUV420P16: | |
| 333 | 333 | libopenjpeg_copy_unpacked16(avctx, frame, image); |
| 334 | 334 | break; |
| 335 | 335 | default: |
| @@ -421,16 +421,16 @@ AVCodec ff_libopenjpeg_encoder = { · 85 unmodified lines | ||
| 421 | 421 | .encode2 = libopenjpeg_encode_frame, |
| 422 | 422 | .close = libopenjpeg_encode_close, |
| 423 | 423 | .capabilities = 0, |
| 424 | − .pix_fmts = (const enum PixelFormat[]) { | |
| 425 | − PIX_FMT_RGB24, PIX_FMT_RGBA, PIX_FMT_RGB48, | |
| 426 | − PIX_FMT_GRAY8, PIX_FMT_GRAY16, PIX_FMT_Y400A, | |
| 427 | − PIX_FMT_YUV420P, PIX_FMT_YUV422P, PIX_FMT_YUVA420P, | |
| 428 | − PIX_FMT_YUV440P, PIX_FMT_YUV444P, | |
| 429 | − PIX_FMT_YUV411P, PIX_FMT_YUV410P, | |
| 430 | − PIX_FMT_YUV420P9, PIX_FMT_YUV422P9, PIX_FMT_YUV444P9, | |
| 431 | − PIX_FMT_YUV420P10, PIX_FMT_YUV422P10, PIX_FMT_YUV444P10, | |
| 432 | − PIX_FMT_YUV420P16, PIX_FMT_YUV422P16, PIX_FMT_YUV444P16, | |
| 433 | − PIX_FMT_NONE | |
| 424 | + .pix_fmts = (const enum AVPixelFormat[]) { | |
| 425 | + AV_PIX_FMT_RGB24, AV_PIX_FMT_RGBA, AV_PIX_FMT_RGB48, | |
| 426 | + AV_PIX_FMT_GRAY8, AV_PIX_FMT_GRAY16, AV_PIX_FMT_Y400A, | |
| 427 | + AV_PIX_FMT_YUV420P, AV_PIX_FMT_YUV422P, AV_PIX_FMT_YUVA420P, | |
| 428 | + AV_PIX_FMT_YUV440P, AV_PIX_FMT_YUV444P, | |
| 429 | + AV_PIX_FMT_YUV411P, AV_PIX_FMT_YUV410P, | |
| 430 | + AV_PIX_FMT_YUV420P9, AV_PIX_FMT_YUV422P9, AV_PIX_FMT_YUV444P9, | |
| 431 | + AV_PIX_FMT_YUV420P10, AV_PIX_FMT_YUV422P10, AV_PIX_FMT_YUV444P10, | |
| 432 | + AV_PIX_FMT_YUV420P16, AV_PIX_FMT_YUV422P16, AV_PIX_FMT_YUV444P16, | |
| 433 | + AV_PIX_FMT_NONE | |
| 434 | 434 | }, |
| 435 | 435 | .long_name = NULL_IF_CONFIG_SMALL("OpenJPEG JPEG 2000"), |
| 436 | 436 | .priv_class = &class, |
| @@ -101,13 +101,13 @@ void *ff_schro_queue_pop(FFSchroQueue *queue); · 100 unmodified lines | ||
| 101 | 101 | void ff_schro_queue_free(FFSchroQueue *queue, void (*free_func)(void *)); |
| 102 | 102 | |
| 103 | 103 | static const struct { |
| 104 | − enum PixelFormat ff_pix_fmt; | |
| 104 | + enum AVPixelFormat ff_pix_fmt; | |
| 105 | 105 | SchroChromaFormat schro_pix_fmt; |
| 106 | 106 | SchroFrameFormat schro_frame_fmt; |
| 107 | 107 | } schro_pixel_format_map[] = { |
| 108 | − { PIX_FMT_YUV420P, SCHRO_CHROMA_420, SCHRO_FRAME_FORMAT_U8_420 }, | |
| 109 | − { PIX_FMT_YUV422P, SCHRO_CHROMA_422, SCHRO_FRAME_FORMAT_U8_422 }, | |
| 110 | − { PIX_FMT_YUV444P, SCHRO_CHROMA_444, SCHRO_FRAME_FORMAT_U8_444 }, | |
| 108 | + { AV_PIX_FMT_YUV420P, SCHRO_CHROMA_420, SCHRO_FRAME_FORMAT_U8_420 }, | |
| 109 | + { AV_PIX_FMT_YUV422P, SCHRO_CHROMA_422, SCHRO_FRAME_FORMAT_U8_422 }, | |
| 110 | + { AV_PIX_FMT_YUV444P, SCHRO_CHROMA_444, SCHRO_FRAME_FORMAT_U8_444 }, | |
| 111 | 111 | }; |
| 112 | 112 | |
| 113 | 113 | /** |
| @@ -138,7 +138,7 @@ static SchroBuffer *find_next_parse_unit(SchroParseUnitContext *parse_ctx) · 137 unmodified lines | ||
| 138 | 138 | /** |
| 139 | 139 | * Returns Libav chroma format. |
| 140 | 140 | */ |
| 141 | −static enum PixelFormat get_chroma_format(SchroChromaFormat schro_pix_fmt) | |
| 141 | +static enum AVPixelFormat get_chroma_format(SchroChromaFormat schro_pix_fmt) | |
| 142 | 142 | { |
| 143 | 143 | int num_formats = sizeof(schro_pixel_format_map) / |
| 144 | 144 | sizeof(schro_pixel_format_map[0]); |
| @@ -147,7 +147,7 @@ static enum PixelFormat get_chroma_format(SchroChromaFormat schro_pix_fmt) · 2 unmodified lines | ||
| 147 | 147 | for (idx = 0; idx < num_formats; ++idx) |
| 148 | 148 | if (schro_pixel_format_map[idx].schro_pix_fmt == schro_pix_fmt) |
| 149 | 149 | return schro_pixel_format_map[idx].ff_pix_fmt; |
| 150 | − return PIX_FMT_NONE; | |
| 150 | + return AV_PIX_FMT_NONE; | |
| 151 | 151 | } |
| 152 | 152 | |
| 153 | 153 | static av_cold int libschroedinger_decode_init(AVCodecContext *avccontext) |
| @@ -448,8 +448,8 @@ AVCodec ff_libschroedinger_encoder = { · 447 unmodified lines | ||
| 448 | 448 | .encode2 = libschroedinger_encode_frame, |
| 449 | 449 | .close = libschroedinger_encode_close, |
| 450 | 450 | .capabilities = CODEC_CAP_DELAY, |
| 451 | − .pix_fmts = (const enum PixelFormat[]){ | |
| 452 | − PIX_FMT_YUV420P, PIX_FMT_YUV422P, PIX_FMT_YUV444P, PIX_FMT_NONE | |
| 451 | + .pix_fmts = (const enum AVPixelFormat[]){ | |
| 452 | + AV_PIX_FMT_YUV420P, AV_PIX_FMT_YUV422P, AV_PIX_FMT_YUV444P, AV_PIX_FMT_NONE | |
| 453 | 453 | }, |
| 454 | 454 | .long_name = NULL_IF_CONFIG_SMALL("libschroedinger Dirac 2.2"), |
| 455 | 455 | }; |
| @@ -187,11 +187,11 @@ static av_cold int encode_init(AVCodecContext* avc_context) · 186 unmodified lines | ||
| 187 | 187 | else |
| 188 | 188 | t_info.colorspace = TH_CS_UNSPECIFIED; |
| 189 | 189 | |
| 190 | − if (avc_context->pix_fmt == PIX_FMT_YUV420P) | |
| 190 | + if (avc_context->pix_fmt == AV_PIX_FMT_YUV420P) | |
| 191 | 191 | t_info.pixel_fmt = TH_PF_420; |
| 192 | − else if (avc_context->pix_fmt == PIX_FMT_YUV422P) | |
| 192 | + else if (avc_context->pix_fmt == AV_PIX_FMT_YUV422P) | |
| 193 | 193 | t_info.pixel_fmt = TH_PF_422; |
| 194 | − else if (avc_context->pix_fmt == PIX_FMT_YUV444P) | |
| 194 | + else if (avc_context->pix_fmt == AV_PIX_FMT_YUV444P) | |
| 195 | 195 | t_info.pixel_fmt = TH_PF_444; |
| 196 | 196 | else { |
| 197 | 197 | av_log(avc_context, AV_LOG_ERROR, "Unsupported pix_fmt\n"); |
| @@ -370,8 +370,8 @@ AVCodec ff_libtheora_encoder = { · 172 unmodified lines | ||
| 370 | 370 | .close = encode_close, |
| 371 | 371 | .encode2 = encode_frame, |
| 372 | 372 | .capabilities = CODEC_CAP_DELAY, // needed to get the statsfile summary |
| 373 | − .pix_fmts = (const enum PixelFormat[]){ | |
| 374 | − PIX_FMT_YUV420P, PIX_FMT_YUV422P, PIX_FMT_YUV444P, PIX_FMT_NONE | |
| 373 | + .pix_fmts = (const enum AVPixelFormat[]){ | |
| 374 | + AV_PIX_FMT_YUV420P, AV_PIX_FMT_YUV422P, AV_PIX_FMT_YUV444P, AV_PIX_FMT_NONE | |
| 375 | 375 | }, |
| 376 | 376 | .long_name = NULL_IF_CONFIG_SMALL("libtheora Theora"), |
| 377 | 377 | }; |
| @@ -54,7 +54,7 @@ static av_cold int vp8_init(AVCodecContext *avctx) · 53 unmodified lines | ||
| 54 | 54 | return AVERROR(EINVAL); |
| 55 | 55 | } |
| 56 | 56 | |
| 57 | − avctx->pix_fmt = PIX_FMT_YUV420P; | |
| 57 | + avctx->pix_fmt = AV_PIX_FMT_YUV420P; | |
| 58 | 58 | return 0; |
| 59 | 59 | } |
| 60 | 60 | |
| @@ -580,7 +580,7 @@ AVCodec ff_libvpx_encoder = { · 579 unmodified lines | ||
| 580 | 580 | .encode2 = vp8_encode, |
| 581 | 581 | .close = vp8_free, |
| 582 | 582 | .capabilities = CODEC_CAP_DELAY | CODEC_CAP_AUTO_THREADS, |
| 583 | − .pix_fmts = (const enum PixelFormat[]){ PIX_FMT_YUV420P, PIX_FMT_NONE }, | |
| 583 | + .pix_fmts = (const enum AVPixelFormat[]){ AV_PIX_FMT_YUV420P, AV_PIX_FMT_NONE }, | |
| 584 | 584 | .long_name = NULL_IF_CONFIG_SMALL("libvpx VP8"), |
| 585 | 585 | .priv_class = &class, |
| 586 | 586 | .defaults = defaults, |
| @@ -206,18 +206,18 @@ static av_cold int X264_close(AVCodecContext *avctx) · 205 unmodified lines | ||
| 206 | 206 | return 0; |
| 207 | 207 | } |
| 208 | 208 | |
| 209 | −static int convert_pix_fmt(enum PixelFormat pix_fmt) | |
| 209 | +static int convert_pix_fmt(enum AVPixelFormat pix_fmt) | |
| 210 | 210 | { |
| 211 | 211 | switch (pix_fmt) { |
| 212 | − case PIX_FMT_YUV420P: | |
| 213 | − case PIX_FMT_YUVJ420P: | |
| 214 | − case PIX_FMT_YUV420P9: | |
| 215 | − case PIX_FMT_YUV420P10: return X264_CSP_I420; | |
| 216 | − case PIX_FMT_YUV422P: | |
| 217 | − case PIX_FMT_YUV422P10: return X264_CSP_I422; | |
| 218 | − case PIX_FMT_YUV444P: | |
| 219 | − case PIX_FMT_YUV444P9: | |
| 220 | − case PIX_FMT_YUV444P10: return X264_CSP_I444; | |
| 212 | + case AV_PIX_FMT_YUV420P: | |
| 213 | + case AV_PIX_FMT_YUVJ420P: | |
| 214 | + case AV_PIX_FMT_YUV420P9: | |
| 215 | + case AV_PIX_FMT_YUV420P10: return X264_CSP_I420; | |
| 216 | + case AV_PIX_FMT_YUV422P: | |
| 217 | + case AV_PIX_FMT_YUV422P10: return X264_CSP_I422; | |
| 218 | + case AV_PIX_FMT_YUV444P: | |
| 219 | + case AV_PIX_FMT_YUV444P9: | |
| 220 | + case AV_PIX_FMT_YUV444P10: return X264_CSP_I444; | |
| 221 | 221 | }; |
| 222 | 222 | return 0; |
| 223 | 223 | } |
| @@ -402,7 +402,7 @@ static av_cold int X264_init(AVCodecContext *avctx) · 178 unmodified lines | ||
| 402 | 402 | |
| 403 | 403 | x4->params.i_slice_count = avctx->slices; |
| 404 | 404 | |
| 405 | − x4->params.vui.b_fullrange = avctx->pix_fmt == PIX_FMT_YUVJ420P; | |
| 405 | + x4->params.vui.b_fullrange = avctx->pix_fmt == AV_PIX_FMT_YUVJ420P; | |
| 406 | 406 | |
| 407 | 407 | if (avctx->flags & CODEC_FLAG_GLOBAL_HEADER) |
| 408 | 408 | x4->params.b_repeat_headers = 0; |
| @@ -447,23 +447,23 @@ static av_cold int X264_init(AVCodecContext *avctx) · 38 unmodified lines | ||
| 447 | 447 | return 0; |
| 448 | 448 | } |
| 449 | 449 | |
| 450 | −static const enum PixelFormat pix_fmts_8bit[] = { | |
| 451 | − PIX_FMT_YUV420P, | |
| 452 | − PIX_FMT_YUVJ420P, | |
| 453 | − PIX_FMT_YUV422P, | |
| 454 | − PIX_FMT_YUV444P, | |
| 455 | − PIX_FMT_NONE | |
| 450 | +static const enum AVPixelFormat pix_fmts_8bit[] = { | |
| 451 | + AV_PIX_FMT_YUV420P, | |
| 452 | + AV_PIX_FMT_YUVJ420P, | |
| 453 | + AV_PIX_FMT_YUV422P, | |
| 454 | + AV_PIX_FMT_YUV444P, | |
| 455 | + AV_PIX_FMT_NONE | |
| 456 | 456 | }; |
| 457 | −static const enum PixelFormat pix_fmts_9bit[] = { | |
| 458 | − PIX_FMT_YUV420P9, | |
| 459 | − PIX_FMT_YUV444P9, | |
| 460 | − PIX_FMT_NONE | |
| 457 | +static const enum AVPixelFormat pix_fmts_9bit[] = { | |
| 458 | + AV_PIX_FMT_YUV420P9, | |
| 459 | + AV_PIX_FMT_YUV444P9, | |
| 460 | + AV_PIX_FMT_NONE | |
| 461 | 461 | }; |
| 462 | −static const enum PixelFormat pix_fmts_10bit[] = { | |
| 463 | − PIX_FMT_YUV420P10, | |
| 464 | − PIX_FMT_YUV422P10, | |
| 465 | − PIX_FMT_YUV444P10, | |
| 466 | − PIX_FMT_NONE | |
| 462 | +static const enum AVPixelFormat pix_fmts_10bit[] = { | |
| 463 | + AV_PIX_FMT_YUV420P10, | |
| 464 | + AV_PIX_FMT_YUV422P10, | |
| 465 | + AV_PIX_FMT_YUV444P10, | |
| 466 | + AV_PIX_FMT_NONE | |
| 467 | 467 | }; |
| 468 | 468 | |
| 469 | 469 | static av_cold void X264_init_static(AVCodec *codec) |
| @@ -427,7 +427,7 @@ AVCodec ff_libxavs_encoder = { · 426 unmodified lines | ||
| 427 | 427 | .encode2 = XAVS_frame, |
| 428 | 428 | .close = XAVS_close, |
| 429 | 429 | .capabilities = CODEC_CAP_DELAY | CODEC_CAP_AUTO_THREADS, |
| 430 | − .pix_fmts = (const enum PixelFormat[]) { PIX_FMT_YUV420P, PIX_FMT_NONE }, | |
| 430 | + .pix_fmts = (const enum AVPixelFormat[]) { AV_PIX_FMT_YUV420P, AV_PIX_FMT_NONE }, | |
| 431 | 431 | .long_name = NULL_IF_CONFIG_SMALL("libxavs Chinese AVS (Audio Video Standard)"), |
| 432 | 432 | .priv_class = &class, |
| 433 | 433 | .defaults = xavs_defaults, |
| @@ -657,7 +657,7 @@ static int xvid_encode_frame(AVCodecContext *avctx, AVPacket *pkt, · 656 unmodified lines | ||
| 657 | 657 | xvid_enc_frame.length = pkt->size; |
| 658 | 658 | |
| 659 | 659 | /* Initialize input image fields */ |
| 660 | − if( avctx->pix_fmt != PIX_FMT_YUV420P ) { | |
| 660 | + if( avctx->pix_fmt != AV_PIX_FMT_YUV420P ) { | |
| 661 | 661 | av_log(avctx, AV_LOG_ERROR, "Xvid: Color spaces other than 420p not supported\n"); |
| 662 | 662 | return -1; |
| 663 | 663 | } |
| @@ -783,6 +783,6 @@ AVCodec ff_libxvid_encoder = { · 119 unmodified lines | ||
| 783 | 783 | .init = xvid_encode_init, |
| 784 | 784 | .encode2 = xvid_encode_frame, |
| 785 | 785 | .close = xvid_encode_close, |
| 786 | − .pix_fmts = (const enum PixelFormat[]){ PIX_FMT_YUV420P, PIX_FMT_NONE }, | |
| 786 | + .pix_fmts = (const enum AVPixelFormat[]){ AV_PIX_FMT_YUV420P, AV_PIX_FMT_NONE }, | |
| 787 | 787 | .long_name = NULL_IF_CONFIG_SMALL("libxvidcore MPEG-4 part 2"), |
| 788 | 788 | }; |
| @@ -51,7 +51,7 @@ static int encode_picture_lossless(AVCodecContext *avctx, AVPacket *pkt, · 50 unmodified lines | ||
| 51 | 51 | const int mb_height = (height + s->mjpeg_vsample[0] - 1) / s->mjpeg_vsample[0]; |
| 52 | 52 | int ret, max_pkt_size = FF_MIN_BUFFER_SIZE; |
| 53 | 53 | |
| 54 | − if (avctx->pix_fmt == PIX_FMT_BGRA) | |
| 54 | + if (avctx->pix_fmt == AV_PIX_FMT_BGRA) | |
| 55 | 55 | max_pkt_size += width * height * 3 * 4; |
| 56 | 56 | else { |
| 57 | 57 | max_pkt_size += mb_width * mb_height * 3 * 4 |
| @@ -72,7 +72,7 @@ static int encode_picture_lossless(AVCodecContext *avctx, AVPacket *pkt, · 14 unmodified lines | ||
| 72 | 72 | |
| 73 | 73 | s->header_bits= put_bits_count(&s->pb); |
| 74 | 74 | |
| 75 | − if(avctx->pix_fmt == PIX_FMT_BGRA){ | |
| 75 | + if(avctx->pix_fmt == AV_PIX_FMT_BGRA){ | |
| 76 | 76 | int x, y, i; |
| 77 | 77 | const int linesize= p->linesize[0]; |
| 78 | 78 | uint16_t (*buffer)[4]= (void *) s->rd_scratchpad; |
| @@ -254,16 +254,16 @@ static av_cold int decode_init(AVCodecContext *avctx){ · 253 unmodified lines | ||
| 254 | 254 | l->mode = AV_RL32(avctx->extradata + 4); |
| 255 | 255 | switch(l->mode) { |
| 256 | 256 | case LOCO_CYUY2: case LOCO_YUY2: case LOCO_UYVY: |
| 257 | − avctx->pix_fmt = PIX_FMT_YUV422P; | |
| 257 | + avctx->pix_fmt = AV_PIX_FMT_YUV422P; | |
| 258 | 258 | break; |
| 259 | 259 | case LOCO_CRGB: case LOCO_RGB: |
| 260 | − avctx->pix_fmt = PIX_FMT_BGR24; | |
| 260 | + avctx->pix_fmt = AV_PIX_FMT_BGR24; | |
| 261 | 261 | break; |
| 262 | 262 | case LOCO_CYV12: case LOCO_YV12: |
| 263 | − avctx->pix_fmt = PIX_FMT_YUV420P; | |
| 263 | + avctx->pix_fmt = AV_PIX_FMT_YUV420P; | |
| 264 | 264 | break; |
| 265 | 265 | case LOCO_CRGBA: case LOCO_RGBA: |
| 266 | − avctx->pix_fmt = PIX_FMT_RGB32; | |
| 266 | + avctx->pix_fmt = AV_PIX_FMT_RGB32; | |
| 267 | 267 | break; |
| 268 | 268 | default: |
| 269 | 269 | av_log(avctx, AV_LOG_INFO, "Unknown colorspace, index = %i\n", l->mode); |
| @@ -235,7 +235,7 @@ static av_cold int decode_init(AVCodecContext *avctx){ · 234 unmodified lines | ||
| 235 | 235 | avctx->idct_algo = FF_IDCT_SIMPLE; |
| 236 | 236 | p->qstride= 0; |
| 237 | 237 | p->qscale_table= av_mallocz(a->mb_width); |
| 238 | − avctx->pix_fmt= PIX_FMT_YUVJ420P; | |
| 238 | + avctx->pix_fmt= AV_PIX_FMT_YUVJ420P; | |
| 239 | 239 | |
| 240 | 240 | return 0; |
| 241 | 241 | } |
| @@ -340,7 +340,7 @@ static int mimic_decode_frame(AVCodecContext *avctx, void *data, · 339 unmodified lines | ||
| 340 | 340 | ctx->avctx = avctx; |
| 341 | 341 | avctx->width = width; |
| 342 | 342 | avctx->height = height; |
| 343 | − avctx->pix_fmt = PIX_FMT_YUV420P; | |
| 343 | + avctx->pix_fmt = AV_PIX_FMT_YUV420P; | |
| 344 | 344 | for(i = 0; i < 3; i++) { |
| 345 | 345 | ctx->num_vblocks[i] = -((-height) >> (3 + !!i)); |
| 346 | 346 | ctx->num_hblocks[i] = width >> (3 + !!i) ; |
| @@ -321,22 +321,22 @@ int ff_mjpeg_decode_sof(MJpegDecodeContext *s) · 320 unmodified lines | ||
| 321 | 321 | switch (pix_fmt_id) { |
| 322 | 322 | case 0x11111100: |
| 323 | 323 | if (s->rgb) |
| 324 | − s->avctx->pix_fmt = PIX_FMT_BGRA; | |
| 324 | + s->avctx->pix_fmt = AV_PIX_FMT_BGRA; | |
| 325 | 325 | else |
| 326 | − s->avctx->pix_fmt = s->cs_itu601 ? PIX_FMT_YUV444P : PIX_FMT_YUVJ444P; | |
| 326 | + s->avctx->pix_fmt = s->cs_itu601 ? AV_PIX_FMT_YUV444P : AV_PIX_FMT_YUVJ444P; | |
| 327 | 327 | assert(s->nb_components == 3); |
| 328 | 328 | break; |
| 329 | 329 | case 0x11000000: |
| 330 | − s->avctx->pix_fmt = PIX_FMT_GRAY8; | |
| 330 | + s->avctx->pix_fmt = AV_PIX_FMT_GRAY8; | |
| 331 | 331 | break; |
| 332 | 332 | case 0x12111100: |
| 333 | − s->avctx->pix_fmt = s->cs_itu601 ? PIX_FMT_YUV440P : PIX_FMT_YUVJ440P; | |
| 333 | + s->avctx->pix_fmt = s->cs_itu601 ? AV_PIX_FMT_YUV440P : AV_PIX_FMT_YUVJ440P; | |
| 334 | 334 | break; |
| 335 | 335 | case 0x21111100: |
| 336 | − s->avctx->pix_fmt = s->cs_itu601 ? PIX_FMT_YUV422P : PIX_FMT_YUVJ422P; | |
| 336 | + s->avctx->pix_fmt = s->cs_itu601 ? AV_PIX_FMT_YUV422P : AV_PIX_FMT_YUVJ422P; | |
| 337 | 337 | break; |
| 338 | 338 | case 0x22111100: |
| 339 | − s->avctx->pix_fmt = s->cs_itu601 ? PIX_FMT_YUV420P : PIX_FMT_YUVJ420P; | |
| 339 | + s->avctx->pix_fmt = s->cs_itu601 ? AV_PIX_FMT_YUV420P : AV_PIX_FMT_YUVJ420P; | |
| 340 | 340 | break; |
| 341 | 341 | default: |
| 342 | 342 | av_log(s->avctx, AV_LOG_ERROR, "Unhandled pixel format 0x%x\n", pix_fmt_id); |
| @@ -344,11 +344,11 @@ int ff_mjpeg_decode_sof(MJpegDecodeContext *s) · 1 unmodified line | ||
| 344 | 344 | } |
| 345 | 345 | if (s->ls) { |
| 346 | 346 | if (s->nb_components > 1) |
| 347 | − s->avctx->pix_fmt = PIX_FMT_RGB24; | |
| 347 | + s->avctx->pix_fmt = AV_PIX_FMT_RGB24; | |
| 348 | 348 | else if (s->bits <= 8) |
| 349 | − s->avctx->pix_fmt = PIX_FMT_GRAY8; | |
| 349 | + s->avctx->pix_fmt = AV_PIX_FMT_GRAY8; | |
| 350 | 350 | else |
| 351 | − s->avctx->pix_fmt = PIX_FMT_GRAY16; | |
| 351 | + s->avctx->pix_fmt = AV_PIX_FMT_GRAY16; | |
| 352 | 352 | } |
| 353 | 353 | |
| 354 | 354 | if (s->picture_ptr->data[0]) |
| @@ -181,9 +181,9 @@ static void jpeg_put_comments(MpegEncContext *s) · 180 unmodified lines | ||
| 181 | 181 | AV_WB16(ptr, size); |
| 182 | 182 | } |
| 183 | 183 | |
| 184 | − if( s->avctx->pix_fmt == PIX_FMT_YUV420P | |
| 185 | − ||s->avctx->pix_fmt == PIX_FMT_YUV422P | |
| 186 | − ||s->avctx->pix_fmt == PIX_FMT_YUV444P){ | |
| 184 | + if( s->avctx->pix_fmt == AV_PIX_FMT_YUV420P | |
| 185 | + ||s->avctx->pix_fmt == AV_PIX_FMT_YUV422P | |
| 186 | + ||s->avctx->pix_fmt == AV_PIX_FMT_YUV444P){ | |
| 187 | 187 | put_marker(p, COM); |
| 188 | 188 | flush_put_bits(p); |
| 189 | 189 | ptr = put_bits_ptr(p); |
| @@ -211,7 +211,7 @@ void ff_mjpeg_encode_picture_header(MpegEncContext *s) · 21 unmodified lines | ||
| 211 | 211 | } |
| 212 | 212 | |
| 213 | 213 | put_bits(&s->pb, 16, 17); |
| 214 | − if(lossless && s->avctx->pix_fmt == PIX_FMT_BGRA) | |
| 214 | + if(lossless && s->avctx->pix_fmt == AV_PIX_FMT_BGRA) | |
| 215 | 215 | put_bits(&s->pb, 8, 9); /* 9 bits/component RCT */ |
| 216 | 216 | else |
| 217 | 217 | put_bits(&s->pb, 8, 8); /* 8 bits/component */ |
| @@ -452,8 +452,8 @@ AVCodec ff_mjpeg_encoder = { · 234 unmodified lines | ||
| 452 | 452 | .init = ff_MPV_encode_init, |
| 453 | 453 | .encode2 = ff_MPV_encode_picture, |
| 454 | 454 | .close = ff_MPV_encode_end, |
| 455 | − .pix_fmts = (const enum PixelFormat[]){ | |
| 456 | − PIX_FMT_YUVJ420P, PIX_FMT_YUVJ422P, PIX_FMT_NONE | |
| 455 | + .pix_fmts = (const enum AVPixelFormat[]){ | |
| 456 | + AV_PIX_FMT_YUVJ420P, AV_PIX_FMT_YUVJ422P, AV_PIX_FMT_NONE | |
| 457 | 457 | }, |
| 458 | 458 | .long_name = NULL_IF_CONFIG_SMALL("MJPEG (Motion JPEG)"), |
| 459 | 459 | }; |
| @@ -58,7 +58,7 @@ static av_cold int mm_decode_init(AVCodecContext *avctx) · 57 unmodified lines | ||
| 58 | 58 | |
| 59 | 59 | s->avctx = avctx; |
| 60 | 60 | |
| 61 | − avctx->pix_fmt = PIX_FMT_PAL8; | |
| 61 | + avctx->pix_fmt = AV_PIX_FMT_PAL8; | |
| 62 | 62 | |
| 63 | 63 | s->frame.reference = 1; |
| 64 | 64 | |
| @@ -62,7 +62,7 @@ static av_cold int mp_decode_init(AVCodecContext *avctx) · 61 unmodified lines | ||
| 62 | 62 | mp->offset_bits_len = av_log2(avctx->width * avctx->height) + 1; |
| 63 | 63 | mp->vpt = av_mallocz(avctx->height * sizeof(YuvPixel)); |
| 64 | 64 | mp->hpt = av_mallocz(h4 * w4 / 16 * sizeof(YuvPixel)); |
| 65 | − avctx->pix_fmt = PIX_FMT_RGB555; | |
| 65 | + avctx->pix_fmt = AV_PIX_FMT_RGB555; | |
| 66 | 66 | return 0; |
| 67 | 67 | } |
| 68 | 68 | |
| @@ -1171,12 +1171,12 @@ static void quant_matrix_rebuild(uint16_t *matrix, const uint8_t *old_perm, · 1170 unmodified lines | ||
| 1171 | 1171 | } |
| 1172 | 1172 | } |
| 1173 | 1173 | |
| 1174 | −static const enum PixelFormat pixfmt_xvmc_mpg2_420[] = { | |
| 1175 | − PIX_FMT_XVMC_MPEG2_IDCT, | |
| 1176 | − PIX_FMT_XVMC_MPEG2_MC, | |
| 1177 | − PIX_FMT_NONE }; | |
| 1174 | +static const enum AVPixelFormat pixfmt_xvmc_mpg2_420[] = { | |
| 1175 | + AV_PIX_FMT_XVMC_MPEG2_IDCT, | |
| 1176 | + AV_PIX_FMT_XVMC_MPEG2_MC, | |
| 1177 | + AV_PIX_FMT_NONE }; | |
| 1178 | 1178 | |
| 1179 | −static enum PixelFormat mpeg_get_pixelformat(AVCodecContext *avctx) | |
| 1179 | +static enum AVPixelFormat mpeg_get_pixelformat(AVCodecContext *avctx) | |
| 1180 | 1180 | { |
| 1181 | 1181 | Mpeg1Context *s1 = avctx->priv_data; |
| 1182 | 1182 | MpegEncContext *s = &s1->mpeg_enc_ctx; |
| @@ -1185,16 +1185,16 @@ static enum PixelFormat mpeg_get_pixelformat(AVCodecContext *avctx) · 2 unmodified lines | ||
| 1185 | 1185 | return avctx->get_format(avctx, pixfmt_xvmc_mpg2_420); |
| 1186 | 1186 | else if (avctx->codec->capabilities & CODEC_CAP_HWACCEL_VDPAU) { |
| 1187 | 1187 | if (avctx->codec_id == AV_CODEC_ID_MPEG1VIDEO) |
| 1188 | − return PIX_FMT_VDPAU_MPEG1; | |
| 1188 | + return AV_PIX_FMT_VDPAU_MPEG1; | |
| 1189 | 1189 | else |
| 1190 | − return PIX_FMT_VDPAU_MPEG2; | |
| 1190 | + return AV_PIX_FMT_VDPAU_MPEG2; | |
| 1191 | 1191 | } else { |
| 1192 | 1192 | if (s->chroma_format < 2) |
| 1193 | 1193 | return avctx->get_format(avctx, ff_hwaccel_pixfmt_list_420); |
| 1194 | 1194 | else if (s->chroma_format == 2) |
| 1195 | − return PIX_FMT_YUV422P; | |
| 1195 | + return AV_PIX_FMT_YUV422P; | |
| 1196 | 1196 | else |
| 1197 | − return PIX_FMT_YUV444P; | |
| 1197 | + return AV_PIX_FMT_YUV444P; | |
| 1198 | 1198 | } |
| 1199 | 1199 | } |
| 1200 | 1200 | |
| @@ -1289,7 +1289,7 @@ static int mpeg_decode_postinit(AVCodecContext *avctx) · 88 unmodified lines | ||
| 1289 | 1289 | avctx->pix_fmt = mpeg_get_pixelformat(avctx); |
| 1290 | 1290 | avctx->hwaccel = ff_find_hwaccel(avctx->codec->id, avctx->pix_fmt); |
| 1291 | 1291 | // until then pix_fmt may be changed right after codec init |
| 1292 | − if (avctx->pix_fmt == PIX_FMT_XVMC_MPEG2_IDCT || | |
| 1292 | + if (avctx->pix_fmt == AV_PIX_FMT_XVMC_MPEG2_IDCT || | |
| 1293 | 1293 | avctx->hwaccel || |
| 1294 | 1294 | s->avctx->codec->capabilities & CODEC_CAP_HWACCEL_VDPAU) |
| 1295 | 1295 | if (avctx->idct_algo == FF_IDCT_AUTO) |
| @@ -2036,7 +2036,7 @@ static int vcr2_init_sequence(AVCodecContext *avctx) · 740 unmodified lines | ||
| 2036 | 2036 | avctx->pix_fmt = mpeg_get_pixelformat(avctx); |
| 2037 | 2037 | avctx->hwaccel = ff_find_hwaccel(avctx->codec->id, avctx->pix_fmt); |
| 2038 | 2038 | |
| 2039 | − if (avctx->pix_fmt == PIX_FMT_XVMC_MPEG2_IDCT || avctx->hwaccel || | |
| 2039 | + if (avctx->pix_fmt == AV_PIX_FMT_XVMC_MPEG2_IDCT || avctx->hwaccel || | |
| 2040 | 2040 | s->avctx->codec->capabilities & CODEC_CAP_HWACCEL_VDPAU) |
| 2041 | 2041 | if (avctx->idct_algo == FF_IDCT_AUTO) |
| 2042 | 2042 | avctx->idct_algo = FF_IDCT_SIMPLE; |
| @@ -2539,7 +2539,7 @@ static av_cold int mpeg_mc_decode_init(AVCodecContext *avctx) · 496 unmodified lines | ||
| 2539 | 2539 | } |
| 2540 | 2540 | mpeg_decode_init(avctx); |
| 2541 | 2541 | |
| 2542 | − avctx->pix_fmt = PIX_FMT_XVMC_MPEG2_IDCT; | |
| 2542 | + avctx->pix_fmt = AV_PIX_FMT_XVMC_MPEG2_IDCT; | |
| 2543 | 2543 | avctx->xvmc_acceleration = 2; // 2 - the blocks are packed! |
| 2544 | 2544 | |
| 2545 | 2545 | return 0; |
| @@ -959,8 +959,8 @@ AVCodec ff_mpeg1video_encoder = { · 958 unmodified lines | ||
| 959 | 959 | .encode2 = ff_MPV_encode_picture, |
| 960 | 960 | .close = ff_MPV_encode_end, |
| 961 | 961 | .supported_framerates = avpriv_frame_rate_tab+1, |
| 962 | − .pix_fmts = (const enum PixelFormat[]){ PIX_FMT_YUV420P, | |
| 963 | − PIX_FMT_NONE }, | |
| 962 | + .pix_fmts = (const enum AVPixelFormat[]){ AV_PIX_FMT_YUV420P, | |
| 963 | + AV_PIX_FMT_NONE }, | |
| 964 | 964 | .capabilities = CODEC_CAP_DELAY | CODEC_CAP_SLICE_THREADS, |
| 965 | 965 | .long_name = NULL_IF_CONFIG_SMALL("MPEG-1 video"), |
| 966 | 966 | .priv_class = &mpeg1_class, |
| @@ -975,8 +975,8 @@ AVCodec ff_mpeg2video_encoder = { · 8 unmodified lines | ||
| 975 | 975 | .encode2 = ff_MPV_encode_picture, |
| 976 | 976 | .close = ff_MPV_encode_end, |
| 977 | 977 | .supported_framerates = avpriv_frame_rate_tab + 1, |
| 978 | − .pix_fmts = (const enum PixelFormat[]){ | |
| 979 | − PIX_FMT_YUV420P, PIX_FMT_YUV422P, PIX_FMT_NONE | |
| 978 | + .pix_fmts = (const enum AVPixelFormat[]){ | |
| 979 | + AV_PIX_FMT_YUV420P, AV_PIX_FMT_YUV422P, AV_PIX_FMT_NONE | |
| 980 | 980 | }, |
| 981 | 981 | .capabilities = CODEC_CAP_DELAY | CODEC_CAP_SLICE_THREADS, |
| 982 | 982 | .long_name = NULL_IF_CONFIG_SMALL("MPEG-2 video"), |
| @@ -2288,7 +2288,7 @@ AVCodec ff_mpeg4_vdpau_decoder = { · 2287 unmodified lines | ||
| 2288 | 2288 | .capabilities = CODEC_CAP_DR1 | CODEC_CAP_TRUNCATED | CODEC_CAP_DELAY | |
| 2289 | 2289 | CODEC_CAP_HWACCEL_VDPAU, |
| 2290 | 2290 | .long_name = NULL_IF_CONFIG_SMALL("MPEG-4 part 2 (VDPAU)"), |
| 2291 | − .pix_fmts = (const enum PixelFormat[]){ PIX_FMT_VDPAU_MPEG4, | |
| 2292 | − PIX_FMT_NONE }, | |
| 2291 | + .pix_fmts = (const enum AVPixelFormat[]){ AV_PIX_FMT_VDPAU_MPEG4, | |
| 2292 | + AV_PIX_FMT_NONE }, | |
| 2293 | 2293 | }; |
| 2294 | 2294 | #endif |
| @@ -1339,7 +1339,7 @@ AVCodec ff_mpeg4_encoder = { · 1338 unmodified lines | ||
| 1339 | 1339 | .init = encode_init, |
| 1340 | 1340 | .encode2 = ff_MPV_encode_picture, |
| 1341 | 1341 | .close = ff_MPV_encode_end, |
| 1342 | − .pix_fmts = (const enum PixelFormat[]){ PIX_FMT_YUV420P, PIX_FMT_NONE }, | |
| 1342 | + .pix_fmts = (const enum AVPixelFormat[]){ AV_PIX_FMT_YUV420P, AV_PIX_FMT_NONE }, | |
| 1343 | 1343 | .capabilities = CODEC_CAP_DELAY | CODEC_CAP_SLICE_THREADS, |
| 1344 | 1344 | .long_name = NULL_IF_CONFIG_SMALL("MPEG-4 part 2"), |
| 1345 | 1345 | .priv_class = &mpeg4enc_class, |
| @@ -125,17 +125,17 @@ const uint8_t *const ff_mpeg2_dc_scale_table[4] = { · 124 unmodified lines | ||
| 125 | 125 | mpeg2_dc_scale_table3, |
| 126 | 126 | }; |
| 127 | 127 | |
| 128 | −const enum PixelFormat ff_pixfmt_list_420[] = { | |
| 129 | − PIX_FMT_YUV420P, | |
| 130 | − PIX_FMT_NONE | |
| 128 | +const enum AVPixelFormat ff_pixfmt_list_420[] = { | |
| 129 | + AV_PIX_FMT_YUV420P, | |
| 130 | + AV_PIX_FMT_NONE | |
| 131 | 131 | }; |
| 132 | 132 | |
| 133 | −const enum PixelFormat ff_hwaccel_pixfmt_list_420[] = { | |
| 134 | − PIX_FMT_DXVA2_VLD, | |
| 135 | − PIX_FMT_VAAPI_VLD, | |
| 136 | − PIX_FMT_VDA_VLD, | |
| 137 | − PIX_FMT_YUV420P, | |
| 138 | − PIX_FMT_NONE | |
| 133 | +const enum AVPixelFormat ff_hwaccel_pixfmt_list_420[] = { | |
| 134 | + AV_PIX_FMT_DXVA2_VLD, | |
| 135 | + AV_PIX_FMT_VAAPI_VLD, | |
| 136 | + AV_PIX_FMT_VDA_VLD, | |
| 137 | + AV_PIX_FMT_YUV420P, | |
| 138 | + AV_PIX_FMT_NONE | |
| 139 | 139 | }; |
| 140 | 140 | |
| 141 | 141 | const uint8_t *avpriv_mpv_find_start_code(const uint8_t *restrict p, |
| @@ -841,9 +841,9 @@ av_cold int ff_MPV_common_init(MpegEncContext *s) · 699 unmodified lines | ||
| 841 | 841 | else if (s->codec_id != AV_CODEC_ID_H264) |
| 842 | 842 | s->mb_height = (s->height + 15) / 16; |
| 843 | 843 | |
| 844 | − if (s->avctx->pix_fmt == PIX_FMT_NONE) { | |
| 844 | + if (s->avctx->pix_fmt == AV_PIX_FMT_NONE) { | |
| 845 | 845 | av_log(s->avctx, AV_LOG_ERROR, |
| 846 | − "decoding to PIX_FMT_NONE is not supported.\n"); | |
| 846 | + "decoding to AV_PIX_FMT_NONE is not supported.\n"); | |
| 847 | 847 | return -1; |
| 848 | 848 | } |
| 849 | 849 | |
| @@ -809,8 +809,8 @@ void ff_MPV_motion(MpegEncContext *s, · 808 unmodified lines | ||
| 809 | 809 | */ |
| 810 | 810 | int ff_alloc_picture(MpegEncContext *s, Picture *pic, int shared); |
| 811 | 811 | |
| 812 | −extern const enum PixelFormat ff_pixfmt_list_420[]; | |
| 813 | −extern const enum PixelFormat ff_hwaccel_pixfmt_list_420[]; | |
| 812 | +extern const enum AVPixelFormat ff_pixfmt_list_420[]; | |
| 813 | +extern const enum AVPixelFormat ff_hwaccel_pixfmt_list_420[]; | |
| 814 | 814 | |
| 815 | 815 | static inline void ff_update_block_index(MpegEncContext *s){ |
| 816 | 816 | const int block_size = 8; |
| @@ -278,50 +278,50 @@ av_cold int ff_MPV_encode_init(AVCodecContext *avctx) · 277 unmodified lines | ||
| 278 | 278 | |
| 279 | 279 | switch (avctx->codec_id) { |
| 280 | 280 | case AV_CODEC_ID_MPEG2VIDEO: |
| 281 | − if (avctx->pix_fmt != PIX_FMT_YUV420P && | |
| 282 | − avctx->pix_fmt != PIX_FMT_YUV422P) { | |
| 281 | + if (avctx->pix_fmt != AV_PIX_FMT_YUV420P && | |
| 282 | + avctx->pix_fmt != AV_PIX_FMT_YUV422P) { | |
| 283 | 283 | av_log(avctx, AV_LOG_ERROR, |
| 284 | 284 | "only YUV420 and YUV422 are supported\n"); |
| 285 | 285 | return -1; |
| 286 | 286 | } |
| 287 | 287 | break; |
| 288 | 288 | case AV_CODEC_ID_LJPEG: |
| 289 | − if (avctx->pix_fmt != PIX_FMT_YUVJ420P && | |
| 290 | − avctx->pix_fmt != PIX_FMT_YUVJ422P && | |
| 291 | − avctx->pix_fmt != PIX_FMT_YUVJ444P && | |
| 292 | − avctx->pix_fmt != PIX_FMT_BGRA && | |
| 293 | − ((avctx->pix_fmt != PIX_FMT_YUV420P && | |
| 294 | − avctx->pix_fmt != PIX_FMT_YUV422P && | |
| 295 | − avctx->pix_fmt != PIX_FMT_YUV444P) || | |
| 289 | + if (avctx->pix_fmt != AV_PIX_FMT_YUVJ420P && | |
| 290 | + avctx->pix_fmt != AV_PIX_FMT_YUVJ422P && | |
| 291 | + avctx->pix_fmt != AV_PIX_FMT_YUVJ444P && | |
| 292 | + avctx->pix_fmt != AV_PIX_FMT_BGRA && | |
| 293 | + ((avctx->pix_fmt != AV_PIX_FMT_YUV420P && | |
| 294 | + avctx->pix_fmt != AV_PIX_FMT_YUV422P && | |
| 295 | + avctx->pix_fmt != AV_PIX_FMT_YUV444P) || | |
| 296 | 296 | avctx->strict_std_compliance > FF_COMPLIANCE_UNOFFICIAL)) { |
| 297 | 297 | av_log(avctx, AV_LOG_ERROR, "colorspace not supported in LJPEG\n"); |
| 298 | 298 | return -1; |
| 299 | 299 | } |
| 300 | 300 | break; |
| 301 | 301 | case AV_CODEC_ID_MJPEG: |
| 302 | − if (avctx->pix_fmt != PIX_FMT_YUVJ420P && | |
| 303 | − avctx->pix_fmt != PIX_FMT_YUVJ422P && | |
| 304 | − ((avctx->pix_fmt != PIX_FMT_YUV420P && | |
| 305 | − avctx->pix_fmt != PIX_FMT_YUV422P) || | |
| 302 | + if (avctx->pix_fmt != AV_PIX_FMT_YUVJ420P && | |
| 303 | + avctx->pix_fmt != AV_PIX_FMT_YUVJ422P && | |
| 304 | + ((avctx->pix_fmt != AV_PIX_FMT_YUV420P && | |
| 305 | + avctx->pix_fmt != AV_PIX_FMT_YUV422P) || | |
| 306 | 306 | avctx->strict_std_compliance > FF_COMPLIANCE_UNOFFICIAL)) { |
| 307 | 307 | av_log(avctx, AV_LOG_ERROR, "colorspace not supported in jpeg\n"); |
| 308 | 308 | return -1; |
| 309 | 309 | } |
| 310 | 310 | break; |
| 311 | 311 | default: |
| 312 | − if (avctx->pix_fmt != PIX_FMT_YUV420P) { | |
| 312 | + if (avctx->pix_fmt != AV_PIX_FMT_YUV420P) { | |
| 313 | 313 | av_log(avctx, AV_LOG_ERROR, "only YUV420 is supported\n"); |
| 314 | 314 | return -1; |
| 315 | 315 | } |
| 316 | 316 | } |
| 317 | 317 | |
| 318 | 318 | switch (avctx->pix_fmt) { |
| 319 | − case PIX_FMT_YUVJ422P: | |
| 320 | − case PIX_FMT_YUV422P: | |
| 319 | + case AV_PIX_FMT_YUVJ422P: | |
| 320 | + case AV_PIX_FMT_YUV422P: | |
| 321 | 321 | s->chroma_format = CHROMA_422; |
| 322 | 322 | break; |
| 323 | − case PIX_FMT_YUVJ420P: | |
| 324 | − case PIX_FMT_YUV420P: | |
| 323 | + case AV_PIX_FMT_YUVJ420P: | |
| 324 | + case AV_PIX_FMT_YUV420P: | |
| 325 | 325 | default: |
| 326 | 326 | s->chroma_format = CHROMA_420; |
| 327 | 327 | break; |
| @@ -640,7 +640,7 @@ av_cold int ff_MPV_encode_init(AVCodecContext *avctx) · 312 unmodified lines | ||
| 640 | 640 | s->out_format = FMT_MJPEG; |
| 641 | 641 | s->intra_only = 1; /* force intra only for jpeg */ |
| 642 | 642 | if (avctx->codec->id == AV_CODEC_ID_LJPEG && |
| 643 | − avctx->pix_fmt == PIX_FMT_BGRA) { | |
| 643 | + avctx->pix_fmt == AV_PIX_FMT_BGRA) { | |
| 644 | 644 | s->mjpeg_vsample[0] = s->mjpeg_hsample[0] = |
| 645 | 645 | s->mjpeg_vsample[1] = s->mjpeg_hsample[1] = |
| 646 | 646 | s->mjpeg_vsample[2] = s->mjpeg_hsample[2] = 1; |
| @@ -1117,7 +1117,7 @@ static int estimate_best_b_count(MpegEncContext *s) · 470 unmodified lines | ||
| 1117 | 1117 | c->me_cmp = s->avctx->me_cmp; |
| 1118 | 1118 | c->mb_cmp = s->avctx->mb_cmp; |
| 1119 | 1119 | c->me_sub_cmp = s->avctx->me_sub_cmp; |
| 1120 | − c->pix_fmt = PIX_FMT_YUV420P; | |
| 1120 | + c->pix_fmt = AV_PIX_FMT_YUV420P; | |
| 1121 | 1121 | c->time_base = s->avctx->time_base; |
| 1122 | 1122 | c->max_b_frames = s->max_b_frames; |
| 1123 | 1123 | |
| @@ -4138,7 +4138,7 @@ AVCodec ff_h263_encoder = { · 3014 unmodified lines | ||
| 4138 | 4138 | .init = ff_MPV_encode_init, |
| 4139 | 4139 | .encode2 = ff_MPV_encode_picture, |
| 4140 | 4140 | .close = ff_MPV_encode_end, |
| 4141 | − .pix_fmts= (const enum PixelFormat[]){PIX_FMT_YUV420P, PIX_FMT_NONE}, | |
| 4141 | + .pix_fmts= (const enum AVPixelFormat[]){AV_PIX_FMT_YUV420P, AV_PIX_FMT_NONE}, | |
| 4142 | 4142 | .long_name= NULL_IF_CONFIG_SMALL("H.263 / H.263-1996"), |
| 4143 | 4143 | .priv_class = &h263_class, |
| 4144 | 4144 | }; |
| @@ -4167,7 +4167,7 @@ AVCodec ff_h263p_encoder = { · 22 unmodified lines | ||
| 4167 | 4167 | .encode2 = ff_MPV_encode_picture, |
| 4168 | 4168 | .close = ff_MPV_encode_end, |
| 4169 | 4169 | .capabilities = CODEC_CAP_SLICE_THREADS, |
| 4170 | − .pix_fmts = (const enum PixelFormat[]){ PIX_FMT_YUV420P, PIX_FMT_NONE }, | |
| 4170 | + .pix_fmts = (const enum AVPixelFormat[]){ AV_PIX_FMT_YUV420P, AV_PIX_FMT_NONE }, | |
| 4171 | 4171 | .long_name = NULL_IF_CONFIG_SMALL("H.263+ / H.263-1998 / H.263 version 2"), |
| 4172 | 4172 | .priv_class = &h263p_class, |
| 4173 | 4173 | }; |
| @@ -4182,7 +4182,7 @@ AVCodec ff_msmpeg4v2_encoder = { · 8 unmodified lines | ||
| 4182 | 4182 | .init = ff_MPV_encode_init, |
| 4183 | 4183 | .encode2 = ff_MPV_encode_picture, |
| 4184 | 4184 | .close = ff_MPV_encode_end, |
| 4185 | − .pix_fmts = (const enum PixelFormat[]){ PIX_FMT_YUV420P, PIX_FMT_NONE }, | |
| 4185 | + .pix_fmts = (const enum AVPixelFormat[]){ AV_PIX_FMT_YUV420P, AV_PIX_FMT_NONE }, | |
| 4186 | 4186 | .long_name = NULL_IF_CONFIG_SMALL("MPEG-4 part 2 Microsoft variant version 2"), |
| 4187 | 4187 | .priv_class = &msmpeg4v2_class, |
| 4188 | 4188 | }; |
| @@ -4197,7 +4197,7 @@ AVCodec ff_msmpeg4v3_encoder = { · 8 unmodified lines | ||
| 4197 | 4197 | .init = ff_MPV_encode_init, |
| 4198 | 4198 | .encode2 = ff_MPV_encode_picture, |
| 4199 | 4199 | .close = ff_MPV_encode_end, |
| 4200 | − .pix_fmts = (const enum PixelFormat[]){ PIX_FMT_YUV420P, PIX_FMT_NONE }, | |
| 4200 | + .pix_fmts = (const enum AVPixelFormat[]){ AV_PIX_FMT_YUV420P, AV_PIX_FMT_NONE }, | |
| 4201 | 4201 | .long_name = NULL_IF_CONFIG_SMALL("MPEG-4 part 2 Microsoft variant version 3"), |
| 4202 | 4202 | .priv_class = &msmpeg4v3_class, |
| 4203 | 4203 | }; |
| @@ -4212,7 +4212,7 @@ AVCodec ff_wmv1_encoder = { · 8 unmodified lines | ||
| 4212 | 4212 | .init = ff_MPV_encode_init, |
| 4213 | 4213 | .encode2 = ff_MPV_encode_picture, |
| 4214 | 4214 | .close = ff_MPV_encode_end, |
| 4215 | − .pix_fmts = (const enum PixelFormat[]){ PIX_FMT_YUV420P, PIX_FMT_NONE }, | |
| 4215 | + .pix_fmts = (const enum AVPixelFormat[]){ AV_PIX_FMT_YUV420P, AV_PIX_FMT_NONE }, | |
| 4216 | 4216 | .long_name = NULL_IF_CONFIG_SMALL("Windows Media Video 7"), |
| 4217 | 4217 | .priv_class = &wmv1_class, |
| 4218 | 4218 | }; |
| @@ -56,10 +56,10 @@ static av_cold int msrle_decode_init(AVCodecContext *avctx) · 55 unmodified lines | ||
| 56 | 56 | switch (avctx->bits_per_coded_sample) { |
| 57 | 57 | case 4: |
| 58 | 58 | case 8: |
| 59 | − avctx->pix_fmt = PIX_FMT_PAL8; | |
| 59 | + avctx->pix_fmt = AV_PIX_FMT_PAL8; | |
| 60 | 60 | break; |
| 61 | 61 | case 24: |
| 62 | − avctx->pix_fmt = PIX_FMT_BGR24; | |
| 62 | + avctx->pix_fmt = AV_PIX_FMT_BGR24; | |
| 63 | 63 | break; |
| 64 | 64 | default: |
| 65 | 65 | av_log(avctx, AV_LOG_ERROR, "unsupported bits per sample\n"); |
| @@ -197,7 +197,7 @@ static av_cold int mss1_decode_init(AVCodecContext *avctx) · 196 unmodified lines | ||
| 197 | 197 | |
| 198 | 198 | ret = ff_mss12_decode_init(&c->ctx, 0, &c->sc, NULL); |
| 199 | 199 | |
| 200 | − avctx->pix_fmt = PIX_FMT_PAL8; | |
| 200 | + avctx->pix_fmt = AV_PIX_FMT_PAL8; | |
| 201 | 201 | |
| 202 | 202 | return ret; |
| 203 | 203 | } |
| @@ -396,11 +396,11 @@ static int decode_wmv9(AVCodecContext *avctx, const uint8_t *buf, int buf_size, · 395 unmodified lines | ||
| 396 | 396 | return AVERROR_INVALIDDATA; |
| 397 | 397 | } |
| 398 | 398 | |
| 399 | − avctx->pix_fmt = PIX_FMT_YUV420P; | |
| 399 | + avctx->pix_fmt = AV_PIX_FMT_YUV420P; | |
| 400 | 400 | |
| 401 | 401 | if (ff_MPV_frame_start(s, avctx) < 0) { |
| 402 | 402 | av_log(v->s.avctx, AV_LOG_ERROR, "ff_MPV_frame_start error\n"); |
| 403 | − avctx->pix_fmt = PIX_FMT_RGB24; | |
| 403 | + avctx->pix_fmt = AV_PIX_FMT_RGB24; | |
| 404 | 404 | return -1; |
| 405 | 405 | } |
| 406 | 406 | |
| @@ -448,7 +448,7 @@ static int decode_wmv9(AVCodecContext *avctx, const uint8_t *buf, int buf_size, · 41 unmodified lines | ||
| 448 | 448 | f->data[1], f->data[2], f->linesize[1], |
| 449 | 449 | w, h); |
| 450 | 450 | |
| 451 | − avctx->pix_fmt = PIX_FMT_RGB24; | |
| 451 | + avctx->pix_fmt = AV_PIX_FMT_RGB24; | |
| 452 | 452 | |
| 453 | 453 | return 0; |
| 454 | 454 | } |
| @@ -519,7 +519,7 @@ static int mss2_decode_frame(AVCodecContext *avctx, void *data, int *data_size, · 64 unmodified lines | ||
| 519 | 519 | if (is_555 && (has_wmv9 || has_mv || c->slice_split && ctx->split_position)) |
| 520 | 520 | return AVERROR_INVALIDDATA; |
| 521 | 521 | |
| 522 | − avctx->pix_fmt = is_555 ? PIX_FMT_RGB555 : PIX_FMT_RGB24; | |
| 522 | + avctx->pix_fmt = is_555 ? AV_PIX_FMT_RGB555 : AV_PIX_FMT_RGB24; | |
| 523 | 523 | if (ctx->pic.data[0] && ctx->pic.format != avctx->pix_fmt) |
| 524 | 524 | avctx->release_buffer(avctx, &ctx->pic); |
| 525 | 525 | |
| @@ -848,8 +848,8 @@ static av_cold int mss2_decode_init(AVCodecContext *avctx) · 322 unmodified lines | ||
| 848 | 848 | } |
| 849 | 849 | ff_mss2dsp_init(&ctx->dsp); |
| 850 | 850 | |
| 851 | − avctx->pix_fmt = c->free_colours == 127 ? PIX_FMT_RGB555 | |
| 852 | − : PIX_FMT_RGB24; | |
| 851 | + avctx->pix_fmt = c->free_colours == 127 ? AV_PIX_FMT_RGB555 | |
| 852 | + : AV_PIX_FMT_RGB24; | |
| 853 | 853 | |
| 854 | 854 | return 0; |
| 855 | 855 | } |
| @@ -835,7 +835,7 @@ static av_cold int mss3_decode_init(AVCodecContext *avctx) · 834 unmodified lines | ||
| 835 | 835 | } |
| 836 | 836 | } |
| 837 | 837 | |
| 838 | − avctx->pix_fmt = PIX_FMT_YUV420P; | |
| 838 | + avctx->pix_fmt = AV_PIX_FMT_YUV420P; | |
| 839 | 839 | avctx->coded_frame = &c->pic; |
| 840 | 840 | |
| 841 | 841 | init_coders(c); |
| @@ -649,7 +649,7 @@ static av_cold int mss4_decode_init(AVCodecContext *avctx) · 648 unmodified lines | ||
| 649 | 649 | } |
| 650 | 650 | } |
| 651 | 651 | |
| 652 | − avctx->pix_fmt = PIX_FMT_YUV444P; | |
| 652 | + avctx->pix_fmt = AV_PIX_FMT_YUV444P; | |
| 653 | 653 | avctx->coded_frame = &c->pic; |
| 654 | 654 | |
| 655 | 655 | return 0; |
| @@ -65,10 +65,10 @@ static av_cold int msvideo1_decode_init(AVCodecContext *avctx) · 64 unmodified lines | ||
| 65 | 65 | /* figure out the colorspace based on the presence of a palette */ |
| 66 | 66 | if (s->avctx->bits_per_coded_sample == 8) { |
| 67 | 67 | s->mode_8bit = 1; |
| 68 | − avctx->pix_fmt = PIX_FMT_PAL8; | |
| 68 | + avctx->pix_fmt = AV_PIX_FMT_PAL8; | |
| 69 | 69 | } else { |
| 70 | 70 | s->mode_8bit = 0; |
| 71 | − avctx->pix_fmt = PIX_FMT_RGB555; | |
| 71 | + avctx->pix_fmt = AV_PIX_FMT_RGB555; | |
| 72 | 72 | } |
| 73 | 73 | |
| 74 | 74 | s->frame.data[0] = NULL; |
| @@ -172,7 +172,7 @@ static void msvideo1_decode_8bit(Msvideo1Context *s) · 97 unmodified lines | ||
| 172 | 172 | } |
| 173 | 173 | |
| 174 | 174 | /* make the palette available on the way out */ |
| 175 | − if (s->avctx->pix_fmt == PIX_FMT_PAL8) | |
| 175 | + if (s->avctx->pix_fmt == AV_PIX_FMT_PAL8) | |
| 176 | 176 | memcpy(s->frame.data[1], s->pal, AVPALETTE_SIZE); |
| 177 | 177 | } |
| 178 | 178 | |
| @@ -74,8 +74,8 @@ static const uint8_t fallback_cquant[] = { · 73 unmodified lines | ||
| 74 | 74 | static void copy_frame(AVFrame *f, const uint8_t *src, int width, int height) |
| 75 | 75 | { |
| 76 | 76 | AVPicture pic; |
| 77 | − avpicture_fill(&pic, src, PIX_FMT_YUV420P, width, height); | |
| 78 | − av_picture_copy((AVPicture *)f, &pic, PIX_FMT_YUV420P, width, height); | |
| 77 | + avpicture_fill(&pic, src, AV_PIX_FMT_YUV420P, width, height); | |
| 78 | + av_picture_copy((AVPicture *)f, &pic, AV_PIX_FMT_YUV420P, width, height); | |
| 79 | 79 | } |
| 80 | 80 | |
| 81 | 81 | /** |
| @@ -269,7 +269,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, · 187 unmodified lines | ||
| 269 | 269 | static av_cold int decode_init(AVCodecContext *avctx) |
| 270 | 270 | { |
| 271 | 271 | NuvContext *c = avctx->priv_data; |
| 272 | − avctx->pix_fmt = PIX_FMT_YUV420P; | |
| 272 | + avctx->pix_fmt = AV_PIX_FMT_YUV420P; | |
| 273 | 273 | c->pic.data[0] = NULL; |
| 274 | 274 | c->decomp_buf = NULL; |
| 275 | 275 | c->quality = -1; |
| @@ -94,7 +94,7 @@ int avcodec_get_context_defaults3(AVCodecContext *s, const AVCodec *codec) · 93 unmodified lines | ||
| 94 | 94 | s->execute = avcodec_default_execute; |
| 95 | 95 | s->execute2 = avcodec_default_execute2; |
| 96 | 96 | s->sample_aspect_ratio = (AVRational){0,1}; |
| 97 | − s->pix_fmt = PIX_FMT_NONE; | |
| 97 | + s->pix_fmt = AV_PIX_FMT_NONE; | |
| 98 | 98 | s->sample_fmt = AV_SAMPLE_FMT_NONE; |
| 99 | 99 | |
| 100 | 100 | s->reget_buffer = avcodec_default_reget_buffer; |
| @@ -52,25 +52,25 @@ static int pam_encode_frame(AVCodecContext *avctx, AVPacket *pkt, · 51 unmodified lines | ||
| 52 | 52 | h = avctx->height; |
| 53 | 53 | w = avctx->width; |
| 54 | 54 | switch (avctx->pix_fmt) { |
| 55 | − case PIX_FMT_MONOWHITE: | |
| 55 | + case AV_PIX_FMT_MONOWHITE: | |
| 56 | 56 | n = (w + 7) >> 3; |
| 57 | 57 | depth = 1; |
| 58 | 58 | maxval = 1; |
| 59 | 59 | tuple_type = "BLACKANDWHITE"; |
| 60 | 60 | break; |
| 61 | − case PIX_FMT_GRAY8: | |
| 61 | + case AV_PIX_FMT_GRAY8: | |
| 62 | 62 | n = w; |
| 63 | 63 | depth = 1; |
| 64 | 64 | maxval = 255; |
| 65 | 65 | tuple_type = "GRAYSCALE"; |
| 66 | 66 | break; |
| 67 | − case PIX_FMT_RGB24: | |
| 67 | + case AV_PIX_FMT_RGB24: | |
| 68 | 68 | n = w * 3; |
| 69 | 69 | depth = 3; |
| 70 | 70 | maxval = 255; |
| 71 | 71 | tuple_type = "RGB"; |
| 72 | 72 | break; |
| 73 | − case PIX_FMT_RGB32: | |
| 73 | + case AV_PIX_FMT_RGB32: | |
| 74 | 74 | n = w * 4; |
| 75 | 75 | depth = 4; |
| 76 | 76 | maxval = 255; |
| @@ -87,7 +87,7 @@ static int pam_encode_frame(AVCodecContext *avctx, AVPacket *pkt, · 10 unmodified lines | ||
| 87 | 87 | ptr = p->data[0]; |
| 88 | 88 | linesize = p->linesize[0]; |
| 89 | 89 | |
| 90 | − if (avctx->pix_fmt == PIX_FMT_RGB32) { | |
| 90 | + if (avctx->pix_fmt == AV_PIX_FMT_RGB32) { | |
| 91 | 91 | int j; |
| 92 | 92 | unsigned int v; |
| 93 | 93 | |
| @@ -121,9 +121,9 @@ AVCodec ff_pam_encoder = { · 27 unmodified lines | ||
| 121 | 121 | .priv_data_size = sizeof(PNMContext), |
| 122 | 122 | .init = ff_pnm_init, |
| 123 | 123 | .encode2 = pam_encode_frame, |
| 124 | − .pix_fmts = (const enum PixelFormat[]){ | |
| 125 | − PIX_FMT_RGB24, PIX_FMT_RGB32, PIX_FMT_GRAY8, PIX_FMT_MONOWHITE, | |
| 126 | − PIX_FMT_NONE | |
| 124 | + .pix_fmts = (const enum AVPixelFormat[]){ | |
| 125 | + AV_PIX_FMT_RGB24, AV_PIX_FMT_RGB32, AV_PIX_FMT_GRAY8, AV_PIX_FMT_MONOWHITE, | |
| 126 | + AV_PIX_FMT_NONE | |
| 127 | 127 | }, |
| 128 | 128 | .long_name = NULL_IF_CONFIG_SMALL("PAM (Portable AnyMap) image"), |
| 129 | 129 | }; |
| @@ -122,7 +122,7 @@ static int pcx_decode_frame(AVCodecContext *avctx, void *data, int *data_size, · 121 unmodified lines | ||
| 122 | 122 | |
| 123 | 123 | switch ((nplanes<<8) + bits_per_pixel) { |
| 124 | 124 | case 0x0308: |
| 125 | − avctx->pix_fmt = PIX_FMT_RGB24; | |
| 125 | + avctx->pix_fmt = AV_PIX_FMT_RGB24; | |
| 126 | 126 | break; |
| 127 | 127 | case 0x0108: |
| 128 | 128 | case 0x0104: |
| @@ -131,7 +131,7 @@ static int pcx_decode_frame(AVCodecContext *avctx, void *data, int *data_size, · 2 unmodified lines | ||
| 131 | 131 | case 0x0401: |
| 132 | 132 | case 0x0301: |
| 133 | 133 | case 0x0201: |
| 134 | − avctx->pix_fmt = PIX_FMT_PAL8; | |
| 134 | + avctx->pix_fmt = AV_PIX_FMT_PAL8; | |
| 135 | 135 | break; |
| 136 | 136 | default: |
| 137 | 137 | av_log(avctx, AV_LOG_ERROR, "invalid PCX file\n"); |
| @@ -118,21 +118,21 @@ static int pcx_encode_frame(AVCodecContext *avctx, AVPacket *pkt, · 117 unmodified lines | ||
| 118 | 118 | } |
| 119 | 119 | |
| 120 | 120 | switch (avctx->pix_fmt) { |
| 121 | − case PIX_FMT_RGB24: | |
| 121 | + case AV_PIX_FMT_RGB24: | |
| 122 | 122 | bpp = 8; |
| 123 | 123 | nplanes = 3; |
| 124 | 124 | break; |
| 125 | − case PIX_FMT_RGB8: | |
| 126 | − case PIX_FMT_BGR8: | |
| 127 | − case PIX_FMT_RGB4_BYTE: | |
| 128 | − case PIX_FMT_BGR4_BYTE: | |
| 129 | − case PIX_FMT_GRAY8: | |
| 130 | − case PIX_FMT_PAL8: | |
| 125 | + case AV_PIX_FMT_RGB8: | |
| 126 | + case AV_PIX_FMT_BGR8: | |
| 127 | + case AV_PIX_FMT_RGB4_BYTE: | |
| 128 | + case AV_PIX_FMT_BGR4_BYTE: | |
| 129 | + case AV_PIX_FMT_GRAY8: | |
| 130 | + case AV_PIX_FMT_PAL8: | |
| 131 | 131 | bpp = 8; |
| 132 | 132 | nplanes = 1; |
| 133 | 133 | pal = (uint32_t *)pict->data[1]; |
| 134 | 134 | break; |
| 135 | − case PIX_FMT_MONOBLACK: | |
| 135 | + case AV_PIX_FMT_MONOBLACK: | |
| 136 | 136 | bpp = 1; |
| 137 | 137 | nplanes = 1; |
| 138 | 138 | pal = monoblack_pal; |
| @@ -209,12 +209,12 @@ AVCodec ff_pcx_encoder = { · 70 unmodified lines | ||
| 209 | 209 | .priv_data_size = sizeof(PCXContext), |
| 210 | 210 | .init = pcx_encode_init, |
| 211 | 211 | .encode2 = pcx_encode_frame, |
| 212 | − .pix_fmts = (const enum PixelFormat[]){ | |
| 213 | − PIX_FMT_RGB24, | |
| 214 | − PIX_FMT_RGB8, PIX_FMT_BGR8, PIX_FMT_RGB4_BYTE, PIX_FMT_BGR4_BYTE, | |
| 215 | − PIX_FMT_GRAY8, PIX_FMT_PAL8, | |
| 216 | − PIX_FMT_MONOBLACK, | |
| 217 | − PIX_FMT_NONE | |
| 212 | + .pix_fmts = (const enum AVPixelFormat[]){ | |
| 213 | + AV_PIX_FMT_RGB24, | |
| 214 | + AV_PIX_FMT_RGB8, AV_PIX_FMT_BGR8, AV_PIX_FMT_RGB4_BYTE, AV_PIX_FMT_BGR4_BYTE, | |
| 215 | + AV_PIX_FMT_GRAY8, AV_PIX_FMT_PAL8, | |
| 216 | + AV_PIX_FMT_MONOBLACK, | |
| 217 | + AV_PIX_FMT_NONE | |
| 218 | 218 | }, |
| 219 | 219 | .long_name = NULL_IF_CONFIG_SMALL("PC Paintbrush PCX image"), |
| 220 | 220 | }; |
| @@ -63,7 +63,7 @@ typedef struct PGSSubContext { · 62 unmodified lines | ||
| 63 | 63 | |
| 64 | 64 | static av_cold int init_decoder(AVCodecContext *avctx) |
| 65 | 65 | { |
| 66 | − avctx->pix_fmt = PIX_FMT_PAL8; | |
| 66 | + avctx->pix_fmt = AV_PIX_FMT_PAL8; | |
| 67 | 67 | |
| 68 | 68 | return 0; |
| 69 | 69 | } |
| @@ -136,7 +136,7 @@ static int decode_frame(AVCodecContext *avctx, · 135 unmodified lines | ||
| 136 | 136 | esize = 0; |
| 137 | 137 | } |
| 138 | 138 | |
| 139 | − avctx->pix_fmt = PIX_FMT_PAL8; | |
| 139 | + avctx->pix_fmt = AV_PIX_FMT_PAL8; | |
| 140 | 140 | |
| 141 | 141 | if (s->width != avctx->width && s->height != avctx->height) { |
| 142 | 142 | if (av_image_check_size(s->width, s->height, 0, avctx) < 0) |
| @@ -463,28 +463,28 @@ static int decode_frame(AVCodecContext *avctx, · 462 unmodified lines | ||
| 463 | 463 | |
| 464 | 464 | if (s->bit_depth == 8 && |
| 465 | 465 | s->color_type == PNG_COLOR_TYPE_RGB) { |
| 466 | − avctx->pix_fmt = PIX_FMT_RGB24; | |
| 466 | + avctx->pix_fmt = AV_PIX_FMT_RGB24; | |
| 467 | 467 | } else if (s->bit_depth == 8 && |
| 468 | 468 | s->color_type == PNG_COLOR_TYPE_RGB_ALPHA) { |
| 469 | − avctx->pix_fmt = PIX_FMT_RGB32; | |
| 469 | + avctx->pix_fmt = AV_PIX_FMT_RGB32; | |
| 470 | 470 | } else if (s->bit_depth == 8 && |
| 471 | 471 | s->color_type == PNG_COLOR_TYPE_GRAY) { |
| 472 | − avctx->pix_fmt = PIX_FMT_GRAY8; | |
| 472 | + avctx->pix_fmt = AV_PIX_FMT_GRAY8; | |
| 473 | 473 | } else if (s->bit_depth == 16 && |
| 474 | 474 | s->color_type == PNG_COLOR_TYPE_GRAY) { |
| 475 | − avctx->pix_fmt = PIX_FMT_GRAY16BE; | |
| 475 | + avctx->pix_fmt = AV_PIX_FMT_GRAY16BE; | |
| 476 | 476 | } else if (s->bit_depth == 16 && |
| 477 | 477 | s->color_type == PNG_COLOR_TYPE_RGB) { |
| 478 | − avctx->pix_fmt = PIX_FMT_RGB48BE; | |
| 478 | + avctx->pix_fmt = AV_PIX_FMT_RGB48BE; | |
| 479 | 479 | } else if (s->bit_depth == 1 && |
| 480 | 480 | s->color_type == PNG_COLOR_TYPE_GRAY) { |
| 481 | − avctx->pix_fmt = PIX_FMT_MONOBLACK; | |
| 481 | + avctx->pix_fmt = AV_PIX_FMT_MONOBLACK; | |
| 482 | 482 | } else if (s->bit_depth == 8 && |
| 483 | 483 | s->color_type == PNG_COLOR_TYPE_PALETTE) { |
| 484 | − avctx->pix_fmt = PIX_FMT_PAL8; | |
| 484 | + avctx->pix_fmt = AV_PIX_FMT_PAL8; | |
| 485 | 485 | } else if (s->bit_depth == 8 && |
| 486 | 486 | s->color_type == PNG_COLOR_TYPE_GRAY_ALPHA) { |
| 487 | − avctx->pix_fmt = PIX_FMT_Y400A; | |
| 487 | + avctx->pix_fmt = AV_PIX_FMT_Y400A; | |
| 488 | 488 | } else { |
| 489 | 489 | goto fail; |
| 490 | 490 | } |
| @@ -249,23 +249,23 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt, · 248 unmodified lines | ||
| 249 | 249 | |
| 250 | 250 | is_progressive = !!(avctx->flags & CODEC_FLAG_INTERLACED_DCT); |
| 251 | 251 | switch(avctx->pix_fmt) { |
| 252 | − case PIX_FMT_RGB32: | |
| 252 | + case AV_PIX_FMT_RGB32: | |
| 253 | 253 | bit_depth = 8; |
| 254 | 254 | color_type = PNG_COLOR_TYPE_RGB_ALPHA; |
| 255 | 255 | break; |
| 256 | − case PIX_FMT_RGB24: | |
| 256 | + case AV_PIX_FMT_RGB24: | |
| 257 | 257 | bit_depth = 8; |
| 258 | 258 | color_type = PNG_COLOR_TYPE_RGB; |
| 259 | 259 | break; |
| 260 | − case PIX_FMT_GRAY8: | |
| 260 | + case AV_PIX_FMT_GRAY8: | |
| 261 | 261 | bit_depth = 8; |
| 262 | 262 | color_type = PNG_COLOR_TYPE_GRAY; |
| 263 | 263 | break; |
| 264 | − case PIX_FMT_MONOBLACK: | |
| 264 | + case AV_PIX_FMT_MONOBLACK: | |
| 265 | 265 | bit_depth = 1; |
| 266 | 266 | color_type = PNG_COLOR_TYPE_GRAY; |
| 267 | 267 | break; |
| 268 | − case PIX_FMT_PAL8: | |
| 268 | + case AV_PIX_FMT_PAL8: | |
| 269 | 269 | bit_depth = 8; |
| 270 | 270 | color_type = PNG_COLOR_TYPE_PALETTE; |
| 271 | 271 | break; |
| @@ -447,7 +447,7 @@ static av_cold int png_enc_init(AVCodecContext *avctx){ · 175 unmodified lines | ||
| 447 | 447 | ff_dsputil_init(&s->dsp, avctx); |
| 448 | 448 | |
| 449 | 449 | s->filter_type = av_clip(avctx->prediction_method, PNG_FILTER_VALUE_NONE, PNG_FILTER_VALUE_MIXED); |
| 450 | − if(avctx->pix_fmt == PIX_FMT_MONOBLACK) | |
| 450 | + if(avctx->pix_fmt == AV_PIX_FMT_MONOBLACK) | |
| 451 | 451 | s->filter_type = PNG_FILTER_VALUE_NONE; |
| 452 | 452 | |
| 453 | 453 | return 0; |
| @@ -460,9 +460,9 @@ AVCodec ff_png_encoder = { · 6 unmodified lines | ||
| 460 | 460 | .priv_data_size = sizeof(PNGEncContext), |
| 461 | 461 | .init = png_enc_init, |
| 462 | 462 | .encode2 = encode_frame, |
| 463 | − .pix_fmts = (const enum PixelFormat[]){ | |
| 464 | − PIX_FMT_RGB24, PIX_FMT_RGB32, PIX_FMT_PAL8, PIX_FMT_GRAY8, | |
| 465 | − PIX_FMT_MONOBLACK, PIX_FMT_NONE | |
| 463 | + .pix_fmts = (const enum AVPixelFormat[]){ | |
| 464 | + AV_PIX_FMT_RGB24, AV_PIX_FMT_RGB32, AV_PIX_FMT_PAL8, AV_PIX_FMT_GRAY8, | |
| 465 | + AV_PIX_FMT_MONOBLACK, AV_PIX_FMT_NONE | |
| 466 | 466 | }, |
| 467 | 467 | .long_name = NULL_IF_CONFIG_SMALL("PNG (Portable Network Graphics) image"), |
| 468 | 468 | }; |
| @@ -68,14 +68,14 @@ int ff_pnm_decode_header(AVCodecContext *avctx, PNMContext * const s) · 67 unmodified lines | ||
| 68 | 68 | return -1; |
| 69 | 69 | |
| 70 | 70 | if (s->type==1 || s->type==4) { |
| 71 | − avctx->pix_fmt = PIX_FMT_MONOWHITE; | |
| 71 | + avctx->pix_fmt = AV_PIX_FMT_MONOWHITE; | |
| 72 | 72 | } else if (s->type==2 || s->type==5) { |
| 73 | 73 | if (avctx->codec_id == AV_CODEC_ID_PGMYUV) |
| 74 | − avctx->pix_fmt = PIX_FMT_YUV420P; | |
| 74 | + avctx->pix_fmt = AV_PIX_FMT_YUV420P; | |
| 75 | 75 | else |
| 76 | − avctx->pix_fmt = PIX_FMT_GRAY8; | |
| 76 | + avctx->pix_fmt = AV_PIX_FMT_GRAY8; | |
| 77 | 77 | } else if (s->type==3 || s->type==6) { |
| 78 | − avctx->pix_fmt = PIX_FMT_RGB24; | |
| 78 | + avctx->pix_fmt = AV_PIX_FMT_RGB24; | |
| 79 | 79 | } else if (s->type==7) { |
| 80 | 80 | w = -1; |
| 81 | 81 | h = -1; |
| @@ -114,19 +114,19 @@ int ff_pnm_decode_header(AVCodecContext *avctx, PNMContext * const s) · 32 unmodified lines | ||
| 114 | 114 | avctx->height = h; |
| 115 | 115 | if (depth == 1) { |
| 116 | 116 | if (maxval == 1) |
| 117 | − avctx->pix_fmt = PIX_FMT_MONOWHITE; | |
| 117 | + avctx->pix_fmt = AV_PIX_FMT_MONOWHITE; | |
| 118 | 118 | else |
| 119 | − avctx->pix_fmt = PIX_FMT_GRAY8; | |
| 119 | + avctx->pix_fmt = AV_PIX_FMT_GRAY8; | |
| 120 | 120 | } else if (depth == 3) { |
| 121 | 121 | if (maxval < 256) { |
| 122 | − avctx->pix_fmt = PIX_FMT_RGB24; | |
| 122 | + avctx->pix_fmt = AV_PIX_FMT_RGB24; | |
| 123 | 123 | } else { |
| 124 | 124 | av_log(avctx, AV_LOG_ERROR, "16-bit components are only supported for grayscale\n"); |
| 125 | − avctx->pix_fmt = PIX_FMT_NONE; | |
| 125 | + avctx->pix_fmt = AV_PIX_FMT_NONE; | |
| 126 | 126 | return -1; |
| 127 | 127 | } |
| 128 | 128 | } else if (depth == 4) { |
| 129 | − avctx->pix_fmt = PIX_FMT_RGB32; | |
| 129 | + avctx->pix_fmt = AV_PIX_FMT_RGB32; | |
| 130 | 130 | } else { |
| 131 | 131 | return -1; |
| 132 | 132 | } |
| @@ -142,7 +142,7 @@ int ff_pnm_decode_header(AVCodecContext *avctx, PNMContext * const s) · 9 unmodified lines | ||
| 142 | 142 | avctx->height = atoi(buf1); |
| 143 | 143 | if(av_image_check_size(avctx->width, avctx->height, 0, avctx)) |
| 144 | 144 | return -1; |
| 145 | − if (avctx->pix_fmt != PIX_FMT_MONOWHITE) { | |
| 145 | + if (avctx->pix_fmt != AV_PIX_FMT_MONOWHITE) { | |
| 146 | 146 | pnm_get(s, buf1, sizeof(buf1)); |
| 147 | 147 | s->maxval = atoi(buf1); |
| 148 | 148 | if (s->maxval <= 0) { |
| @@ -150,23 +150,23 @@ int ff_pnm_decode_header(AVCodecContext *avctx, PNMContext * const s) · 1 unmodified line | ||
| 150 | 150 | s->maxval = 255; |
| 151 | 151 | } |
| 152 | 152 | if (s->maxval >= 256) { |
| 153 | − if (avctx->pix_fmt == PIX_FMT_GRAY8) { | |
| 154 | − avctx->pix_fmt = PIX_FMT_GRAY16BE; | |
| 153 | + if (avctx->pix_fmt == AV_PIX_FMT_GRAY8) { | |
| 154 | + avctx->pix_fmt = AV_PIX_FMT_GRAY16BE; | |
| 155 | 155 | if (s->maxval != 65535) |
| 156 | − avctx->pix_fmt = PIX_FMT_GRAY16; | |
| 157 | − } else if (avctx->pix_fmt == PIX_FMT_RGB24) { | |
| 156 | + avctx->pix_fmt = AV_PIX_FMT_GRAY16; | |
| 157 | + } else if (avctx->pix_fmt == AV_PIX_FMT_RGB24) { | |
| 158 | 158 | if (s->maxval > 255) |
| 159 | − avctx->pix_fmt = PIX_FMT_RGB48BE; | |
| 159 | + avctx->pix_fmt = AV_PIX_FMT_RGB48BE; | |
| 160 | 160 | } else { |
| 161 | 161 | av_log(avctx, AV_LOG_ERROR, "Unsupported pixel format\n"); |
| 162 | − avctx->pix_fmt = PIX_FMT_NONE; | |
| 162 | + avctx->pix_fmt = AV_PIX_FMT_NONE; | |
| 163 | 163 | return -1; |
| 164 | 164 | } |
| 165 | 165 | } |
| 166 | 166 | }else |
| 167 | 167 | s->maxval=1; |
| 168 | 168 | /* more check if YUV420 */ |
| 169 | − if (avctx->pix_fmt == PIX_FMT_YUV420P) { | |
| 169 | + if (avctx->pix_fmt == AV_PIX_FMT_YUV420P) { | |
| 170 | 170 | if ((avctx->width & 1) != 0) |
| 171 | 171 | return -1; |
| 172 | 172 | h = (avctx->height * 2); |
| @@ -58,33 +58,33 @@ static int pnm_decode_frame(AVCodecContext *avctx, void *data, · 57 unmodified lines | ||
| 58 | 58 | switch (avctx->pix_fmt) { |
| 59 | 59 | default: |
| 60 | 60 | return -1; |
| 61 | − case PIX_FMT_RGB48BE: | |
| 61 | + case AV_PIX_FMT_RGB48BE: | |
| 62 | 62 | n = avctx->width * 6; |
| 63 | 63 | components=3; |
| 64 | 64 | sample_len=16; |
| 65 | 65 | goto do_read; |
| 66 | − case PIX_FMT_RGB24: | |
| 66 | + case AV_PIX_FMT_RGB24: | |
| 67 | 67 | n = avctx->width * 3; |
| 68 | 68 | components=3; |
| 69 | 69 | sample_len=8; |
| 70 | 70 | goto do_read; |
| 71 | − case PIX_FMT_GRAY8: | |
| 71 | + case AV_PIX_FMT_GRAY8: | |
| 72 | 72 | n = avctx->width; |
| 73 | 73 | components=1; |
| 74 | 74 | sample_len=8; |
| 75 | 75 | if (s->maxval < 255) |
| 76 | 76 | upgrade = 1; |
| 77 | 77 | goto do_read; |
| 78 | − case PIX_FMT_GRAY16BE: | |
| 79 | − case PIX_FMT_GRAY16LE: | |
| 78 | + case AV_PIX_FMT_GRAY16BE: | |
| 79 | + case AV_PIX_FMT_GRAY16LE: | |
| 80 | 80 | n = avctx->width * 2; |
| 81 | 81 | components=1; |
| 82 | 82 | sample_len=16; |
| 83 | 83 | if (s->maxval < 65535) |
| 84 | 84 | upgrade = 2; |
| 85 | 85 | goto do_read; |
| 86 | − case PIX_FMT_MONOWHITE: | |
| 87 | − case PIX_FMT_MONOBLACK: | |
| 86 | + case AV_PIX_FMT_MONOWHITE: | |
| 87 | + case AV_PIX_FMT_MONOBLACK: | |
| 88 | 88 | n = (avctx->width + 7) >> 3; |
| 89 | 89 | components=1; |
| 90 | 90 | sample_len=1; |
| @@ -133,7 +133,7 @@ static int pnm_decode_frame(AVCodecContext *avctx, void *data, · 42 unmodified lines | ||
| 133 | 133 | } |
| 134 | 134 | } |
| 135 | 135 | break; |
| 136 | − case PIX_FMT_YUV420P: | |
| 136 | + case AV_PIX_FMT_YUV420P: | |
| 137 | 137 | { |
| 138 | 138 | unsigned char *ptr1, *ptr2; |
| 139 | 139 | |
| @@ -161,7 +161,7 @@ static int pnm_decode_frame(AVCodecContext *avctx, void *data, · 21 unmodified lines | ||
| 161 | 161 | } |
| 162 | 162 | } |
| 163 | 163 | break; |
| 164 | − case PIX_FMT_RGB32: | |
| 164 | + case AV_PIX_FMT_RGB32: | |
| 165 | 165 | ptr = p->data[0]; |
| 166 | 166 | linesize = p->linesize[0]; |
| 167 | 167 | if (s->bytestream + avctx->width * avctx->height * 4 > s->bytestream_end) |
| @@ -51,27 +51,27 @@ static int pnm_encode_frame(AVCodecContext *avctx, AVPacket *pkt, · 50 unmodified lines | ||
| 51 | 51 | h = avctx->height; |
| 52 | 52 | h1 = h; |
| 53 | 53 | switch (avctx->pix_fmt) { |
| 54 | − case PIX_FMT_MONOWHITE: | |
| 54 | + case AV_PIX_FMT_MONOWHITE: | |
| 55 | 55 | c = '4'; |
| 56 | 56 | n = (avctx->width + 7) >> 3; |
| 57 | 57 | break; |
| 58 | − case PIX_FMT_GRAY8: | |
| 58 | + case AV_PIX_FMT_GRAY8: | |
| 59 | 59 | c = '5'; |
| 60 | 60 | n = avctx->width; |
| 61 | 61 | break; |
| 62 | − case PIX_FMT_GRAY16BE: | |
| 62 | + case AV_PIX_FMT_GRAY16BE: | |
| 63 | 63 | c = '5'; |
| 64 | 64 | n = avctx->width * 2; |
| 65 | 65 | break; |
| 66 | − case PIX_FMT_RGB24: | |
| 66 | + case AV_PIX_FMT_RGB24: | |
| 67 | 67 | c = '6'; |
| 68 | 68 | n = avctx->width * 3; |
| 69 | 69 | break; |
| 70 | − case PIX_FMT_RGB48BE: | |
| 70 | + case AV_PIX_FMT_RGB48BE: | |
| 71 | 71 | c = '6'; |
| 72 | 72 | n = avctx->width * 6; |
| 73 | 73 | break; |
| 74 | − case PIX_FMT_YUV420P: | |
| 74 | + case AV_PIX_FMT_YUV420P: | |
| 75 | 75 | c = '5'; |
| 76 | 76 | n = avctx->width; |
| 77 | 77 | h1 = (h * 3) / 2; |
| @@ -82,9 +82,9 @@ static int pnm_encode_frame(AVCodecContext *avctx, AVPacket *pkt, · 4 unmodified lines | ||
| 82 | 82 | snprintf(s->bytestream, s->bytestream_end - s->bytestream, |
| 83 | 83 | "P%c\n%d %d\n", c, avctx->width, h1); |
| 84 | 84 | s->bytestream += strlen(s->bytestream); |
| 85 | − if (avctx->pix_fmt != PIX_FMT_MONOWHITE) { | |
| 85 | + if (avctx->pix_fmt != AV_PIX_FMT_MONOWHITE) { | |
| 86 | 86 | snprintf(s->bytestream, s->bytestream_end - s->bytestream, |
| 87 | − "%d\n", (avctx->pix_fmt != PIX_FMT_GRAY16BE && avctx->pix_fmt != PIX_FMT_RGB48BE) ? 255 : 65535); | |
| 87 | + "%d\n", (avctx->pix_fmt != AV_PIX_FMT_GRAY16BE && avctx->pix_fmt != AV_PIX_FMT_RGB48BE) ? 255 : 65535); | |
| 88 | 88 | s->bytestream += strlen(s->bytestream); |
| 89 | 89 | } |
| 90 | 90 | |
| @@ -96,7 +96,7 @@ static int pnm_encode_frame(AVCodecContext *avctx, AVPacket *pkt, · 5 unmodified lines | ||
| 96 | 96 | ptr += linesize; |
| 97 | 97 | } |
| 98 | 98 | |
| 99 | − if (avctx->pix_fmt == PIX_FMT_YUV420P) { | |
| 99 | + if (avctx->pix_fmt == AV_PIX_FMT_YUV420P) { | |
| 100 | 100 | h >>= 1; |
| 101 | 101 | n >>= 1; |
| 102 | 102 | ptr1 = p->data[1]; |
| @@ -126,8 +126,8 @@ AVCodec ff_pgm_encoder = { · 23 unmodified lines | ||
| 126 | 126 | .priv_data_size = sizeof(PNMContext), |
| 127 | 127 | .init = ff_pnm_init, |
| 128 | 128 | .encode2 = pnm_encode_frame, |
| 129 | − .pix_fmts = (const enum PixelFormat[]){ | |
| 130 | − PIX_FMT_GRAY8, PIX_FMT_GRAY16BE, PIX_FMT_NONE | |
| 129 | + .pix_fmts = (const enum AVPixelFormat[]){ | |
| 130 | + AV_PIX_FMT_GRAY8, AV_PIX_FMT_GRAY16BE, AV_PIX_FMT_NONE | |
| 131 | 131 | }, |
| 132 | 132 | .long_name = NULL_IF_CONFIG_SMALL("PGM (Portable GrayMap) image"), |
| 133 | 133 | }; |
| @@ -141,7 +141,7 @@ AVCodec ff_pgmyuv_encoder = { · 7 unmodified lines | ||
| 141 | 141 | .priv_data_size = sizeof(PNMContext), |
| 142 | 142 | .init = ff_pnm_init, |
| 143 | 143 | .encode2 = pnm_encode_frame, |
| 144 | − .pix_fmts = (const enum PixelFormat[]){ PIX_FMT_YUV420P, PIX_FMT_NONE }, | |
| 144 | + .pix_fmts = (const enum AVPixelFormat[]){ AV_PIX_FMT_YUV420P, AV_PIX_FMT_NONE }, | |
| 145 | 145 | .long_name = NULL_IF_CONFIG_SMALL("PGMYUV (Portable GrayMap YUV) image"), |
| 146 | 146 | }; |
| 147 | 147 | #endif |
| @@ -154,8 +154,8 @@ AVCodec ff_ppm_encoder = { · 6 unmodified lines | ||
| 154 | 154 | .priv_data_size = sizeof(PNMContext), |
| 155 | 155 | .init = ff_pnm_init, |
| 156 | 156 | .encode2 = pnm_encode_frame, |
| 157 | − .pix_fmts = (const enum PixelFormat[]){ | |
| 158 | − PIX_FMT_RGB24, PIX_FMT_RGB48BE, PIX_FMT_NONE | |
| 157 | + .pix_fmts = (const enum AVPixelFormat[]){ | |
| 158 | + AV_PIX_FMT_RGB24, AV_PIX_FMT_RGB48BE, AV_PIX_FMT_NONE | |
| 159 | 159 | }, |
| 160 | 160 | .long_name = NULL_IF_CONFIG_SMALL("PPM (Portable PixelMap) image"), |
| 161 | 161 | }; |
| @@ -169,8 +169,8 @@ AVCodec ff_pbm_encoder = { · 7 unmodified lines | ||
| 169 | 169 | .priv_data_size = sizeof(PNMContext), |
| 170 | 170 | .init = ff_pnm_init, |
| 171 | 171 | .encode2 = pnm_encode_frame, |
| 172 | − .pix_fmts = (const enum PixelFormat[]){ PIX_FMT_MONOWHITE, | |
| 173 | − PIX_FMT_NONE }, | |
| 172 | + .pix_fmts = (const enum AVPixelFormat[]){ AV_PIX_FMT_MONOWHITE, | |
| 173 | + AV_PIX_FMT_NONE }, | |
| 174 | 174 | .long_name = NULL_IF_CONFIG_SMALL("PBM (Portable BitMap) image"), |
| 175 | 175 | }; |
| 176 | 176 | #endif |
| @@ -139,10 +139,10 @@ static int decode_frame_header(ProresContext *ctx, const uint8_t *buf, · 138 unmodified lines | ||
| 139 | 139 | ctx->num_chroma_blocks = (1 << ctx->chroma_factor) >> 1; |
| 140 | 140 | switch (ctx->chroma_factor) { |
| 141 | 141 | case 2: |
| 142 | − avctx->pix_fmt = PIX_FMT_YUV422P10; | |
| 142 | + avctx->pix_fmt = AV_PIX_FMT_YUV422P10; | |
| 143 | 143 | break; |
| 144 | 144 | case 3: |
| 145 | − avctx->pix_fmt = PIX_FMT_YUV444P10; | |
| 145 | + avctx->pix_fmt = AV_PIX_FMT_YUV444P10; | |
| 146 | 146 | break; |
| 147 | 147 | default: |
| 148 | 148 | av_log(avctx, AV_LOG_ERROR, |
| @@ -33,7 +33,7 @@ · 32 unmodified lines | ||
| 33 | 33 | |
| 34 | 34 | #define MAX_MBS_PER_SLICE 8 |
| 35 | 35 | |
| 36 | −#define MAX_PLANES 3 // should be increased to 4 when there's PIX_FMT_YUV444AP10 | |
| 36 | +#define MAX_PLANES 3 // should be increased to 4 when there's AV_PIX_FMT_YUV444AP10 | |
| 37 | 37 | |
| 38 | 38 | enum { |
| 39 | 39 | PRORES_PROFILE_PROXY = 0, |
| @@ -904,7 +904,7 @@ static av_cold int encode_init(AVCodecContext *avctx) · 864 unmodified lines | ||
| 904 | 904 | return AVERROR(EINVAL); |
| 905 | 905 | } |
| 906 | 906 | |
| 907 | − ctx->chroma_factor = avctx->pix_fmt == PIX_FMT_YUV422P10 | |
| 907 | + ctx->chroma_factor = avctx->pix_fmt == AV_PIX_FMT_YUV422P10 | |
| 908 | 908 | ? CFACTOR_Y422 |
| 909 | 909 | : CFACTOR_Y444; |
| 910 | 910 | ctx->profile_info = prores_profile_info + ctx->profile; |
| @@ -1071,8 +1071,8 @@ AVCodec ff_prores_encoder = { · 160 unmodified lines | ||
| 1071 | 1071 | .encode2 = encode_frame, |
| 1072 | 1072 | .capabilities = CODEC_CAP_SLICE_THREADS, |
| 1073 | 1073 | .long_name = NULL_IF_CONFIG_SMALL("Apple ProRes (iCodec Pro)"), |
| 1074 | − .pix_fmts = (const enum PixelFormat[]) { | |
| 1075 | − PIX_FMT_YUV422P10, PIX_FMT_YUV444P10, PIX_FMT_NONE | |
| 1074 | + .pix_fmts = (const enum AVPixelFormat[]) { | |
| 1075 | + AV_PIX_FMT_YUV422P10, AV_PIX_FMT_YUV444P10, AV_PIX_FMT_NONE | |
| 1076 | 1076 | }, |
| 1077 | 1077 | .priv_class = &proresenc_class, |
| 1078 | 1078 | }; |
| @@ -59,7 +59,7 @@ static int ptx_decode_frame(AVCodecContext *avctx, void *data, int *data_size, · 58 unmodified lines | ||
| 59 | 59 | return -1; |
| 60 | 60 | } |
| 61 | 61 | |
| 62 | − avctx->pix_fmt = PIX_FMT_RGB555; | |
| 62 | + avctx->pix_fmt = AV_PIX_FMT_RGB555; | |
| 63 | 63 | |
| 64 | 64 | if (buf_end - buf < offset) |
| 65 | 65 | return AVERROR_INVALIDDATA; |
| @@ -148,7 +148,7 @@ static int decode_frame(AVCodecContext *avctx, · 147 unmodified lines | ||
| 148 | 148 | static av_cold int decode_init(AVCodecContext *avctx){ |
| 149 | 149 | // QdrawContext * const a = avctx->priv_data; |
| 150 | 150 | |
| 151 | − avctx->pix_fmt= PIX_FMT_PAL8; | |
| 151 | + avctx->pix_fmt= AV_PIX_FMT_PAL8; | |
| 152 | 152 | |
| 153 | 153 | return 0; |
| 154 | 154 | } |
| @@ -290,7 +290,7 @@ static av_cold int decode_init(AVCodecContext *avctx){ · 289 unmodified lines | ||
| 290 | 290 | QpegContext * const a = avctx->priv_data; |
| 291 | 291 | |
| 292 | 292 | a->avctx = avctx; |
| 293 | − avctx->pix_fmt= PIX_FMT_PAL8; | |
| 293 | + avctx->pix_fmt= AV_PIX_FMT_PAL8; | |
| 294 | 294 | a->refdata = av_malloc(avctx->width * avctx->height); |
| 295 | 295 | |
| 296 | 296 | return 0; |
| @@ -346,7 +346,7 @@ static av_cold int qtrle_decode_init(AVCodecContext *avctx) · 345 unmodified lines | ||
| 346 | 346 | switch (avctx->bits_per_coded_sample) { |
| 347 | 347 | case 1: |
| 348 | 348 | case 33: |
| 349 | − avctx->pix_fmt = PIX_FMT_MONOWHITE; | |
| 349 | + avctx->pix_fmt = AV_PIX_FMT_MONOWHITE; | |
| 350 | 350 | break; |
| 351 | 351 | |
| 352 | 352 | case 2: |
| @@ -355,19 +355,19 @@ static av_cold int qtrle_decode_init(AVCodecContext *avctx) · 2 unmodified lines | ||
| 355 | 355 | case 34: |
| 356 | 356 | case 36: |
| 357 | 357 | case 40: |
| 358 | − avctx->pix_fmt = PIX_FMT_PAL8; | |
| 358 | + avctx->pix_fmt = AV_PIX_FMT_PAL8; | |
| 359 | 359 | break; |
| 360 | 360 | |
| 361 | 361 | case 16: |
| 362 | − avctx->pix_fmt = PIX_FMT_RGB555; | |
| 362 | + avctx->pix_fmt = AV_PIX_FMT_RGB555; | |
| 363 | 363 | break; |
| 364 | 364 | |
| 365 | 365 | case 24: |
| 366 | − avctx->pix_fmt = PIX_FMT_RGB24; | |
| 366 | + avctx->pix_fmt = AV_PIX_FMT_RGB24; | |
| 367 | 367 | break; |
| 368 | 368 | |
| 369 | 369 | case 32: |
| 370 | − avctx->pix_fmt = PIX_FMT_RGB32; | |
| 370 | + avctx->pix_fmt = AV_PIX_FMT_RGB32; | |
| 371 | 371 | break; |
| 372 | 372 | |
| 373 | 373 | default: |
| @@ -70,13 +70,13 @@ static av_cold int qtrle_encode_init(AVCodecContext *avctx) · 69 unmodified lines | ||
| 70 | 70 | s->avctx=avctx; |
| 71 | 71 | |
| 72 | 72 | switch (avctx->pix_fmt) { |
| 73 | − case PIX_FMT_RGB555BE: | |
| 73 | + case AV_PIX_FMT_RGB555BE: | |
| 74 | 74 | s->pixel_size = 2; |
| 75 | 75 | break; |
| 76 | − case PIX_FMT_RGB24: | |
| 76 | + case AV_PIX_FMT_RGB24: | |
| 77 | 77 | s->pixel_size = 3; |
| 78 | 78 | break; |
| 79 | − case PIX_FMT_ARGB: | |
| 79 | + case AV_PIX_FMT_ARGB: | |
| 80 | 80 | s->pixel_size = 4; |
| 81 | 81 | break; |
| 82 | 82 | default: |
| @@ -335,8 +335,8 @@ AVCodec ff_qtrle_encoder = { · 252 unmodified lines | ||
| 335 | 335 | .init = qtrle_encode_init, |
| 336 | 336 | .encode2 = qtrle_encode_frame, |
| 337 | 337 | .close = qtrle_encode_end, |
| 338 | − .pix_fmts = (const enum PixelFormat[]){ | |
| 339 | − PIX_FMT_RGB24, PIX_FMT_RGB555BE, PIX_FMT_ARGB, PIX_FMT_NONE | |
| 338 | + .pix_fmts = (const enum AVPixelFormat[]){ | |
| 339 | + AV_PIX_FMT_RGB24, AV_PIX_FMT_RGB555BE, AV_PIX_FMT_ARGB, AV_PIX_FMT_NONE | |
| 340 | 340 | }, |
| 341 | 341 | .long_name = NULL_IF_CONFIG_SMALL("QuickTime Animation (RLE) video"), |
| 342 | 342 | }; |
| @@ -26,7 +26,7 @@ · 25 unmodified lines | ||
| 26 | 26 | |
| 27 | 27 | static av_cold int decode_init(AVCodecContext *avctx) |
| 28 | 28 | { |
| 29 | − avctx->pix_fmt = PIX_FMT_RGB48; | |
| 29 | + avctx->pix_fmt = AV_PIX_FMT_RGB48; | |
| 30 | 30 | avctx->bits_per_raw_sample = 10; |
| 31 | 31 | |
| 32 | 32 | avctx->coded_frame = avcodec_alloc_frame(); |
| @@ -29,126 +29,126 @@ · 28 unmodified lines | ||
| 29 | 29 | #include "libavutil/common.h" |
| 30 | 30 | |
| 31 | 31 | const PixelFormatTag ff_raw_pix_fmt_tags[] = { |
| 32 | − { PIX_FMT_YUV420P, MKTAG('I', '4', '2', '0') }, /* Planar formats */ | |
| 33 | − { PIX_FMT_YUV420P, MKTAG('I', 'Y', 'U', 'V') }, | |
| 34 | − { PIX_FMT_YUV420P, MKTAG('Y', 'V', '1', '2') }, | |
| 35 | − { PIX_FMT_YUV410P, MKTAG('Y', 'U', 'V', '9') }, | |
| 36 | − { PIX_FMT_YUV410P, MKTAG('Y', 'V', 'U', '9') }, | |
| 37 | − { PIX_FMT_YUV411P, MKTAG('Y', '4', '1', 'B') }, | |
| 38 | − { PIX_FMT_YUV422P, MKTAG('Y', '4', '2', 'B') }, | |
| 39 | − { PIX_FMT_YUV422P, MKTAG('P', '4', '2', '2') }, | |
| 40 | − { PIX_FMT_YUV422P, MKTAG('Y', 'V', '1', '6') }, | |
| 32 | + { AV_PIX_FMT_YUV420P, MKTAG('I', '4', '2', '0') }, /* Planar formats */ | |
| 33 | + { AV_PIX_FMT_YUV420P, MKTAG('I', 'Y', 'U', 'V') }, | |
| 34 | + { AV_PIX_FMT_YUV420P, MKTAG('Y', 'V', '1', '2') }, | |
| 35 | + { AV_PIX_FMT_YUV410P, MKTAG('Y', 'U', 'V', '9') }, | |
| 36 | + { AV_PIX_FMT_YUV410P, MKTAG('Y', 'V', 'U', '9') }, | |
| 37 | + { AV_PIX_FMT_YUV411P, MKTAG('Y', '4', '1', 'B') }, | |
| 38 | + { AV_PIX_FMT_YUV422P, MKTAG('Y', '4', '2', 'B') }, | |
| 39 | + { AV_PIX_FMT_YUV422P, MKTAG('P', '4', '2', '2') }, | |
| 40 | + { AV_PIX_FMT_YUV422P, MKTAG('Y', 'V', '1', '6') }, | |
| 41 | 41 | /* yuvjXXX formats are deprecated hacks specific to libav*, |
| 42 | 42 | they are identical to yuvXXX */ |
| 43 | − { PIX_FMT_YUVJ420P, MKTAG('I', '4', '2', '0') }, /* Planar formats */ | |
| 44 | − { PIX_FMT_YUVJ420P, MKTAG('I', 'Y', 'U', 'V') }, | |
| 45 | − { PIX_FMT_YUVJ420P, MKTAG('Y', 'V', '1', '2') }, | |
| 46 | − { PIX_FMT_YUVJ422P, MKTAG('Y', '4', '2', 'B') }, | |
| 47 | − { PIX_FMT_YUVJ422P, MKTAG('P', '4', '2', '2') }, | |
| 48 | − { PIX_FMT_GRAY8, MKTAG('Y', '8', '0', '0') }, | |
| 49 | − { PIX_FMT_GRAY8, MKTAG('Y', '8', ' ', ' ') }, | |
| 43 | + { AV_PIX_FMT_YUVJ420P, MKTAG('I', '4', '2', '0') }, /* Planar formats */ | |
| 44 | + { AV_PIX_FMT_YUVJ420P, MKTAG('I', 'Y', 'U', 'V') }, | |
| 45 | + { AV_PIX_FMT_YUVJ420P, MKTAG('Y', 'V', '1', '2') }, | |
| 46 | + { AV_PIX_FMT_YUVJ422P, MKTAG('Y', '4', '2', 'B') }, | |
| 47 | + { AV_PIX_FMT_YUVJ422P, MKTAG('P', '4', '2', '2') }, | |
| 48 | + { AV_PIX_FMT_GRAY8, MKTAG('Y', '8', '0', '0') }, | |
| 49 | + { AV_PIX_FMT_GRAY8, MKTAG('Y', '8', ' ', ' ') }, | |
| 50 | 50 | |
| 51 | − { PIX_FMT_YUYV422, MKTAG('Y', 'U', 'Y', '2') }, /* Packed formats */ | |
| 52 | − { PIX_FMT_YUYV422, MKTAG('Y', '4', '2', '2') }, | |
| 53 | − { PIX_FMT_YUYV422, MKTAG('V', '4', '2', '2') }, | |
| 54 | − { PIX_FMT_YUYV422, MKTAG('V', 'Y', 'U', 'Y') }, | |
| 55 | − { PIX_FMT_YUYV422, MKTAG('Y', 'U', 'N', 'V') }, | |
| 56 | − { PIX_FMT_UYVY422, MKTAG('U', 'Y', 'V', 'Y') }, | |
| 57 | − { PIX_FMT_UYVY422, MKTAG('H', 'D', 'Y', 'C') }, | |
| 58 | − { PIX_FMT_UYVY422, MKTAG('U', 'Y', 'N', 'V') }, | |
| 59 | − { PIX_FMT_UYVY422, MKTAG('U', 'Y', 'N', 'Y') }, | |
| 60 | − { PIX_FMT_UYVY422, MKTAG('u', 'y', 'v', '1') }, | |
| 61 | − { PIX_FMT_UYVY422, MKTAG('2', 'V', 'u', '1') }, | |
| 62 | − { PIX_FMT_UYVY422, MKTAG('A', 'V', 'R', 'n') }, /* Avid AVI Codec 1:1 */ | |
| 63 | − { PIX_FMT_UYVY422, MKTAG('A', 'V', '1', 'x') }, /* Avid 1:1x */ | |
| 64 | − { PIX_FMT_UYVY422, MKTAG('A', 'V', 'u', 'p') }, | |
| 65 | − { PIX_FMT_UYVY422, MKTAG('V', 'D', 'T', 'Z') }, /* SoftLab-NSK VideoTizer */ | |
| 66 | − { PIX_FMT_UYVY422, MKTAG('a', 'u', 'v', '2') }, | |
| 67 | − { PIX_FMT_UYYVYY411, MKTAG('Y', '4', '1', '1') }, | |
| 68 | − { PIX_FMT_GRAY8, MKTAG('G', 'R', 'E', 'Y') }, | |
| 69 | − { PIX_FMT_NV12, MKTAG('N', 'V', '1', '2') }, | |
| 70 | − { PIX_FMT_NV21, MKTAG('N', 'V', '2', '1') }, | |
| 51 | + { AV_PIX_FMT_YUYV422, MKTAG('Y', 'U', 'Y', '2') }, /* Packed formats */ | |
| 52 | + { AV_PIX_FMT_YUYV422, MKTAG('Y', '4', '2', '2') }, | |
| 53 | + { AV_PIX_FMT_YUYV422, MKTAG('V', '4', '2', '2') }, | |
| 54 | + { AV_PIX_FMT_YUYV422, MKTAG('V', 'Y', 'U', 'Y') }, | |
| 55 | + { AV_PIX_FMT_YUYV422, MKTAG('Y', 'U', 'N', 'V') }, | |
| 56 | + { AV_PIX_FMT_UYVY422, MKTAG('U', 'Y', 'V', 'Y') }, | |
| 57 | + { AV_PIX_FMT_UYVY422, MKTAG('H', 'D', 'Y', 'C') }, | |
| 58 | + { AV_PIX_FMT_UYVY422, MKTAG('U', 'Y', 'N', 'V') }, | |
| 59 | + { AV_PIX_FMT_UYVY422, MKTAG('U', 'Y', 'N', 'Y') }, | |
| 60 | + { AV_PIX_FMT_UYVY422, MKTAG('u', 'y', 'v', '1') }, | |
| 61 | + { AV_PIX_FMT_UYVY422, MKTAG('2', 'V', 'u', '1') }, | |
| 62 | + { AV_PIX_FMT_UYVY422, MKTAG('A', 'V', 'R', 'n') }, /* Avid AVI Codec 1:1 */ | |
| 63 | + { AV_PIX_FMT_UYVY422, MKTAG('A', 'V', '1', 'x') }, /* Avid 1:1x */ | |
| 64 | + { AV_PIX_FMT_UYVY422, MKTAG('A', 'V', 'u', 'p') }, | |
| 65 | + { AV_PIX_FMT_UYVY422, MKTAG('V', 'D', 'T', 'Z') }, /* SoftLab-NSK VideoTizer */ | |
| 66 | + { AV_PIX_FMT_UYVY422, MKTAG('a', 'u', 'v', '2') }, | |
| 67 | + { AV_PIX_FMT_UYYVYY411, MKTAG('Y', '4', '1', '1') }, | |
| 68 | + { AV_PIX_FMT_GRAY8, MKTAG('G', 'R', 'E', 'Y') }, | |
| 69 | + { AV_PIX_FMT_NV12, MKTAG('N', 'V', '1', '2') }, | |
| 70 | + { AV_PIX_FMT_NV21, MKTAG('N', 'V', '2', '1') }, | |
| 71 | 71 | |
| 72 | 72 | /* nut */ |
| 73 | − { PIX_FMT_RGB555LE, MKTAG('R', 'G', 'B', 15) }, | |
| 74 | − { PIX_FMT_BGR555LE, MKTAG('B', 'G', 'R', 15) }, | |
| 75 | − { PIX_FMT_RGB565LE, MKTAG('R', 'G', 'B', 16) }, | |
| 76 | − { PIX_FMT_BGR565LE, MKTAG('B', 'G', 'R', 16) }, | |
| 77 | − { PIX_FMT_RGB555BE, MKTAG(15 , 'B', 'G', 'R') }, | |
| 78 | − { PIX_FMT_BGR555BE, MKTAG(15 , 'R', 'G', 'B') }, | |
| 79 | − { PIX_FMT_RGB565BE, MKTAG(16 , 'B', 'G', 'R') }, | |
| 80 | − { PIX_FMT_BGR565BE, MKTAG(16 , 'R', 'G', 'B') }, | |
| 81 | − { PIX_FMT_RGB444LE, MKTAG('R', 'G', 'B', 12) }, | |
| 82 | − { PIX_FMT_BGR444LE, MKTAG('B', 'G', 'R', 12) }, | |
| 83 | − { PIX_FMT_RGB444BE, MKTAG(12 , 'B', 'G', 'R') }, | |
| 84 | − { PIX_FMT_BGR444BE, MKTAG(12 , 'R', 'G', 'B') }, | |
| 85 | − { PIX_FMT_RGBA, MKTAG('R', 'G', 'B', 'A') }, | |
| 86 | − { PIX_FMT_BGRA, MKTAG('B', 'G', 'R', 'A') }, | |
| 87 | − { PIX_FMT_ABGR, MKTAG('A', 'B', 'G', 'R') }, | |
| 88 | − { PIX_FMT_ARGB, MKTAG('A', 'R', 'G', 'B') }, | |
| 89 | − { PIX_FMT_RGB24, MKTAG('R', 'G', 'B', 24 ) }, | |
| 90 | − { PIX_FMT_BGR24, MKTAG('B', 'G', 'R', 24 ) }, | |
| 91 | − { PIX_FMT_YUV411P, MKTAG('4', '1', '1', 'P') }, | |
| 92 | − { PIX_FMT_YUV422P, MKTAG('4', '2', '2', 'P') }, | |
| 93 | − { PIX_FMT_YUVJ422P, MKTAG('4', '2', '2', 'P') }, | |
| 94 | − { PIX_FMT_YUV440P, MKTAG('4', '4', '0', 'P') }, | |
| 95 | − { PIX_FMT_YUVJ440P, MKTAG('4', '4', '0', 'P') }, | |
| 96 | − { PIX_FMT_YUV444P, MKTAG('4', '4', '4', 'P') }, | |
| 97 | − { PIX_FMT_YUVJ444P, MKTAG('4', '4', '4', 'P') }, | |
| 98 | − { PIX_FMT_MONOWHITE,MKTAG('B', '1', 'W', '0') }, | |
| 99 | − { PIX_FMT_MONOBLACK,MKTAG('B', '0', 'W', '1') }, | |
| 100 | − { PIX_FMT_BGR8, MKTAG('B', 'G', 'R', 8 ) }, | |
| 101 | − { PIX_FMT_RGB8, MKTAG('R', 'G', 'B', 8 ) }, | |
| 102 | − { PIX_FMT_BGR4, MKTAG('B', 'G', 'R', 4 ) }, | |
| 103 | − { PIX_FMT_RGB4, MKTAG('R', 'G', 'B', 4 ) }, | |
| 104 | − { PIX_FMT_RGB4_BYTE,MKTAG('B', '4', 'B', 'Y') }, | |
| 105 | − { PIX_FMT_BGR4_BYTE,MKTAG('R', '4', 'B', 'Y') }, | |
| 106 | − { PIX_FMT_RGB48LE, MKTAG('R', 'G', 'B', 48 ) }, | |
| 107 | − { PIX_FMT_RGB48BE, MKTAG( 48, 'R', 'G', 'B') }, | |
| 108 | − { PIX_FMT_BGR48LE, MKTAG('B', 'G', 'R', 48 ) }, | |
| 109 | − { PIX_FMT_BGR48BE, MKTAG( 48, 'B', 'G', 'R') }, | |
| 110 | − { PIX_FMT_GRAY16LE, MKTAG('Y', '1', 0 , 16 ) }, | |
| 111 | − { PIX_FMT_GRAY16BE, MKTAG(16 , 0 , '1', 'Y') }, | |
| 112 | − { PIX_FMT_YUV420P10LE, MKTAG('Y', '3', 11 , 10 ) }, | |
| 113 | − { PIX_FMT_YUV420P10BE, MKTAG(10 , 11 , '3', 'Y') }, | |
| 114 | − { PIX_FMT_YUV422P10LE, MKTAG('Y', '3', 10 , 10 ) }, | |
| 115 | − { PIX_FMT_YUV422P10BE, MKTAG(10 , 10 , '3', 'Y') }, | |
| 116 | − { PIX_FMT_YUV444P10LE, MKTAG('Y', '3', 0 , 10 ) }, | |
| 117 | − { PIX_FMT_YUV444P10BE, MKTAG(10 , 0 , '3', 'Y') }, | |
| 118 | − { PIX_FMT_YUV420P16LE, MKTAG('Y', '3', 11 , 16 ) }, | |
| 119 | − { PIX_FMT_YUV420P16BE, MKTAG(16 , 11 , '3', 'Y') }, | |
| 120 | − { PIX_FMT_YUV422P16LE, MKTAG('Y', '3', 10 , 16 ) }, | |
| 121 | − { PIX_FMT_YUV422P16BE, MKTAG(16 , 10 , '3', 'Y') }, | |
| 122 | − { PIX_FMT_YUV444P16LE, MKTAG('Y', '3', 0 , 16 ) }, | |
| 123 | − { PIX_FMT_YUV444P16BE, MKTAG(16 , 0 , '3', 'Y') }, | |
| 124 | − { PIX_FMT_YUVA420P, MKTAG('Y', '4', 11 , 8 ) }, | |
| 125 | − { PIX_FMT_Y400A, MKTAG('Y', '2', 0 , 8 ) }, | |
| 73 | + { AV_PIX_FMT_RGB555LE, MKTAG('R', 'G', 'B', 15) }, | |
| 74 | + { AV_PIX_FMT_BGR555LE, MKTAG('B', 'G', 'R', 15) }, | |
| 75 | + { AV_PIX_FMT_RGB565LE, MKTAG('R', 'G', 'B', 16) }, | |
| 76 | + { AV_PIX_FMT_BGR565LE, MKTAG('B', 'G', 'R', 16) }, | |
| 77 | + { AV_PIX_FMT_RGB555BE, MKTAG(15 , 'B', 'G', 'R') }, | |
| 78 | + { AV_PIX_FMT_BGR555BE, MKTAG(15 , 'R', 'G', 'B') }, | |
| 79 | + { AV_PIX_FMT_RGB565BE, MKTAG(16 , 'B', 'G', 'R') }, | |
| 80 | + { AV_PIX_FMT_BGR565BE, MKTAG(16 , 'R', 'G', 'B') }, | |
| 81 | + { AV_PIX_FMT_RGB444LE, MKTAG('R', 'G', 'B', 12) }, | |
| 82 | + { AV_PIX_FMT_BGR444LE, MKTAG('B', 'G', 'R', 12) }, | |
| 83 | + { AV_PIX_FMT_RGB444BE, MKTAG(12 , 'B', 'G', 'R') }, | |
| 84 | + { AV_PIX_FMT_BGR444BE, MKTAG(12 , 'R', 'G', 'B') }, | |
| 85 | + { AV_PIX_FMT_RGBA, MKTAG('R', 'G', 'B', 'A') }, | |
| 86 | + { AV_PIX_FMT_BGRA, MKTAG('B', 'G', 'R', 'A') }, | |
| 87 | + { AV_PIX_FMT_ABGR, MKTAG('A', 'B', 'G', 'R') }, | |
| 88 | + { AV_PIX_FMT_ARGB, MKTAG('A', 'R', 'G', 'B') }, | |
| 89 | + { AV_PIX_FMT_RGB24, MKTAG('R', 'G', 'B', 24 ) }, | |
| 90 | + { AV_PIX_FMT_BGR24, MKTAG('B', 'G', 'R', 24 ) }, | |
| 91 | + { AV_PIX_FMT_YUV411P, MKTAG('4', '1', '1', 'P') }, | |
| 92 | + { AV_PIX_FMT_YUV422P, MKTAG('4', '2', '2', 'P') }, | |
| 93 | + { AV_PIX_FMT_YUVJ422P, MKTAG('4', '2', '2', 'P') }, | |
| 94 | + { AV_PIX_FMT_YUV440P, MKTAG('4', '4', '0', 'P') }, | |
| 95 | + { AV_PIX_FMT_YUVJ440P, MKTAG('4', '4', '0', 'P') }, | |
| 96 | + { AV_PIX_FMT_YUV444P, MKTAG('4', '4', '4', 'P') }, | |
| 97 | + { AV_PIX_FMT_YUVJ444P, MKTAG('4', '4', '4', 'P') }, | |
| 98 | + { AV_PIX_FMT_MONOWHITE,MKTAG('B', '1', 'W', '0') }, | |
| 99 | + { AV_PIX_FMT_MONOBLACK,MKTAG('B', '0', 'W', '1') }, | |
| 100 | + { AV_PIX_FMT_BGR8, MKTAG('B', 'G', 'R', 8 ) }, | |
| 101 | + { AV_PIX_FMT_RGB8, MKTAG('R', 'G', 'B', 8 ) }, | |
| 102 | + { AV_PIX_FMT_BGR4, MKTAG('B', 'G', 'R', 4 ) }, | |
| 103 | + { AV_PIX_FMT_RGB4, MKTAG('R', 'G', 'B', 4 ) }, | |
| 104 | + { AV_PIX_FMT_RGB4_BYTE,MKTAG('B', '4', 'B', 'Y') }, | |
| 105 | + { AV_PIX_FMT_BGR4_BYTE,MKTAG('R', '4', 'B', 'Y') }, | |
| 106 | + { AV_PIX_FMT_RGB48LE, MKTAG('R', 'G', 'B', 48 ) }, | |
| 107 | + { AV_PIX_FMT_RGB48BE, MKTAG( 48, 'R', 'G', 'B') }, | |
| 108 | + { AV_PIX_FMT_BGR48LE, MKTAG('B', 'G', 'R', 48 ) }, | |
| 109 | + { AV_PIX_FMT_BGR48BE, MKTAG( 48, 'B', 'G', 'R') }, | |
| 110 | + { AV_PIX_FMT_GRAY16LE, MKTAG('Y', '1', 0 , 16 ) }, | |
| 111 | + { AV_PIX_FMT_GRAY16BE, MKTAG(16 , 0 , '1', 'Y') }, | |
| 112 | + { AV_PIX_FMT_YUV420P10LE, MKTAG('Y', '3', 11 , 10 ) }, | |
| 113 | + { AV_PIX_FMT_YUV420P10BE, MKTAG(10 , 11 , '3', 'Y') }, | |
| 114 | + { AV_PIX_FMT_YUV422P10LE, MKTAG('Y', '3', 10 , 10 ) }, | |
| 115 | + { AV_PIX_FMT_YUV422P10BE, MKTAG(10 , 10 , '3', 'Y') }, | |
| 116 | + { AV_PIX_FMT_YUV444P10LE, MKTAG('Y', '3', 0 , 10 ) }, | |
| 117 | + { AV_PIX_FMT_YUV444P10BE, MKTAG(10 , 0 , '3', 'Y') }, | |
| 118 | + { AV_PIX_FMT_YUV420P16LE, MKTAG('Y', '3', 11 , 16 ) }, | |
| 119 | + { AV_PIX_FMT_YUV420P16BE, MKTAG(16 , 11 , '3', 'Y') }, | |
| 120 | + { AV_PIX_FMT_YUV422P16LE, MKTAG('Y', '3', 10 , 16 ) }, | |
| 121 | + { AV_PIX_FMT_YUV422P16BE, MKTAG(16 , 10 , '3', 'Y') }, | |
| 122 | + { AV_PIX_FMT_YUV444P16LE, MKTAG('Y', '3', 0 , 16 ) }, | |
| 123 | + { AV_PIX_FMT_YUV444P16BE, MKTAG(16 , 0 , '3', 'Y') }, | |
| 124 | + { AV_PIX_FMT_YUVA420P, MKTAG('Y', '4', 11 , 8 ) }, | |
| 125 | + { AV_PIX_FMT_Y400A, MKTAG('Y', '2', 0 , 8 ) }, | |
| 126 | 126 | |
| 127 | 127 | /* quicktime */ |
| 128 | − { PIX_FMT_UYVY422, MKTAG('2', 'v', 'u', 'y') }, | |
| 129 | − { PIX_FMT_UYVY422, MKTAG('2', 'V', 'u', 'y') }, | |
| 130 | − { PIX_FMT_UYVY422, MKTAG('A', 'V', 'U', 'I') }, /* FIXME merge both fields */ | |
| 131 | − { PIX_FMT_YUYV422, MKTAG('y', 'u', 'v', '2') }, | |
| 132 | − { PIX_FMT_YUYV422, MKTAG('y', 'u', 'v', 's') }, | |
| 133 | − { PIX_FMT_YUYV422, MKTAG('D', 'V', 'O', 'O') }, /* Digital Voodoo SD 8 Bit */ | |
| 134 | − { PIX_FMT_RGB555LE,MKTAG('L', '5', '5', '5') }, | |
| 135 | − { PIX_FMT_RGB565LE,MKTAG('L', '5', '6', '5') }, | |
| 136 | − { PIX_FMT_RGB565BE,MKTAG('B', '5', '6', '5') }, | |
| 137 | − { PIX_FMT_BGR24, MKTAG('2', '4', 'B', 'G') }, | |
| 138 | − { PIX_FMT_BGRA, MKTAG('B', 'G', 'R', 'A') }, | |
| 139 | − { PIX_FMT_RGBA, MKTAG('R', 'G', 'B', 'A') }, | |
| 140 | − { PIX_FMT_ABGR, MKTAG('A', 'B', 'G', 'R') }, | |
| 141 | − { PIX_FMT_GRAY16BE,MKTAG('b', '1', '6', 'g') }, | |
| 142 | − { PIX_FMT_RGB48BE, MKTAG('b', '4', '8', 'r') }, | |
| 128 | + { AV_PIX_FMT_UYVY422, MKTAG('2', 'v', 'u', 'y') }, | |
| 129 | + { AV_PIX_FMT_UYVY422, MKTAG('2', 'V', 'u', 'y') }, | |
| 130 | + { AV_PIX_FMT_UYVY422, MKTAG('A', 'V', 'U', 'I') }, /* FIXME merge both fields */ | |
| 131 | + { AV_PIX_FMT_YUYV422, MKTAG('y', 'u', 'v', '2') }, | |
| 132 | + { AV_PIX_FMT_YUYV422, MKTAG('y', 'u', 'v', 's') }, | |
| 133 | + { AV_PIX_FMT_YUYV422, MKTAG('D', 'V', 'O', 'O') }, /* Digital Voodoo SD 8 Bit */ | |
| 134 | + { AV_PIX_FMT_RGB555LE,MKTAG('L', '5', '5', '5') }, | |
| 135 | + { AV_PIX_FMT_RGB565LE,MKTAG('L', '5', '6', '5') }, | |
| 136 | + { AV_PIX_FMT_RGB565BE,MKTAG('B', '5', '6', '5') }, | |
| 137 | + { AV_PIX_FMT_BGR24, MKTAG('2', '4', 'B', 'G') }, | |
| 138 | + { AV_PIX_FMT_BGRA, MKTAG('B', 'G', 'R', 'A') }, | |
| 139 | + { AV_PIX_FMT_RGBA, MKTAG('R', 'G', 'B', 'A') }, | |
| 140 | + { AV_PIX_FMT_ABGR, MKTAG('A', 'B', 'G', 'R') }, | |
| 141 | + { AV_PIX_FMT_GRAY16BE,MKTAG('b', '1', '6', 'g') }, | |
| 142 | + { AV_PIX_FMT_RGB48BE, MKTAG('b', '4', '8', 'r') }, | |
| 143 | 143 | |
| 144 | 144 | /* special */ |
| 145 | − { PIX_FMT_RGB565LE,MKTAG( 3 , 0 , 0 , 0 ) }, /* flipped RGB565LE */ | |
| 146 | − { PIX_FMT_YUV444P, MKTAG('Y', 'V', '2', '4') }, /* YUV444P, swapped UV */ | |
| 145 | + { AV_PIX_FMT_RGB565LE,MKTAG( 3 , 0 , 0 , 0 ) }, /* flipped RGB565LE */ | |
| 146 | + { AV_PIX_FMT_YUV444P, MKTAG('Y', 'V', '2', '4') }, /* YUV444P, swapped UV */ | |
| 147 | 147 | |
| 148 | − { PIX_FMT_NONE, 0 }, | |
| 148 | + { AV_PIX_FMT_NONE, 0 }, | |
| 149 | 149 | }; |
| 150 | 150 | |
| 151 | −unsigned int avcodec_pix_fmt_to_codec_tag(enum PixelFormat fmt) | |
| 151 | +unsigned int avcodec_pix_fmt_to_codec_tag(enum AVPixelFormat fmt) | |
| 152 | 152 | { |
| 153 | 153 | const PixelFormatTag *tags = ff_raw_pix_fmt_tags; |
| 154 | 154 | while (tags->pix_fmt >= 0) { |
| @@ -30,7 +30,7 @@ · 29 unmodified lines | ||
| 30 | 30 | #include "avcodec.h" |
| 31 | 31 | |
| 32 | 32 | typedef struct PixelFormatTag { |
| 33 | − enum PixelFormat pix_fmt; | |
| 33 | + enum AVPixelFormat pix_fmt; | |
| 34 | 34 | unsigned int fourcc; |
| 35 | 35 | } PixelFormatTag; |
| 36 | 36 | |
| @@ -39,38 +39,38 @@ typedef struct RawVideoContext { · 38 unmodified lines | ||
| 39 | 39 | } RawVideoContext; |
| 40 | 40 | |
| 41 | 41 | static const PixelFormatTag pix_fmt_bps_avi[] = { |
| 42 | − { PIX_FMT_PAL8, 4 }, | |
| 43 | − { PIX_FMT_PAL8, 8 }, | |
| 44 | − { PIX_FMT_RGB444, 12 }, | |
| 45 | − { PIX_FMT_RGB555, 15 }, | |
| 46 | − { PIX_FMT_RGB555, 16 }, | |
| 47 | − { PIX_FMT_BGR24, 24 }, | |
| 48 | − { PIX_FMT_RGB32, 32 }, | |
| 49 | − { PIX_FMT_NONE, 0 }, | |
| 42 | + { AV_PIX_FMT_PAL8, 4 }, | |
| 43 | + { AV_PIX_FMT_PAL8, 8 }, | |
| 44 | + { AV_PIX_FMT_RGB444, 12 }, | |
| 45 | + { AV_PIX_FMT_RGB555, 15 }, | |
| 46 | + { AV_PIX_FMT_RGB555, 16 }, | |
| 47 | + { AV_PIX_FMT_BGR24, 24 }, | |
| 48 | + { AV_PIX_FMT_RGB32, 32 }, | |
| 49 | + { AV_PIX_FMT_NONE, 0 }, | |
| 50 | 50 | }; |
| 51 | 51 | |
| 52 | 52 | static const PixelFormatTag pix_fmt_bps_mov[] = { |
| 53 | − { PIX_FMT_MONOWHITE, 1 }, | |
| 54 | − { PIX_FMT_PAL8, 2 }, | |
| 55 | − { PIX_FMT_PAL8, 4 }, | |
| 56 | − { PIX_FMT_PAL8, 8 }, | |
| 53 | + { AV_PIX_FMT_MONOWHITE, 1 }, | |
| 54 | + { AV_PIX_FMT_PAL8, 2 }, | |
| 55 | + { AV_PIX_FMT_PAL8, 4 }, | |
| 56 | + { AV_PIX_FMT_PAL8, 8 }, | |
| 57 | 57 | // FIXME swscale does not support 16 bit in .mov, sample 16bit.mov |
| 58 | 58 | // http://developer.apple.com/documentation/QuickTime/QTFF/QTFFChap3/qtff3.html |
| 59 | − { PIX_FMT_RGB555BE, 16 }, | |
| 60 | − { PIX_FMT_RGB24, 24 }, | |
| 61 | − { PIX_FMT_ARGB, 32 }, | |
| 62 | − { PIX_FMT_MONOWHITE,33 }, | |
| 63 | − { PIX_FMT_NONE, 0 }, | |
| 59 | + { AV_PIX_FMT_RGB555BE, 16 }, | |
| 60 | + { AV_PIX_FMT_RGB24, 24 }, | |
| 61 | + { AV_PIX_FMT_ARGB, 32 }, | |
| 62 | + { AV_PIX_FMT_MONOWHITE,33 }, | |
| 63 | + { AV_PIX_FMT_NONE, 0 }, | |
| 64 | 64 | }; |
| 65 | 65 | |
| 66 | −static enum PixelFormat find_pix_fmt(const PixelFormatTag *tags, unsigned int fourcc) | |
| 66 | +static enum AVPixelFormat find_pix_fmt(const PixelFormatTag *tags, unsigned int fourcc) | |
| 67 | 67 | { |
| 68 | 68 | while (tags->pix_fmt >= 0) { |
| 69 | 69 | if (tags->fourcc == fourcc) |
| 70 | 70 | return tags->pix_fmt; |
| 71 | 71 | tags++; |
| 72 | 72 | } |
| 73 | − return PIX_FMT_YUV420P; | |
| 73 | + return AV_PIX_FMT_YUV420P; | |
| 74 | 74 | } |
| 75 | 75 | |
| 76 | 76 | static av_cold int raw_init_decoder(AVCodecContext *avctx) |
| @@ -83,13 +83,13 @@ static av_cold int raw_init_decoder(AVCodecContext *avctx) · 6 unmodified lines | ||
| 83 | 83 | avctx->pix_fmt = find_pix_fmt(pix_fmt_bps_avi, avctx->bits_per_coded_sample); |
| 84 | 84 | else if (avctx->codec_tag) |
| 85 | 85 | avctx->pix_fmt = find_pix_fmt(ff_raw_pix_fmt_tags, avctx->codec_tag); |
| 86 | − else if (avctx->pix_fmt == PIX_FMT_NONE && avctx->bits_per_coded_sample) | |
| 86 | + else if (avctx->pix_fmt == AV_PIX_FMT_NONE && avctx->bits_per_coded_sample) | |
| 87 | 87 | avctx->pix_fmt = find_pix_fmt(pix_fmt_bps_avi, avctx->bits_per_coded_sample); |
| 88 | 88 | |
| 89 | 89 | ff_set_systematic_pal2(context->palette, avctx->pix_fmt); |
| 90 | 90 | context->length = avpicture_get_size(avctx->pix_fmt, avctx->width, avctx->height); |
| 91 | 91 | if((avctx->bits_per_coded_sample == 4 || avctx->bits_per_coded_sample == 2) && |
| 92 | − avctx->pix_fmt==PIX_FMT_PAL8 && | |
| 92 | + avctx->pix_fmt==AV_PIX_FMT_PAL8 && | |
| 93 | 93 | (!avctx->codec_tag || avctx->codec_tag == MKTAG('r','a','w',' '))){ |
| 94 | 94 | context->buffer = av_malloc(context->length); |
| 95 | 95 | if (!context->buffer) |
| @@ -130,7 +130,7 @@ static int raw_decode(AVCodecContext *avctx, · 34 unmodified lines | ||
| 130 | 130 | frame->reordered_opaque = avctx->reordered_opaque; |
| 131 | 131 | frame->pkt_pts = avctx->pkt->pts; |
| 132 | 132 | |
| 133 | − if(buf_size < context->length - (avctx->pix_fmt==PIX_FMT_PAL8 ? 256*4 : 0)) | |
| 133 | + if(buf_size < context->length - (avctx->pix_fmt==AV_PIX_FMT_PAL8 ? 256*4 : 0)) | |
| 134 | 134 | return -1; |
| 135 | 135 | |
| 136 | 136 | //2bpp and 4bpp raw in avi and mov (yes this is ugly ...) |
| @@ -160,11 +160,11 @@ static int raw_decode(AVCodecContext *avctx, · 23 unmodified lines | ||
| 160 | 160 | if ((res = avpicture_fill(picture, buf, avctx->pix_fmt, |
| 161 | 161 | avctx->width, avctx->height)) < 0) |
| 162 | 162 | return res; |
| 163 | − if((avctx->pix_fmt==PIX_FMT_PAL8 && buf_size < context->length) || | |
| 163 | + if((avctx->pix_fmt==AV_PIX_FMT_PAL8 && buf_size < context->length) || | |
| 164 | 164 | (av_pix_fmt_descriptors[avctx->pix_fmt].flags & PIX_FMT_PSEUDOPAL)) { |
| 165 | 165 | frame->data[1]= context->palette; |
| 166 | 166 | } |
| 167 | − if (avctx->pix_fmt == PIX_FMT_PAL8) { | |
| 167 | + if (avctx->pix_fmt == AV_PIX_FMT_PAL8) { | |
| 168 | 168 | const uint8_t *pal = av_packet_get_side_data(avpkt, AV_PKT_DATA_PALETTE, NULL); |
| 169 | 169 | |
| 170 | 170 | if (pal) { |
| @@ -172,7 +172,7 @@ static int raw_decode(AVCodecContext *avctx, · 1 unmodified line | ||
| 172 | 172 | frame->palette_has_changed = 1; |
| 173 | 173 | } |
| 174 | 174 | } |
| 175 | − if(avctx->pix_fmt==PIX_FMT_BGR24 && ((frame->linesize[0]+3)&~3)*avctx->height <= buf_size) | |
| 175 | + if(avctx->pix_fmt==AV_PIX_FMT_BGR24 && ((frame->linesize[0]+3)&~3)*avctx->height <= buf_size) | |
| 176 | 176 | frame->linesize[0] = (frame->linesize[0]+3)&~3; |
| 177 | 177 | |
| 178 | 178 | if(context->flip) |
| @@ -185,7 +185,7 @@ static int raw_decode(AVCodecContext *avctx, · 6 unmodified lines | ||
| 185 | 185 | FFSWAP(uint8_t *, picture->data[1], picture->data[2]); |
| 186 | 186 | |
| 187 | 187 | if(avctx->codec_tag == AV_RL32("yuv2") && |
| 188 | − avctx->pix_fmt == PIX_FMT_YUYV422) { | |
| 188 | + avctx->pix_fmt == AV_PIX_FMT_YUYV422) { | |
| 189 | 189 | int x, y; |
| 190 | 190 | uint8_t *line = picture->data[0]; |
| 191 | 191 | for(y = 0; y < avctx->height; y++) { |
| @@ -57,7 +57,7 @@ static int raw_encode(AVCodecContext *avctx, AVPacket *pkt, · 56 unmodified lines | ||
| 57 | 57 | return ret; |
| 58 | 58 | |
| 59 | 59 | if(avctx->codec_tag == AV_RL32("yuv2") && ret > 0 && |
| 60 | − avctx->pix_fmt == PIX_FMT_YUYV422) { | |
| 60 | + avctx->pix_fmt == AV_PIX_FMT_YUYV422) { | |
| 61 | 61 | int x; |
| 62 | 62 | for(x = 1; x < avctx->height*avctx->width*2; x += 2) |
| 63 | 63 | pkt->data[x] ^= 0x80; |
| @@ -134,7 +134,7 @@ static av_cold int rl2_decode_init(AVCodecContext *avctx) · 133 unmodified lines | ||
| 134 | 134 | int back_size; |
| 135 | 135 | int i; |
| 136 | 136 | s->avctx = avctx; |
| 137 | − avctx->pix_fmt = PIX_FMT_PAL8; | |
| 137 | + avctx->pix_fmt = AV_PIX_FMT_PAL8; | |
| 138 | 138 | |
| 139 | 139 | /** parse extra data */ |
| 140 | 140 | if(!avctx->extradata || avctx->extradata_size < EXTRADATA1_SIZE){ |
| @@ -163,7 +163,7 @@ static av_cold int roq_decode_init(AVCodecContext *avctx) · 162 unmodified lines | ||
| 163 | 163 | s->height = avctx->height; |
| 164 | 164 | s->last_frame = &s->frames[0]; |
| 165 | 165 | s->current_frame = &s->frames[1]; |
| 166 | − avctx->pix_fmt = PIX_FMT_YUV444P; | |
| 166 | + avctx->pix_fmt = AV_PIX_FMT_YUV444P; | |
| 167 | 167 | |
| 168 | 168 | return 0; |
| 169 | 169 | } |
| @@ -1081,7 +1081,7 @@ AVCodec ff_roq_encoder = { · 1080 unmodified lines | ||
| 1081 | 1081 | .encode2 = roq_encode_frame, |
| 1082 | 1082 | .close = roq_encode_end, |
| 1083 | 1083 | .supported_framerates = (const AVRational[]){ {30,1}, {0,0} }, |
| 1084 | − .pix_fmts = (const enum PixelFormat[]){ PIX_FMT_YUV444P, | |
| 1085 | − PIX_FMT_NONE }, | |
| 1084 | + .pix_fmts = (const enum AVPixelFormat[]){ AV_PIX_FMT_YUV444P, | |
| 1085 | + AV_PIX_FMT_NONE }, | |
| 1086 | 1086 | .long_name = NULL_IF_CONFIG_SMALL("id RoQ video"), |
| 1087 | 1087 | }; |
| @@ -236,7 +236,7 @@ static av_cold int rpza_decode_init(AVCodecContext *avctx) · 235 unmodified lines | ||
| 236 | 236 | RpzaContext *s = avctx->priv_data; |
| 237 | 237 | |
| 238 | 238 | s->avctx = avctx; |
| 239 | − avctx->pix_fmt = PIX_FMT_RGB555; | |
| 239 | + avctx->pix_fmt = AV_PIX_FMT_RGB555; | |
| 240 | 240 | |
| 241 | 241 | s->frame.data[0] = NULL; |
| 242 | 242 | |
| @@ -467,7 +467,7 @@ static av_cold int rv10_decode_init(AVCodecContext *avctx) · 466 unmodified lines | ||
| 467 | 467 | av_log(avctx, AV_LOG_DEBUG, "ver:%X ver0:%X\n", rv->sub_id, avctx->extradata_size >= 4 ? ((uint32_t*)avctx->extradata)[0] : -1); |
| 468 | 468 | } |
| 469 | 469 | |
| 470 | − avctx->pix_fmt = PIX_FMT_YUV420P; | |
| 470 | + avctx->pix_fmt = AV_PIX_FMT_YUV420P; | |
| 471 | 471 | |
| 472 | 472 | if (ff_MPV_common_init(s) < 0) |
| 473 | 473 | return -1; |
| @@ -66,7 +66,7 @@ AVCodec ff_rv10_encoder = { · 65 unmodified lines | ||
| 66 | 66 | .init = ff_MPV_encode_init, |
| 67 | 67 | .encode2 = ff_MPV_encode_picture, |
| 68 | 68 | .close = ff_MPV_encode_end, |
| 69 | − .pix_fmts = (const enum PixelFormat[]){ PIX_FMT_YUV420P, PIX_FMT_NONE }, | |
| 69 | + .pix_fmts = (const enum AVPixelFormat[]){ AV_PIX_FMT_YUV420P, AV_PIX_FMT_NONE }, | |
| 70 | 70 | .long_name = NULL_IF_CONFIG_SMALL("RealVideo 1.0"), |
| 71 | 71 | .priv_class = &rv10_class, |
| 72 | 72 | }; |
| @@ -67,7 +67,7 @@ AVCodec ff_rv20_encoder = { · 66 unmodified lines | ||
| 67 | 67 | .init = ff_MPV_encode_init, |
| 68 | 68 | .encode2 = ff_MPV_encode_picture, |
| 69 | 69 | .close = ff_MPV_encode_end, |
| 70 | − .pix_fmts = (const enum PixelFormat[]){ PIX_FMT_YUV420P, PIX_FMT_NONE }, | |
| 70 | + .pix_fmts = (const enum AVPixelFormat[]){ AV_PIX_FMT_YUV420P, AV_PIX_FMT_NONE }, | |
| 71 | 71 | .long_name = NULL_IF_CONFIG_SMALL("RealVideo 2.0"), |
| 72 | 72 | .priv_class = &rv20_class, |
| 73 | 73 | }; |
| @@ -1479,7 +1479,7 @@ av_cold int ff_rv34_decode_init(AVCodecContext *avctx) · 1478 unmodified lines | ||
| 1479 | 1479 | r->s.avctx = avctx; |
| 1480 | 1480 | avctx->flags |= CODEC_FLAG_EMU_EDGE; |
| 1481 | 1481 | r->s.flags |= CODEC_FLAG_EMU_EDGE; |
| 1482 | − avctx->pix_fmt = PIX_FMT_YUV420P; | |
| 1482 | + avctx->pix_fmt = AV_PIX_FMT_YUV420P; | |
| 1483 | 1483 | avctx->has_b_frames = 1; |
| 1484 | 1484 | s->low_delay = 0; |
| 1485 | 1485 | |
| @@ -191,11 +191,11 @@ static int decode_frame(AVCodecContext *avctx, · 190 unmodified lines | ||
| 191 | 191 | } |
| 192 | 192 | |
| 193 | 193 | if (s->depth == SGI_GRAYSCALE) { |
| 194 | − avctx->pix_fmt = s->bytes_per_channel == 2 ? PIX_FMT_GRAY16BE : PIX_FMT_GRAY8; | |
| 194 | + avctx->pix_fmt = s->bytes_per_channel == 2 ? AV_PIX_FMT_GRAY16BE : AV_PIX_FMT_GRAY8; | |
| 195 | 195 | } else if (s->depth == SGI_RGB) { |
| 196 | − avctx->pix_fmt = s->bytes_per_channel == 2 ? PIX_FMT_RGB48BE : PIX_FMT_RGB24; | |
| 196 | + avctx->pix_fmt = s->bytes_per_channel == 2 ? AV_PIX_FMT_RGB48BE : AV_PIX_FMT_RGB24; | |
| 197 | 197 | } else if (s->depth == SGI_RGBA && s->bytes_per_channel == 1) { |
| 198 | − avctx->pix_fmt = PIX_FMT_RGBA; | |
| 198 | + avctx->pix_fmt = AV_PIX_FMT_RGBA; | |
| 199 | 199 | } else { |
| 200 | 200 | av_log(avctx, AV_LOG_ERROR, "wrong picture format\n"); |
| 201 | 201 | return -1; |
| @@ -60,15 +60,15 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt, · 59 unmodified lines | ||
| 60 | 60 | height = avctx->height; |
| 61 | 61 | |
| 62 | 62 | switch (avctx->pix_fmt) { |
| 63 | − case PIX_FMT_GRAY8: | |
| 63 | + case AV_PIX_FMT_GRAY8: | |
| 64 | 64 | dimension = SGI_SINGLE_CHAN; |
| 65 | 65 | depth = SGI_GRAYSCALE; |
| 66 | 66 | break; |
| 67 | − case PIX_FMT_RGB24: | |
| 67 | + case AV_PIX_FMT_RGB24: | |
| 68 | 68 | dimension = SGI_MULTI_CHAN; |
| 69 | 69 | depth = SGI_RGB; |
| 70 | 70 | break; |
| 71 | − case PIX_FMT_RGBA: | |
| 71 | + case AV_PIX_FMT_RGBA: | |
| 72 | 72 | dimension = SGI_MULTI_CHAN; |
| 73 | 73 | depth = SGI_RGBA; |
| 74 | 74 | break; |
| @@ -177,8 +177,8 @@ AVCodec ff_sgi_encoder = { · 102 unmodified lines | ||
| 177 | 177 | .priv_data_size = sizeof(SgiContext), |
| 178 | 178 | .init = encode_init, |
| 179 | 179 | .encode2 = encode_frame, |
| 180 | − .pix_fmts = (const enum PixelFormat[]){ | |
| 181 | − PIX_FMT_RGB24, PIX_FMT_RGBA, PIX_FMT_GRAY8, PIX_FMT_NONE | |
| 180 | + .pix_fmts = (const enum AVPixelFormat[]){ | |
| 181 | + AV_PIX_FMT_RGB24, AV_PIX_FMT_RGBA, AV_PIX_FMT_GRAY8, AV_PIX_FMT_NONE | |
| 182 | 182 | }, |
| 183 | 183 | .long_name = NULL_IF_CONFIG_SMALL("SGI image"), |
| 184 | 184 | }; |
| @@ -515,7 +515,7 @@ static av_cold int decode_init(AVCodecContext *avctx) · 514 unmodified lines | ||
| 515 | 515 | |
| 516 | 516 | c->avctx = avctx; |
| 517 | 517 | |
| 518 | − avctx->pix_fmt = PIX_FMT_PAL8; | |
| 518 | + avctx->pix_fmt = AV_PIX_FMT_PAL8; | |
| 519 | 519 | |
| 520 | 520 | |
| 521 | 521 | /* decode huffman trees from extradata */ |
| @@ -414,7 +414,7 @@ static av_cold int smc_decode_init(AVCodecContext *avctx) · 413 unmodified lines | ||
| 414 | 414 | SmcContext *s = avctx->priv_data; |
| 415 | 415 | |
| 416 | 416 | s->avctx = avctx; |
| 417 | − avctx->pix_fmt = PIX_FMT_PAL8; | |
| 417 | + avctx->pix_fmt = AV_PIX_FMT_PAL8; | |
| 418 | 418 | |
| 419 | 419 | s->frame.data[0] = NULL; |
| 420 | 420 | |
| @@ -356,7 +356,7 @@ static av_cold int decode_init(AVCodecContext *avctx) · 355 unmodified lines | ||
| 356 | 356 | { |
| 357 | 357 | int ret; |
| 358 | 358 | |
| 359 | − avctx->pix_fmt= PIX_FMT_YUV420P; | |
| 359 | + avctx->pix_fmt= AV_PIX_FMT_YUV420P; | |
| 360 | 360 | |
| 361 | 361 | if ((ret = ff_snow_common_init(avctx)) < 0) { |
| 362 | 362 | ff_snow_common_end(avctx->priv_data); |
| @@ -217,15 +217,15 @@ static av_cold int encode_init(AVCodecContext *avctx) · 216 unmodified lines | ||
| 217 | 217 | |
| 218 | 218 | avctx->coded_frame= &s->current_picture; |
| 219 | 219 | switch(avctx->pix_fmt){ |
| 220 | −// case PIX_FMT_YUV444P: | |
| 221 | −// case PIX_FMT_YUV422P: | |
| 222 | − case PIX_FMT_YUV420P: | |
| 223 | − case PIX_FMT_GRAY8: | |
| 224 | −// case PIX_FMT_YUV411P: | |
| 225 | −// case PIX_FMT_YUV410P: | |
| 220 | +// case AV_PIX_FMT_YUV444P: | |
| 221 | +// case AV_PIX_FMT_YUV422P: | |
| 222 | + case AV_PIX_FMT_YUV420P: | |
| 223 | + case AV_PIX_FMT_GRAY8: | |
| 224 | +// case AV_PIX_FMT_YUV411P: | |
| 225 | +// case AV_PIX_FMT_YUV410P: | |
| 226 | 226 | s->colorspace_type= 0; |
| 227 | 227 | break; |
| 228 | −/* case PIX_FMT_RGB32: | |
| 228 | +/* case AV_PIX_FMT_RGB32: | |
| 229 | 229 | s->colorspace= 1; |
| 230 | 230 | break;*/ |
| 231 | 231 | default: |
| @@ -90,13 +90,13 @@ static int sunrast_decode_frame(AVCodecContext *avctx, void *data, · 89 unmodified lines | ||
| 90 | 90 | |
| 91 | 91 | switch (depth) { |
| 92 | 92 | case 1: |
| 93 | − avctx->pix_fmt = PIX_FMT_MONOWHITE; | |
| 93 | + avctx->pix_fmt = AV_PIX_FMT_MONOWHITE; | |
| 94 | 94 | break; |
| 95 | 95 | case 8: |
| 96 | − avctx->pix_fmt = maplength ? PIX_FMT_PAL8 : PIX_FMT_GRAY8; | |
| 96 | + avctx->pix_fmt = maplength ? AV_PIX_FMT_PAL8 : AV_PIX_FMT_GRAY8; | |
| 97 | 97 | break; |
| 98 | 98 | case 24: |
| 99 | − avctx->pix_fmt = (type == RT_FORMAT_RGB) ? PIX_FMT_RGB24 : PIX_FMT_BGR24; | |
| 99 | + avctx->pix_fmt = (type == RT_FORMAT_RGB) ? AV_PIX_FMT_RGB24 : AV_PIX_FMT_BGR24; | |
| 100 | 100 | break; |
| 101 | 101 | default: |
| 102 | 102 | av_log(avctx, AV_LOG_ERROR, "invalid depth\n"); |
| @@ -161,16 +161,16 @@ static av_cold int sunrast_encode_init(AVCodecContext *avctx) · 160 unmodified lines | ||
| 161 | 161 | s->maplength = 0; |
| 162 | 162 | |
| 163 | 163 | switch (avctx->pix_fmt) { |
| 164 | − case PIX_FMT_MONOWHITE: | |
| 164 | + case AV_PIX_FMT_MONOWHITE: | |
| 165 | 165 | s->depth = 1; |
| 166 | 166 | break; |
| 167 | − case PIX_FMT_PAL8 : | |
| 167 | + case AV_PIX_FMT_PAL8 : | |
| 168 | 168 | s->maptype = RMT_EQUAL_RGB; |
| 169 | 169 | s->maplength = 3 * 256; |
| 170 | − case PIX_FMT_GRAY8: | |
| 170 | + case AV_PIX_FMT_GRAY8: | |
| 171 | 171 | s->depth = 8; |
| 172 | 172 | break; |
| 173 | − case PIX_FMT_BGR24: | |
| 173 | + case AV_PIX_FMT_BGR24: | |
| 174 | 174 | s->depth = 24; |
| 175 | 175 | break; |
| 176 | 176 | default: |
| @@ -220,10 +220,10 @@ AVCodec ff_sunrast_encoder = { · 43 unmodified lines | ||
| 220 | 220 | .init = sunrast_encode_init, |
| 221 | 221 | .encode2 = sunrast_encode_frame, |
| 222 | 222 | .defaults = sunrast_defaults, |
| 223 | − .pix_fmts = (const enum PixelFormat[]){ PIX_FMT_BGR24, | |
| 224 | − PIX_FMT_PAL8, | |
| 225 | − PIX_FMT_GRAY8, | |
| 226 | − PIX_FMT_MONOWHITE, | |
| 227 | − PIX_FMT_NONE }, | |
| 223 | + .pix_fmts = (const enum AVPixelFormat[]){ AV_PIX_FMT_BGR24, | |
| 224 | + AV_PIX_FMT_PAL8, | |
| 225 | + AV_PIX_FMT_GRAY8, | |
| 226 | + AV_PIX_FMT_MONOWHITE, | |
| 227 | + AV_PIX_FMT_NONE }, | |
| 228 | 228 | .long_name = NULL_IF_CONFIG_SMALL("Sun Rasterfile image"), |
| 229 | 229 | }; |
| @@ -714,7 +714,7 @@ static av_cold int svq1_decode_init(AVCodecContext *avctx) · 713 unmodified lines | ||
| 714 | 714 | s->width = (avctx->width+3)&~3; |
| 715 | 715 | s->height = (avctx->height+3)&~3; |
| 716 | 716 | s->codec_id= avctx->codec->id; |
| 717 | − avctx->pix_fmt = PIX_FMT_YUV410P; | |
| 717 | + avctx->pix_fmt = AV_PIX_FMT_YUV410P; | |
| 718 | 718 | avctx->has_b_frames= 1; // not true, but DP frames and these behave like unidirectional b frames |
| 719 | 719 | s->flags= avctx->flags; |
| 720 | 720 | if (ff_MPV_common_init(s) < 0) return -1; |
| @@ -774,6 +774,6 @@ AVCodec ff_svq1_decoder = { · 53 unmodified lines | ||
| 774 | 774 | .decode = svq1_decode_frame, |
| 775 | 775 | .capabilities = CODEC_CAP_DR1, |
| 776 | 776 | .flush = ff_mpeg_flush, |
| 777 | − .pix_fmts = (const enum PixelFormat[]){ PIX_FMT_YUV410P, PIX_FMT_NONE }, | |
| 777 | + .pix_fmts = (const enum AVPixelFormat[]){ AV_PIX_FMT_YUV410P, AV_PIX_FMT_NONE }, | |
| 778 | 778 | .long_name = NULL_IF_CONFIG_SMALL("Sorenson Vector Quantizer 1 / Sorenson Video 1 / SVQ1"), |
| 779 | 779 | }; |
| @@ -512,7 +512,7 @@ static int svq1_encode_frame(AVCodecContext *avctx, AVPacket *pkt, · 511 unmodified lines | ||
| 512 | 512 | return ret; |
| 513 | 513 | } |
| 514 | 514 | |
| 515 | − if(avctx->pix_fmt != PIX_FMT_YUV410P){ | |
| 515 | + if(avctx->pix_fmt != AV_PIX_FMT_YUV410P){ | |
| 516 | 516 | av_log(avctx, AV_LOG_ERROR, "unsupported pixel format\n"); |
| 517 | 517 | return -1; |
| 518 | 518 | } |
| @@ -587,6 +587,6 @@ AVCodec ff_svq1_encoder = { · 68 unmodified lines | ||
| 587 | 587 | .init = svq1_encode_init, |
| 588 | 588 | .encode2 = svq1_encode_frame, |
| 589 | 589 | .close = svq1_encode_end, |
| 590 | − .pix_fmts = (const enum PixelFormat[]){ PIX_FMT_YUV410P, PIX_FMT_NONE }, | |
| 590 | + .pix_fmts = (const enum AVPixelFormat[]){ AV_PIX_FMT_YUV410P, AV_PIX_FMT_NONE }, | |
| 591 | 591 | .long_name = NULL_IF_CONFIG_SMALL("Sorenson Vector Quantizer 1 / Sorenson Video 1 / SVQ1"), |
| 592 | 592 | }; |
| @@ -1112,5 +1112,5 @@ AVCodec ff_svq3_decoder = { · 1111 unmodified lines | ||
| 1112 | 1112 | .capabilities = CODEC_CAP_DRAW_HORIZ_BAND | CODEC_CAP_DR1 | |
| 1113 | 1113 | CODEC_CAP_DELAY, |
| 1114 | 1114 | .long_name = NULL_IF_CONFIG_SMALL("Sorenson Vector Quantizer 3 / Sorenson Video 3 / SVQ3"), |
| 1115 | − .pix_fmts = (const enum PixelFormat[]){ PIX_FMT_YUVJ420P, PIX_FMT_NONE }, | |
| 1115 | + .pix_fmts = (const enum AVPixelFormat[]){ AV_PIX_FMT_YUVJ420P, AV_PIX_FMT_NONE }, | |
| 1116 | 1116 | }; |
| @@ -124,19 +124,19 @@ static int decode_frame(AVCodecContext *avctx, · 123 unmodified lines | ||
| 124 | 124 | |
| 125 | 125 | switch(bpp){ |
| 126 | 126 | case 8: |
| 127 | − avctx->pix_fmt = ((compr & (~TGA_RLE)) == TGA_BW) ? PIX_FMT_GRAY8 : PIX_FMT_PAL8; | |
| 127 | + avctx->pix_fmt = ((compr & (~TGA_RLE)) == TGA_BW) ? AV_PIX_FMT_GRAY8 : AV_PIX_FMT_PAL8; | |
| 128 | 128 | break; |
| 129 | 129 | case 15: |
| 130 | − avctx->pix_fmt = PIX_FMT_RGB555LE; | |
| 130 | + avctx->pix_fmt = AV_PIX_FMT_RGB555LE; | |
| 131 | 131 | break; |
| 132 | 132 | case 16: |
| 133 | − avctx->pix_fmt = PIX_FMT_RGB555LE; | |
| 133 | + avctx->pix_fmt = AV_PIX_FMT_RGB555LE; | |
| 134 | 134 | break; |
| 135 | 135 | case 24: |
| 136 | − avctx->pix_fmt = PIX_FMT_BGR24; | |
| 136 | + avctx->pix_fmt = AV_PIX_FMT_BGR24; | |
| 137 | 137 | break; |
| 138 | 138 | case 32: |
| 139 | − avctx->pix_fmt = PIX_FMT_BGRA; | |
| 139 | + avctx->pix_fmt = AV_PIX_FMT_BGRA; | |
| 140 | 140 | break; |
| 141 | 141 | default: |
| 142 | 142 | av_log(avctx, AV_LOG_ERROR, "Bit depth %i is not supported\n", bpp); |
| @@ -177,7 +177,7 @@ static int decode_frame(AVCodecContext *avctx, · 34 unmodified lines | ||
| 177 | 177 | return -1; |
| 178 | 178 | } |
| 179 | 179 | pal_size = colors * pal_sample_size; |
| 180 | − if(avctx->pix_fmt != PIX_FMT_PAL8)//should not occur but skip palette anyway | |
| 180 | + if(avctx->pix_fmt != AV_PIX_FMT_PAL8)//should not occur but skip palette anyway | |
| 181 | 181 | bytestream2_skip(&s->gb, pal_size); |
| 182 | 182 | else{ |
| 183 | 183 | int t; |
| @@ -99,22 +99,22 @@ static int targa_encode_frame(AVCodecContext *avctx, AVPacket *pkt, · 98 unmodified lines | ||
| 99 | 99 | AV_WL16(pkt->data+12, avctx->width); |
| 100 | 100 | AV_WL16(pkt->data+14, avctx->height); |
| 101 | 101 | /* image descriptor byte: origin is always top-left, bits 0-3 specify alpha */ |
| 102 | − pkt->data[17] = 0x20 | (avctx->pix_fmt == PIX_FMT_BGRA ? 8 : 0); | |
| 102 | + pkt->data[17] = 0x20 | (avctx->pix_fmt == AV_PIX_FMT_BGRA ? 8 : 0); | |
| 103 | 103 | |
| 104 | 104 | switch(avctx->pix_fmt) { |
| 105 | − case PIX_FMT_GRAY8: | |
| 105 | + case AV_PIX_FMT_GRAY8: | |
| 106 | 106 | pkt->data[2] = TGA_BW; /* uncompressed grayscale image */ |
| 107 | 107 | pkt->data[16] = 8; /* bpp */ |
| 108 | 108 | break; |
| 109 | − case PIX_FMT_RGB555LE: | |
| 109 | + case AV_PIX_FMT_RGB555LE: | |
| 110 | 110 | pkt->data[2] = TGA_RGB; /* uncompresses true-color image */ |
| 111 | 111 | pkt->data[16] = 16; /* bpp */ |
| 112 | 112 | break; |
| 113 | − case PIX_FMT_BGR24: | |
| 113 | + case AV_PIX_FMT_BGR24: | |
| 114 | 114 | pkt->data[2] = TGA_RGB; /* uncompressed true-color image */ |
| 115 | 115 | pkt->data[16] = 24; /* bpp */ |
| 116 | 116 | break; |
| 117 | − case PIX_FMT_BGRA: | |
| 117 | + case AV_PIX_FMT_BGRA: | |
| 118 | 118 | pkt->data[2] = TGA_RGB; /* uncompressed true-color image */ |
| 119 | 119 | pkt->data[16] = 32; /* bpp */ |
| 120 | 120 | break; |
| @@ -171,9 +171,9 @@ AVCodec ff_targa_encoder = { · 50 unmodified lines | ||
| 171 | 171 | .priv_data_size = sizeof(TargaContext), |
| 172 | 172 | .init = targa_encode_init, |
| 173 | 173 | .encode2 = targa_encode_frame, |
| 174 | − .pix_fmts = (const enum PixelFormat[]){ | |
| 175 | − PIX_FMT_BGR24, PIX_FMT_BGRA, PIX_FMT_RGB555LE, PIX_FMT_GRAY8, | |
| 176 | − PIX_FMT_NONE | |
| 174 | + .pix_fmts = (const enum AVPixelFormat[]){ | |
| 175 | + AV_PIX_FMT_BGR24, AV_PIX_FMT_BGRA, AV_PIX_FMT_RGB555LE, AV_PIX_FMT_GRAY8, | |
| 176 | + AV_PIX_FMT_NONE | |
| 177 | 177 | }, |
| 178 | 178 | .long_name= NULL_IF_CONFIG_SMALL("Truevision Targa image"), |
| 179 | 179 | }; |
| @@ -214,7 +214,7 @@ static av_cold int seqvideo_decode_init(AVCodecContext *avctx) · 213 unmodified lines | ||
| 214 | 214 | SeqVideoContext *seq = avctx->priv_data; |
| 215 | 215 | |
| 216 | 216 | seq->avctx = avctx; |
| 217 | − avctx->pix_fmt = PIX_FMT_PAL8; | |
| 217 | + avctx->pix_fmt = AV_PIX_FMT_PAL8; | |
| 218 | 218 | |
| 219 | 219 | seq->frame.data[0] = NULL; |
| 220 | 220 | |
| @@ -250,22 +250,22 @@ static int init_image(TiffContext *s) · 249 unmodified lines | ||
| 250 | 250 | |
| 251 | 251 | switch (s->bpp * 10 + s->bppcount) { |
| 252 | 252 | case 11: |
| 253 | − s->avctx->pix_fmt = PIX_FMT_MONOBLACK; | |
| 253 | + s->avctx->pix_fmt = AV_PIX_FMT_MONOBLACK; | |
| 254 | 254 | break; |
| 255 | 255 | case 81: |
| 256 | − s->avctx->pix_fmt = PIX_FMT_PAL8; | |
| 256 | + s->avctx->pix_fmt = AV_PIX_FMT_PAL8; | |
| 257 | 257 | break; |
| 258 | 258 | case 243: |
| 259 | − s->avctx->pix_fmt = PIX_FMT_RGB24; | |
| 259 | + s->avctx->pix_fmt = AV_PIX_FMT_RGB24; | |
| 260 | 260 | break; |
| 261 | 261 | case 161: |
| 262 | − s->avctx->pix_fmt = s->le ? PIX_FMT_GRAY16LE : PIX_FMT_GRAY16BE; | |
| 262 | + s->avctx->pix_fmt = s->le ? AV_PIX_FMT_GRAY16LE : AV_PIX_FMT_GRAY16BE; | |
| 263 | 263 | break; |
| 264 | 264 | case 324: |
| 265 | − s->avctx->pix_fmt = PIX_FMT_RGBA; | |
| 265 | + s->avctx->pix_fmt = AV_PIX_FMT_RGBA; | |
| 266 | 266 | break; |
| 267 | 267 | case 483: |
| 268 | − s->avctx->pix_fmt = s->le ? PIX_FMT_RGB48LE : PIX_FMT_RGB48BE; | |
| 268 | + s->avctx->pix_fmt = s->le ? AV_PIX_FMT_RGB48LE : AV_PIX_FMT_RGB48BE; | |
| 269 | 269 | break; |
| 270 | 270 | default: |
| 271 | 271 | av_log(s->avctx, AV_LOG_ERROR, |
| @@ -284,7 +284,7 @@ static int init_image(TiffContext *s) · 12 unmodified lines | ||
| 284 | 284 | av_log(s->avctx, AV_LOG_ERROR, "get_buffer() failed\n"); |
| 285 | 285 | return ret; |
| 286 | 286 | } |
| 287 | − if (s->avctx->pix_fmt == PIX_FMT_PAL8) { | |
| 287 | + if (s->avctx->pix_fmt == AV_PIX_FMT_PAL8) { | |
| 288 | 288 | if (s->palette_is_set) { |
| 289 | 289 | memcpy(s->picture.data[1], s->palette, sizeof(s->palette)); |
| 290 | 290 | } else { |
| @@ -235,11 +235,11 @@ static int encode_frame(AVCodecContext * avctx, AVPacket *pkt, · 234 unmodified lines | ||
| 235 | 235 | s->subsampling[1] = 1; |
| 236 | 236 | |
| 237 | 237 | switch (avctx->pix_fmt) { |
| 238 | − case PIX_FMT_RGB48LE: | |
| 239 | − case PIX_FMT_GRAY16LE: | |
| 240 | − case PIX_FMT_RGB24: | |
| 241 | − case PIX_FMT_GRAY8: | |
| 242 | − case PIX_FMT_PAL8: | |
| 238 | + case AV_PIX_FMT_RGB48LE: | |
| 239 | + case AV_PIX_FMT_GRAY16LE: | |
| 240 | + case AV_PIX_FMT_RGB24: | |
| 241 | + case AV_PIX_FMT_GRAY8: | |
| 242 | + case AV_PIX_FMT_PAL8: | |
| 243 | 243 | pfd = &av_pix_fmt_descriptors[avctx->pix_fmt]; |
| 244 | 244 | s->bpp = av_get_bits_per_pixel(pfd); |
| 245 | 245 | if (pfd->flags & PIX_FMT_PAL) { |
| @@ -254,21 +254,21 @@ static int encode_frame(AVCodecContext * avctx, AVPacket *pkt, · 8 unmodified lines | ||
| 254 | 254 | bpp_tab[i] = s->bpp / s->bpp_tab_size; |
| 255 | 255 | } |
| 256 | 256 | break; |
| 257 | − case PIX_FMT_MONOBLACK: | |
| 257 | + case AV_PIX_FMT_MONOBLACK: | |
| 258 | 258 | s->bpp = 1; |
| 259 | 259 | s->photometric_interpretation = 1; |
| 260 | 260 | s->bpp_tab_size = 0; |
| 261 | 261 | break; |
| 262 | − case PIX_FMT_MONOWHITE: | |
| 262 | + case AV_PIX_FMT_MONOWHITE: | |
| 263 | 263 | s->bpp = 1; |
| 264 | 264 | s->photometric_interpretation = 0; |
| 265 | 265 | s->bpp_tab_size = 0; |
| 266 | 266 | break; |
| 267 | − case PIX_FMT_YUV420P: | |
| 268 | − case PIX_FMT_YUV422P: | |
| 269 | − case PIX_FMT_YUV444P: | |
| 270 | − case PIX_FMT_YUV410P: | |
| 271 | − case PIX_FMT_YUV411P: | |
| 267 | + case AV_PIX_FMT_YUV420P: | |
| 268 | + case AV_PIX_FMT_YUV422P: | |
| 269 | + case AV_PIX_FMT_YUV444P: | |
| 270 | + case AV_PIX_FMT_YUV410P: | |
| 271 | + case AV_PIX_FMT_YUV411P: | |
| 272 | 272 | s->photometric_interpretation = 6; |
| 273 | 273 | avcodec_get_chroma_sub_sample(avctx->pix_fmt, |
| 274 | 274 | &shift_h, &shift_v); |
| @@ -433,7 +433,7 @@ static int encode_frame(AVCodecContext * avctx, AVPacket *pkt, · 158 unmodified lines | ||
| 433 | 433 | add_entry(s, TIFF_SOFTWARE_NAME, TIFF_STRING, |
| 434 | 434 | strlen(LIBAVCODEC_IDENT) + 1, LIBAVCODEC_IDENT); |
| 435 | 435 | |
| 436 | − if (avctx->pix_fmt == PIX_FMT_PAL8) { | |
| 436 | + if (avctx->pix_fmt == AV_PIX_FMT_PAL8) { | |
| 437 | 437 | uint16_t pal[256 * 3]; |
| 438 | 438 | for (i = 0; i < 256; i++) { |
| 439 | 439 | uint32_t rgb = *(uint32_t *) (p->data[1] + i * 4); |
| @@ -496,13 +496,13 @@ AVCodec ff_tiff_encoder = { · 56 unmodified lines | ||
| 496 | 496 | .id = AV_CODEC_ID_TIFF, |
| 497 | 497 | .priv_data_size = sizeof(TiffEncoderContext), |
| 498 | 498 | .encode2 = encode_frame, |
| 499 | − .pix_fmts = (const enum PixelFormat[]) { | |
| 500 | − PIX_FMT_RGB24, PIX_FMT_RGB48LE, PIX_FMT_PAL8, | |
| 501 | − PIX_FMT_GRAY8, PIX_FMT_GRAY16LE, | |
| 502 | − PIX_FMT_MONOBLACK, PIX_FMT_MONOWHITE, | |
| 503 | − PIX_FMT_YUV420P, PIX_FMT_YUV422P, PIX_FMT_YUV444P, | |
| 504 | − PIX_FMT_YUV410P, PIX_FMT_YUV411P, | |
| 505 | − PIX_FMT_NONE | |
| 499 | + .pix_fmts = (const enum AVPixelFormat[]) { | |
| 500 | + AV_PIX_FMT_RGB24, AV_PIX_FMT_RGB48LE, AV_PIX_FMT_PAL8, | |
| 501 | + AV_PIX_FMT_GRAY8, AV_PIX_FMT_GRAY16LE, | |
| 502 | + AV_PIX_FMT_MONOBLACK, AV_PIX_FMT_MONOWHITE, | |
| 503 | + AV_PIX_FMT_YUV420P, AV_PIX_FMT_YUV422P, AV_PIX_FMT_YUV444P, | |
| 504 | + AV_PIX_FMT_YUV410P, AV_PIX_FMT_YUV411P, | |
| 505 | + AV_PIX_FMT_NONE | |
| 506 | 506 | }, |
| 507 | 507 | .long_name = NULL_IF_CONFIG_SMALL("TIFF image"), |
| 508 | 508 | .priv_class = &tiffenc_class, |
| @@ -87,7 +87,7 @@ static int tmv_decode_frame(AVCodecContext *avctx, void *data, · 86 unmodified lines | ||
| 87 | 87 | |
| 88 | 88 | static av_cold int tmv_decode_init(AVCodecContext *avctx) |
| 89 | 89 | { |
| 90 | − avctx->pix_fmt = PIX_FMT_PAL8; | |
| 90 | + avctx->pix_fmt = AV_PIX_FMT_PAL8; | |
| 91 | 91 | return 0; |
| 92 | 92 | } |
| 93 | 93 | |
| @@ -390,10 +390,10 @@ static int truemotion1_decode_header(TrueMotion1Context *s) · 389 unmodified lines | ||
| 390 | 390 | } |
| 391 | 391 | |
| 392 | 392 | if (compression_types[header.compression].algorithm == ALGO_RGB24H) { |
| 393 | − new_pix_fmt = PIX_FMT_RGB32; | |
| 393 | + new_pix_fmt = AV_PIX_FMT_RGB32; | |
| 394 | 394 | width_shift = 1; |
| 395 | 395 | } else |
| 396 | − new_pix_fmt = PIX_FMT_RGB555; // RGB565 is supported as well | |
| 396 | + new_pix_fmt = AV_PIX_FMT_RGB555; // RGB565 is supported as well | |
| 397 | 397 | |
| 398 | 398 | s->w >>= width_shift; |
| 399 | 399 | if (av_image_check_size(s->w, s->h, 0, s->avctx) < 0) |
| @@ -419,7 +419,7 @@ static int truemotion1_decode_header(TrueMotion1Context *s) · 19 unmodified lines | ||
| 419 | 419 | if (compression_types[header.compression].algorithm == ALGO_RGB24H) |
| 420 | 420 | gen_vector_table24(s, sel_vector_table); |
| 421 | 421 | else |
| 422 | − if (s->avctx->pix_fmt == PIX_FMT_RGB555) | |
| 422 | + if (s->avctx->pix_fmt == AV_PIX_FMT_RGB555) | |
| 423 | 423 | gen_vector_table15(s, sel_vector_table); |
| 424 | 424 | else |
| 425 | 425 | gen_vector_table16(s, sel_vector_table); |
| @@ -464,9 +464,9 @@ static av_cold int truemotion1_decode_init(AVCodecContext *avctx) · 38 unmodified lines | ||
| 464 | 464 | |
| 465 | 465 | // FIXME: it may change ? |
| 466 | 466 | // if (avctx->bits_per_sample == 24) |
| 467 | −// avctx->pix_fmt = PIX_FMT_RGB24; | |
| 467 | +// avctx->pix_fmt = AV_PIX_FMT_RGB24; | |
| 468 | 468 | // else |
| 469 | −// avctx->pix_fmt = PIX_FMT_RGB555; | |
| 469 | +// avctx->pix_fmt = AV_PIX_FMT_RGB555; | |
| 470 | 470 | |
| 471 | 471 | s->frame.data[0] = NULL; |
| 472 | 472 | |
| @@ -879,7 +879,7 @@ static av_cold int decode_init(AVCodecContext *avctx){ · 878 unmodified lines | ||
| 879 | 879 | |
| 880 | 880 | l->avctx = avctx; |
| 881 | 881 | l->pic.data[0]=NULL; |
| 882 | − avctx->pix_fmt = PIX_FMT_BGR24; | |
| 882 | + avctx->pix_fmt = AV_PIX_FMT_BGR24; | |
| 883 | 883 | |
| 884 | 884 | ff_dsputil_init(&l->dsp, avctx); |
| 885 | 885 | |
| @@ -113,7 +113,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPac · 112 unmodified lines | ||
| 113 | 113 | } |
| 114 | 114 | |
| 115 | 115 | /* make the palette available on the way out */ |
| 116 | − if (c->avctx->pix_fmt == PIX_FMT_PAL8) { | |
| 116 | + if (c->avctx->pix_fmt == AV_PIX_FMT_PAL8) { | |
| 117 | 117 | const uint8_t *pal = av_packet_get_side_data(avpkt, AV_PKT_DATA_PALETTE, NULL); |
| 118 | 118 | |
| 119 | 119 | if (pal) { |
| @@ -149,12 +149,12 @@ static av_cold int decode_init(AVCodecContext *avctx) · 29 unmodified lines | ||
| 149 | 149 | // Needed if zlib unused or init aborted before inflateInit |
| 150 | 150 | memset(&c->zstream, 0, sizeof(z_stream)); |
| 151 | 151 | switch(avctx->bits_per_coded_sample){ |
| 152 | − case 8: avctx->pix_fmt = PIX_FMT_PAL8; break; | |
| 153 | − case 16: avctx->pix_fmt = PIX_FMT_RGB555; break; | |
| 152 | + case 8: avctx->pix_fmt = AV_PIX_FMT_PAL8; break; | |
| 153 | + case 16: avctx->pix_fmt = AV_PIX_FMT_RGB555; break; | |
| 154 | 154 | case 24: |
| 155 | − avctx->pix_fmt = PIX_FMT_BGR24; | |
| 155 | + avctx->pix_fmt = AV_PIX_FMT_BGR24; | |
| 156 | 156 | break; |
| 157 | − case 32: avctx->pix_fmt = PIX_FMT_RGB32; break; | |
| 157 | + case 32: avctx->pix_fmt = AV_PIX_FMT_RGB32; break; | |
| 158 | 158 | default: av_log(avctx, AV_LOG_ERROR, "Camtasia error: unknown depth %i bpp\n", avctx->bits_per_coded_sample); |
| 159 | 159 | return -1; |
| 160 | 160 | } |
| @@ -336,7 +336,7 @@ static av_cold int tscc2_decode_init(AVCodecContext *avctx) · 335 unmodified lines | ||
| 336 | 336 | |
| 337 | 337 | c->avctx = avctx; |
| 338 | 338 | |
| 339 | − avctx->pix_fmt = PIX_FMT_YUV444P; | |
| 339 | + avctx->pix_fmt = AV_PIX_FMT_YUV444P; | |
| 340 | 340 | |
| 341 | 341 | if ((ret = init_vlcs(c)) < 0) { |
| 342 | 342 | av_log(avctx, AV_LOG_ERROR, "Cannot initialise VLCs\n"); |
| @@ -68,9 +68,9 @@ static int txd_decode_frame(AVCodecContext *avctx, void *data, int *data_size, · 67 unmodified lines | ||
| 68 | 68 | } |
| 69 | 69 | |
| 70 | 70 | if (depth == 8) { |
| 71 | − avctx->pix_fmt = PIX_FMT_PAL8; | |
| 71 | + avctx->pix_fmt = AV_PIX_FMT_PAL8; | |
| 72 | 72 | } else if (depth == 16 || depth == 32) { |
| 73 | − avctx->pix_fmt = PIX_FMT_RGB32; | |
| 73 | + avctx->pix_fmt = AV_PIX_FMT_RGB32; | |
| 74 | 74 | } else { |
| 75 | 75 | av_log(avctx, AV_LOG_ERROR, "depth of %i is unsupported\n", depth); |
| 76 | 76 | return -1; |
| @@ -49,7 +49,7 @@ static av_cold int ulti_decode_init(AVCodecContext *avctx) · 48 unmodified lines | ||
| 49 | 49 | s->width = avctx->width; |
| 50 | 50 | s->height = avctx->height; |
| 51 | 51 | s->blocks = (s->width / 8) * (s->height / 8); |
| 52 | − avctx->pix_fmt = PIX_FMT_YUV410P; | |
| 52 | + avctx->pix_fmt = AV_PIX_FMT_YUV410P; | |
| 53 | 53 | avctx->coded_frame = &s->frame; |
| 54 | 54 | s->ulti_codebook = ulti_codebook; |
| 55 | 55 | |
| @@ -165,64 +165,64 @@ void avcodec_align_dimensions2(AVCodecContext *s, int *width, int *height, · 164 unmodified lines | ||
| 165 | 165 | int h_align = 1; |
| 166 | 166 | |
| 167 | 167 | switch (s->pix_fmt) { |
| 168 | − case PIX_FMT_YUV420P: | |
| 169 | − case PIX_FMT_YUYV422: | |
| 170 | − case PIX_FMT_UYVY422: | |
| 171 | − case PIX_FMT_YUV422P: | |
| 172 | − case PIX_FMT_YUV440P: | |
| 173 | − case PIX_FMT_YUV444P: | |
| 174 | − case PIX_FMT_GBRP: | |
| 175 | − case PIX_FMT_GRAY8: | |
| 176 | − case PIX_FMT_GRAY16BE: | |
| 177 | − case PIX_FMT_GRAY16LE: | |
| 178 | − case PIX_FMT_YUVJ420P: | |
| 179 | − case PIX_FMT_YUVJ422P: | |
| 180 | − case PIX_FMT_YUVJ440P: | |
| 181 | − case PIX_FMT_YUVJ444P: | |
| 182 | − case PIX_FMT_YUVA420P: | |
| 183 | − case PIX_FMT_YUV420P9LE: | |
| 184 | − case PIX_FMT_YUV420P9BE: | |
| 185 | − case PIX_FMT_YUV420P10LE: | |
| 186 | − case PIX_FMT_YUV420P10BE: | |
| 187 | − case PIX_FMT_YUV422P9LE: | |
| 188 | − case PIX_FMT_YUV422P9BE: | |
| 189 | − case PIX_FMT_YUV422P10LE: | |
| 190 | − case PIX_FMT_YUV422P10BE: | |
| 191 | − case PIX_FMT_YUV444P9LE: | |
| 192 | − case PIX_FMT_YUV444P9BE: | |
| 193 | − case PIX_FMT_YUV444P10LE: | |
| 194 | − case PIX_FMT_YUV444P10BE: | |
| 195 | − case PIX_FMT_GBRP9LE: | |
| 196 | − case PIX_FMT_GBRP9BE: | |
| 197 | − case PIX_FMT_GBRP10LE: | |
| 198 | − case PIX_FMT_GBRP10BE: | |
| 168 | + case AV_PIX_FMT_YUV420P: | |
| 169 | + case AV_PIX_FMT_YUYV422: | |
| 170 | + case AV_PIX_FMT_UYVY422: | |
| 171 | + case AV_PIX_FMT_YUV422P: | |
| 172 | + case AV_PIX_FMT_YUV440P: | |
| 173 | + case AV_PIX_FMT_YUV444P: | |
| 174 | + case AV_PIX_FMT_GBRP: | |
| 175 | + case AV_PIX_FMT_GRAY8: | |
| 176 | + case AV_PIX_FMT_GRAY16BE: | |
| 177 | + case AV_PIX_FMT_GRAY16LE: | |
| 178 | + case AV_PIX_FMT_YUVJ420P: | |
| 179 | + case AV_PIX_FMT_YUVJ422P: | |
| 180 | + case AV_PIX_FMT_YUVJ440P: | |
| 181 | + case AV_PIX_FMT_YUVJ444P: | |
| 182 | + case AV_PIX_FMT_YUVA420P: | |
| 183 | + case AV_PIX_FMT_YUV420P9LE: | |
| 184 | + case AV_PIX_FMT_YUV420P9BE: | |
| 185 | + case AV_PIX_FMT_YUV420P10LE: | |
| 186 | + case AV_PIX_FMT_YUV420P10BE: | |
| 187 | + case AV_PIX_FMT_YUV422P9LE: | |
| 188 | + case AV_PIX_FMT_YUV422P9BE: | |
| 189 | + case AV_PIX_FMT_YUV422P10LE: | |
| 190 | + case AV_PIX_FMT_YUV422P10BE: | |
| 191 | + case AV_PIX_FMT_YUV444P9LE: | |
| 192 | + case AV_PIX_FMT_YUV444P9BE: | |
| 193 | + case AV_PIX_FMT_YUV444P10LE: | |
| 194 | + case AV_PIX_FMT_YUV444P10BE: | |
| 195 | + case AV_PIX_FMT_GBRP9LE: | |
| 196 | + case AV_PIX_FMT_GBRP9BE: | |
| 197 | + case AV_PIX_FMT_GBRP10LE: | |
| 198 | + case AV_PIX_FMT_GBRP10BE: | |
| 199 | 199 | w_align = 16; //FIXME assume 16 pixel per macroblock |
| 200 | 200 | h_align = 16 * 2; // interlaced needs 2 macroblocks height |
| 201 | 201 | break; |
| 202 | − case PIX_FMT_YUV411P: | |
| 203 | − case PIX_FMT_UYYVYY411: | |
| 202 | + case AV_PIX_FMT_YUV411P: | |
| 203 | + case AV_PIX_FMT_UYYVYY411: | |
| 204 | 204 | w_align = 32; |
| 205 | 205 | h_align = 8; |
| 206 | 206 | break; |
| 207 | − case PIX_FMT_YUV410P: | |
| 207 | + case AV_PIX_FMT_YUV410P: | |
| 208 | 208 | if (s->codec_id == AV_CODEC_ID_SVQ1) { |
| 209 | 209 | w_align = 64; |
| 210 | 210 | h_align = 64; |
| 211 | 211 | } |
| 212 | − case PIX_FMT_RGB555: | |
| 212 | + case AV_PIX_FMT_RGB555: | |
| 213 | 213 | if (s->codec_id == AV_CODEC_ID_RPZA) { |
| 214 | 214 | w_align = 4; |
| 215 | 215 | h_align = 4; |
| 216 | 216 | } |
| 217 | − case PIX_FMT_PAL8: | |
| 218 | − case PIX_FMT_BGR8: | |
| 219 | − case PIX_FMT_RGB8: | |
| 217 | + case AV_PIX_FMT_PAL8: | |
| 218 | + case AV_PIX_FMT_BGR8: | |
| 219 | + case AV_PIX_FMT_RGB8: | |
| 220 | 220 | if (s->codec_id == AV_CODEC_ID_SMC) { |
| 221 | 221 | w_align = 4; |
| 222 | 222 | h_align = 4; |
| 223 | 223 | } |
| 224 | 224 | break; |
| 225 | − case PIX_FMT_BGR24: | |
| 225 | + case AV_PIX_FMT_BGR24: | |
| 226 | 226 | if ((s->codec_id == AV_CODEC_ID_MSZH) || |
| 227 | 227 | (s->codec_id == AV_CODEC_ID_ZLIB)) { |
| 228 | 228 | w_align = 4; |
| @@ -624,9 +624,9 @@ int avcodec_default_execute2(AVCodecContext *c, int (*func)(AVCodecContext *c2, · 395 unmodified lines | ||
| 624 | 624 | return 0; |
| 625 | 625 | } |
| 626 | 626 | |
| 627 | −enum PixelFormat avcodec_default_get_format(struct AVCodecContext *s, const enum PixelFormat *fmt) | |
| 627 | +enum AVPixelFormat avcodec_default_get_format(struct AVCodecContext *s, const enum AVPixelFormat *fmt) | |
| 628 | 628 | { |
| 629 | − while (*fmt != PIX_FMT_NONE && ff_is_hwaccel_pix_fmt(*fmt)) | |
| 629 | + while (*fmt != AV_PIX_FMT_NONE && ff_is_hwaccel_pix_fmt(*fmt)) | |
| 630 | 630 | ++fmt; |
| 631 | 631 | return fmt[0]; |
| 632 | 632 | } |
| @@ -809,10 +809,10 @@ int attribute_align_arg avcodec_open2(AVCodecContext *avctx, const AVCodec *code · 176 unmodified lines | ||
| 809 | 809 | } |
| 810 | 810 | } |
| 811 | 811 | if (avctx->codec->pix_fmts) { |
| 812 | − for (i = 0; avctx->codec->pix_fmts[i] != PIX_FMT_NONE; i++) | |
| 812 | + for (i = 0; avctx->codec->pix_fmts[i] != AV_PIX_FMT_NONE; i++) | |
| 813 | 813 | if (avctx->pix_fmt == avctx->codec->pix_fmts[i]) |
| 814 | 814 | break; |
| 815 | − if (avctx->codec->pix_fmts[i] == PIX_FMT_NONE) { | |
| 815 | + if (avctx->codec->pix_fmts[i] == AV_PIX_FMT_NONE) { | |
| 816 | 816 | av_log(avctx, AV_LOG_ERROR, "Specified pix_fmt is not supported\n"); |
| 817 | 817 | ret = AVERROR(EINVAL); |
| 818 | 818 | goto free_and_end; |
| @@ -1621,7 +1621,7 @@ void avcodec_string(char *buf, int buf_size, AVCodecContext *enc, int encode) · 802 unmodified lines | ||
| 1621 | 1621 | if (profile) |
| 1622 | 1622 | snprintf(buf + strlen(buf), buf_size - strlen(buf), |
| 1623 | 1623 | " (%s)", profile); |
| 1624 | − if (enc->pix_fmt != PIX_FMT_NONE) { | |
| 1624 | + if (enc->pix_fmt != AV_PIX_FMT_NONE) { | |
| 1625 | 1625 | snprintf(buf + strlen(buf), buf_size - strlen(buf), |
| 1626 | 1626 | ", %s", |
| 1627 | 1627 | av_get_pix_fmt_name(enc->pix_fmt)); |
| @@ -2067,7 +2067,7 @@ AVHWAccel *av_hwaccel_next(AVHWAccel *hwaccel) · 439 unmodified lines | ||
| 2067 | 2067 | return hwaccel ? hwaccel->next : first_hwaccel; |
| 2068 | 2068 | } |
| 2069 | 2069 | |
| 2070 | −AVHWAccel *ff_find_hwaccel(enum AVCodecID codec_id, enum PixelFormat pix_fmt) | |
| 2070 | +AVHWAccel *ff_find_hwaccel(enum AVCodecID codec_id, enum AVPixelFormat pix_fmt) | |
| 2071 | 2071 | { |
| 2072 | 2072 | AVHWAccel *hwaccel = NULL; |
| 2073 | 2073 | |
| @@ -86,7 +86,7 @@ static int decode_plane(UtvideoContext *c, int plane_no, · 85 unmodified lines | ||
| 86 | 86 | VLC vlc; |
| 87 | 87 | GetBitContext gb; |
| 88 | 88 | int prev, fsym; |
| 89 | − const int cmask = ~(!plane_no && c->avctx->pix_fmt == PIX_FMT_YUV420P); | |
| 89 | + const int cmask = ~(!plane_no && c->avctx->pix_fmt == AV_PIX_FMT_YUV420P); | |
| 90 | 90 | |
| 91 | 91 | if (build_huff(src, &vlc, &fsym)) { |
| 92 | 92 | av_log(c->avctx, AV_LOG_ERROR, "Cannot build Huffman codes\n"); |
| @@ -393,8 +393,8 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, · 300 unmodified lines | ||
| 393 | 393 | } |
| 394 | 394 | |
| 395 | 395 | switch (c->avctx->pix_fmt) { |
| 396 | − case PIX_FMT_RGB24: | |
| 397 | − case PIX_FMT_RGBA: | |
| 396 | + case AV_PIX_FMT_RGB24: | |
| 397 | + case AV_PIX_FMT_RGBA: | |
| 398 | 398 | for (i = 0; i < c->planes; i++) { |
| 399 | 399 | ret = decode_plane(c, i, c->pic.data[0] + ff_ut_rgb_order[i], |
| 400 | 400 | c->planes, c->pic.linesize[0], avctx->width, |
| @@ -418,7 +418,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, · 17 unmodified lines | ||
| 418 | 418 | restore_rgb_planes(c->pic.data[0], c->planes, c->pic.linesize[0], |
| 419 | 419 | avctx->width, avctx->height); |
| 420 | 420 | break; |
| 421 | − case PIX_FMT_YUV420P: | |
| 421 | + case AV_PIX_FMT_YUV420P: | |
| 422 | 422 | for (i = 0; i < 3; i++) { |
| 423 | 423 | ret = decode_plane(c, i, c->pic.data[i], 1, c->pic.linesize[i], |
| 424 | 424 | avctx->width >> !!i, avctx->height >> !!i, |
| @@ -439,7 +439,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, · 14 unmodified lines | ||
| 439 | 439 | } |
| 440 | 440 | } |
| 441 | 441 | break; |
| 442 | − case PIX_FMT_YUV422P: | |
| 442 | + case AV_PIX_FMT_YUV422P: | |
| 443 | 443 | for (i = 0; i < 3; i++) { |
| 444 | 444 | ret = decode_plane(c, i, c->pic.data[i], 1, c->pic.linesize[i], |
| 445 | 445 | avctx->width >> !!i, avctx->height, |
| @@ -507,19 +507,19 @@ static av_cold int decode_init(AVCodecContext *avctx) · 61 unmodified lines | ||
| 507 | 507 | switch (avctx->codec_tag) { |
| 508 | 508 | case MKTAG('U', 'L', 'R', 'G'): |
| 509 | 509 | c->planes = 3; |
| 510 | − avctx->pix_fmt = PIX_FMT_RGB24; | |
| 510 | + avctx->pix_fmt = AV_PIX_FMT_RGB24; | |
| 511 | 511 | break; |
| 512 | 512 | case MKTAG('U', 'L', 'R', 'A'): |
| 513 | 513 | c->planes = 4; |
| 514 | − avctx->pix_fmt = PIX_FMT_RGBA; | |
| 514 | + avctx->pix_fmt = AV_PIX_FMT_RGBA; | |
| 515 | 515 | break; |
| 516 | 516 | case MKTAG('U', 'L', 'Y', '0'): |
| 517 | 517 | c->planes = 3; |
| 518 | − avctx->pix_fmt = PIX_FMT_YUV420P; | |
| 518 | + avctx->pix_fmt = AV_PIX_FMT_YUV420P; | |
| 519 | 519 | break; |
| 520 | 520 | case MKTAG('U', 'L', 'Y', '2'): |
| 521 | 521 | c->planes = 3; |
| 522 | − avctx->pix_fmt = PIX_FMT_YUV422P; | |
| 522 | + avctx->pix_fmt = AV_PIX_FMT_YUV422P; | |
| 523 | 523 | break; |
| 524 | 524 | default: |
| 525 | 525 | av_log(avctx, AV_LOG_ERROR, "Unknown Ut Video FOURCC provided (%08X)\n", |
| @@ -65,17 +65,17 @@ static av_cold int utvideo_encode_init(AVCodecContext *avctx) · 64 unmodified lines | ||
| 65 | 65 | c->slice_stride = FFALIGN(avctx->width, 32); |
| 66 | 66 | |
| 67 | 67 | switch (avctx->pix_fmt) { |
| 68 | − case PIX_FMT_RGB24: | |
| 68 | + case AV_PIX_FMT_RGB24: | |
| 69 | 69 | c->planes = 3; |
| 70 | 70 | avctx->codec_tag = MKTAG('U', 'L', 'R', 'G'); |
| 71 | 71 | original_format = UTVIDEO_RGB; |
| 72 | 72 | break; |
| 73 | − case PIX_FMT_RGBA: | |
| 73 | + case AV_PIX_FMT_RGBA: | |
| 74 | 74 | c->planes = 4; |
| 75 | 75 | avctx->codec_tag = MKTAG('U', 'L', 'R', 'A'); |
| 76 | 76 | original_format = UTVIDEO_RGBA; |
| 77 | 77 | break; |
| 78 | − case PIX_FMT_YUV420P: | |
| 78 | + case AV_PIX_FMT_YUV420P: | |
| 79 | 79 | if (avctx->width & 1 || avctx->height & 1) { |
| 80 | 80 | av_log(avctx, AV_LOG_ERROR, |
| 81 | 81 | "4:2:0 video requires even width and height.\n"); |
| @@ -85,7 +85,7 @@ static av_cold int utvideo_encode_init(AVCodecContext *avctx) · 3 unmodified lines | ||
| 85 | 85 | avctx->codec_tag = MKTAG('U', 'L', 'Y', '0'); |
| 86 | 86 | original_format = UTVIDEO_420; |
| 87 | 87 | break; |
| 88 | − case PIX_FMT_YUV422P: | |
| 88 | + case AV_PIX_FMT_YUV422P: | |
| 89 | 89 | if (avctx->width & 1) { |
| 90 | 90 | av_log(avctx, AV_LOG_ERROR, |
| 91 | 91 | "4:2:2 video requires even width.\n"); |
| @@ -538,14 +538,14 @@ static int utvideo_encode_frame(AVCodecContext *avctx, AVPacket *pkt, · 446 unmodified lines | ||
| 538 | 538 | } |
| 539 | 539 | |
| 540 | 540 | /* In case of RGB, mangle the planes to Ut Video's format */ |
| 541 | − if (avctx->pix_fmt == PIX_FMT_RGBA || avctx->pix_fmt == PIX_FMT_RGB24) | |
| 541 | + if (avctx->pix_fmt == AV_PIX_FMT_RGBA || avctx->pix_fmt == AV_PIX_FMT_RGB24) | |
| 542 | 542 | mangle_rgb_planes(c->slice_buffer, c->slice_stride, pic->data[0], |
| 543 | 543 | c->planes, pic->linesize[0], width, height); |
| 544 | 544 | |
| 545 | 545 | /* Deal with the planes */ |
| 546 | 546 | switch (avctx->pix_fmt) { |
| 547 | − case PIX_FMT_RGB24: | |
| 548 | − case PIX_FMT_RGBA: | |
| 547 | + case AV_PIX_FMT_RGB24: | |
| 548 | + case AV_PIX_FMT_RGBA: | |
| 549 | 549 | for (i = 0; i < c->planes; i++) { |
| 550 | 550 | ret = encode_plane(avctx, c->slice_buffer[i] + 2 * c->slice_stride, |
| 551 | 551 | c->slice_buffer[i], c->slice_stride, |
| @@ -557,7 +557,7 @@ static int utvideo_encode_frame(AVCodecContext *avctx, AVPacket *pkt, · 5 unmodified lines | ||
| 557 | 557 | } |
| 558 | 558 | } |
| 559 | 559 | break; |
| 560 | − case PIX_FMT_YUV422P: | |
| 560 | + case AV_PIX_FMT_YUV422P: | |
| 561 | 561 | for (i = 0; i < c->planes; i++) { |
| 562 | 562 | ret = encode_plane(avctx, pic->data[i], c->slice_buffer[0], |
| 563 | 563 | pic->linesize[i], width >> !!i, height, &pb); |
| @@ -568,7 +568,7 @@ static int utvideo_encode_frame(AVCodecContext *avctx, AVPacket *pkt, · 4 unmodified lines | ||
| 568 | 568 | } |
| 569 | 569 | } |
| 570 | 570 | break; |
| 571 | − case PIX_FMT_YUV420P: | |
| 571 | + case AV_PIX_FMT_YUV420P: | |
| 572 | 572 | for (i = 0; i < c->planes; i++) { |
| 573 | 573 | ret = encode_plane(avctx, pic->data[i], c->slice_buffer[0], |
| 574 | 574 | pic->linesize[i], width >> !!i, height >> !!i, |
| @@ -619,9 +619,9 @@ AVCodec ff_utvideo_encoder = { · 44 unmodified lines | ||
| 619 | 619 | .init = utvideo_encode_init, |
| 620 | 620 | .encode2 = utvideo_encode_frame, |
| 621 | 621 | .close = utvideo_encode_close, |
| 622 | − .pix_fmts = (const enum PixelFormat[]) { | |
| 623 | − PIX_FMT_RGB24, PIX_FMT_RGBA, PIX_FMT_YUV422P, | |
| 624 | − PIX_FMT_YUV420P, PIX_FMT_NONE | |
| 622 | + .pix_fmts = (const enum AVPixelFormat[]) { | |
| 623 | + AV_PIX_FMT_RGB24, AV_PIX_FMT_RGBA, AV_PIX_FMT_YUV422P, | |
| 624 | + AV_PIX_FMT_YUV420P, AV_PIX_FMT_NONE | |
| 625 | 625 | }, |
| 626 | 626 | .long_name = NULL_IF_CONFIG_SMALL("Ut Video"), |
| 627 | 627 | }; |
| @@ -32,7 +32,7 @@ static av_cold int decode_init(AVCodecContext *avctx) · 31 unmodified lines | ||
| 32 | 32 | av_log(avctx, AV_LOG_ERROR, "v210 needs even width\n"); |
| 33 | 33 | return -1; |
| 34 | 34 | } |
| 35 | − avctx->pix_fmt = PIX_FMT_YUV422P10; | |
| 35 | + avctx->pix_fmt = AV_PIX_FMT_YUV422P10; | |
| 36 | 36 | avctx->bits_per_raw_sample = 10; |
| 37 | 37 | |
| 38 | 38 | avctx->coded_frame = avcodec_alloc_frame(); |
| @@ -123,6 +123,6 @@ AVCodec ff_v210_encoder = { · 122 unmodified lines | ||
| 123 | 123 | .init = encode_init, |
| 124 | 124 | .encode2 = encode_frame, |
| 125 | 125 | .close = encode_close, |
| 126 | − .pix_fmts = (const enum PixelFormat[]){ PIX_FMT_YUV422P10, PIX_FMT_NONE }, | |
| 126 | + .pix_fmts = (const enum AVPixelFormat[]){ AV_PIX_FMT_YUV422P10, AV_PIX_FMT_NONE }, | |
| 127 | 127 | .long_name = NULL_IF_CONFIG_SMALL("Uncompressed 4:2:2 10-bit"), |
| 128 | 128 | }; |
| @@ -29,7 +29,7 @@ static av_cold int decode_init(AVCodecContext *avctx) · 28 unmodified lines | ||
| 29 | 29 | av_log(avctx, AV_LOG_ERROR, "v210x needs even width\n"); |
| 30 | 30 | return -1; |
| 31 | 31 | } |
| 32 | − avctx->pix_fmt = PIX_FMT_YUV422P16; | |
| 32 | + avctx->pix_fmt = AV_PIX_FMT_YUV422P16; | |
| 33 | 33 | avctx->bits_per_raw_sample= 10; |
| 34 | 34 | |
| 35 | 35 | avctx->coded_frame= avcodec_alloc_frame(); |
| @@ -26,7 +26,7 @@ · 25 unmodified lines | ||
| 26 | 26 | |
| 27 | 27 | static av_cold int v410_decode_init(AVCodecContext *avctx) |
| 28 | 28 | { |
| 29 | − avctx->pix_fmt = PIX_FMT_YUV444P10; | |
| 29 | + avctx->pix_fmt = AV_PIX_FMT_YUV444P10; | |
| 30 | 30 | avctx->bits_per_raw_sample = 10; |
| 31 | 31 | |
| 32 | 32 | if (avctx->width & 1) { |
| @@ -96,6 +96,6 @@ AVCodec ff_v410_encoder = { · 95 unmodified lines | ||
| 96 | 96 | .init = v410_encode_init, |
| 97 | 97 | .encode2 = v410_encode_frame, |
| 98 | 98 | .close = v410_encode_close, |
| 99 | − .pix_fmts = (const enum PixelFormat[]){ PIX_FMT_YUV444P10, PIX_FMT_NONE }, | |
| 99 | + .pix_fmts = (const enum AVPixelFormat[]){ AV_PIX_FMT_YUV444P10, AV_PIX_FMT_NONE }, | |
| 100 | 100 | .long_name = NULL_IF_CONFIG_SMALL("Uncompressed 4:4:4 10-bit"), |
| 101 | 101 | }; |
| @@ -340,7 +340,7 @@ AVHWAccel ff_h264_vaapi_hwaccel = { · 339 unmodified lines | ||
| 340 | 340 | .name = "h264_vaapi", |
| 341 | 341 | .type = AVMEDIA_TYPE_VIDEO, |
| 342 | 342 | .id = AV_CODEC_ID_H264, |
| 343 | − .pix_fmt = PIX_FMT_VAAPI_VLD, | |
| 343 | + .pix_fmt = AV_PIX_FMT_VAAPI_VLD, | |
| 344 | 344 | .start_frame = start_frame, |
| 345 | 345 | .end_frame = end_frame, |
| 346 | 346 | .decode_slice = decode_slice, |
| @@ -142,7 +142,7 @@ AVHWAccel ff_mpeg2_vaapi_hwaccel = { · 141 unmodified lines | ||
| 142 | 142 | .name = "mpeg2_vaapi", |
| 143 | 143 | .type = AVMEDIA_TYPE_VIDEO, |
| 144 | 144 | .id = AV_CODEC_ID_MPEG2VIDEO, |
| 145 | − .pix_fmt = PIX_FMT_VAAPI_VLD, | |
| 145 | + .pix_fmt = AV_PIX_FMT_VAAPI_VLD, | |
| 146 | 146 | .start_frame = vaapi_mpeg2_start_frame, |
| 147 | 147 | .end_frame = vaapi_mpeg2_end_frame, |
| 148 | 148 | .decode_slice = vaapi_mpeg2_decode_slice, |
| @@ -154,7 +154,7 @@ AVHWAccel ff_mpeg4_vaapi_hwaccel = { · 153 unmodified lines | ||
| 154 | 154 | .name = "mpeg4_vaapi", |
| 155 | 155 | .type = AVMEDIA_TYPE_VIDEO, |
| 156 | 156 | .id = AV_CODEC_ID_MPEG4, |
| 157 | − .pix_fmt = PIX_FMT_VAAPI_VLD, | |
| 157 | + .pix_fmt = AV_PIX_FMT_VAAPI_VLD, | |
| 158 | 158 | .start_frame = vaapi_mpeg4_start_frame, |
| 159 | 159 | .end_frame = vaapi_mpeg4_end_frame, |
| 160 | 160 | .decode_slice = vaapi_mpeg4_decode_slice, |
| @@ -166,7 +166,7 @@ AVHWAccel ff_h263_vaapi_hwaccel = { · 5 unmodified lines | ||
| 166 | 166 | .name = "h263_vaapi", |
| 167 | 167 | .type = AVMEDIA_TYPE_VIDEO, |
| 168 | 168 | .id = AV_CODEC_ID_H263, |
| 169 | − .pix_fmt = PIX_FMT_VAAPI_VLD, | |
| 169 | + .pix_fmt = AV_PIX_FMT_VAAPI_VLD, | |
| 170 | 170 | .start_frame = vaapi_mpeg4_start_frame, |
| 171 | 171 | .end_frame = vaapi_mpeg4_end_frame, |
| 172 | 172 | .decode_slice = vaapi_mpeg4_decode_slice, |
| @@ -345,7 +345,7 @@ AVHWAccel ff_wmv3_vaapi_hwaccel = { · 344 unmodified lines | ||
| 345 | 345 | .name = "wmv3_vaapi", |
| 346 | 346 | .type = AVMEDIA_TYPE_VIDEO, |
| 347 | 347 | .id = AV_CODEC_ID_WMV3, |
| 348 | − .pix_fmt = PIX_FMT_VAAPI_VLD, | |
| 348 | + .pix_fmt = AV_PIX_FMT_VAAPI_VLD, | |
| 349 | 349 | .start_frame = vaapi_vc1_start_frame, |
| 350 | 350 | .end_frame = vaapi_vc1_end_frame, |
| 351 | 351 | .decode_slice = vaapi_vc1_decode_slice, |
| @@ -356,7 +356,7 @@ AVHWAccel ff_vc1_vaapi_hwaccel = { · 4 unmodified lines | ||
| 356 | 356 | .name = "vc1_vaapi", |
| 357 | 357 | .type = AVMEDIA_TYPE_VIDEO, |
| 358 | 358 | .id = AV_CODEC_ID_VC1, |
| 359 | − .pix_fmt = PIX_FMT_VAAPI_VLD, | |
| 359 | + .pix_fmt = AV_PIX_FMT_VAAPI_VLD, | |
| 360 | 360 | .start_frame = vaapi_vc1_start_frame, |
| 361 | 361 | .end_frame = vaapi_vc1_end_frame, |
| 362 | 362 | .decode_slice = vaapi_vc1_decode_slice, |
| @@ -246,7 +246,7 @@ static av_cold int decode_init(AVCodecContext *avctx) · 245 unmodified lines | ||
| 246 | 246 | VBDecContext * const c = avctx->priv_data; |
| 247 | 247 | |
| 248 | 248 | c->avctx = avctx; |
| 249 | − avctx->pix_fmt = PIX_FMT_PAL8; | |
| 249 | + avctx->pix_fmt = AV_PIX_FMT_PAL8; | |
| 250 | 250 | |
| 251 | 251 | c->frame = av_mallocz(avctx->width * avctx->height); |
| 252 | 252 | c->prev_frame = av_mallocz(avctx->width * avctx->height); |
| @@ -193,7 +193,7 @@ static av_cold int vble_decode_init(AVCodecContext *avctx) · 192 unmodified lines | ||
| 193 | 193 | ctx->avctx = avctx; |
| 194 | 194 | ff_dsputil_init(&ctx->dsp, avctx); |
| 195 | 195 | |
| 196 | − avctx->pix_fmt = PIX_FMT_YUV420P; | |
| 196 | + avctx->pix_fmt = AV_PIX_FMT_YUV420P; | |
| 197 | 197 | avctx->bits_per_raw_sample = 8; |
| 198 | 198 | avctx->coded_frame = avcodec_alloc_frame(); |
| 199 | 199 | |
| @@ -5149,7 +5149,7 @@ static av_cold int vc1_decode_init(AVCodecContext *avctx) · 5148 unmodified lines | ||
| 5149 | 5149 | if (!(avctx->flags & CODEC_FLAG_GRAY)) |
| 5150 | 5150 | avctx->pix_fmt = avctx->get_format(avctx, avctx->codec->pix_fmts); |
| 5151 | 5151 | else |
| 5152 | − avctx->pix_fmt = PIX_FMT_GRAY8; | |
| 5152 | + avctx->pix_fmt = AV_PIX_FMT_GRAY8; | |
| 5153 | 5153 | avctx->hwaccel = ff_find_hwaccel(avctx->codec->id, avctx->pix_fmt); |
| 5154 | 5154 | v->s.avctx = avctx; |
| 5155 | 5155 | avctx->flags |= CODEC_FLAG_EMU_EDGE; |
| @@ -5336,9 +5336,9 @@ static int vc1_decode_frame(AVCodecContext *avctx, void *data, · 180 unmodified lines | ||
| 5336 | 5336 | |
| 5337 | 5337 | if (s->avctx->codec->capabilities&CODEC_CAP_HWACCEL_VDPAU) { |
| 5338 | 5338 | if (v->profile < PROFILE_ADVANCED) |
| 5339 | − avctx->pix_fmt = PIX_FMT_VDPAU_WMV3; | |
| 5339 | + avctx->pix_fmt = AV_PIX_FMT_VDPAU_WMV3; | |
| 5340 | 5340 | else |
| 5341 | − avctx->pix_fmt = PIX_FMT_VDPAU_VC1; | |
| 5341 | + avctx->pix_fmt = AV_PIX_FMT_VDPAU_VC1; | |
| 5342 | 5342 | } |
| 5343 | 5343 | |
| 5344 | 5344 | //for advanced profile we may need to parse and unescape data |
| @@ -5722,7 +5722,7 @@ AVCodec ff_wmv3_vdpau_decoder = { · 377 unmodified lines | ||
| 5722 | 5722 | .decode = vc1_decode_frame, |
| 5723 | 5723 | .capabilities = CODEC_CAP_DR1 | CODEC_CAP_DELAY | CODEC_CAP_HWACCEL_VDPAU, |
| 5724 | 5724 | .long_name = NULL_IF_CONFIG_SMALL("Windows Media Video 9 VDPAU"), |
| 5725 | − .pix_fmts = (const enum PixelFormat[]){ PIX_FMT_VDPAU_WMV3, PIX_FMT_NONE }, | |
| 5725 | + .pix_fmts = (const enum AVPixelFormat[]){ AV_PIX_FMT_VDPAU_WMV3, AV_PIX_FMT_NONE }, | |
| 5726 | 5726 | .profiles = NULL_IF_CONFIG_SMALL(profiles) |
| 5727 | 5727 | }; |
| 5728 | 5728 | #endif |
| @@ -5738,7 +5738,7 @@ AVCodec ff_vc1_vdpau_decoder = { · 9 unmodified lines | ||
| 5738 | 5738 | .decode = vc1_decode_frame, |
| 5739 | 5739 | .capabilities = CODEC_CAP_DR1 | CODEC_CAP_DELAY | CODEC_CAP_HWACCEL_VDPAU, |
| 5740 | 5740 | .long_name = NULL_IF_CONFIG_SMALL("SMPTE VC-1 VDPAU"), |
| 5741 | − .pix_fmts = (const enum PixelFormat[]){ PIX_FMT_VDPAU_VC1, PIX_FMT_NONE }, | |
| 5741 | + .pix_fmts = (const enum AVPixelFormat[]){ AV_PIX_FMT_VDPAU_VC1, AV_PIX_FMT_NONE }, | |
| 5742 | 5742 | .profiles = NULL_IF_CONFIG_SMALL(profiles) |
| 5743 | 5743 | }; |
| 5744 | 5744 | #endif |
| @@ -47,7 +47,7 @@ static av_cold int vcr1_decode_init(AVCodecContext *avctx) · 46 unmodified lines | ||
| 47 | 47 | { |
| 48 | 48 | vcr1_common_init(avctx); |
| 49 | 49 | |
| 50 | − avctx->pix_fmt = PIX_FMT_YUV410P; | |
| 50 | + avctx->pix_fmt = AV_PIX_FMT_YUV410P; | |
| 51 | 51 | |
| 52 | 52 | return 0; |
| 53 | 53 | } |
| @@ -371,7 +371,7 @@ AVHWAccel ff_h264_vda_hwaccel = { · 370 unmodified lines | ||
| 371 | 371 | .name = "h264_vda", |
| 372 | 372 | .type = AVMEDIA_TYPE_VIDEO, |
| 373 | 373 | .id = AV_CODEC_ID_H264, |
| 374 | − .pix_fmt = PIX_FMT_VDA_VLD, | |
| 374 | + .pix_fmt = AV_PIX_FMT_VDA_VLD, | |
| 375 | 375 | .start_frame = start_frame, |
| 376 | 376 | .decode_slice = decode_slice, |
| 377 | 377 | .end_frame = end_frame, |
| @@ -388,7 +388,7 @@ static av_cold int vmdvideo_decode_init(AVCodecContext *avctx) · 387 unmodified lines | ||
| 388 | 388 | unsigned char *raw_palette; |
| 389 | 389 | |
| 390 | 390 | s->avctx = avctx; |
| 391 | − avctx->pix_fmt = PIX_FMT_PAL8; | |
| 391 | + avctx->pix_fmt = AV_PIX_FMT_PAL8; | |
| 392 | 392 | |
| 393 | 393 | /* make sure the VMD header made it */ |
| 394 | 394 | if (s->avctx->extradata_size != VMD_HEADER_SIZE) { |
| @@ -474,13 +474,13 @@ static av_cold int decode_init(AVCodecContext *avctx) · 473 unmodified lines | ||
| 474 | 474 | |
| 475 | 475 | switch(c->bpp){ |
| 476 | 476 | case 8: |
| 477 | − avctx->pix_fmt = PIX_FMT_PAL8; | |
| 477 | + avctx->pix_fmt = AV_PIX_FMT_PAL8; | |
| 478 | 478 | break; |
| 479 | 479 | case 16: |
| 480 | − avctx->pix_fmt = PIX_FMT_RGB555; | |
| 480 | + avctx->pix_fmt = AV_PIX_FMT_RGB555; | |
| 481 | 481 | break; |
| 482 | 482 | case 32: |
| 483 | − avctx->pix_fmt = PIX_FMT_RGB32; | |
| 483 | + avctx->pix_fmt = AV_PIX_FMT_RGB32; | |
| 484 | 484 | break; |
| 485 | 485 | default: |
| 486 | 486 | av_log(avctx, AV_LOG_ERROR, "Unsupported bitdepth %i\n", c->bpp); |
| @@ -1673,8 +1673,8 @@ static av_cold int vp3_decode_init(AVCodecContext *avctx) · 1672 unmodified lines | ||
| 1673 | 1673 | s->avctx = avctx; |
| 1674 | 1674 | s->width = FFALIGN(avctx->width, 16); |
| 1675 | 1675 | s->height = FFALIGN(avctx->height, 16); |
| 1676 | − if (avctx->pix_fmt == PIX_FMT_NONE) | |
| 1677 | − avctx->pix_fmt = PIX_FMT_YUV420P; | |
| 1676 | + if (avctx->pix_fmt == AV_PIX_FMT_NONE) | |
| 1677 | + avctx->pix_fmt = AV_PIX_FMT_YUV420P; | |
| 1678 | 1678 | avctx->chroma_sample_location = AVCHROMA_LOC_CENTER; |
| 1679 | 1679 | ff_dsputil_init(&s->dsp, avctx); |
| 1680 | 1680 | ff_vp3dsp_init(&s->vp3dsp, avctx->flags); |
| @@ -2115,8 +2115,8 @@ static int vp3_init_thread_copy(AVCodecContext *avctx) · 434 unmodified lines | ||
| 2115 | 2115 | } |
| 2116 | 2116 | |
| 2117 | 2117 | #if CONFIG_THEORA_DECODER |
| 2118 | −static const enum PixelFormat theora_pix_fmts[4] = { | |
| 2119 | − PIX_FMT_YUV420P, PIX_FMT_NONE, PIX_FMT_YUV422P, PIX_FMT_YUV444P | |
| 2118 | +static const enum AVPixelFormat theora_pix_fmts[4] = { | |
| 2119 | + AV_PIX_FMT_YUV420P, AV_PIX_FMT_NONE, AV_PIX_FMT_YUV422P, AV_PIX_FMT_YUV444P | |
| 2120 | 2120 | }; |
| 2121 | 2121 | |
| 2122 | 2122 | static int theora_decode_header(AVCodecContext *avctx, GetBitContext *gb) |
| @@ -664,7 +664,7 @@ av_cold void ff_vp56_init(AVCodecContext *avctx, int flip, int has_alpha) · 663 unmodified lines | ||
| 664 | 664 | int i; |
| 665 | 665 | |
| 666 | 666 | s->avctx = avctx; |
| 667 | − avctx->pix_fmt = has_alpha ? PIX_FMT_YUVA420P : PIX_FMT_YUV420P; | |
| 667 | + avctx->pix_fmt = has_alpha ? AV_PIX_FMT_YUVA420P : AV_PIX_FMT_YUV420P; | |
| 668 | 668 | |
| 669 | 669 | ff_dsputil_init(&s->dsp, avctx); |
| 670 | 670 | ff_vp3dsp_init(&s->vp3dsp, avctx->flags); |
| @@ -2016,7 +2016,7 @@ static av_cold int vp8_decode_init(AVCodecContext *avctx) · 2015 unmodified lines | ||
| 2016 | 2016 | VP8Context *s = avctx->priv_data; |
| 2017 | 2017 | |
| 2018 | 2018 | s->avctx = avctx; |
| 2019 | − avctx->pix_fmt = PIX_FMT_YUV420P; | |
| 2019 | + avctx->pix_fmt = AV_PIX_FMT_YUV420P; | |
| 2020 | 2020 | |
| 2021 | 2021 | ff_dsputil_init(&s->dsp, avctx); |
| 2022 | 2022 | ff_h264_pred_init(&s->hpc, AV_CODEC_ID_VP8, 8, 1); |
| @@ -124,7 +124,7 @@ static av_cold int vqa_decode_init(AVCodecContext *avctx) · 123 unmodified lines | ||
| 124 | 124 | int i, j, codebook_index; |
| 125 | 125 | |
| 126 | 126 | s->avctx = avctx; |
| 127 | − avctx->pix_fmt = PIX_FMT_PAL8; | |
| 127 | + avctx->pix_fmt = AV_PIX_FMT_PAL8; | |
| 128 | 128 | |
| 129 | 129 | /* make sure the extradata made it */ |
| 130 | 130 | if (s->avctx->extradata_size != VQA_HEADER_SIZE) { |
| @@ -219,6 +219,6 @@ AVCodec ff_wmv2_encoder = { · 218 unmodified lines | ||
| 219 | 219 | .init = wmv2_encode_init, |
| 220 | 220 | .encode2 = ff_MPV_encode_picture, |
| 221 | 221 | .close = ff_MPV_encode_end, |
| 222 | − .pix_fmts = (const enum PixelFormat[]){ PIX_FMT_YUV420P, PIX_FMT_NONE }, | |
| 222 | + .pix_fmts = (const enum AVPixelFormat[]){ AV_PIX_FMT_YUV420P, AV_PIX_FMT_NONE }, | |
| 223 | 223 | .long_name = NULL_IF_CONFIG_SMALL("Windows Media Video 8"), |
| 224 | 224 | }; |
| @@ -135,7 +135,7 @@ static av_cold int decode_init(AVCodecContext *avctx){ · 134 unmodified lines | ||
| 135 | 135 | static VLC_TYPE code_table[1 << CODE_VLC_BITS][2]; |
| 136 | 136 | |
| 137 | 137 | l->avctx = avctx; |
| 138 | − avctx->pix_fmt = PIX_FMT_YUV422P; | |
| 138 | + avctx->pix_fmt = AV_PIX_FMT_YUV422P; | |
| 139 | 139 | |
| 140 | 140 | code_vlc.table = code_table; |
| 141 | 141 | code_vlc.table_allocated = 1 << CODE_VLC_BITS; |
| @@ -79,7 +79,7 @@ static av_cold int xan_decode_init(AVCodecContext *avctx) · 78 unmodified lines | ||
| 79 | 79 | s->avctx = avctx; |
| 80 | 80 | s->frame_size = 0; |
| 81 | 81 | |
| 82 | − avctx->pix_fmt = PIX_FMT_PAL8; | |
| 82 | + avctx->pix_fmt = AV_PIX_FMT_PAL8; | |
| 83 | 83 | |
| 84 | 84 | s->buffer1_size = avctx->width * avctx->height; |
| 85 | 85 | s->buffer1 = av_malloc(s->buffer1_size); |
| @@ -81,7 +81,7 @@ AVCodec ff_xbm_encoder = { · 80 unmodified lines | ||
| 81 | 81 | .init = xbm_encode_init, |
| 82 | 82 | .encode2 = xbm_encode_frame, |
| 83 | 83 | .close = xbm_encode_close, |
| 84 | − .pix_fmts = (const enum PixelFormat[]) { PIX_FMT_MONOWHITE, | |
| 85 | − PIX_FMT_NONE }, | |
| 84 | + .pix_fmts = (const enum AVPixelFormat[]) { AV_PIX_FMT_MONOWHITE, | |
| 85 | + AV_PIX_FMT_NONE }, | |
| 86 | 86 | .long_name = NULL_IF_CONFIG_SMALL("XBM (X BitMap) image"), |
| 87 | 87 | }; |
| @@ -130,7 +130,7 @@ static int decode_frame(AVCodecContext *avctx, · 129 unmodified lines | ||
| 130 | 130 | static av_cold int decode_init(AVCodecContext *avctx){ |
| 131 | 131 | // VideoXLContext * const a = avctx->priv_data; |
| 132 | 132 | |
| 133 | − avctx->pix_fmt= PIX_FMT_YUV411P; | |
| 133 | + avctx->pix_fmt= AV_PIX_FMT_YUV411P; | |
| 134 | 134 | |
| 135 | 135 | return 0; |
| 136 | 136 | } |
| @@ -26,7 +26,7 @@ · 25 unmodified lines | ||
| 26 | 26 | #include "bytestream.h" |
| 27 | 27 | |
| 28 | 28 | static av_cold int decode_init(AVCodecContext *avctx) { |
| 29 | − avctx->pix_fmt = PIX_FMT_PAL8; | |
| 29 | + avctx->pix_fmt = AV_PIX_FMT_PAL8; | |
| 30 | 30 | return 0; |
| 31 | 31 | } |
| 32 | 32 | |
| @@ -153,19 +153,19 @@ static int xwd_decode_frame(AVCodecContext *avctx, void *data, · 152 unmodified lines | ||
| 153 | 153 | return AVERROR_PATCHWELCOME; |
| 154 | 154 | } |
| 155 | 155 | |
| 156 | − avctx->pix_fmt = PIX_FMT_NONE; | |
| 156 | + avctx->pix_fmt = AV_PIX_FMT_NONE; | |
| 157 | 157 | switch (vclass) { |
| 158 | 158 | case XWD_STATIC_GRAY: |
| 159 | 159 | case XWD_GRAY_SCALE: |
| 160 | 160 | if (bpp != 1) |
| 161 | 161 | return AVERROR_INVALIDDATA; |
| 162 | 162 | if (pixdepth == 1) |
| 163 | − avctx->pix_fmt = PIX_FMT_MONOWHITE; | |
| 163 | + avctx->pix_fmt = AV_PIX_FMT_MONOWHITE; | |
| 164 | 164 | break; |
| 165 | 165 | case XWD_STATIC_COLOR: |
| 166 | 166 | case XWD_PSEUDO_COLOR: |
| 167 | 167 | if (bpp == 8) |
| 168 | − avctx->pix_fmt = PIX_FMT_PAL8; | |
| 168 | + avctx->pix_fmt = AV_PIX_FMT_PAL8; | |
| 169 | 169 | break; |
| 170 | 170 | case XWD_TRUE_COLOR: |
| 171 | 171 | case XWD_DIRECT_COLOR: |
| @@ -173,24 +173,24 @@ static int xwd_decode_frame(AVCodecContext *avctx, void *data, · 1 unmodified line | ||
| 173 | 173 | return AVERROR_INVALIDDATA; |
| 174 | 174 | if (bpp == 16 && pixdepth == 15) { |
| 175 | 175 | if (rgb[0] == 0x7C00 && rgb[1] == 0x3E0 && rgb[2] == 0x1F) |
| 176 | − avctx->pix_fmt = be ? PIX_FMT_RGB555BE : PIX_FMT_RGB555LE; | |
| 176 | + avctx->pix_fmt = be ? AV_PIX_FMT_RGB555BE : AV_PIX_FMT_RGB555LE; | |
| 177 | 177 | else if (rgb[0] == 0x1F && rgb[1] == 0x3E0 && rgb[2] == 0x7C00) |
| 178 | − avctx->pix_fmt = be ? PIX_FMT_BGR555BE : PIX_FMT_BGR555LE; | |
| 178 | + avctx->pix_fmt = be ? AV_PIX_FMT_BGR555BE : AV_PIX_FMT_BGR555LE; | |
| 179 | 179 | } else if (bpp == 16 && pixdepth == 16) { |
| 180 | 180 | if (rgb[0] == 0xF800 && rgb[1] == 0x7E0 && rgb[2] == 0x1F) |
| 181 | − avctx->pix_fmt = be ? PIX_FMT_RGB565BE : PIX_FMT_RGB565LE; | |
| 181 | + avctx->pix_fmt = be ? AV_PIX_FMT_RGB565BE : AV_PIX_FMT_RGB565LE; | |
| 182 | 182 | else if (rgb[0] == 0x1F && rgb[1] == 0x7E0 && rgb[2] == 0xF800) |
| 183 | − avctx->pix_fmt = be ? PIX_FMT_BGR565BE : PIX_FMT_BGR565LE; | |
| 183 | + avctx->pix_fmt = be ? AV_PIX_FMT_BGR565BE : AV_PIX_FMT_BGR565LE; | |
| 184 | 184 | } else if (bpp == 24) { |
| 185 | 185 | if (rgb[0] == 0xFF0000 && rgb[1] == 0xFF00 && rgb[2] == 0xFF) |
| 186 | − avctx->pix_fmt = be ? PIX_FMT_RGB24 : PIX_FMT_BGR24; | |
| 186 | + avctx->pix_fmt = be ? AV_PIX_FMT_RGB24 : AV_PIX_FMT_BGR24; | |
| 187 | 187 | else if (rgb[0] == 0xFF && rgb[1] == 0xFF00 && rgb[2] == 0xFF0000) |
| 188 | − avctx->pix_fmt = be ? PIX_FMT_BGR24 : PIX_FMT_RGB24; | |
| 188 | + avctx->pix_fmt = be ? AV_PIX_FMT_BGR24 : AV_PIX_FMT_RGB24; | |
| 189 | 189 | } else if (bpp == 32) { |
| 190 | 190 | if (rgb[0] == 0xFF0000 && rgb[1] == 0xFF00 && rgb[2] == 0xFF) |
| 191 | − avctx->pix_fmt = be ? PIX_FMT_ARGB : PIX_FMT_BGRA; | |
| 191 | + avctx->pix_fmt = be ? AV_PIX_FMT_ARGB : AV_PIX_FMT_BGRA; | |
| 192 | 192 | else if (rgb[0] == 0xFF && rgb[1] == 0xFF00 && rgb[2] == 0xFF0000) |
| 193 | − avctx->pix_fmt = be ? PIX_FMT_ABGR : PIX_FMT_RGBA; | |
| 193 | + avctx->pix_fmt = be ? AV_PIX_FMT_ABGR : AV_PIX_FMT_RGBA; | |
| 194 | 194 | } |
| 195 | 195 | bytestream2_skipu(&gb, ncolors * XWD_CMAP_SIZE); |
| 196 | 196 | break; |
| @@ -199,7 +199,7 @@ static int xwd_decode_frame(AVCodecContext *avctx, void *data, · 2 unmodified lines | ||
| 199 | 199 | return AVERROR_INVALIDDATA; |
| 200 | 200 | } |
| 201 | 201 | |
| 202 | − if (avctx->pix_fmt == PIX_FMT_NONE) { | |
| 202 | + if (avctx->pix_fmt == AV_PIX_FMT_NONE) { | |
| 203 | 203 | av_log_ask_for_sample(avctx, "unknown file: bpp %d, pixdepth %d, vclass %d\n", bpp, pixdepth, vclass); |
| 204 | 204 | return AVERROR_PATCHWELCOME; |
| 205 | 205 | } |
| @@ -216,7 +216,7 @@ static int xwd_decode_frame(AVCodecContext *avctx, void *data, · 10 unmodified lines | ||
| 216 | 216 | p->key_frame = 1; |
| 217 | 217 | p->pict_type = AV_PICTURE_TYPE_I; |
| 218 | 218 | |
| 219 | − if (avctx->pix_fmt == PIX_FMT_PAL8) { | |
| 219 | + if (avctx->pix_fmt == AV_PIX_FMT_PAL8) { | |
| 220 | 220 | uint32_t *dst = (uint32_t *)p->data[1]; |
| 221 | 221 | uint8_t red, green, blue; |
| 222 | 222 | |
| @@ -42,7 +42,7 @@ static av_cold int xwd_encode_init(AVCodecContext *avctx) · 41 unmodified lines | ||
| 42 | 42 | static int xwd_encode_frame(AVCodecContext *avctx, AVPacket *pkt, |
| 43 | 43 | const AVFrame *p, int *got_packet) |
| 44 | 44 | { |
| 45 | − enum PixelFormat pix_fmt = avctx->pix_fmt; | |
| 45 | + enum AVPixelFormat pix_fmt = avctx->pix_fmt; | |
| 46 | 46 | uint32_t pixdepth, bpp, bpad, ncolors = 0, lsize, vclass, be = 0; |
| 47 | 47 | uint32_t rgb[3] = { 0 }, bitorder = 0; |
| 48 | 48 | uint32_t header_size; |
| @@ -53,15 +53,15 @@ static int xwd_encode_frame(AVCodecContext *avctx, AVPacket *pkt, · 4 unmodified lines | ||
| 53 | 53 | if (av_pix_fmt_descriptors[pix_fmt].flags & PIX_FMT_BE) |
| 54 | 54 | be = 1; |
| 55 | 55 | switch (pix_fmt) { |
| 56 | − case PIX_FMT_ARGB: | |
| 57 | − case PIX_FMT_BGRA: | |
| 58 | − case PIX_FMT_RGBA: | |
| 59 | − case PIX_FMT_ABGR: | |
| 60 | − if (pix_fmt == PIX_FMT_ARGB || | |
| 61 | − pix_fmt == PIX_FMT_ABGR) | |
| 56 | + case AV_PIX_FMT_ARGB: | |
| 57 | + case AV_PIX_FMT_BGRA: | |
| 58 | + case AV_PIX_FMT_RGBA: | |
| 59 | + case AV_PIX_FMT_ABGR: | |
| 60 | + if (pix_fmt == AV_PIX_FMT_ARGB || | |
| 61 | + pix_fmt == AV_PIX_FMT_ABGR) | |
| 62 | 62 | be = 1; |
| 63 | − if (pix_fmt == PIX_FMT_ABGR || | |
| 64 | − pix_fmt == PIX_FMT_RGBA) { | |
| 63 | + if (pix_fmt == AV_PIX_FMT_ABGR || | |
| 64 | + pix_fmt == AV_PIX_FMT_RGBA) { | |
| 65 | 65 | rgb[0] = 0xFF; |
| 66 | 66 | rgb[1] = 0xFF00; |
| 67 | 67 | rgb[2] = 0xFF0000; |
| @@ -75,9 +75,9 @@ static int xwd_encode_frame(AVCodecContext *avctx, AVPacket *pkt, · 7 unmodified lines | ||
| 75 | 75 | vclass = XWD_TRUE_COLOR; |
| 76 | 76 | bpad = 32; |
| 77 | 77 | break; |
| 78 | − case PIX_FMT_BGR24: | |
| 79 | − case PIX_FMT_RGB24: | |
| 80 | − if (pix_fmt == PIX_FMT_RGB24) | |
| 78 | + case AV_PIX_FMT_BGR24: | |
| 79 | + case AV_PIX_FMT_RGB24: | |
| 80 | + if (pix_fmt == AV_PIX_FMT_RGB24) | |
| 81 | 81 | be = 1; |
| 82 | 82 | bpp = 24; |
| 83 | 83 | vclass = XWD_TRUE_COLOR; |
| @@ -86,12 +86,12 @@ static int xwd_encode_frame(AVCodecContext *avctx, AVPacket *pkt, · 2 unmodified lines | ||
| 86 | 86 | rgb[1] = 0xFF00; |
| 87 | 87 | rgb[2] = 0xFF; |
| 88 | 88 | break; |
| 89 | − case PIX_FMT_RGB565LE: | |
| 90 | − case PIX_FMT_RGB565BE: | |
| 91 | − case PIX_FMT_BGR565LE: | |
| 92 | − case PIX_FMT_BGR565BE: | |
| 93 | − if (pix_fmt == PIX_FMT_BGR565LE || | |
| 94 | − pix_fmt == PIX_FMT_BGR565BE) { | |
| 89 | + case AV_PIX_FMT_RGB565LE: | |
| 90 | + case AV_PIX_FMT_RGB565BE: | |
| 91 | + case AV_PIX_FMT_BGR565LE: | |
| 92 | + case AV_PIX_FMT_BGR565BE: | |
| 93 | + if (pix_fmt == AV_PIX_FMT_BGR565LE || | |
| 94 | + pix_fmt == AV_PIX_FMT_BGR565BE) { | |
| 95 | 95 | rgb[0] = 0x1F; |
| 96 | 96 | rgb[1] = 0x7E0; |
| 97 | 97 | rgb[2] = 0xF800; |
| @@ -104,12 +104,12 @@ static int xwd_encode_frame(AVCodecContext *avctx, AVPacket *pkt, · 6 unmodified lines | ||
| 104 | 104 | vclass = XWD_TRUE_COLOR; |
| 105 | 105 | bpad = 16; |
| 106 | 106 | break; |
| 107 | − case PIX_FMT_RGB555LE: | |
| 108 | − case PIX_FMT_RGB555BE: | |
| 109 | − case PIX_FMT_BGR555LE: | |
| 110 | − case PIX_FMT_BGR555BE: | |
| 111 | − if (pix_fmt == PIX_FMT_BGR555LE || | |
| 112 | − pix_fmt == PIX_FMT_BGR555BE) { | |
| 107 | + case AV_PIX_FMT_RGB555LE: | |
| 108 | + case AV_PIX_FMT_RGB555BE: | |
| 109 | + case AV_PIX_FMT_BGR555LE: | |
| 110 | + case AV_PIX_FMT_BGR555BE: | |
| 111 | + if (pix_fmt == AV_PIX_FMT_BGR555LE || | |
| 112 | + pix_fmt == AV_PIX_FMT_BGR555BE) { | |
| 113 | 113 | rgb[0] = 0x1F; |
| 114 | 114 | rgb[1] = 0x3E0; |
| 115 | 115 | rgb[2] = 0x7C00; |
| @@ -122,17 +122,17 @@ static int xwd_encode_frame(AVCodecContext *avctx, AVPacket *pkt, · 6 unmodified lines | ||
| 122 | 122 | vclass = XWD_TRUE_COLOR; |
| 123 | 123 | bpad = 16; |
| 124 | 124 | break; |
| 125 | − case PIX_FMT_RGB8: | |
| 126 | − case PIX_FMT_BGR8: | |
| 127 | − case PIX_FMT_RGB4_BYTE: | |
| 128 | − case PIX_FMT_BGR4_BYTE: | |
| 129 | − case PIX_FMT_PAL8: | |
| 125 | + case AV_PIX_FMT_RGB8: | |
| 126 | + case AV_PIX_FMT_BGR8: | |
| 127 | + case AV_PIX_FMT_RGB4_BYTE: | |
| 128 | + case AV_PIX_FMT_BGR4_BYTE: | |
| 129 | + case AV_PIX_FMT_PAL8: | |
| 130 | 130 | bpp = 8; |
| 131 | 131 | vclass = XWD_PSEUDO_COLOR; |
| 132 | 132 | bpad = 8; |
| 133 | 133 | ncolors = 256; |
| 134 | 134 | break; |
| 135 | − case PIX_FMT_MONOWHITE: | |
| 135 | + case AV_PIX_FMT_MONOWHITE: | |
| 136 | 136 | be = 1; |
| 137 | 137 | bitorder = 1; |
| 138 | 138 | bpp = 1; |
| @@ -226,26 +226,26 @@ AVCodec ff_xwd_encoder = { · 87 unmodified lines | ||
| 226 | 226 | .init = xwd_encode_init, |
| 227 | 227 | .encode2 = xwd_encode_frame, |
| 228 | 228 | .close = xwd_encode_close, |
| 229 | − .pix_fmts = (const enum PixelFormat[]) { PIX_FMT_BGRA, | |
| 230 | − PIX_FMT_RGBA, | |
| 231 | − PIX_FMT_ARGB, | |
| 232 | − PIX_FMT_ABGR, | |
| 233 | − PIX_FMT_RGB24, | |
| 234 | − PIX_FMT_BGR24, | |
| 235 | − PIX_FMT_RGB565BE, | |
| 236 | − PIX_FMT_RGB565LE, | |
| 237 | − PIX_FMT_BGR565BE, | |
| 238 | − PIX_FMT_BGR565LE, | |
| 239 | − PIX_FMT_RGB555BE, | |
| 240 | − PIX_FMT_RGB555LE, | |
| 241 | − PIX_FMT_BGR555BE, | |
| 242 | − PIX_FMT_BGR555LE, | |
| 243 | − PIX_FMT_RGB8, | |
| 244 | − PIX_FMT_BGR8, | |
| 245 | − PIX_FMT_RGB4_BYTE, | |
| 246 | − PIX_FMT_BGR4_BYTE, | |
| 247 | − PIX_FMT_PAL8, | |
| 248 | − PIX_FMT_MONOWHITE, | |
| 249 | − PIX_FMT_NONE }, | |
| 229 | + .pix_fmts = (const enum AVPixelFormat[]) { AV_PIX_FMT_BGRA, | |
| 230 | + AV_PIX_FMT_RGBA, | |
| 231 | + AV_PIX_FMT_ARGB, | |
| 232 | + AV_PIX_FMT_ABGR, | |
| 233 | + AV_PIX_FMT_RGB24, | |
| 234 | + AV_PIX_FMT_BGR24, | |
| 235 | + AV_PIX_FMT_RGB565BE, | |
| 236 | + AV_PIX_FMT_RGB565LE, | |
| 237 | + AV_PIX_FMT_BGR565BE, | |
| 238 | + AV_PIX_FMT_BGR565LE, | |
| 239 | + AV_PIX_FMT_RGB555BE, | |
| 240 | + AV_PIX_FMT_RGB555LE, | |
| 241 | + AV_PIX_FMT_BGR555BE, | |
| 242 | + AV_PIX_FMT_BGR555LE, | |
| 243 | + AV_PIX_FMT_RGB8, | |
| 244 | + AV_PIX_FMT_BGR8, | |
| 245 | + AV_PIX_FMT_RGB4_BYTE, | |
| 246 | + AV_PIX_FMT_BGR4_BYTE, | |
| 247 | + AV_PIX_FMT_PAL8, | |
| 248 | + AV_PIX_FMT_MONOWHITE, | |
| 249 | + AV_PIX_FMT_NONE }, | |
| 250 | 250 | .long_name = NULL_IF_CONFIG_SMALL("XWD (X Window Dump) image"), |
| 251 | 251 | }; |
| @@ -44,7 +44,7 @@ static av_cold int xan_decode_init(AVCodecContext *avctx) · 43 unmodified lines | ||
| 44 | 44 | |
| 45 | 45 | s->avctx = avctx; |
| 46 | 46 | |
| 47 | − avctx->pix_fmt = PIX_FMT_YUV420P; | |
| 47 | + avctx->pix_fmt = AV_PIX_FMT_YUV420P; | |
| 48 | 48 | |
| 49 | 49 | s->buffer_size = avctx->width * avctx->height; |
| 50 | 50 | s->y_buffer = av_malloc(s->buffer_size); |
| @@ -89,7 +89,7 @@ static av_cold int yop_decode_init(AVCodecContext *avctx) · 88 unmodified lines | ||
| 89 | 89 | return -1; |
| 90 | 90 | } |
| 91 | 91 | |
| 92 | − avctx->pix_fmt = PIX_FMT_PAL8; | |
| 92 | + avctx->pix_fmt = AV_PIX_FMT_PAL8; | |
| 93 | 93 | |
| 94 | 94 | s->num_pal_colors = avctx->extradata[0]; |
| 95 | 95 | s->first_color[0] = avctx->extradata[1]; |
| @@ -129,7 +129,7 @@ static av_cold int zerocodec_decode_init(AVCodecContext *avctx) · 128 unmodified lines | ||
| 129 | 129 | z_stream *zstream = &zc->zstream; |
| 130 | 130 | int zret; |
| 131 | 131 | |
| 132 | − avctx->pix_fmt = PIX_FMT_UYVY422; | |
| 132 | + avctx->pix_fmt = AV_PIX_FMT_UYVY422; | |
| 133 | 133 | avctx->bits_per_raw_sample = 8; |
| 134 | 134 | |
| 135 | 135 | zc->size = avpicture_get_size(avctx->pix_fmt, |
| @@ -627,7 +627,7 @@ static av_cold int decode_init(AVCodecContext *avctx) · 626 unmodified lines | ||
| 627 | 627 | // Needed if zlib unused or init aborted before inflateInit |
| 628 | 628 | memset(&c->zstream, 0, sizeof(z_stream)); |
| 629 | 629 | |
| 630 | − avctx->pix_fmt = PIX_FMT_RGB24; | |
| 630 | + avctx->pix_fmt = AV_PIX_FMT_RGB24; | |
| 631 | 631 | c->decomp_size = (avctx->width + 255) * 4 * (avctx->height + 64); |
| 632 | 632 | |
| 633 | 633 | /* Allocate decompression buffer */ |
| @@ -345,6 +345,6 @@ AVCodec ff_zmbv_encoder = { · 344 unmodified lines | ||
| 345 | 345 | .init = encode_init, |
| 346 | 346 | .encode2 = encode_frame, |
| 347 | 347 | .close = encode_end, |
| 348 | − .pix_fmts = (const enum PixelFormat[]){ PIX_FMT_PAL8, PIX_FMT_NONE }, | |
| 348 | + .pix_fmts = (const enum AVPixelFormat[]){ AV_PIX_FMT_PAL8, AV_PIX_FMT_NONE }, | |
| 349 | 349 | .long_name = NULL_IF_CONFIG_SMALL("Zip Motion Blocks Video"), |
| 350 | 350 | }; |
| @@ -282,7 +282,7 @@ static int grab_read_header(AVFormatContext *s1) · 281 unmodified lines | ||
| 282 | 282 | s->per_frame = ((uint64_t)1000000 * framerate.den) / framerate.num; |
| 283 | 283 | |
| 284 | 284 | st->codec->codec_type = AVMEDIA_TYPE_VIDEO; |
| 285 | − st->codec->pix_fmt = PIX_FMT_YUV420P; | |
| 285 | + st->codec->pix_fmt = AV_PIX_FMT_YUV420P; | |
| 286 | 286 | st->codec->codec_id = AV_CODEC_ID_RAWVIDEO; |
| 287 | 287 | st->codec->width = width; |
| 288 | 288 | st->codec->height = height; |
| @@ -48,20 +48,20 @@ · 47 unmodified lines | ||
| 48 | 48 | struct rgb_pixfmt_map_entry { |
| 49 | 49 | int bits_per_pixel; |
| 50 | 50 | int red_offset, green_offset, blue_offset, alpha_offset; |
| 51 | − enum PixelFormat pixfmt; | |
| 51 | + enum AVPixelFormat pixfmt; | |
| 52 | 52 | }; |
| 53 | 53 | |
| 54 | 54 | static struct rgb_pixfmt_map_entry rgb_pixfmt_map[] = { |
| 55 | 55 | // bpp, red_offset, green_offset, blue_offset, alpha_offset, pixfmt |
| 56 | − { 32, 0, 8, 16, 24, PIX_FMT_RGBA }, | |
| 57 | − { 32, 16, 8, 0, 24, PIX_FMT_BGRA }, | |
| 58 | − { 32, 8, 16, 24, 0, PIX_FMT_ARGB }, | |
| 59 | − { 32, 3, 2, 8, 0, PIX_FMT_ABGR }, | |
| 60 | − { 24, 0, 8, 16, 0, PIX_FMT_RGB24 }, | |
| 61 | − { 24, 16, 8, 0, 0, PIX_FMT_BGR24 }, | |
| 56 | + { 32, 0, 8, 16, 24, AV_PIX_FMT_RGBA }, | |
| 57 | + { 32, 16, 8, 0, 24, AV_PIX_FMT_BGRA }, | |
| 58 | + { 32, 8, 16, 24, 0, AV_PIX_FMT_ARGB }, | |
| 59 | + { 32, 3, 2, 8, 0, AV_PIX_FMT_ABGR }, | |
| 60 | + { 24, 0, 8, 16, 0, AV_PIX_FMT_RGB24 }, | |
| 61 | + { 24, 16, 8, 0, 0, AV_PIX_FMT_BGR24 }, | |
| 62 | 62 | }; |
| 63 | 63 | |
| 64 | −static enum PixelFormat get_pixfmt_from_fb_varinfo(struct fb_var_screeninfo *varinfo) | |
| 64 | +static enum AVPixelFormat get_pixfmt_from_fb_varinfo(struct fb_var_screeninfo *varinfo) | |
| 65 | 65 | { |
| 66 | 66 | int i; |
| 67 | 67 | |
| @@ -74,7 +74,7 @@ static enum PixelFormat get_pixfmt_from_fb_varinfo(struct fb_var_screeninfo *var · 6 unmodified lines | ||
| 74 | 74 | return entry->pixfmt; |
| 75 | 75 | } |
| 76 | 76 | |
| 77 | − return PIX_FMT_NONE; | |
| 77 | + return AV_PIX_FMT_NONE; | |
| 78 | 78 | } |
| 79 | 79 | |
| 80 | 80 | typedef struct { |
| @@ -99,7 +99,7 @@ static av_cold int fbdev_read_header(AVFormatContext *avctx) · 18 unmodified lines | ||
| 99 | 99 | { |
| 100 | 100 | FBDevContext *fbdev = avctx->priv_data; |
| 101 | 101 | AVStream *st = NULL; |
| 102 | − enum PixelFormat pix_fmt; | |
| 102 | + enum AVPixelFormat pix_fmt; | |
| 103 | 103 | int ret, flags = O_RDONLY; |
| 104 | 104 | |
| 105 | 105 | ret = av_parse_video_rate(&fbdev->framerate_q, fbdev->framerate); |
| @@ -139,7 +139,7 @@ static av_cold int fbdev_read_header(AVFormatContext *avctx) · 33 unmodified lines | ||
| 139 | 139 | } |
| 140 | 140 | |
| 141 | 141 | pix_fmt = get_pixfmt_from_fb_varinfo(&fbdev->varinfo); |
| 142 | − if (pix_fmt == PIX_FMT_NONE) { | |
| 142 | + if (pix_fmt == AV_PIX_FMT_NONE) { | |
| 143 | 143 | ret = AVERROR(EINVAL); |
| 144 | 144 | av_log(avctx, AV_LOG_ERROR, |
| 145 | 145 | "Framebuffer pixel format not supported.\n"); |
| @@ -73,12 +73,12 @@ typedef struct dc1394_data { · 72 unmodified lines | ||
| 73 | 73 | struct dc1394_frame_format { |
| 74 | 74 | int width; |
| 75 | 75 | int height; |
| 76 | − enum PixelFormat pix_fmt; | |
| 76 | + enum AVPixelFormat pix_fmt; | |
| 77 | 77 | int frame_size_id; |
| 78 | 78 | } dc1394_frame_formats[] = { |
| 79 | − { 320, 240, PIX_FMT_UYVY422, DC1394_VIDEO_MODE_320x240_YUV422 }, | |
| 80 | − { 640, 480, PIX_FMT_UYYVYY411, DC1394_VIDEO_MODE_640x480_YUV411 }, | |
| 81 | − { 640, 480, PIX_FMT_UYVY422, DC1394_VIDEO_MODE_640x480_YUV422 }, | |
| 79 | + { 320, 240, AV_PIX_FMT_UYVY422, DC1394_VIDEO_MODE_320x240_YUV422 }, | |
| 80 | + { 640, 480, AV_PIX_FMT_UYYVYY411, DC1394_VIDEO_MODE_640x480_YUV411 }, | |
| 81 | + { 640, 480, AV_PIX_FMT_UYVY422, DC1394_VIDEO_MODE_640x480_YUV422 }, | |
| 82 | 82 | { 0, 0, 0, 0 } /* gotta be the last one */ |
| 83 | 83 | }; |
| 84 | 84 | |
| @@ -124,12 +124,12 @@ static inline int dc1394_read_common(AVFormatContext *c, · 39 unmodified lines | ||
| 124 | 124 | AVStream* vst; |
| 125 | 125 | struct dc1394_frame_format *fmt; |
| 126 | 126 | struct dc1394_frame_rate *fps; |
| 127 | − enum PixelFormat pix_fmt; | |
| 127 | + enum AVPixelFormat pix_fmt; | |
| 128 | 128 | int width, height; |
| 129 | 129 | AVRational framerate; |
| 130 | 130 | int ret = 0; |
| 131 | 131 | |
| 132 | − if ((pix_fmt = av_get_pix_fmt(dc1394->pixel_format)) == PIX_FMT_NONE) { | |
| 132 | + if ((pix_fmt = av_get_pix_fmt(dc1394->pixel_format)) == AV_PIX_FMT_NONE) { | |
| 133 | 133 | av_log(c, AV_LOG_ERROR, "No such pixel format: %s.\n", dc1394->pixel_format); |
| 134 | 134 | ret = AVERROR(EINVAL); |
| 135 | 135 | goto out; |
| @@ -7,7 +7,7 @@ · 6 unmodified lines | ||
| 7 | 7 | * (http://v4l2spec.bytesex.org/v4l2spec/capture.c) |
| 8 | 8 | * |
| 9 | 9 | * Thanks to Michael Niedermayer for providing the mapping between |
| 10 | − * V4L2_PIX_FMT_* and PIX_FMT_* | |
| 10 | + * V4L2_PIX_FMT_* and AV_PIX_FMT_* | |
| 11 | 11 | * |
| 12 | 12 | * |
| 13 | 13 | * This file is part of Libav. |
| @@ -84,28 +84,28 @@ struct buff_data { · 70 unmodified lines | ||
| 84 | 84 | }; |
| 85 | 85 | |
| 86 | 86 | struct fmt_map { |
| 87 | − enum PixelFormat ff_fmt; | |
| 87 | + enum AVPixelFormat ff_fmt; | |
| 88 | 88 | enum AVCodecID codec_id; |
| 89 | 89 | uint32_t v4l2_fmt; |
| 90 | 90 | }; |
| 91 | 91 | |
| 92 | 92 | static struct fmt_map fmt_conversion_table[] = { |
| 93 | 93 | //ff_fmt codec_id v4l2_fmt |
| 94 | − { PIX_FMT_YUV420P, AV_CODEC_ID_RAWVIDEO, V4L2_PIX_FMT_YUV420 }, | |
| 95 | − { PIX_FMT_YUV422P, AV_CODEC_ID_RAWVIDEO, V4L2_PIX_FMT_YUV422P }, | |
| 96 | − { PIX_FMT_YUYV422, AV_CODEC_ID_RAWVIDEO, V4L2_PIX_FMT_YUYV }, | |
| 97 | − { PIX_FMT_UYVY422, AV_CODEC_ID_RAWVIDEO, V4L2_PIX_FMT_UYVY }, | |
| 98 | − { PIX_FMT_YUV411P, AV_CODEC_ID_RAWVIDEO, V4L2_PIX_FMT_YUV411P }, | |
| 99 | − { PIX_FMT_YUV410P, AV_CODEC_ID_RAWVIDEO, V4L2_PIX_FMT_YUV410 }, | |
| 100 | − { PIX_FMT_RGB555, AV_CODEC_ID_RAWVIDEO, V4L2_PIX_FMT_RGB555 }, | |
| 101 | − { PIX_FMT_RGB565, AV_CODEC_ID_RAWVIDEO, V4L2_PIX_FMT_RGB565 }, | |
| 102 | − { PIX_FMT_BGR24, AV_CODEC_ID_RAWVIDEO, V4L2_PIX_FMT_BGR24 }, | |
| 103 | − { PIX_FMT_RGB24, AV_CODEC_ID_RAWVIDEO, V4L2_PIX_FMT_RGB24 }, | |
| 104 | − { PIX_FMT_BGRA, AV_CODEC_ID_RAWVIDEO, V4L2_PIX_FMT_BGR32 }, | |
| 105 | − { PIX_FMT_GRAY8, AV_CODEC_ID_RAWVIDEO, V4L2_PIX_FMT_GREY }, | |
| 106 | − { PIX_FMT_NV12, AV_CODEC_ID_RAWVIDEO, V4L2_PIX_FMT_NV12 }, | |
| 107 | − { PIX_FMT_NONE, AV_CODEC_ID_MJPEG, V4L2_PIX_FMT_MJPEG }, | |
| 108 | − { PIX_FMT_NONE, AV_CODEC_ID_MJPEG, V4L2_PIX_FMT_JPEG }, | |
| 94 | + { AV_PIX_FMT_YUV420P, AV_CODEC_ID_RAWVIDEO, V4L2_PIX_FMT_YUV420 }, | |
| 95 | + { AV_PIX_FMT_YUV422P, AV_CODEC_ID_RAWVIDEO, V4L2_PIX_FMT_YUV422P }, | |
| 96 | + { AV_PIX_FMT_YUYV422, AV_CODEC_ID_RAWVIDEO, V4L2_PIX_FMT_YUYV }, | |
| 97 | + { AV_PIX_FMT_UYVY422, AV_CODEC_ID_RAWVIDEO, V4L2_PIX_FMT_UYVY }, | |
| 98 | + { AV_PIX_FMT_YUV411P, AV_CODEC_ID_RAWVIDEO, V4L2_PIX_FMT_YUV411P }, | |
| 99 | + { AV_PIX_FMT_YUV410P, AV_CODEC_ID_RAWVIDEO, V4L2_PIX_FMT_YUV410 }, | |
| 100 | + { AV_PIX_FMT_RGB555, AV_CODEC_ID_RAWVIDEO, V4L2_PIX_FMT_RGB555 }, | |
| 101 | + { AV_PIX_FMT_RGB565, AV_CODEC_ID_RAWVIDEO, V4L2_PIX_FMT_RGB565 }, | |
| 102 | + { AV_PIX_FMT_BGR24, AV_CODEC_ID_RAWVIDEO, V4L2_PIX_FMT_BGR24 }, | |
| 103 | + { AV_PIX_FMT_RGB24, AV_CODEC_ID_RAWVIDEO, V4L2_PIX_FMT_RGB24 }, | |
| 104 | + { AV_PIX_FMT_BGRA, AV_CODEC_ID_RAWVIDEO, V4L2_PIX_FMT_BGR32 }, | |
| 105 | + { AV_PIX_FMT_GRAY8, AV_CODEC_ID_RAWVIDEO, V4L2_PIX_FMT_GREY }, | |
| 106 | + { AV_PIX_FMT_NV12, AV_CODEC_ID_RAWVIDEO, V4L2_PIX_FMT_NV12 }, | |
| 107 | + { AV_PIX_FMT_NONE, AV_CODEC_ID_MJPEG, V4L2_PIX_FMT_MJPEG }, | |
| 108 | + { AV_PIX_FMT_NONE, AV_CODEC_ID_MJPEG, V4L2_PIX_FMT_JPEG }, | |
| 109 | 109 | }; |
| 110 | 110 | |
| 111 | 111 | static int device_open(AVFormatContext *ctx) |
| @@ -220,14 +220,14 @@ static int first_field(int fd) · 108 unmodified lines | ||
| 220 | 220 | return 1; |
| 221 | 221 | } |
| 222 | 222 | |
| 223 | −static uint32_t fmt_ff2v4l(enum PixelFormat pix_fmt, enum AVCodecID codec_id) | |
| 223 | +static uint32_t fmt_ff2v4l(enum AVPixelFormat pix_fmt, enum AVCodecID codec_id) | |
| 224 | 224 | { |
| 225 | 225 | int i; |
| 226 | 226 | |
| 227 | 227 | for (i = 0; i < FF_ARRAY_ELEMS(fmt_conversion_table); i++) { |
| 228 | 228 | if ((codec_id == AV_CODEC_ID_NONE || |
| 229 | 229 | fmt_conversion_table[i].codec_id == codec_id) && |
| 230 | − (pix_fmt == PIX_FMT_NONE || | |
| 230 | + (pix_fmt == AV_PIX_FMT_NONE || | |
| 231 | 231 | fmt_conversion_table[i].ff_fmt == pix_fmt)) { |
| 232 | 232 | return fmt_conversion_table[i].v4l2_fmt; |
| 233 | 233 | } |
| @@ -236,7 +236,7 @@ static uint32_t fmt_ff2v4l(enum PixelFormat pix_fmt, enum AVCodecID codec_id) · 2 unmodified lines | ||
| 236 | 236 | return 0; |
| 237 | 237 | } |
| 238 | 238 | |
| 239 | −static enum PixelFormat fmt_v4l2ff(uint32_t v4l2_fmt, enum AVCodecID codec_id) | |
| 239 | +static enum AVPixelFormat fmt_v4l2ff(uint32_t v4l2_fmt, enum AVCodecID codec_id) | |
| 240 | 240 | { |
| 241 | 241 | int i; |
| 242 | 242 | |
| @@ -247,7 +247,7 @@ static enum PixelFormat fmt_v4l2ff(uint32_t v4l2_fmt, enum AVCodecID codec_id) · 4 unmodified lines | ||
| 247 | 247 | } |
| 248 | 248 | } |
| 249 | 249 | |
| 250 | − return PIX_FMT_NONE; | |
| 250 | + return AV_PIX_FMT_NONE; | |
| 251 | 251 | } |
| 252 | 252 | |
| 253 | 253 | static enum AVCodecID fmt_v4l2codec(uint32_t v4l2_fmt) |
| @@ -295,7 +295,7 @@ static void list_formats(AVFormatContext *ctx, int fd, int type) · 41 unmodified lines | ||
| 295 | 295 | |
| 296 | 296 | while(!ioctl(fd, VIDIOC_ENUM_FMT, &vfd)) { |
| 297 | 297 | enum AVCodecID codec_id = fmt_v4l2codec(vfd.pixelformat); |
| 298 | − enum PixelFormat pix_fmt = fmt_v4l2ff(vfd.pixelformat, codec_id); | |
| 298 | + enum AVPixelFormat pix_fmt = fmt_v4l2ff(vfd.pixelformat, codec_id); | |
| 299 | 299 | |
| 300 | 300 | vfd.index++; |
| 301 | 301 | |
| @@ -645,7 +645,7 @@ static int v4l2_set_parameters(AVFormatContext *s1) · 343 unmodified lines | ||
| 645 | 645 | } |
| 646 | 646 | |
| 647 | 647 | static uint32_t device_try_init(AVFormatContext *s1, |
| 648 | − enum PixelFormat pix_fmt, | |
| 648 | + enum AVPixelFormat pix_fmt, | |
| 649 | 649 | int *width, |
| 650 | 650 | int *height, |
| 651 | 651 | enum AVCodecID *codec_id) |
| @@ -684,7 +684,7 @@ static int v4l2_read_header(AVFormatContext *s1) · 32 unmodified lines | ||
| 684 | 684 | int res = 0; |
| 685 | 685 | uint32_t desired_format; |
| 686 | 686 | enum AVCodecID codec_id; |
| 687 | − enum PixelFormat pix_fmt = PIX_FMT_NONE; | |
| 687 | + enum AVPixelFormat pix_fmt = AV_PIX_FMT_NONE; | |
| 688 | 688 | |
| 689 | 689 | st = avformat_new_stream(s1, NULL); |
| 690 | 690 | if (!st) { |
| @@ -721,7 +721,7 @@ static int v4l2_read_header(AVFormatContext *s1) · 30 unmodified lines | ||
| 721 | 721 | |
| 722 | 722 | pix_fmt = av_get_pix_fmt(s->pixel_format); |
| 723 | 723 | |
| 724 | − if (pix_fmt == PIX_FMT_NONE && !codec) { | |
| 724 | + if (pix_fmt == AV_PIX_FMT_NONE && !codec) { | |
| 725 | 725 | av_log(s1, AV_LOG_ERROR, "No such input format: %s.\n", |
| 726 | 726 | s->pixel_format); |
| 727 | 727 | |
| @@ -47,32 +47,32 @@ struct vfw_ctx { · 46 unmodified lines | ||
| 47 | 47 | char *framerate; /**< Set by a private option. */ |
| 48 | 48 | }; |
| 49 | 49 | |
| 50 | −static enum PixelFormat vfw_pixfmt(DWORD biCompression, WORD biBitCount) | |
| 50 | +static enum AVPixelFormat vfw_pixfmt(DWORD biCompression, WORD biBitCount) | |
| 51 | 51 | { |
| 52 | 52 | switch(biCompression) { |
| 53 | 53 | case MKTAG('U', 'Y', 'V', 'Y'): |
| 54 | − return PIX_FMT_UYVY422; | |
| 54 | + return AV_PIX_FMT_UYVY422; | |
| 55 | 55 | case MKTAG('Y', 'U', 'Y', '2'): |
| 56 | − return PIX_FMT_YUYV422; | |
| 56 | + return AV_PIX_FMT_YUYV422; | |
| 57 | 57 | case MKTAG('I', '4', '2', '0'): |
| 58 | − return PIX_FMT_YUV420P; | |
| 58 | + return AV_PIX_FMT_YUV420P; | |
| 59 | 59 | case BI_RGB: |
| 60 | 60 | switch(biBitCount) { /* 1-8 are untested */ |
| 61 | 61 | case 1: |
| 62 | − return PIX_FMT_MONOWHITE; | |
| 62 | + return AV_PIX_FMT_MONOWHITE; | |
| 63 | 63 | case 4: |
| 64 | − return PIX_FMT_RGB4; | |
| 64 | + return AV_PIX_FMT_RGB4; | |
| 65 | 65 | case 8: |
| 66 | − return PIX_FMT_RGB8; | |
| 66 | + return AV_PIX_FMT_RGB8; | |
| 67 | 67 | case 16: |
| 68 | − return PIX_FMT_RGB555; | |
| 68 | + return AV_PIX_FMT_RGB555; | |
| 69 | 69 | case 24: |
| 70 | − return PIX_FMT_BGR24; | |
| 70 | + return AV_PIX_FMT_BGR24; | |
| 71 | 71 | case 32: |
| 72 | − return PIX_FMT_RGB32; | |
| 72 | + return AV_PIX_FMT_RGB32; | |
| 73 | 73 | } |
| 74 | 74 | } |
| 75 | − return PIX_FMT_NONE; | |
| 75 | + return AV_PIX_FMT_NONE; | |
| 76 | 76 | } |
| 77 | 77 | |
| 78 | 78 | static enum AVCodecID vfw_codecid(DWORD biCompression) |
| @@ -376,7 +376,7 @@ static int vfw_read_header(AVFormatContext *s) · 297 unmodified lines | ||
| 376 | 376 | codec->width = bi->bmiHeader.biWidth; |
| 377 | 377 | codec->height = bi->bmiHeader.biHeight; |
| 378 | 378 | codec->pix_fmt = vfw_pixfmt(biCompression, biBitCount); |
| 379 | − if(codec->pix_fmt == PIX_FMT_NONE) { | |
| 379 | + if(codec->pix_fmt == AV_PIX_FMT_NONE) { | |
| 380 | 380 | codec->codec_id = vfw_codecid(biCompression); |
| 381 | 381 | if(codec->codec_id == AV_CODEC_ID_NONE) { |
| 382 | 382 | av_log(s, AV_LOG_ERROR, "Unknown compression type. " |
| @@ -158,7 +158,7 @@ x11grab_read_header(AVFormatContext *s1) · 157 unmodified lines | ||
| 158 | 158 | struct x11grab *x11grab = s1->priv_data; |
| 159 | 159 | Display *dpy; |
| 160 | 160 | AVStream *st = NULL; |
| 161 | − enum PixelFormat input_pixfmt; | |
| 161 | + enum AVPixelFormat input_pixfmt; | |
| 162 | 162 | XImage *image; |
| 163 | 163 | int x_off = 0; |
| 164 | 164 | int y_off = 0; |
| @@ -259,19 +259,19 @@ x11grab_read_header(AVFormatContext *s1) · 94 unmodified lines | ||
| 259 | 259 | switch (image->bits_per_pixel) { |
| 260 | 260 | case 8: |
| 261 | 261 | av_log (s1, AV_LOG_DEBUG, "8 bit palette\n"); |
| 262 | − input_pixfmt = PIX_FMT_PAL8; | |
| 262 | + input_pixfmt = AV_PIX_FMT_PAL8; | |
| 263 | 263 | break; |
| 264 | 264 | case 16: |
| 265 | 265 | if ( image->red_mask == 0xf800 && |
| 266 | 266 | image->green_mask == 0x07e0 && |
| 267 | 267 | image->blue_mask == 0x001f ) { |
| 268 | 268 | av_log (s1, AV_LOG_DEBUG, "16 bit RGB565\n"); |
| 269 | − input_pixfmt = PIX_FMT_RGB565; | |
| 269 | + input_pixfmt = AV_PIX_FMT_RGB565; | |
| 270 | 270 | } else if (image->red_mask == 0x7c00 && |
| 271 | 271 | image->green_mask == 0x03e0 && |
| 272 | 272 | image->blue_mask == 0x001f ) { |
| 273 | 273 | av_log(s1, AV_LOG_DEBUG, "16 bit RGB555\n"); |
| 274 | − input_pixfmt = PIX_FMT_RGB555; | |
| 274 | + input_pixfmt = AV_PIX_FMT_RGB555; | |
| 275 | 275 | } else { |
| 276 | 276 | av_log(s1, AV_LOG_ERROR, "RGB ordering at image depth %i not supported ... aborting\n", image->bits_per_pixel); |
| 277 | 277 | av_log(s1, AV_LOG_ERROR, "color masks: r 0x%.6lx g 0x%.6lx b 0x%.6lx\n", image->red_mask, image->green_mask, image->blue_mask); |
| @@ -283,11 +283,11 @@ x11grab_read_header(AVFormatContext *s1) · 5 unmodified lines | ||
| 283 | 283 | if ( image->red_mask == 0xff0000 && |
| 284 | 284 | image->green_mask == 0x00ff00 && |
| 285 | 285 | image->blue_mask == 0x0000ff ) { |
| 286 | − input_pixfmt = PIX_FMT_BGR24; | |
| 286 | + input_pixfmt = AV_PIX_FMT_BGR24; | |
| 287 | 287 | } else if ( image->red_mask == 0x0000ff && |
| 288 | 288 | image->green_mask == 0x00ff00 && |
| 289 | 289 | image->blue_mask == 0xff0000 ) { |
| 290 | − input_pixfmt = PIX_FMT_RGB24; | |
| 290 | + input_pixfmt = AV_PIX_FMT_RGB24; | |
| 291 | 291 | } else { |
| 292 | 292 | av_log(s1, AV_LOG_ERROR,"rgb ordering at image depth %i not supported ... aborting\n", image->bits_per_pixel); |
| 293 | 293 | av_log(s1, AV_LOG_ERROR, "color masks: r 0x%.6lx g 0x%.6lx b 0x%.6lx\n", image->red_mask, image->green_mask, image->blue_mask); |
| @@ -296,7 +296,7 @@ x11grab_read_header(AVFormatContext *s1) · 2 unmodified lines | ||
| 296 | 296 | } |
| 297 | 297 | break; |
| 298 | 298 | case 32: |
| 299 | − input_pixfmt = PIX_FMT_RGB32; | |
| 299 | + input_pixfmt = AV_PIX_FMT_RGB32; | |
| 300 | 300 | break; |
| 301 | 301 | default: |
| 302 | 302 | av_log(s1, AV_LOG_ERROR, "image depth %i not supported ... aborting\n", image->bits_per_pixel); |
| @@ -90,7 +90,7 @@ int avfilter_link(AVFilterContext *src, unsigned srcpad, · 89 unmodified lines | ||
| 90 | 90 | link->srcpad = &src->output_pads[srcpad]; |
| 91 | 91 | link->dstpad = &dst->input_pads[dstpad]; |
| 92 | 92 | link->type = src->output_pads[srcpad].type; |
| 93 | − assert(PIX_FMT_NONE == -1 && AV_SAMPLE_FMT_NONE == -1); | |
| 93 | + assert(AV_PIX_FMT_NONE == -1 && AV_SAMPLE_FMT_NONE == -1); | |
| 94 | 94 | link->format = -1; |
| 95 | 95 | |
| 96 | 96 | return 0; |
| @@ -578,7 +578,7 @@ int avfilter_config_links(AVFilterContext *filter); · 577 unmodified lines | ||
| 578 | 578 | */ |
| 579 | 579 | AVFilterBufferRef * |
| 580 | 580 | avfilter_get_video_buffer_ref_from_arrays(uint8_t *data[4], int linesize[4], int perms, |
| 581 | − int w, int h, enum PixelFormat format); | |
| 581 | + int w, int h, enum AVPixelFormat format); | |
| 582 | 582 | |
| 583 | 583 | /** |
| 584 | 584 | * Create an audio buffer reference wrapped around an already |
| @@ -44,7 +44,7 @@ typedef struct { · 43 unmodified lines | ||
| 44 | 44 | |
| 45 | 45 | /* video only */ |
| 46 | 46 | int h, w; |
| 47 | − enum PixelFormat pix_fmt; | |
| 47 | + enum AVPixelFormat pix_fmt; | |
| 48 | 48 | AVRational pixel_aspect; |
| 49 | 49 | |
| 50 | 50 | /* audio only */ |
| @@ -173,10 +173,10 @@ static av_cold int init_video(AVFilterContext *ctx, const char *args) · 122 unmodified lines | ||
| 173 | 173 | av_log(ctx, AV_LOG_ERROR, "Expected 7 arguments, but %d found in '%s'\n", n, args); |
| 174 | 174 | return AVERROR(EINVAL); |
| 175 | 175 | } |
| 176 | − if ((c->pix_fmt = av_get_pix_fmt(pix_fmt_str)) == PIX_FMT_NONE) { | |
| 176 | + if ((c->pix_fmt = av_get_pix_fmt(pix_fmt_str)) == AV_PIX_FMT_NONE) { | |
| 177 | 177 | char *tail; |
| 178 | 178 | c->pix_fmt = strtol(pix_fmt_str, &tail, 10); |
| 179 | − if (*tail || c->pix_fmt < 0 || c->pix_fmt >= PIX_FMT_NB) { | |
| 179 | + if (*tail || c->pix_fmt < 0 || c->pix_fmt >= AV_PIX_FMT_NB) { | |
| 180 | 180 | av_log(ctx, AV_LOG_ERROR, "Invalid pixel format string '%s'\n", pix_fmt_str); |
| 181 | 181 | return AVERROR(EINVAL); |
| 182 | 182 | } |
| @@ -27,7 +27,7 @@ · 26 unmodified lines | ||
| 27 | 27 | enum { RED = 0, GREEN, BLUE, ALPHA }; |
| 28 | 28 | |
| 29 | 29 | int ff_fill_line_with_color(uint8_t *line[4], int pixel_step[4], int w, uint8_t dst_color[4], |
| 30 | − enum PixelFormat pix_fmt, uint8_t rgba_color[4], | |
| 30 | + enum AVPixelFormat pix_fmt, uint8_t rgba_color[4], | |
| 31 | 31 | int *is_packed_rgba, uint8_t rgba_map_ptr[4]) |
| 32 | 32 | { |
| 33 | 33 | uint8_t rgba_map[4] = {0}; |
| @@ -37,12 +37,12 @@ int ff_fill_line_with_color(uint8_t *line[4], int pixel_step[4], int w, uint8_t · 3 unmodified lines | ||
| 37 | 37 | |
| 38 | 38 | *is_packed_rgba = 1; |
| 39 | 39 | switch (pix_fmt) { |
| 40 | − case PIX_FMT_ARGB: rgba_map[ALPHA] = 0; rgba_map[RED ] = 1; rgba_map[GREEN] = 2; rgba_map[BLUE ] = 3; break; | |
| 41 | − case PIX_FMT_ABGR: rgba_map[ALPHA] = 0; rgba_map[BLUE ] = 1; rgba_map[GREEN] = 2; rgba_map[RED ] = 3; break; | |
| 42 | − case PIX_FMT_RGBA: | |
| 43 | − case PIX_FMT_RGB24: rgba_map[RED ] = 0; rgba_map[GREEN] = 1; rgba_map[BLUE ] = 2; rgba_map[ALPHA] = 3; break; | |
| 44 | − case PIX_FMT_BGRA: | |
| 45 | − case PIX_FMT_BGR24: rgba_map[BLUE ] = 0; rgba_map[GREEN] = 1; rgba_map[RED ] = 2; rgba_map[ALPHA] = 3; break; | |
| 40 | + case AV_PIX_FMT_ARGB: rgba_map[ALPHA] = 0; rgba_map[RED ] = 1; rgba_map[GREEN] = 2; rgba_map[BLUE ] = 3; break; | |
| 41 | + case AV_PIX_FMT_ABGR: rgba_map[ALPHA] = 0; rgba_map[BLUE ] = 1; rgba_map[GREEN] = 2; rgba_map[RED ] = 3; break; | |
| 42 | + case AV_PIX_FMT_RGBA: | |
| 43 | + case AV_PIX_FMT_RGB24: rgba_map[RED ] = 0; rgba_map[GREEN] = 1; rgba_map[BLUE ] = 2; rgba_map[ALPHA] = 3; break; | |
| 44 | + case AV_PIX_FMT_BGRA: | |
| 45 | + case AV_PIX_FMT_BGR24: rgba_map[BLUE ] = 0; rgba_map[GREEN] = 1; rgba_map[RED ] = 2; rgba_map[ALPHA] = 3; break; | |
| 46 | 46 | default: |
| 47 | 47 | *is_packed_rgba = 0; |
| 48 | 48 | } |
| @@ -29,7 +29,7 @@ · 28 unmodified lines | ||
| 29 | 29 | |
| 30 | 30 | int ff_fill_line_with_color(uint8_t *line[4], int pixel_step[4], int w, |
| 31 | 31 | uint8_t dst_color[4], |
| 32 | − enum PixelFormat pix_fmt, uint8_t rgba_color[4], | |
| 32 | + enum AVPixelFormat pix_fmt, uint8_t rgba_color[4], | |
| 33 | 33 | int *is_packed_rgba, uint8_t rgba_map[4]); |
| 34 | 34 | |
| 35 | 35 | void ff_draw_rectangle(uint8_t *dst[4], int dst_linesize[4], |
| @@ -155,7 +155,7 @@ int ff_fmt_is_in(int fmt, const int *fmts) · 154 unmodified lines | ||
| 155 | 155 | { |
| 156 | 156 | const int *p; |
| 157 | 157 | |
| 158 | − for (p = fmts; *p != PIX_FMT_NONE; p++) { | |
| 158 | + for (p = fmts; *p != AV_PIX_FMT_NONE; p++) { | |
| 159 | 159 | if (fmt == *p) |
| 160 | 160 | return 1; |
| 161 | 161 | } |
| @@ -210,7 +210,7 @@ AVFilterFormats *ff_all_formats(enum AVMediaType type) · 48 unmodified lines | ||
| 210 | 210 | { |
| 211 | 211 | AVFilterFormats *ret = NULL; |
| 212 | 212 | int fmt; |
| 213 | − int num_formats = type == AVMEDIA_TYPE_VIDEO ? PIX_FMT_NB : | |
| 213 | + int num_formats = type == AVMEDIA_TYPE_VIDEO ? AV_PIX_FMT_NB : | |
| 214 | 214 | type == AVMEDIA_TYPE_AUDIO ? AV_SAMPLE_FMT_NB : 0; |
| 215 | 215 | |
| 216 | 216 | for (fmt = 0; fmt < num_formats; fmt++) |
| @@ -45,10 +45,10 @@ typedef struct { · 44 unmodified lines | ||
| 45 | 45 | |
| 46 | 46 | static int query_formats(AVFilterContext *ctx) |
| 47 | 47 | { |
| 48 | − static const enum PixelFormat pix_fmts[] = { | |
| 49 | − PIX_FMT_YUV410P, PIX_FMT_YUV420P, PIX_FMT_GRAY8, PIX_FMT_NV12, | |
| 50 | − PIX_FMT_NV21, PIX_FMT_YUV444P, PIX_FMT_YUV422P, PIX_FMT_YUV411P, | |
| 51 | − PIX_FMT_NONE | |
| 48 | + static const enum AVPixelFormat pix_fmts[] = { | |
| 49 | + AV_PIX_FMT_YUV410P, AV_PIX_FMT_YUV420P, AV_PIX_FMT_GRAY8, AV_PIX_FMT_NV12, | |
| 50 | + AV_PIX_FMT_NV21, AV_PIX_FMT_YUV444P, AV_PIX_FMT_YUV422P, AV_PIX_FMT_YUV411P, | |
| 51 | + AV_PIX_FMT_NONE | |
| 52 | 52 | }; |
| 53 | 53 | |
| 54 | 54 | ff_set_common_formats(ctx, ff_make_format_list(pix_fmts)); |
| @@ -124,13 +124,13 @@ static av_cold void uninit(AVFilterContext *ctx) · 123 unmodified lines | ||
| 124 | 124 | |
| 125 | 125 | static int query_formats(AVFilterContext *ctx) |
| 126 | 126 | { |
| 127 | − enum PixelFormat pix_fmts[] = { | |
| 128 | − PIX_FMT_YUV444P, PIX_FMT_YUV422P, PIX_FMT_YUV420P, | |
| 129 | − PIX_FMT_YUV411P, PIX_FMT_YUV410P, PIX_FMT_YUVA420P, | |
| 130 | − PIX_FMT_YUV440P, PIX_FMT_GRAY8, | |
| 131 | − PIX_FMT_YUVJ444P, PIX_FMT_YUVJ422P, PIX_FMT_YUVJ420P, | |
| 132 | − PIX_FMT_YUVJ440P, | |
| 133 | − PIX_FMT_NONE | |
| 127 | + enum AVPixelFormat pix_fmts[] = { | |
| 128 | + AV_PIX_FMT_YUV444P, AV_PIX_FMT_YUV422P, AV_PIX_FMT_YUV420P, | |
| 129 | + AV_PIX_FMT_YUV411P, AV_PIX_FMT_YUV410P, AV_PIX_FMT_YUVA420P, | |
| 130 | + AV_PIX_FMT_YUV440P, AV_PIX_FMT_GRAY8, | |
| 131 | + AV_PIX_FMT_YUVJ444P, AV_PIX_FMT_YUVJ422P, AV_PIX_FMT_YUVJ420P, | |
| 132 | + AV_PIX_FMT_YUVJ440P, | |
| 133 | + AV_PIX_FMT_NONE | |
| 134 | 134 | }; |
| 135 | 135 | |
| 136 | 136 | ff_set_common_formats(ctx, ff_make_format_list(pix_fmts)); |
| @@ -85,30 +85,30 @@ typedef struct { · 84 unmodified lines | ||
| 85 | 85 | |
| 86 | 86 | static int query_formats(AVFilterContext *ctx) |
| 87 | 87 | { |
| 88 | − static const enum PixelFormat pix_fmts[] = { | |
| 89 | − PIX_FMT_RGB48BE, PIX_FMT_RGB48LE, | |
| 90 | − PIX_FMT_BGR48BE, PIX_FMT_BGR48LE, | |
| 91 | − PIX_FMT_ARGB, PIX_FMT_RGBA, | |
| 92 | − PIX_FMT_ABGR, PIX_FMT_BGRA, | |
| 93 | − PIX_FMT_RGB24, PIX_FMT_BGR24, | |
| 94 | − PIX_FMT_RGB565BE, PIX_FMT_RGB565LE, | |
| 95 | − PIX_FMT_RGB555BE, PIX_FMT_RGB555LE, | |
| 96 | − PIX_FMT_BGR565BE, PIX_FMT_BGR565LE, | |
| 97 | − PIX_FMT_BGR555BE, PIX_FMT_BGR555LE, | |
| 98 | − PIX_FMT_GRAY16BE, PIX_FMT_GRAY16LE, | |
| 99 | − PIX_FMT_YUV420P16LE, PIX_FMT_YUV420P16BE, | |
| 100 | − PIX_FMT_YUV422P16LE, PIX_FMT_YUV422P16BE, | |
| 101 | − PIX_FMT_YUV444P16LE, PIX_FMT_YUV444P16BE, | |
| 102 | − PIX_FMT_YUV444P, PIX_FMT_YUV422P, | |
| 103 | − PIX_FMT_YUV420P, PIX_FMT_YUV411P, | |
| 104 | − PIX_FMT_YUV410P, PIX_FMT_YUV440P, | |
| 105 | − PIX_FMT_YUVJ444P, PIX_FMT_YUVJ422P, | |
| 106 | − PIX_FMT_YUVJ420P, PIX_FMT_YUVJ440P, | |
| 107 | − PIX_FMT_YUVA420P, | |
| 108 | − PIX_FMT_RGB8, PIX_FMT_BGR8, | |
| 109 | − PIX_FMT_RGB4_BYTE, PIX_FMT_BGR4_BYTE, | |
| 110 | − PIX_FMT_PAL8, PIX_FMT_GRAY8, | |
| 111 | − PIX_FMT_NONE | |
| 88 | + static const enum AVPixelFormat pix_fmts[] = { | |
| 89 | + AV_PIX_FMT_RGB48BE, AV_PIX_FMT_RGB48LE, | |
| 90 | + AV_PIX_FMT_BGR48BE, AV_PIX_FMT_BGR48LE, | |
| 91 | + AV_PIX_FMT_ARGB, AV_PIX_FMT_RGBA, | |
| 92 | + AV_PIX_FMT_ABGR, AV_PIX_FMT_BGRA, | |
| 93 | + AV_PIX_FMT_RGB24, AV_PIX_FMT_BGR24, | |
| 94 | + AV_PIX_FMT_RGB565BE, AV_PIX_FMT_RGB565LE, | |
| 95 | + AV_PIX_FMT_RGB555BE, AV_PIX_FMT_RGB555LE, | |
| 96 | + AV_PIX_FMT_BGR565BE, AV_PIX_FMT_BGR565LE, | |
| 97 | + AV_PIX_FMT_BGR555BE, AV_PIX_FMT_BGR555LE, | |
| 98 | + AV_PIX_FMT_GRAY16BE, AV_PIX_FMT_GRAY16LE, | |
| 99 | + AV_PIX_FMT_YUV420P16LE, AV_PIX_FMT_YUV420P16BE, | |
| 100 | + AV_PIX_FMT_YUV422P16LE, AV_PIX_FMT_YUV422P16BE, | |
| 101 | + AV_PIX_FMT_YUV444P16LE, AV_PIX_FMT_YUV444P16BE, | |
| 102 | + AV_PIX_FMT_YUV444P, AV_PIX_FMT_YUV422P, | |
| 103 | + AV_PIX_FMT_YUV420P, AV_PIX_FMT_YUV411P, | |
| 104 | + AV_PIX_FMT_YUV410P, AV_PIX_FMT_YUV440P, | |
| 105 | + AV_PIX_FMT_YUVJ444P, AV_PIX_FMT_YUVJ422P, | |
| 106 | + AV_PIX_FMT_YUVJ420P, AV_PIX_FMT_YUVJ440P, | |
| 107 | + AV_PIX_FMT_YUVA420P, | |
| 108 | + AV_PIX_FMT_RGB8, AV_PIX_FMT_BGR8, | |
| 109 | + AV_PIX_FMT_RGB4_BYTE, AV_PIX_FMT_BGR4_BYTE, | |
| 110 | + AV_PIX_FMT_PAL8, AV_PIX_FMT_GRAY8, | |
| 111 | + AV_PIX_FMT_NONE | |
| 112 | 112 | }; |
| 113 | 113 | |
| 114 | 114 | ff_set_common_formats(ctx, ff_make_format_list(pix_fmts)); |
| @@ -43,13 +43,13 @@ typedef struct { · 42 unmodified lines | ||
| 43 | 43 | |
| 44 | 44 | static int query_formats(AVFilterContext *ctx) |
| 45 | 45 | { |
| 46 | − static const enum PixelFormat pix_fmts[] = { | |
| 47 | − PIX_FMT_YUV420P, PIX_FMT_YUVJ420P, | |
| 48 | − PIX_FMT_YUV422P, PIX_FMT_YUVJ422P, | |
| 49 | − PIX_FMT_YUV444P, PIX_FMT_YUVJ444P, | |
| 50 | − PIX_FMT_YUV411P, PIX_FMT_GRAY8, | |
| 51 | − PIX_FMT_NV12, PIX_FMT_NV21, | |
| 52 | − PIX_FMT_NONE | |
| 46 | + static const enum AVPixelFormat pix_fmts[] = { | |
| 47 | + AV_PIX_FMT_YUV420P, AV_PIX_FMT_YUVJ420P, | |
| 48 | + AV_PIX_FMT_YUV422P, AV_PIX_FMT_YUVJ422P, | |
| 49 | + AV_PIX_FMT_YUV444P, AV_PIX_FMT_YUVJ444P, | |
| 50 | + AV_PIX_FMT_YUV411P, AV_PIX_FMT_GRAY8, | |
| 51 | + AV_PIX_FMT_NV12, AV_PIX_FMT_NV21, | |
| 52 | + AV_PIX_FMT_NONE | |
| 53 | 53 | }; |
| 54 | 54 | |
| 55 | 55 | ff_set_common_formats(ctx, ff_make_format_list(pix_fmts)); |
| @@ -161,11 +161,11 @@ static const AVClass delogo_class = { · 160 unmodified lines | ||
| 161 | 161 | |
| 162 | 162 | static int query_formats(AVFilterContext *ctx) |
| 163 | 163 | { |
| 164 | − enum PixelFormat pix_fmts[] = { | |
| 165 | − PIX_FMT_YUV444P, PIX_FMT_YUV422P, PIX_FMT_YUV420P, | |
| 166 | − PIX_FMT_YUV411P, PIX_FMT_YUV410P, PIX_FMT_YUV440P, | |
| 167 | − PIX_FMT_YUVA420P, PIX_FMT_GRAY8, | |
| 168 | − PIX_FMT_NONE | |
| 164 | + enum AVPixelFormat pix_fmts[] = { | |
| 165 | + AV_PIX_FMT_YUV444P, AV_PIX_FMT_YUV422P, AV_PIX_FMT_YUV420P, | |
| 166 | + AV_PIX_FMT_YUV411P, AV_PIX_FMT_YUV410P, AV_PIX_FMT_YUV440P, | |
| 167 | + AV_PIX_FMT_YUVA420P, AV_PIX_FMT_GRAY8, | |
| 168 | + AV_PIX_FMT_NONE | |
| 169 | 169 | }; |
| 170 | 170 | |
| 171 | 171 | ff_set_common_formats(ctx, ff_make_format_list(pix_fmts)); |
| @@ -66,12 +66,12 @@ static av_cold int init(AVFilterContext *ctx, const char *args) · 65 unmodified lines | ||
| 66 | 66 | |
| 67 | 67 | static int query_formats(AVFilterContext *ctx) |
| 68 | 68 | { |
| 69 | − enum PixelFormat pix_fmts[] = { | |
| 70 | − PIX_FMT_YUV444P, PIX_FMT_YUV422P, PIX_FMT_YUV420P, | |
| 71 | − PIX_FMT_YUV411P, PIX_FMT_YUV410P, | |
| 72 | − PIX_FMT_YUVJ444P, PIX_FMT_YUVJ422P, PIX_FMT_YUVJ420P, | |
| 73 | − PIX_FMT_YUV440P, PIX_FMT_YUVJ440P, | |
| 74 | − PIX_FMT_NONE | |
| 69 | + enum AVPixelFormat pix_fmts[] = { | |
| 70 | + AV_PIX_FMT_YUV444P, AV_PIX_FMT_YUV422P, AV_PIX_FMT_YUV420P, | |
| 71 | + AV_PIX_FMT_YUV411P, AV_PIX_FMT_YUV410P, | |
| 72 | + AV_PIX_FMT_YUVJ444P, AV_PIX_FMT_YUVJ422P, AV_PIX_FMT_YUVJ420P, | |
| 73 | + AV_PIX_FMT_YUV440P, AV_PIX_FMT_YUVJ440P, | |
| 74 | + AV_PIX_FMT_NONE | |
| 75 | 75 | }; |
| 76 | 76 | |
| 77 | 77 | ff_set_common_formats(ctx, ff_make_format_list(pix_fmts)); |
| @@ -389,14 +389,14 @@ static av_cold int init(AVFilterContext *ctx, const char *args) · 388 unmodified lines | ||
| 389 | 389 | |
| 390 | 390 | static int query_formats(AVFilterContext *ctx) |
| 391 | 391 | { |
| 392 | − static const enum PixelFormat pix_fmts[] = { | |
| 393 | − PIX_FMT_ARGB, PIX_FMT_RGBA, | |
| 394 | − PIX_FMT_ABGR, PIX_FMT_BGRA, | |
| 395 | − PIX_FMT_RGB24, PIX_FMT_BGR24, | |
| 396 | − PIX_FMT_YUV420P, PIX_FMT_YUV444P, | |
| 397 | − PIX_FMT_YUV422P, PIX_FMT_YUV411P, | |
| 398 | − PIX_FMT_YUV410P, PIX_FMT_YUV440P, | |
| 399 | − PIX_FMT_NONE | |
| 392 | + static const enum AVPixelFormat pix_fmts[] = { | |
| 393 | + AV_PIX_FMT_ARGB, AV_PIX_FMT_RGBA, | |
| 394 | + AV_PIX_FMT_ABGR, AV_PIX_FMT_BGRA, | |
| 395 | + AV_PIX_FMT_RGB24, AV_PIX_FMT_BGR24, | |
| 396 | + AV_PIX_FMT_YUV420P, AV_PIX_FMT_YUV444P, | |
| 397 | + AV_PIX_FMT_YUV422P, AV_PIX_FMT_YUV411P, | |
| 398 | + AV_PIX_FMT_YUV410P, AV_PIX_FMT_YUV440P, | |
| 399 | + AV_PIX_FMT_NONE | |
| 400 | 400 | }; |
| 401 | 401 | |
| 402 | 402 | ff_set_common_formats(ctx, ff_make_format_list(pix_fmts)); |
| @@ -73,13 +73,13 @@ static av_cold int init(AVFilterContext *ctx, const char *args) · 72 unmodified lines | ||
| 73 | 73 | |
| 74 | 74 | static int query_formats(AVFilterContext *ctx) |
| 75 | 75 | { |
| 76 | − static const enum PixelFormat pix_fmts[] = { | |
| 77 | − PIX_FMT_YUV444P, PIX_FMT_YUV422P, PIX_FMT_YUV420P, | |
| 78 | − PIX_FMT_YUV411P, PIX_FMT_YUV410P, | |
| 79 | − PIX_FMT_YUVJ444P, PIX_FMT_YUVJ422P, PIX_FMT_YUVJ420P, | |
| 80 | − PIX_FMT_YUV440P, PIX_FMT_YUVJ440P, | |
| 81 | − PIX_FMT_RGB24, PIX_FMT_BGR24, | |
| 82 | − PIX_FMT_NONE | |
| 76 | + static const enum AVPixelFormat pix_fmts[] = { | |
| 77 | + AV_PIX_FMT_YUV444P, AV_PIX_FMT_YUV422P, AV_PIX_FMT_YUV420P, | |
| 78 | + AV_PIX_FMT_YUV411P, AV_PIX_FMT_YUV410P, | |
| 79 | + AV_PIX_FMT_YUVJ444P, AV_PIX_FMT_YUVJ422P, AV_PIX_FMT_YUVJ420P, | |
| 80 | + AV_PIX_FMT_YUV440P, AV_PIX_FMT_YUVJ440P, | |
| 81 | + AV_PIX_FMT_RGB24, AV_PIX_FMT_BGR24, | |
| 82 | + AV_PIX_FMT_NONE | |
| 83 | 83 | }; |
| 84 | 84 | |
| 85 | 85 | ff_set_common_formats(ctx, ff_make_format_list(pix_fmts)); |
| @@ -71,14 +71,14 @@ static av_cold int init(AVFilterContext *ctx, const char *args) · 70 unmodified lines | ||
| 71 | 71 | static int query_formats(AVFilterContext *ctx) |
| 72 | 72 | { |
| 73 | 73 | AVFilterFormats *formats; |
| 74 | − enum PixelFormat pix_fmt; | |
| 74 | + enum AVPixelFormat pix_fmt; | |
| 75 | 75 | int ret; |
| 76 | 76 | |
| 77 | 77 | /** accept any input pixel format that is not hardware accelerated, not |
| 78 | 78 | * a bitstream format, and does not have vertically sub-sampled chroma */ |
| 79 | 79 | if (ctx->inputs[0]) { |
| 80 | 80 | formats = NULL; |
| 81 | − for (pix_fmt = 0; pix_fmt < PIX_FMT_NB; pix_fmt++) | |
| 81 | + for (pix_fmt = 0; pix_fmt < AV_PIX_FMT_NB; pix_fmt++) | |
| 82 | 82 | if (!( av_pix_fmt_descriptors[pix_fmt].flags & PIX_FMT_HWACCEL |
| 83 | 83 | || av_pix_fmt_descriptors[pix_fmt].flags & PIX_FMT_BITSTREAM) |
| 84 | 84 | && av_pix_fmt_descriptors[pix_fmt].nb_components |
| @@ -38,18 +38,18 @@ typedef struct { · 37 unmodified lines | ||
| 38 | 38 | * List of flags telling if a given image format has been listed |
| 39 | 39 | * as argument to the filter. |
| 40 | 40 | */ |
| 41 | − int listed_pix_fmt_flags[PIX_FMT_NB]; | |
| 41 | + int listed_pix_fmt_flags[AV_PIX_FMT_NB]; | |
| 42 | 42 | } FormatContext; |
| 43 | 43 | |
| 44 | −#define PIX_FMT_NAME_MAXSIZE 32 | |
| 44 | +#define AV_PIX_FMT_NAME_MAXSIZE 32 | |
| 45 | 45 | |
| 46 | 46 | static av_cold int init(AVFilterContext *ctx, const char *args) |
| 47 | 47 | { |
| 48 | 48 | FormatContext *format = ctx->priv; |
| 49 | 49 | const char *cur, *sep; |
| 50 | − char pix_fmt_name[PIX_FMT_NAME_MAXSIZE]; | |
| 50 | + char pix_fmt_name[AV_PIX_FMT_NAME_MAXSIZE]; | |
| 51 | 51 | int pix_fmt_name_len; |
| 52 | − enum PixelFormat pix_fmt; | |
| 52 | + enum AVPixelFormat pix_fmt; | |
| 53 | 53 | |
| 54 | 54 | /* parse the list of formats */ |
| 55 | 55 | for (cur = args; cur; cur = sep ? sep+1 : NULL) { |
| @@ -57,7 +57,7 @@ static av_cold int init(AVFilterContext *ctx, const char *args) · 1 unmodified line | ||
| 57 | 57 | pix_fmt_name_len = strlen(cur); |
| 58 | 58 | else |
| 59 | 59 | pix_fmt_name_len = sep - cur; |
| 60 | − if (pix_fmt_name_len >= PIX_FMT_NAME_MAXSIZE) { | |
| 60 | + if (pix_fmt_name_len >= AV_PIX_FMT_NAME_MAXSIZE) { | |
| 61 | 61 | av_log(ctx, AV_LOG_ERROR, "Format name too long\n"); |
| 62 | 62 | return -1; |
| 63 | 63 | } |
| @@ -66,7 +66,7 @@ static av_cold int init(AVFilterContext *ctx, const char *args) · 2 unmodified lines | ||
| 66 | 66 | pix_fmt_name[pix_fmt_name_len] = 0; |
| 67 | 67 | pix_fmt = av_get_pix_fmt(pix_fmt_name); |
| 68 | 68 | |
| 69 | − if (pix_fmt == PIX_FMT_NONE) { | |
| 69 | + if (pix_fmt == AV_PIX_FMT_NONE) { | |
| 70 | 70 | av_log(ctx, AV_LOG_ERROR, "Unknown pixel format: %s\n", pix_fmt_name); |
| 71 | 71 | return -1; |
| 72 | 72 | } |
| @@ -80,12 +80,12 @@ static av_cold int init(AVFilterContext *ctx, const char *args) · 7 unmodified lines | ||
| 80 | 80 | static AVFilterFormats *make_format_list(FormatContext *format, int flag) |
| 81 | 81 | { |
| 82 | 82 | AVFilterFormats *formats; |
| 83 | − enum PixelFormat pix_fmt; | |
| 83 | + enum AVPixelFormat pix_fmt; | |
| 84 | 84 | |
| 85 | 85 | formats = av_mallocz(sizeof(AVFilterFormats)); |
| 86 | − formats->formats = av_malloc(sizeof(enum PixelFormat) * PIX_FMT_NB); | |
| 86 | + formats->formats = av_malloc(sizeof(enum AVPixelFormat) * AV_PIX_FMT_NB); | |
| 87 | 87 | |
| 88 | − for (pix_fmt = 0; pix_fmt < PIX_FMT_NB; pix_fmt++) | |
| 88 | + for (pix_fmt = 0; pix_fmt < AV_PIX_FMT_NB; pix_fmt++) | |
| 89 | 89 | if (format->listed_pix_fmt_flags[pix_fmt] == flag) |
| 90 | 90 | formats->formats[formats->format_count++] = pix_fmt; |
| 91 | 91 | |
| @@ -329,12 +329,12 @@ static int query_formats(AVFilterContext *ctx) · 328 unmodified lines | ||
| 329 | 329 | AVFilterFormats *formats = NULL; |
| 330 | 330 | |
| 331 | 331 | if (frei0r->plugin_info.color_model == F0R_COLOR_MODEL_BGRA8888) { |
| 332 | − ff_add_format(&formats, PIX_FMT_BGRA); | |
| 332 | + ff_add_format(&formats, AV_PIX_FMT_BGRA); | |
| 333 | 333 | } else if (frei0r->plugin_info.color_model == F0R_COLOR_MODEL_RGBA8888) { |
| 334 | − ff_add_format(&formats, PIX_FMT_RGBA); | |
| 334 | + ff_add_format(&formats, AV_PIX_FMT_RGBA); | |
| 335 | 335 | } else { /* F0R_COLOR_MODEL_PACKED32 */ |
| 336 | − static const enum PixelFormat pix_fmts[] = { | |
| 337 | − PIX_FMT_BGRA, PIX_FMT_ARGB, PIX_FMT_ABGR, PIX_FMT_ARGB, PIX_FMT_NONE | |
| 336 | + static const enum AVPixelFormat pix_fmts[] = { | |
| 337 | + AV_PIX_FMT_BGRA, AV_PIX_FMT_ARGB, AV_PIX_FMT_ABGR, AV_PIX_FMT_ARGB, AV_PIX_FMT_NONE | |
| 338 | 338 | }; |
| 339 | 339 | formats = ff_make_format_list(pix_fmts); |
| 340 | 340 | } |
| @@ -151,12 +151,12 @@ static av_cold void uninit(AVFilterContext *ctx) · 150 unmodified lines | ||
| 151 | 151 | |
| 152 | 152 | static int query_formats(AVFilterContext *ctx) |
| 153 | 153 | { |
| 154 | − static const enum PixelFormat pix_fmts[] = { | |
| 155 | − PIX_FMT_YUV410P, PIX_FMT_YUV420P, | |
| 156 | − PIX_FMT_GRAY8, PIX_FMT_NV12, | |
| 157 | − PIX_FMT_NV21, PIX_FMT_YUV444P, | |
| 158 | − PIX_FMT_YUV422P, PIX_FMT_YUV411P, | |
| 159 | − PIX_FMT_NONE | |
| 154 | + static const enum AVPixelFormat pix_fmts[] = { | |
| 155 | + AV_PIX_FMT_YUV410P, AV_PIX_FMT_YUV420P, | |
| 156 | + AV_PIX_FMT_GRAY8, AV_PIX_FMT_NV12, | |
| 157 | + AV_PIX_FMT_NV21, AV_PIX_FMT_YUV444P, | |
| 158 | + AV_PIX_FMT_YUV422P, AV_PIX_FMT_YUV411P, | |
| 159 | + AV_PIX_FMT_NONE | |
| 160 | 160 | }; |
| 161 | 161 | |
| 162 | 162 | ff_set_common_formats(ctx, ff_make_format_list(pix_fmts)); |
| @@ -42,30 +42,30 @@ typedef struct { · 41 unmodified lines | ||
| 42 | 42 | |
| 43 | 43 | static int query_formats(AVFilterContext *ctx) |
| 44 | 44 | { |
| 45 | − static const enum PixelFormat pix_fmts[] = { | |
| 46 | − PIX_FMT_RGB48BE, PIX_FMT_RGB48LE, | |
| 47 | − PIX_FMT_BGR48BE, PIX_FMT_BGR48LE, | |
| 48 | − PIX_FMT_ARGB, PIX_FMT_RGBA, | |
| 49 | − PIX_FMT_ABGR, PIX_FMT_BGRA, | |
| 50 | − PIX_FMT_RGB24, PIX_FMT_BGR24, | |
| 51 | − PIX_FMT_RGB565BE, PIX_FMT_RGB565LE, | |
| 52 | − PIX_FMT_RGB555BE, PIX_FMT_RGB555LE, | |
| 53 | − PIX_FMT_BGR565BE, PIX_FMT_BGR565LE, | |
| 54 | − PIX_FMT_BGR555BE, PIX_FMT_BGR555LE, | |
| 55 | − PIX_FMT_GRAY16BE, PIX_FMT_GRAY16LE, | |
| 56 | − PIX_FMT_YUV420P16LE, PIX_FMT_YUV420P16BE, | |
| 57 | − PIX_FMT_YUV422P16LE, PIX_FMT_YUV422P16BE, | |
| 58 | − PIX_FMT_YUV444P16LE, PIX_FMT_YUV444P16BE, | |
| 59 | − PIX_FMT_YUV444P, PIX_FMT_YUV422P, | |
| 60 | − PIX_FMT_YUV420P, PIX_FMT_YUV411P, | |
| 61 | − PIX_FMT_YUV410P, PIX_FMT_YUV440P, | |
| 62 | − PIX_FMT_YUVJ444P, PIX_FMT_YUVJ422P, | |
| 63 | − PIX_FMT_YUVJ420P, PIX_FMT_YUVJ440P, | |
| 64 | − PIX_FMT_YUVA420P, | |
| 65 | − PIX_FMT_RGB8, PIX_FMT_BGR8, | |
| 66 | − PIX_FMT_RGB4_BYTE, PIX_FMT_BGR4_BYTE, | |
| 67 | − PIX_FMT_PAL8, PIX_FMT_GRAY8, | |
| 68 | − PIX_FMT_NONE | |
| 45 | + static const enum AVPixelFormat pix_fmts[] = { | |
| 46 | + AV_PIX_FMT_RGB48BE, AV_PIX_FMT_RGB48LE, | |
| 47 | + AV_PIX_FMT_BGR48BE, AV_PIX_FMT_BGR48LE, | |
| 48 | + AV_PIX_FMT_ARGB, AV_PIX_FMT_RGBA, | |
| 49 | + AV_PIX_FMT_ABGR, AV_PIX_FMT_BGRA, | |
| 50 | + AV_PIX_FMT_RGB24, AV_PIX_FMT_BGR24, | |
| 51 | + AV_PIX_FMT_RGB565BE, AV_PIX_FMT_RGB565LE, | |
| 52 | + AV_PIX_FMT_RGB555BE, AV_PIX_FMT_RGB555LE, | |
| 53 | + AV_PIX_FMT_BGR565BE, AV_PIX_FMT_BGR565LE, | |
| 54 | + AV_PIX_FMT_BGR555BE, AV_PIX_FMT_BGR555LE, | |
| 55 | + AV_PIX_FMT_GRAY16BE, AV_PIX_FMT_GRAY16LE, | |
| 56 | + AV_PIX_FMT_YUV420P16LE, AV_PIX_FMT_YUV420P16BE, | |
| 57 | + AV_PIX_FMT_YUV422P16LE, AV_PIX_FMT_YUV422P16BE, | |
| 58 | + AV_PIX_FMT_YUV444P16LE, AV_PIX_FMT_YUV444P16BE, | |
| 59 | + AV_PIX_FMT_YUV444P, AV_PIX_FMT_YUV422P, | |
| 60 | + AV_PIX_FMT_YUV420P, AV_PIX_FMT_YUV411P, | |
| 61 | + AV_PIX_FMT_YUV410P, AV_PIX_FMT_YUV440P, | |
| 62 | + AV_PIX_FMT_YUVJ444P, AV_PIX_FMT_YUVJ422P, | |
| 63 | + AV_PIX_FMT_YUVJ420P, AV_PIX_FMT_YUVJ440P, | |
| 64 | + AV_PIX_FMT_YUVA420P, | |
| 65 | + AV_PIX_FMT_RGB8, AV_PIX_FMT_BGR8, | |
| 66 | + AV_PIX_FMT_RGB4_BYTE, AV_PIX_FMT_BGR4_BYTE, | |
| 67 | + AV_PIX_FMT_PAL8, AV_PIX_FMT_GRAY8, | |
| 68 | + AV_PIX_FMT_NONE | |
| 69 | 69 | }; |
| 70 | 70 | |
| 71 | 71 | ff_set_common_formats(ctx, ff_make_format_list(pix_fmts)); |
| @@ -264,27 +264,27 @@ static void uninit(AVFilterContext *ctx) · 263 unmodified lines | ||
| 264 | 264 | |
| 265 | 265 | static int query_formats(AVFilterContext *ctx) |
| 266 | 266 | { |
| 267 | − static const enum PixelFormat pix_fmts[] = { | |
| 268 | − PIX_FMT_YUV420P, | |
| 269 | − PIX_FMT_YUV422P, | |
| 270 | − PIX_FMT_YUV444P, | |
| 271 | − PIX_FMT_YUV410P, | |
| 272 | − PIX_FMT_YUV411P, | |
| 273 | − PIX_FMT_YUV440P, | |
| 274 | − PIX_FMT_YUVJ420P, | |
| 275 | − PIX_FMT_YUVJ422P, | |
| 276 | − PIX_FMT_YUVJ444P, | |
| 277 | − PIX_FMT_YUVJ440P, | |
| 278 | − AV_NE( PIX_FMT_YUV420P9BE, PIX_FMT_YUV420P9LE ), | |
| 279 | − AV_NE( PIX_FMT_YUV422P9BE, PIX_FMT_YUV422P9LE ), | |
| 280 | − AV_NE( PIX_FMT_YUV444P9BE, PIX_FMT_YUV444P9LE ), | |
| 281 | − AV_NE( PIX_FMT_YUV420P10BE, PIX_FMT_YUV420P10LE ), | |
| 282 | − AV_NE( PIX_FMT_YUV422P10BE, PIX_FMT_YUV422P10LE ), | |
| 283 | − AV_NE( PIX_FMT_YUV444P10BE, PIX_FMT_YUV444P10LE ), | |
| 284 | − AV_NE( PIX_FMT_YUV420P16BE, PIX_FMT_YUV420P16LE ), | |
| 285 | − AV_NE( PIX_FMT_YUV422P16BE, PIX_FMT_YUV422P16LE ), | |
| 286 | − AV_NE( PIX_FMT_YUV444P16BE, PIX_FMT_YUV444P16LE ), | |
| 287 | − PIX_FMT_NONE | |
| 267 | + static const enum AVPixelFormat pix_fmts[] = { | |
| 268 | + AV_PIX_FMT_YUV420P, | |
| 269 | + AV_PIX_FMT_YUV422P, | |
| 270 | + AV_PIX_FMT_YUV444P, | |
| 271 | + AV_PIX_FMT_YUV410P, | |
| 272 | + AV_PIX_FMT_YUV411P, | |
| 273 | + AV_PIX_FMT_YUV440P, | |
| 274 | + AV_PIX_FMT_YUVJ420P, | |
| 275 | + AV_PIX_FMT_YUVJ422P, | |
| 276 | + AV_PIX_FMT_YUVJ444P, | |
| 277 | + AV_PIX_FMT_YUVJ440P, | |
| 278 | + AV_NE( AV_PIX_FMT_YUV420P9BE, AV_PIX_FMT_YUV420P9LE ), | |
| 279 | + AV_NE( AV_PIX_FMT_YUV422P9BE, AV_PIX_FMT_YUV422P9LE ), | |
| 280 | + AV_NE( AV_PIX_FMT_YUV444P9BE, AV_PIX_FMT_YUV444P9LE ), | |
| 281 | + AV_NE( AV_PIX_FMT_YUV420P10BE, AV_PIX_FMT_YUV420P10LE ), | |
| 282 | + AV_NE( AV_PIX_FMT_YUV422P10BE, AV_PIX_FMT_YUV422P10LE ), | |
| 283 | + AV_NE( AV_PIX_FMT_YUV444P10BE, AV_PIX_FMT_YUV444P10LE ), | |
| 284 | + AV_NE( AV_PIX_FMT_YUV420P16BE, AV_PIX_FMT_YUV420P16LE ), | |
| 285 | + AV_NE( AV_PIX_FMT_YUV422P16BE, AV_PIX_FMT_YUV422P16LE ), | |
| 286 | + AV_NE( AV_PIX_FMT_YUV444P16BE, AV_PIX_FMT_YUV444P16LE ), | |
| 287 | + AV_PIX_FMT_NONE | |
| 288 | 288 | }; |
| 289 | 289 | |
| 290 | 290 | ff_set_common_formats(ctx, ff_make_format_list(pix_fmts)); |
| @@ -34,14 +34,14 @@ · 33 unmodified lines | ||
| 34 | 34 | #include "formats.h" |
| 35 | 35 | #include "video.h" |
| 36 | 36 | |
| 37 | −static void fill_iplimage_from_picref(IplImage *img, const AVFilterBufferRef *picref, enum PixelFormat pixfmt) | |
| 37 | +static void fill_iplimage_from_picref(IplImage *img, const AVFilterBufferRef *picref, enum AVPixelFormat pixfmt) | |
| 38 | 38 | { |
| 39 | 39 | IplImage *tmpimg; |
| 40 | 40 | int depth, channels_nb; |
| 41 | 41 | |
| 42 | − if (pixfmt == PIX_FMT_GRAY8) { depth = IPL_DEPTH_8U; channels_nb = 1; } | |
| 43 | − else if (pixfmt == PIX_FMT_BGRA) { depth = IPL_DEPTH_8U; channels_nb = 4; } | |
| 44 | − else if (pixfmt == PIX_FMT_BGR24) { depth = IPL_DEPTH_8U; channels_nb = 3; } | |
| 42 | + if (pixfmt == AV_PIX_FMT_GRAY8) { depth = IPL_DEPTH_8U; channels_nb = 1; } | |
| 43 | + else if (pixfmt == AV_PIX_FMT_BGRA) { depth = IPL_DEPTH_8U; channels_nb = 4; } | |
| 44 | + else if (pixfmt == AV_PIX_FMT_BGR24) { depth = IPL_DEPTH_8U; channels_nb = 3; } | |
| 45 | 45 | else return; |
| 46 | 46 | |
| 47 | 47 | 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 · 4 unmodified lines | ||
| 52 | 52 | img->widthStep = picref->linesize[0]; |
| 53 | 53 | } |
| 54 | 54 | |
| 55 | −static void fill_picref_from_iplimage(AVFilterBufferRef *picref, const IplImage *img, enum PixelFormat pixfmt) | |
| 55 | +static void fill_picref_from_iplimage(AVFilterBufferRef *picref, const IplImage *img, enum AVPixelFormat pixfmt) | |
| 56 | 56 | { |
| 57 | 57 | picref->linesize[0] = img->widthStep; |
| 58 | 58 | picref->data[0] = img->imageData; |
| @@ -60,8 +60,8 @@ static void fill_picref_from_iplimage(AVFilterBufferRef *picref, const IplImage · 1 unmodified line | ||
| 60 | 60 | |
| 61 | 61 | static int query_formats(AVFilterContext *ctx) |
| 62 | 62 | { |
| 63 | − static const enum PixelFormat pix_fmts[] = { | |
| 64 | − PIX_FMT_BGR24, PIX_FMT_BGRA, PIX_FMT_GRAY8, PIX_FMT_NONE | |
| 63 | + static const enum AVPixelFormat pix_fmts[] = { | |
| 64 | + AV_PIX_FMT_BGR24, AV_PIX_FMT_BGRA, AV_PIX_FMT_GRAY8, AV_PIX_FMT_NONE | |
| 65 | 65 | }; |
| 66 | 66 | |
| 67 | 67 | ff_set_common_formats(ctx, ff_make_format_list(pix_fmts)); |
| @@ -144,26 +144,26 @@ static av_cold void uninit(AVFilterContext *ctx) · 143 unmodified lines | ||
| 144 | 144 | } |
| 145 | 145 | |
| 146 | 146 | #define YUV_FORMATS \ |
| 147 | − PIX_FMT_YUV444P, PIX_FMT_YUV422P, PIX_FMT_YUV420P, \ | |
| 148 | − PIX_FMT_YUV411P, PIX_FMT_YUV410P, PIX_FMT_YUV440P, \ | |
| 149 | − PIX_FMT_YUVA420P, \ | |
| 150 | − PIX_FMT_YUVJ444P, PIX_FMT_YUVJ422P, PIX_FMT_YUVJ420P, \ | |
| 151 | − PIX_FMT_YUVJ440P | |
| 147 | + AV_PIX_FMT_YUV444P, AV_PIX_FMT_YUV422P, AV_PIX_FMT_YUV420P, \ | |
| 148 | + AV_PIX_FMT_YUV411P, AV_PIX_FMT_YUV410P, AV_PIX_FMT_YUV440P, \ | |
| 149 | + AV_PIX_FMT_YUVA420P, \ | |
| 150 | + AV_PIX_FMT_YUVJ444P, AV_PIX_FMT_YUVJ422P, AV_PIX_FMT_YUVJ420P, \ | |
| 151 | + AV_PIX_FMT_YUVJ440P | |
| 152 | 152 | |
| 153 | 153 | #define RGB_FORMATS \ |
| 154 | − PIX_FMT_ARGB, PIX_FMT_RGBA, \ | |
| 155 | − PIX_FMT_ABGR, PIX_FMT_BGRA, \ | |
| 156 | − PIX_FMT_RGB24, PIX_FMT_BGR24 | |
| 154 | + AV_PIX_FMT_ARGB, AV_PIX_FMT_RGBA, \ | |
| 155 | + AV_PIX_FMT_ABGR, AV_PIX_FMT_BGRA, \ | |
| 156 | + AV_PIX_FMT_RGB24, AV_PIX_FMT_BGR24 | |
| 157 | 157 | |
| 158 | −static enum PixelFormat yuv_pix_fmts[] = { YUV_FORMATS, PIX_FMT_NONE }; | |
| 159 | −static enum PixelFormat rgb_pix_fmts[] = { RGB_FORMATS, PIX_FMT_NONE }; | |
| 160 | −static enum PixelFormat all_pix_fmts[] = { RGB_FORMATS, YUV_FORMATS, PIX_FMT_NONE }; | |
| 158 | +static enum AVPixelFormat yuv_pix_fmts[] = { YUV_FORMATS, AV_PIX_FMT_NONE }; | |
| 159 | +static enum AVPixelFormat rgb_pix_fmts[] = { RGB_FORMATS, AV_PIX_FMT_NONE }; | |
| 160 | +static enum AVPixelFormat all_pix_fmts[] = { RGB_FORMATS, YUV_FORMATS, AV_PIX_FMT_NONE }; | |
| 161 | 161 | |
| 162 | 162 | static int query_formats(AVFilterContext *ctx) |
| 163 | 163 | { |
| 164 | 164 | LutContext *lut = ctx->priv; |
| 165 | 165 | |
| 166 | − enum PixelFormat *pix_fmts = lut->is_rgb ? rgb_pix_fmts : | |
| 166 | + enum AVPixelFormat *pix_fmts = lut->is_rgb ? rgb_pix_fmts : | |
| 167 | 167 | lut->is_yuv ? yuv_pix_fmts : all_pix_fmts; |
| 168 | 168 | |
| 169 | 169 | ff_set_common_formats(ctx, ff_make_format_list(pix_fmts)); |
| @@ -223,13 +223,13 @@ static int config_props(AVFilterLink *inlink) · 53 unmodified lines | ||
| 223 | 223 | lut->var_values[VAR_H] = inlink->h; |
| 224 | 224 | |
| 225 | 225 | switch (inlink->format) { |
| 226 | − case PIX_FMT_YUV410P: | |
| 227 | − case PIX_FMT_YUV411P: | |
| 228 | − case PIX_FMT_YUV420P: | |
| 229 | − case PIX_FMT_YUV422P: | |
| 230 | − case PIX_FMT_YUV440P: | |
| 231 | − case PIX_FMT_YUV444P: | |
| 232 | − case PIX_FMT_YUVA420P: | |
| 226 | + case AV_PIX_FMT_YUV410P: | |
| 227 | + case AV_PIX_FMT_YUV411P: | |
| 228 | + case AV_PIX_FMT_YUV420P: | |
| 229 | + case AV_PIX_FMT_YUV422P: | |
| 230 | + case AV_PIX_FMT_YUV440P: | |
| 231 | + case AV_PIX_FMT_YUV444P: | |
| 232 | + case AV_PIX_FMT_YUVA420P: | |
| 233 | 233 | min[Y] = min[U] = min[V] = 16; |
| 234 | 234 | max[Y] = 235; |
| 235 | 235 | max[U] = max[V] = 240; |
| @@ -246,12 +246,12 @@ static int config_props(AVFilterLink *inlink) · 10 unmodified lines | ||
| 246 | 246 | |
| 247 | 247 | if (lut->is_rgb) { |
| 248 | 248 | switch (inlink->format) { |
| 249 | − case PIX_FMT_ARGB: lut->rgba_map[A] = 0; lut->rgba_map[R] = 1; lut->rgba_map[G] = 2; lut->rgba_map[B] = 3; break; | |
| 250 | − case PIX_FMT_ABGR: lut->rgba_map[A] = 0; lut->rgba_map[B] = 1; lut->rgba_map[G] = 2; lut->rgba_map[R] = 3; break; | |
| 251 | − case PIX_FMT_RGBA: | |
| 252 | − case PIX_FMT_RGB24: lut->rgba_map[R] = 0; lut->rgba_map[G] = 1; lut->rgba_map[B] = 2; lut->rgba_map[A] = 3; break; | |
| 253 | − case PIX_FMT_BGRA: | |
| 254 | − case PIX_FMT_BGR24: lut->rgba_map[B] = 0; lut->rgba_map[G] = 1; lut->rgba_map[R] = 2; lut->rgba_map[A] = 3; break; | |
| 249 | + case AV_PIX_FMT_ARGB: lut->rgba_map[A] = 0; lut->rgba_map[R] = 1; lut->rgba_map[G] = 2; lut->rgba_map[B] = 3; break; | |
| 250 | + case AV_PIX_FMT_ABGR: lut->rgba_map[A] = 0; lut->rgba_map[B] = 1; lut->rgba_map[G] = 2; lut->rgba_map[R] = 3; break; | |
| 251 | + case AV_PIX_FMT_RGBA: | |
| 252 | + case AV_PIX_FMT_RGB24: lut->rgba_map[R] = 0; lut->rgba_map[G] = 1; lut->rgba_map[B] = 2; lut->rgba_map[A] = 3; break; | |
| 253 | + case AV_PIX_FMT_BGRA: | |
| 254 | + case AV_PIX_FMT_BGR24: lut->rgba_map[B] = 0; lut->rgba_map[G] = 1; lut->rgba_map[R] = 2; lut->rgba_map[A] = 3; break; | |
| 255 | 255 | } |
| 256 | 256 | lut->step = av_get_bits_per_pixel(desc) >> 3; |
| 257 | 257 | } |
| @@ -98,8 +98,8 @@ static av_cold void uninit(AVFilterContext *ctx) · 97 unmodified lines | ||
| 98 | 98 | |
| 99 | 99 | static int query_formats(AVFilterContext *ctx) |
| 100 | 100 | { |
| 101 | − const enum PixelFormat inout_pix_fmts[] = { PIX_FMT_YUV420P, PIX_FMT_NONE }; | |
| 102 | − const enum PixelFormat blend_pix_fmts[] = { PIX_FMT_YUVA420P, PIX_FMT_NONE }; | |
| 101 | + const enum AVPixelFormat inout_pix_fmts[] = { AV_PIX_FMT_YUV420P, AV_PIX_FMT_NONE }; | |
| 102 | + const enum AVPixelFormat blend_pix_fmts[] = { AV_PIX_FMT_YUVA420P, AV_PIX_FMT_NONE }; | |
| 103 | 103 | AVFilterFormats *inout_formats = ff_make_format_list(inout_pix_fmts); |
| 104 | 104 | AVFilterFormats *blend_formats = ff_make_format_list(blend_pix_fmts); |
| 105 | 105 | |
| @@ -208,11 +208,11 @@ static void blend_frame(AVFilterContext *ctx, · 102 unmodified lines | ||
| 208 | 208 | start_y = FFMAX(y, 0); |
| 209 | 209 | height = end_y - start_y; |
| 210 | 210 | |
| 211 | − if (dst->format == PIX_FMT_BGR24 || dst->format == PIX_FMT_RGB24) { | |
| 211 | + if (dst->format == AV_PIX_FMT_BGR24 || dst->format == AV_PIX_FMT_RGB24) { | |
| 212 | 212 | uint8_t *dp = dst->data[0] + x * 3 + start_y * dst->linesize[0]; |
| 213 | 213 | uint8_t *sp = src->data[0]; |
| 214 | − int b = dst->format == PIX_FMT_BGR24 ? 2 : 0; | |
| 215 | − int r = dst->format == PIX_FMT_BGR24 ? 0 : 2; | |
| 214 | + int b = dst->format == AV_PIX_FMT_BGR24 ? 2 : 0; | |
| 215 | + int r = dst->format == AV_PIX_FMT_BGR24 ? 0 : 2; | |
| 216 | 216 | if (y < 0) |
| 217 | 217 | sp += -y * src->linesize[0]; |
| 218 | 218 | for (i = 0; i < height; i++) { |
| @@ -73,19 +73,19 @@ enum var_name { · 72 unmodified lines | ||
| 73 | 73 | |
| 74 | 74 | static int query_formats(AVFilterContext *ctx) |
| 75 | 75 | { |
| 76 | − static const enum PixelFormat pix_fmts[] = { | |
| 77 | − PIX_FMT_ARGB, PIX_FMT_RGBA, | |
| 78 | − PIX_FMT_ABGR, PIX_FMT_BGRA, | |
| 79 | − PIX_FMT_RGB24, PIX_FMT_BGR24, | |
| 80 | − | |
| 81 | − PIX_FMT_YUV444P, PIX_FMT_YUV422P, | |
| 82 | − PIX_FMT_YUV420P, PIX_FMT_YUV411P, | |
| 83 | − PIX_FMT_YUV410P, PIX_FMT_YUV440P, | |
| 84 | − PIX_FMT_YUVJ444P, PIX_FMT_YUVJ422P, | |
| 85 | − PIX_FMT_YUVJ420P, PIX_FMT_YUVJ440P, | |
| 86 | − PIX_FMT_YUVA420P, | |
| 87 | − | |
| 88 | − PIX_FMT_NONE | |
| 76 | + static const enum AVPixelFormat pix_fmts[] = { | |
| 77 | + AV_PIX_FMT_ARGB, AV_PIX_FMT_RGBA, | |
| 78 | + AV_PIX_FMT_ABGR, AV_PIX_FMT_BGRA, | |
| 79 | + AV_PIX_FMT_RGB24, AV_PIX_FMT_BGR24, | |
| 80 | + | |
| 81 | + AV_PIX_FMT_YUV444P, AV_PIX_FMT_YUV422P, | |
| 82 | + AV_PIX_FMT_YUV420P, AV_PIX_FMT_YUV411P, | |
| 83 | + AV_PIX_FMT_YUV410P, AV_PIX_FMT_YUV440P, | |
| 84 | + AV_PIX_FMT_YUVJ444P, AV_PIX_FMT_YUVJ422P, | |
| 85 | + AV_PIX_FMT_YUVJ420P, AV_PIX_FMT_YUVJ440P, | |
| 86 | + AV_PIX_FMT_YUVA420P, | |
| 87 | + | |
| 88 | + AV_PIX_FMT_NONE | |
| 89 | 89 | }; |
| 90 | 90 | |
| 91 | 91 | ff_set_common_formats(ctx, ff_make_format_list(pix_fmts)); |
| @@ -123,12 +123,12 @@ static av_cold void uninit(AVFilterContext *ctx) · 122 unmodified lines | ||
| 123 | 123 | static int query_formats(AVFilterContext *ctx) |
| 124 | 124 | { |
| 125 | 125 | AVFilterFormats *formats; |
| 126 | − enum PixelFormat pix_fmt; | |
| 126 | + enum AVPixelFormat pix_fmt; | |
| 127 | 127 | int ret; |
| 128 | 128 | |
| 129 | 129 | if (ctx->inputs[0]) { |
| 130 | 130 | formats = NULL; |
| 131 | − for (pix_fmt = 0; pix_fmt < PIX_FMT_NB; pix_fmt++) | |
| 131 | + for (pix_fmt = 0; pix_fmt < AV_PIX_FMT_NB; pix_fmt++) | |
| 132 | 132 | if ( sws_isSupportedInput(pix_fmt) |
| 133 | 133 | && (ret = ff_add_format(&formats, pix_fmt)) < 0) { |
| 134 | 134 | ff_formats_unref(&formats); |
| @@ -138,7 +138,7 @@ static int query_formats(AVFilterContext *ctx) · 3 unmodified lines | ||
| 138 | 138 | } |
| 139 | 139 | if (ctx->outputs[0]) { |
| 140 | 140 | formats = NULL; |
| 141 | − for (pix_fmt = 0; pix_fmt < PIX_FMT_NB; pix_fmt++) | |
| 141 | + for (pix_fmt = 0; pix_fmt < AV_PIX_FMT_NB; pix_fmt++) | |
| 142 | 142 | if ( sws_isSupportedOutput(pix_fmt) |
| 143 | 143 | && (ret = ff_add_format(&formats, pix_fmt)) < 0) { |
| 144 | 144 | ff_formats_unref(&formats); |
| @@ -65,28 +65,28 @@ static av_cold int init(AVFilterContext *ctx, const char *args) · 64 unmodified lines | ||
| 65 | 65 | |
| 66 | 66 | static int query_formats(AVFilterContext *ctx) |
| 67 | 67 | { |
| 68 | − enum PixelFormat pix_fmts[] = { | |
| 69 | − PIX_FMT_ARGB, PIX_FMT_RGBA, | |
| 70 | − PIX_FMT_ABGR, PIX_FMT_BGRA, | |
| 71 | − PIX_FMT_RGB24, PIX_FMT_BGR24, | |
| 72 | − PIX_FMT_RGB565BE, PIX_FMT_RGB565LE, | |
| 73 | − PIX_FMT_RGB555BE, PIX_FMT_RGB555LE, | |
| 74 | − PIX_FMT_BGR565BE, PIX_FMT_BGR565LE, | |
| 75 | − PIX_FMT_BGR555BE, PIX_FMT_BGR555LE, | |
| 76 | − PIX_FMT_GRAY16BE, PIX_FMT_GRAY16LE, | |
| 77 | − PIX_FMT_YUV420P16LE, PIX_FMT_YUV420P16BE, | |
| 78 | − PIX_FMT_YUV422P16LE, PIX_FMT_YUV422P16BE, | |
| 79 | − PIX_FMT_YUV444P16LE, PIX_FMT_YUV444P16BE, | |
| 80 | − PIX_FMT_NV12, PIX_FMT_NV21, | |
| 81 | − PIX_FMT_RGB8, PIX_FMT_BGR8, | |
| 82 | − PIX_FMT_RGB4_BYTE, PIX_FMT_BGR4_BYTE, | |
| 83 | − PIX_FMT_YUV444P, PIX_FMT_YUV422P, | |
| 84 | − PIX_FMT_YUV420P, PIX_FMT_YUVJ420P, | |
| 85 | − PIX_FMT_YUV411P, PIX_FMT_YUV410P, | |
| 86 | − PIX_FMT_YUVJ444P, PIX_FMT_YUVJ422P, | |
| 87 | − PIX_FMT_YUV440P, PIX_FMT_YUVJ440P, | |
| 88 | − PIX_FMT_YUVA420P, PIX_FMT_GRAY8, | |
| 89 | − PIX_FMT_NONE | |
| 68 | + enum AVPixelFormat pix_fmts[] = { | |
| 69 | + AV_PIX_FMT_ARGB, AV_PIX_FMT_RGBA, | |
| 70 | + AV_PIX_FMT_ABGR, AV_PIX_FMT_BGRA, | |
| 71 | + AV_PIX_FMT_RGB24, AV_PIX_FMT_BGR24, | |
| 72 | + AV_PIX_FMT_RGB565BE, AV_PIX_FMT_RGB565LE, | |
| 73 | + AV_PIX_FMT_RGB555BE, AV_PIX_FMT_RGB555LE, | |
| 74 | + AV_PIX_FMT_BGR565BE, AV_PIX_FMT_BGR565LE, | |
| 75 | + AV_PIX_FMT_BGR555BE, AV_PIX_FMT_BGR555LE, | |
| 76 | + AV_PIX_FMT_GRAY16BE, AV_PIX_FMT_GRAY16LE, | |
| 77 | + AV_PIX_FMT_YUV420P16LE, AV_PIX_FMT_YUV420P16BE, | |
| 78 | + AV_PIX_FMT_YUV422P16LE, AV_PIX_FMT_YUV422P16BE, | |
| 79 | + AV_PIX_FMT_YUV444P16LE, AV_PIX_FMT_YUV444P16BE, | |
| 80 | + AV_PIX_FMT_NV12, AV_PIX_FMT_NV21, | |
| 81 | + AV_PIX_FMT_RGB8, AV_PIX_FMT_BGR8, | |
| 82 | + AV_PIX_FMT_RGB4_BYTE, AV_PIX_FMT_BGR4_BYTE, | |
| 83 | + AV_PIX_FMT_YUV444P, AV_PIX_FMT_YUV422P, | |
| 84 | + AV_PIX_FMT_YUV420P, AV_PIX_FMT_YUVJ420P, | |
| 85 | + AV_PIX_FMT_YUV411P, AV_PIX_FMT_YUV410P, | |
| 86 | + AV_PIX_FMT_YUVJ444P, AV_PIX_FMT_YUVJ422P, | |
| 87 | + AV_PIX_FMT_YUV440P, AV_PIX_FMT_YUVJ440P, | |
| 88 | + AV_PIX_FMT_YUVA420P, AV_PIX_FMT_GRAY8, | |
| 89 | + AV_PIX_FMT_NONE | |
| 90 | 90 | }; |
| 91 | 91 | |
| 92 | 92 | ff_set_common_formats(ctx, ff_make_format_list(pix_fmts)); |
| @@ -159,10 +159,10 @@ static av_cold int init(AVFilterContext *ctx, const char *args) · 158 unmodified lines | ||
| 159 | 159 | |
| 160 | 160 | static int query_formats(AVFilterContext *ctx) |
| 161 | 161 | { |
| 162 | − enum PixelFormat pix_fmts[] = { | |
| 163 | − PIX_FMT_YUV420P, PIX_FMT_YUV422P, PIX_FMT_YUV444P, PIX_FMT_YUV410P, | |
| 164 | − PIX_FMT_YUV411P, PIX_FMT_YUV440P, PIX_FMT_YUVJ420P, PIX_FMT_YUVJ422P, | |
| 165 | − PIX_FMT_YUVJ444P, PIX_FMT_YUVJ440P, PIX_FMT_NONE | |
| 162 | + enum AVPixelFormat pix_fmts[] = { | |
| 163 | + AV_PIX_FMT_YUV420P, AV_PIX_FMT_YUV422P, AV_PIX_FMT_YUV444P, AV_PIX_FMT_YUV410P, | |
| 164 | + AV_PIX_FMT_YUV411P, AV_PIX_FMT_YUV440P, AV_PIX_FMT_YUVJ420P, AV_PIX_FMT_YUVJ422P, | |
| 165 | + AV_PIX_FMT_YUVJ444P, AV_PIX_FMT_YUVJ440P, AV_PIX_FMT_NONE | |
| 166 | 166 | }; |
| 167 | 167 | |
| 168 | 168 | ff_set_common_formats(ctx, ff_make_format_list(pix_fmts)); |
| @@ -357,27 +357,27 @@ static av_cold void uninit(AVFilterContext *ctx) · 356 unmodified lines | ||
| 357 | 357 | |
| 358 | 358 | static int query_formats(AVFilterContext *ctx) |
| 359 | 359 | { |
| 360 | − static const enum PixelFormat pix_fmts[] = { | |
| 361 | − PIX_FMT_YUV420P, | |
| 362 | − PIX_FMT_YUV422P, | |
| 363 | − PIX_FMT_YUV444P, | |
| 364 | − PIX_FMT_YUV410P, | |
| 365 | − PIX_FMT_YUV411P, | |
| 366 | − PIX_FMT_GRAY8, | |
| 367 | − PIX_FMT_YUVJ420P, | |
| 368 | − PIX_FMT_YUVJ422P, | |
| 369 | − PIX_FMT_YUVJ444P, | |
| 370 | − AV_NE( PIX_FMT_GRAY16BE, PIX_FMT_GRAY16LE ), | |
| 371 | − PIX_FMT_YUV440P, | |
| 372 | − PIX_FMT_YUVJ440P, | |
| 373 | − AV_NE( PIX_FMT_YUV420P10BE, PIX_FMT_YUV420P10LE ), | |
| 374 | − AV_NE( PIX_FMT_YUV422P10BE, PIX_FMT_YUV422P10LE ), | |
| 375 | − AV_NE( PIX_FMT_YUV444P10BE, PIX_FMT_YUV444P10LE ), | |
| 376 | − AV_NE( PIX_FMT_YUV420P16BE, PIX_FMT_YUV420P16LE ), | |
| 377 | − AV_NE( PIX_FMT_YUV422P16BE, PIX_FMT_YUV422P16LE ), | |
| 378 | − AV_NE( PIX_FMT_YUV444P16BE, PIX_FMT_YUV444P16LE ), | |
| 379 | − PIX_FMT_YUVA420P, | |
| 380 | − PIX_FMT_NONE | |
| 360 | + static const enum AVPixelFormat pix_fmts[] = { | |
| 361 | + AV_PIX_FMT_YUV420P, | |
| 362 | + AV_PIX_FMT_YUV422P, | |
| 363 | + AV_PIX_FMT_YUV444P, | |
| 364 | + AV_PIX_FMT_YUV410P, | |
| 365 | + AV_PIX_FMT_YUV411P, | |
| 366 | + AV_PIX_FMT_GRAY8, | |
| 367 | + AV_PIX_FMT_YUVJ420P, | |
| 368 | + AV_PIX_FMT_YUVJ422P, | |
| 369 | + AV_PIX_FMT_YUVJ444P, | |
| 370 | + AV_NE( AV_PIX_FMT_GRAY16BE, AV_PIX_FMT_GRAY16LE ), | |
| 371 | + AV_PIX_FMT_YUV440P, | |
| 372 | + AV_PIX_FMT_YUVJ440P, | |
| 373 | + AV_NE( AV_PIX_FMT_YUV420P10BE, AV_PIX_FMT_YUV420P10LE ), | |
| 374 | + AV_NE( AV_PIX_FMT_YUV422P10BE, AV_PIX_FMT_YUV422P10LE ), | |
| 375 | + AV_NE( AV_PIX_FMT_YUV444P10BE, AV_PIX_FMT_YUV444P10LE ), | |
| 376 | + AV_NE( AV_PIX_FMT_YUV420P16BE, AV_PIX_FMT_YUV420P16LE ), | |
| 377 | + AV_NE( AV_PIX_FMT_YUV422P16BE, AV_PIX_FMT_YUV422P16LE ), | |
| 378 | + AV_NE( AV_PIX_FMT_YUV444P16BE, AV_PIX_FMT_YUV444P16LE ), | |
| 379 | + AV_PIX_FMT_YUVA420P, | |
| 380 | + AV_PIX_FMT_NONE | |
| 381 | 381 | }; |
| 382 | 382 | |
| 383 | 383 | ff_set_common_formats(ctx, ff_make_format_list(pix_fmts)); |
| @@ -99,7 +99,7 @@ AVFilterBufferRef *ff_default_get_video_buffer(AVFilterLink *link, int perms, in · 98 unmodified lines | ||
| 99 | 99 | |
| 100 | 100 | AVFilterBufferRef * |
| 101 | 101 | avfilter_get_video_buffer_ref_from_arrays(uint8_t *data[4], int linesize[4], int perms, |
| 102 | − int w, int h, enum PixelFormat format) | |
| 102 | + int w, int h, enum AVPixelFormat format) | |
| 103 | 103 | { |
| 104 | 104 | AVFilterBuffer *pic = av_mallocz(sizeof(AVFilterBuffer)); |
| 105 | 105 | AVFilterBufferRef *picref = av_mallocz(sizeof(AVFilterBufferRef)); |
| @@ -93,19 +93,19 @@ static av_cold void color_uninit(AVFilterContext *ctx) · 92 unmodified lines | ||
| 93 | 93 | |
| 94 | 94 | static int query_formats(AVFilterContext *ctx) |
| 95 | 95 | { |
| 96 | − static const enum PixelFormat pix_fmts[] = { | |
| 97 | − PIX_FMT_ARGB, PIX_FMT_RGBA, | |
| 98 | − PIX_FMT_ABGR, PIX_FMT_BGRA, | |
| 99 | − PIX_FMT_RGB24, PIX_FMT_BGR24, | |
| 100 | − | |
| 101 | − PIX_FMT_YUV444P, PIX_FMT_YUV422P, | |
| 102 | − PIX_FMT_YUV420P, PIX_FMT_YUV411P, | |
| 103 | − PIX_FMT_YUV410P, PIX_FMT_YUV440P, | |
| 104 | − PIX_FMT_YUVJ444P, PIX_FMT_YUVJ422P, | |
| 105 | − PIX_FMT_YUVJ420P, PIX_FMT_YUVJ440P, | |
| 106 | − PIX_FMT_YUVA420P, | |
| 107 | − | |
| 108 | − PIX_FMT_NONE | |
| 96 | + static const enum AVPixelFormat pix_fmts[] = { | |
| 97 | + AV_PIX_FMT_ARGB, AV_PIX_FMT_RGBA, | |
| 98 | + AV_PIX_FMT_ABGR, AV_PIX_FMT_BGRA, | |
| 99 | + AV_PIX_FMT_RGB24, AV_PIX_FMT_BGR24, | |
| 100 | + | |
| 101 | + AV_PIX_FMT_YUV444P, AV_PIX_FMT_YUV422P, | |
| 102 | + AV_PIX_FMT_YUV420P, AV_PIX_FMT_YUV411P, | |
| 103 | + AV_PIX_FMT_YUV410P, AV_PIX_FMT_YUV440P, | |
| 104 | + AV_PIX_FMT_YUVJ444P, AV_PIX_FMT_YUVJ422P, | |
| 105 | + AV_PIX_FMT_YUVJ420P, AV_PIX_FMT_YUVJ440P, | |
| 106 | + AV_PIX_FMT_YUVA420P, | |
| 107 | + | |
| 108 | + AV_PIX_FMT_NONE | |
| 109 | 109 | }; |
| 110 | 110 | |
| 111 | 111 | ff_set_common_formats(ctx, ff_make_format_list(pix_fmts)); |
| @@ -203,7 +203,7 @@ static av_cold void uninit(AVFilterContext *ctx) · 202 unmodified lines | ||
| 203 | 203 | static int query_formats(AVFilterContext *ctx) |
| 204 | 204 | { |
| 205 | 205 | MovieContext *movie = ctx->priv; |
| 206 | − enum PixelFormat pix_fmts[] = { movie->codec_ctx->pix_fmt, PIX_FMT_NONE }; | |
| 206 | + enum AVPixelFormat pix_fmts[] = { movie->codec_ctx->pix_fmt, AV_PIX_FMT_NONE }; | |
| 207 | 207 | |
| 208 | 208 | ff_set_common_formats(ctx, ff_make_format_list(pix_fmts)); |
| 209 | 209 | return 0; |
| @@ -352,8 +352,8 @@ static av_cold int test_init(AVFilterContext *ctx, const char *args) · 351 unmodified lines | ||
| 352 | 352 | |
| 353 | 353 | static int test_query_formats(AVFilterContext *ctx) |
| 354 | 354 | { |
| 355 | − static const enum PixelFormat pix_fmts[] = { | |
| 356 | − PIX_FMT_RGB24, PIX_FMT_NONE | |
| 355 | + static const enum AVPixelFormat pix_fmts[] = { | |
| 356 | + AV_PIX_FMT_RGB24, AV_PIX_FMT_NONE | |
| 357 | 357 | }; |
| 358 | 358 | ff_set_common_formats(ctx, ff_make_format_list(pix_fmts)); |
| 359 | 359 | return 0; |
| @@ -397,29 +397,29 @@ static const AVClass rgbtestsrc_class = { · 37 unmodified lines | ||
| 397 | 397 | #define A 3 |
| 398 | 398 | |
| 399 | 399 | static void rgbtest_put_pixel(uint8_t *dst, int dst_linesize, |
| 400 | − int x, int y, int r, int g, int b, enum PixelFormat fmt, | |
| 400 | + int x, int y, int r, int g, int b, enum AVPixelFormat fmt, | |
| 401 | 401 | int rgba_map[4]) |
| 402 | 402 | { |
| 403 | 403 | int32_t v; |
| 404 | 404 | uint8_t *p; |
| 405 | 405 | |
| 406 | 406 | switch (fmt) { |
| 407 | − case PIX_FMT_BGR444: ((uint16_t*)(dst + y*dst_linesize))[x] = ((r >> 4) << 8) | ((g >> 4) << 4) | (b >> 4); break; | |
| 408 | − case PIX_FMT_RGB444: ((uint16_t*)(dst + y*dst_linesize))[x] = ((b >> 4) << 8) | ((g >> 4) << 4) | (r >> 4); break; | |
| 409 | − case PIX_FMT_BGR555: ((uint16_t*)(dst + y*dst_linesize))[x] = ((r>>3)<<10) | ((g>>3)<<5) | (b>>3); break; | |
| 410 | − case PIX_FMT_RGB555: ((uint16_t*)(dst + y*dst_linesize))[x] = ((b>>3)<<10) | ((g>>3)<<5) | (r>>3); break; | |
| 411 | − case PIX_FMT_BGR565: ((uint16_t*)(dst + y*dst_linesize))[x] = ((r>>3)<<11) | ((g>>2)<<5) | (b>>3); break; | |
| 412 | − case PIX_FMT_RGB565: ((uint16_t*)(dst + y*dst_linesize))[x] = ((b>>3)<<11) | ((g>>2)<<5) | (r>>3); break; | |
| 413 | − case PIX_FMT_RGB24: | |
| 414 | − case PIX_FMT_BGR24: | |
| 407 | + case AV_PIX_FMT_BGR444: ((uint16_t*)(dst + y*dst_linesize))[x] = ((r >> 4) << 8) | ((g >> 4) << 4) | (b >> 4); break; | |
| 408 | + case AV_PIX_FMT_RGB444: ((uint16_t*)(dst + y*dst_linesize))[x] = ((b >> 4) << 8) | ((g >> 4) << 4) | (r >> 4); break; | |
| 409 | + case AV_PIX_FMT_BGR555: ((uint16_t*)(dst + y*dst_linesize))[x] = ((r>>3)<<10) | ((g>>3)<<5) | (b>>3); break; | |
| 410 | + case AV_PIX_FMT_RGB555: ((uint16_t*)(dst + y*dst_linesize))[x] = ((b>>3)<<10) | ((g>>3)<<5) | (r>>3); break; | |
| 411 | + case AV_PIX_FMT_BGR565: ((uint16_t*)(dst + y*dst_linesize))[x] = ((r>>3)<<11) | ((g>>2)<<5) | (b>>3); break; | |
| 412 | + case AV_PIX_FMT_RGB565: ((uint16_t*)(dst + y*dst_linesize))[x] = ((b>>3)<<11) | ((g>>2)<<5) | (r>>3); break; | |
| 413 | + case AV_PIX_FMT_RGB24: | |
| 414 | + case AV_PIX_FMT_BGR24: | |
| 415 | 415 | v = (r << (rgba_map[R]*8)) + (g << (rgba_map[G]*8)) + (b << (rgba_map[B]*8)); |
| 416 | 416 | p = dst + 3*x + y*dst_linesize; |
| 417 | 417 | AV_WL24(p, v); |
| 418 | 418 | break; |
| 419 | − case PIX_FMT_RGBA: | |
| 420 | − case PIX_FMT_BGRA: | |
| 421 | − case PIX_FMT_ARGB: | |
| 422 | − case PIX_FMT_ABGR: | |
| 419 | + case AV_PIX_FMT_RGBA: | |
| 420 | + case AV_PIX_FMT_BGRA: | |
| 421 | + case AV_PIX_FMT_ARGB: | |
| 422 | + case AV_PIX_FMT_ABGR: | |
| 423 | 423 | v = (r << (rgba_map[R]*8)) + (g << (rgba_map[G]*8)) + (b << (rgba_map[B]*8)); |
| 424 | 424 | p = dst + 4*x + y*dst_linesize; |
| 425 | 425 | AV_WL32(p, v); |
| @@ -458,13 +458,13 @@ static av_cold int rgbtest_init(AVFilterContext *ctx, const char *args) · 32 unmodified lines | ||
| 458 | 458 | |
| 459 | 459 | static int rgbtest_query_formats(AVFilterContext *ctx) |
| 460 | 460 | { |
| 461 | − static const enum PixelFormat pix_fmts[] = { | |
| 462 | − PIX_FMT_RGBA, PIX_FMT_ARGB, PIX_FMT_BGRA, PIX_FMT_ABGR, | |
| 463 | − PIX_FMT_BGR24, PIX_FMT_RGB24, | |
| 464 | − PIX_FMT_RGB444, PIX_FMT_BGR444, | |
| 465 | − PIX_FMT_RGB565, PIX_FMT_BGR565, | |
| 466 | − PIX_FMT_RGB555, PIX_FMT_BGR555, | |
| 467 | − PIX_FMT_NONE | |
| 461 | + static const enum AVPixelFormat pix_fmts[] = { | |
| 462 | + AV_PIX_FMT_RGBA, AV_PIX_FMT_ARGB, AV_PIX_FMT_BGRA, AV_PIX_FMT_ABGR, | |
| 463 | + AV_PIX_FMT_BGR24, AV_PIX_FMT_RGB24, | |
| 464 | + AV_PIX_FMT_RGB444, AV_PIX_FMT_BGR444, | |
| 465 | + AV_PIX_FMT_RGB565, AV_PIX_FMT_BGR565, | |
| 466 | + AV_PIX_FMT_RGB555, AV_PIX_FMT_BGR555, | |
| 467 | + AV_PIX_FMT_NONE | |
| 468 | 468 | }; |
| 469 | 469 | ff_set_common_formats(ctx, ff_make_format_list(pix_fmts)); |
| 470 | 470 | return 0; |
| @@ -475,12 +475,12 @@ static int rgbtest_config_props(AVFilterLink *outlink) · 4 unmodified lines | ||
| 475 | 475 | TestSourceContext *test = outlink->src->priv; |
| 476 | 476 | |
| 477 | 477 | switch (outlink->format) { |
| 478 | − case PIX_FMT_ARGB: test->rgba_map[A] = 0; test->rgba_map[R] = 1; test->rgba_map[G] = 2; test->rgba_map[B] = 3; break; | |
| 479 | − case PIX_FMT_ABGR: test->rgba_map[A] = 0; test->rgba_map[B] = 1; test->rgba_map[G] = 2; test->rgba_map[R] = 3; break; | |
| 480 | − case PIX_FMT_RGBA: | |
| 481 | − case PIX_FMT_RGB24: test->rgba_map[R] = 0; test->rgba_map[G] = 1; test->rgba_map[B] = 2; test->rgba_map[A] = 3; break; | |
| 482 | − case PIX_FMT_BGRA: | |
| 483 | − case PIX_FMT_BGR24: test->rgba_map[B] = 0; test->rgba_map[G] = 1; test->rgba_map[R] = 2; test->rgba_map[A] = 3; break; | |
| 478 | + case AV_PIX_FMT_ARGB: test->rgba_map[A] = 0; test->rgba_map[R] = 1; test->rgba_map[G] = 2; test->rgba_map[B] = 3; break; | |
| 479 | + case AV_PIX_FMT_ABGR: test->rgba_map[A] = 0; test->rgba_map[B] = 1; test->rgba_map[G] = 2; test->rgba_map[R] = 3; break; | |
| 480 | + case AV_PIX_FMT_RGBA: | |
| 481 | + case AV_PIX_FMT_RGB24: test->rgba_map[R] = 0; test->rgba_map[G] = 1; test->rgba_map[B] = 2; test->rgba_map[A] = 3; break; | |
| 482 | + case AV_PIX_FMT_BGRA: | |
| 483 | + case AV_PIX_FMT_BGR24: test->rgba_map[B] = 0; test->rgba_map[G] = 1; test->rgba_map[R] = 2; test->rgba_map[A] = 3; break; | |
| 484 | 484 | } |
| 485 | 485 | |
| 486 | 486 | return config_props(outlink); |
| @@ -90,7 +90,7 @@ static int bfi_read_header(AVFormatContext * s) · 89 unmodified lines | ||
| 90 | 90 | avpriv_set_pts_info(vstream, 32, 1, fps); |
| 91 | 91 | vstream->codec->codec_type = AVMEDIA_TYPE_VIDEO; |
| 92 | 92 | vstream->codec->codec_id = AV_CODEC_ID_BFI; |
| 93 | − vstream->codec->pix_fmt = PIX_FMT_PAL8; | |
| 93 | + vstream->codec->pix_fmt = AV_PIX_FMT_PAL8; | |
| 94 | 94 | |
| 95 | 95 | /* Set up the audio codec now... */ |
| 96 | 96 | astream->codec->codec_type = AVMEDIA_TYPE_AUDIO; |
| @@ -50,7 +50,7 @@ static int bmv_read_header(AVFormatContext *s) · 49 unmodified lines | ||
| 50 | 50 | st->codec->codec_id = AV_CODEC_ID_BMV_VIDEO; |
| 51 | 51 | st->codec->width = 640; |
| 52 | 52 | st->codec->height = 429; |
| 53 | − st->codec->pix_fmt = PIX_FMT_PAL8; | |
| 53 | + st->codec->pix_fmt = AV_PIX_FMT_PAL8; | |
| 54 | 54 | avpriv_set_pts_info(st, 16, 1, 12); |
| 55 | 55 | ast = avformat_new_stream(s, 0); |
| 56 | 56 | if (!ast) |
| @@ -137,7 +137,7 @@ static int dv_write_pack(enum dv_pack_type pack_id, DVMuxContext *c, uint8_t* bu · 136 unmodified lines | ||
| 137 | 137 | (1 << 3) | /* recording mode: 1 -- original */ |
| 138 | 138 | 7; |
| 139 | 139 | buf[3] = (1 << 7) | /* direction: 1 -- forward */ |
| 140 | − (c->sys->pix_fmt == PIX_FMT_YUV420P ? 0x20 : /* speed */ | |
| 140 | + (c->sys->pix_fmt == AV_PIX_FMT_YUV420P ? 0x20 : /* speed */ | |
| 141 | 141 | c->sys->ltc_divisor * 4); |
| 142 | 142 | buf[4] = (1 << 7) | /* reserved -- always 1 */ |
| 143 | 143 | 0x7f; /* genre category */ |
| @@ -62,7 +62,7 @@ static int read_header(AVFormatContext *s) · 61 unmodified lines | ||
| 62 | 62 | avio_skip(pb, 2); |
| 63 | 63 | st->codec->codec_type = AVMEDIA_TYPE_VIDEO; |
| 64 | 64 | st->codec->codec_id = AV_CODEC_ID_RAWVIDEO; |
| 65 | − st->codec->pix_fmt = PIX_FMT_RGBA; | |
| 65 | + st->codec->pix_fmt = AV_PIX_FMT_RGBA; | |
| 66 | 66 | st->codec->codec_tag = 0; /* no fourcc */ |
| 67 | 67 | st->codec->width = avio_rb16(pb); |
| 68 | 68 | st->codec->height = avio_rb16(pb); |
| @@ -35,8 +35,8 @@ typedef struct { · 34 unmodified lines | ||
| 35 | 35 | |
| 36 | 36 | static int write_header(AVFormatContext *s) |
| 37 | 37 | { |
| 38 | − if (s->streams[0]->codec->pix_fmt != PIX_FMT_RGBA) { | |
| 39 | − av_log(s, AV_LOG_ERROR, "only PIX_FMT_RGBA is supported\n"); | |
| 38 | + if (s->streams[0]->codec->pix_fmt != AV_PIX_FMT_RGBA) { | |
| 39 | + av_log(s, AV_LOG_ERROR, "only AV_PIX_FMT_RGBA is supported\n"); | |
| 40 | 40 | return AVERROR_INVALIDDATA; |
| 41 | 41 | } |
| 42 | 42 | return 0; |
| @@ -223,7 +223,7 @@ static int gif_image_write_image(AVIOContext *pb, · 222 unmodified lines | ||
| 223 | 223 | put_bits(&p, 9, 0x0100); /* clear code */ |
| 224 | 224 | |
| 225 | 225 | for (i = (left < GIF_CHUNKS) ? left : GIF_CHUNKS; i; i--) { |
| 226 | − if (pix_fmt == PIX_FMT_RGB24) { | |
| 226 | + if (pix_fmt == AV_PIX_FMT_RGB24) { | |
| 227 | 227 | v = gif_clut_index(ptr[0], ptr[1], ptr[2]); |
| 228 | 228 | ptr += 3; |
| 229 | 229 | } else { |
| @@ -290,7 +290,7 @@ static int gif_write_header(AVFormatContext *s) · 60 unmodified lines | ||
| 290 | 290 | // rate = video_enc->time_base.den; |
| 291 | 291 | } |
| 292 | 292 | |
| 293 | − if (video_enc->pix_fmt != PIX_FMT_RGB24) { | |
| 293 | + if (video_enc->pix_fmt != AV_PIX_FMT_RGB24) { | |
| 294 | 294 | av_log(s, AV_LOG_ERROR, |
| 295 | 295 | "ERROR: gif only handles the rgb24 pixel format. Use -pix_fmt rgb24.\n"); |
| 296 | 296 | return AVERROR(EIO); |
| @@ -327,7 +327,7 @@ static int gif_write_video(AVFormatContext *s, AVCodecContext *enc, · 30 unmodified lines | ||
| 327 | 327 | avio_w8(pb, 0x00); |
| 328 | 328 | |
| 329 | 329 | gif_image_write_image(pb, 0, 0, enc->width, enc->height, |
| 330 | − buf, enc->width * 3, PIX_FMT_RGB24); | |
| 330 | + buf, enc->width * 3, AV_PIX_FMT_RGB24); | |
| 331 | 331 | |
| 332 | 332 | avio_flush(s->pb); |
| 333 | 333 | return 0; |
| @@ -192,7 +192,7 @@ static int gxf_write_mpeg_auxiliary(AVIOContext *pb, AVStream *st) · 191 unmodified lines | ||
| 192 | 192 | size = snprintf(buffer, 1024, "Ver 1\nBr %.6f\nIpg 1\nPpi %d\nBpiop %d\n" |
| 193 | 193 | "Pix 0\nCf %d\nCg %d\nSl %d\nnl16 %d\nVi 1\nf1 1\n", |
| 194 | 194 | (float)st->codec->bit_rate, sc->p_per_gop, sc->b_per_i_or_p, |
| 195 | − st->codec->pix_fmt == PIX_FMT_YUV422P ? 2 : 1, sc->first_gop_closed == 1, | |
| 195 | + st->codec->pix_fmt == AV_PIX_FMT_YUV422P ? 2 : 1, sc->first_gop_closed == 1, | |
| 196 | 196 | starting_line, (st->codec->height + 15) / 16); |
| 197 | 197 | avio_w8(pb, TRACK_MPG_AUX); |
| 198 | 198 | avio_w8(pb, size + 1); |
| @@ -471,7 +471,7 @@ static int gxf_write_umf_media_mpeg(AVIOContext *pb, AVStream *st) · 272 unmodified lines | ||
| 471 | 471 | { |
| 472 | 472 | GXFStreamContext *sc = st->priv_data; |
| 473 | 473 | |
| 474 | − if (st->codec->pix_fmt == PIX_FMT_YUV422P) | |
| 474 | + if (st->codec->pix_fmt == AV_PIX_FMT_YUV422P) | |
| 475 | 475 | avio_wl32(pb, 2); |
| 476 | 476 | else |
| 477 | 477 | avio_wl32(pb, 1); /* default to 420 */ |
| @@ -718,7 +718,7 @@ static int gxf_write_header(AVFormatContext *s) · 240 unmodified lines | ||
| 718 | 718 | media_info = 'M'; |
| 719 | 719 | break; |
| 720 | 720 | case AV_CODEC_ID_DVVIDEO: |
| 721 | − if (st->codec->pix_fmt == PIX_FMT_YUV422P) { | |
| 721 | + if (st->codec->pix_fmt == AV_PIX_FMT_YUV422P) { | |
| 722 | 722 | sc->media_type += 2; |
| 723 | 723 | sc->track_type = 6; |
| 724 | 724 | gxf->flags |= 0x00002000; |
| @@ -140,7 +140,7 @@ static int read_header(AVFormatContext *s1) · 139 unmodified lines | ||
| 140 | 140 | int first_index, last_index, ret = 0; |
| 141 | 141 | int width = 0, height = 0; |
| 142 | 142 | AVStream *st; |
| 143 | − enum PixelFormat pix_fmt = PIX_FMT_NONE; | |
| 143 | + enum AVPixelFormat pix_fmt = AV_PIX_FMT_NONE; | |
| 144 | 144 | AVRational framerate; |
| 145 | 145 | |
| 146 | 146 | s1->ctx_flags |= AVFMTCTX_NOHEADER; |
| @@ -150,7 +150,7 @@ static int read_header(AVFormatContext *s1) · 3 unmodified lines | ||
| 150 | 150 | return AVERROR(ENOMEM); |
| 151 | 151 | } |
| 152 | 152 | |
| 153 | − if (s->pixel_format && (pix_fmt = av_get_pix_fmt(s->pixel_format)) == PIX_FMT_NONE) { | |
| 153 | + if (s->pixel_format && (pix_fmt = av_get_pix_fmt(s->pixel_format)) == AV_PIX_FMT_NONE) { | |
| 154 | 154 | av_log(s1, AV_LOG_ERROR, "No such pixel format: %s.\n", s->pixel_format); |
| 155 | 155 | return AVERROR(EINVAL); |
| 156 | 156 | } |
| @@ -204,7 +204,7 @@ static int read_header(AVFormatContext *s1) · 47 unmodified lines | ||
| 204 | 204 | st->codec->codec_type = AVMEDIA_TYPE_VIDEO; |
| 205 | 205 | st->codec->codec_id = ff_guess_image2_codec(s->path); |
| 206 | 206 | } |
| 207 | − if(st->codec->codec_type == AVMEDIA_TYPE_VIDEO && pix_fmt != PIX_FMT_NONE) | |
| 207 | + if(st->codec->codec_type == AVMEDIA_TYPE_VIDEO && pix_fmt != AV_PIX_FMT_NONE) | |
| 208 | 208 | st->codec->pix_fmt = pix_fmt; |
| 209 | 209 | |
| 210 | 210 | return 0; |
| @@ -39,7 +39,7 @@ static const AVCodecTag lxf_tags[] = { · 38 unmodified lines | ||
| 39 | 39 | { AV_CODEC_ID_DVVIDEO, 4 }, //DV25 |
| 40 | 40 | { AV_CODEC_ID_DVVIDEO, 5 }, //DVCPRO |
| 41 | 41 | { AV_CODEC_ID_DVVIDEO, 6 }, //DVCPRO50 |
| 42 | − { AV_CODEC_ID_RAWVIDEO, 7 }, //PIX_FMT_ARGB, where alpha is used for chroma keying | |
| 42 | + { AV_CODEC_ID_RAWVIDEO, 7 }, //AV_PIX_FMT_ARGB, where alpha is used for chroma keying | |
| 43 | 43 | { AV_CODEC_ID_RAWVIDEO, 8 }, //16-bit chroma key |
| 44 | 44 | { AV_CODEC_ID_MPEG2VIDEO, 9 }, //4:2:2 CBP ("Constrained Bytes per Gop") |
| 45 | 45 | { AV_CODEC_ID_NONE, 0 }, |
| @@ -778,10 +778,10 @@ static int mov_get_dv_codec_tag(AVFormatContext *s, MOVTrack *track) · 777 unmodified lines | ||
| 778 | 778 | |
| 779 | 779 | if (track->enc->width == 720) /* SD */ |
| 780 | 780 | if (track->enc->height == 480) /* NTSC */ |
| 781 | − if (track->enc->pix_fmt == PIX_FMT_YUV422P) tag = MKTAG('d','v','5','n'); | |
| 781 | + if (track->enc->pix_fmt == AV_PIX_FMT_YUV422P) tag = MKTAG('d','v','5','n'); | |
| 782 | 782 | else tag = MKTAG('d','v','c',' '); |
| 783 | − else if (track->enc->pix_fmt == PIX_FMT_YUV422P) tag = MKTAG('d','v','5','p'); | |
| 784 | − else if (track->enc->pix_fmt == PIX_FMT_YUV420P) tag = MKTAG('d','v','c','p'); | |
| 783 | + else if (track->enc->pix_fmt == AV_PIX_FMT_YUV422P) tag = MKTAG('d','v','5','p'); | |
| 784 | + else if (track->enc->pix_fmt == AV_PIX_FMT_YUV420P) tag = MKTAG('d','v','c','p'); | |
| 785 | 785 | else tag = MKTAG('d','v','p','p'); |
| 786 | 786 | else if (track->enc->height == 720) /* HD 720 line */ |
| 787 | 787 | if (track->enc->time_base.den == 50) tag = MKTAG('d','v','h','q'); |
| @@ -798,24 +798,24 @@ static int mov_get_dv_codec_tag(AVFormatContext *s, MOVTrack *track) · 10 unmodified lines | ||
| 798 | 798 | } |
| 799 | 799 | |
| 800 | 800 | static const struct { |
| 801 | − enum PixelFormat pix_fmt; | |
| 801 | + enum AVPixelFormat pix_fmt; | |
| 802 | 802 | uint32_t tag; |
| 803 | 803 | unsigned bps; |
| 804 | 804 | } mov_pix_fmt_tags[] = { |
| 805 | − { PIX_FMT_YUYV422, MKTAG('y','u','v','s'), 0 }, | |
| 806 | − { PIX_FMT_UYVY422, MKTAG('2','v','u','y'), 0 }, | |
| 807 | − { PIX_FMT_RGB555BE,MKTAG('r','a','w',' '), 16 }, | |
| 808 | − { PIX_FMT_RGB555LE,MKTAG('L','5','5','5'), 16 }, | |
| 809 | − { PIX_FMT_RGB565LE,MKTAG('L','5','6','5'), 16 }, | |
| 810 | − { PIX_FMT_RGB565BE,MKTAG('B','5','6','5'), 16 }, | |
| 811 | − { PIX_FMT_GRAY16BE,MKTAG('b','1','6','g'), 16 }, | |
| 812 | − { PIX_FMT_RGB24, MKTAG('r','a','w',' '), 24 }, | |
| 813 | − { PIX_FMT_BGR24, MKTAG('2','4','B','G'), 24 }, | |
| 814 | − { PIX_FMT_ARGB, MKTAG('r','a','w',' '), 32 }, | |
| 815 | − { PIX_FMT_BGRA, MKTAG('B','G','R','A'), 32 }, | |
| 816 | − { PIX_FMT_RGBA, MKTAG('R','G','B','A'), 32 }, | |
| 817 | − { PIX_FMT_ABGR, MKTAG('A','B','G','R'), 32 }, | |
| 818 | − { PIX_FMT_RGB48BE, MKTAG('b','4','8','r'), 48 }, | |
| 805 | + { AV_PIX_FMT_YUYV422, MKTAG('y','u','v','s'), 0 }, | |
| 806 | + { AV_PIX_FMT_UYVY422, MKTAG('2','v','u','y'), 0 }, | |
| 807 | + { AV_PIX_FMT_RGB555BE,MKTAG('r','a','w',' '), 16 }, | |
| 808 | + { AV_PIX_FMT_RGB555LE,MKTAG('L','5','5','5'), 16 }, | |
| 809 | + { AV_PIX_FMT_RGB565LE,MKTAG('L','5','6','5'), 16 }, | |
| 810 | + { AV_PIX_FMT_RGB565BE,MKTAG('B','5','6','5'), 16 }, | |
| 811 | + { AV_PIX_FMT_GRAY16BE,MKTAG('b','1','6','g'), 16 }, | |
| 812 | + { AV_PIX_FMT_RGB24, MKTAG('r','a','w',' '), 24 }, | |
| 813 | + { AV_PIX_FMT_BGR24, MKTAG('2','4','B','G'), 24 }, | |
| 814 | + { AV_PIX_FMT_ARGB, MKTAG('r','a','w',' '), 32 }, | |
| 815 | + { AV_PIX_FMT_BGRA, MKTAG('B','G','R','A'), 32 }, | |
| 816 | + { AV_PIX_FMT_RGBA, MKTAG('R','G','B','A'), 32 }, | |
| 817 | + { AV_PIX_FMT_ABGR, MKTAG('A','B','G','R'), 32 }, | |
| 818 | + { AV_PIX_FMT_RGB48BE, MKTAG('b','4','8','r'), 48 }, | |
| 819 | 819 | }; |
| 820 | 820 | |
| 821 | 821 | static int mov_get_rawvideo_codec_tag(AVFormatContext *s, MOVTrack *track) |
| @@ -130,7 +130,7 @@ static int mtv_read_header(AVFormatContext *s) · 129 unmodified lines | ||
| 130 | 130 | avpriv_set_pts_info(st, 64, 1, mtv->video_fps); |
| 131 | 131 | st->codec->codec_type = AVMEDIA_TYPE_VIDEO; |
| 132 | 132 | st->codec->codec_id = AV_CODEC_ID_RAWVIDEO; |
| 133 | − st->codec->pix_fmt = PIX_FMT_RGB565BE; | |
| 133 | + st->codec->pix_fmt = AV_PIX_FMT_RGB565BE; | |
| 134 | 134 | st->codec->width = mtv->img_width; |
| 135 | 135 | st->codec->height = mtv->img_height; |
| 136 | 136 | st->codec->sample_rate = mtv->video_fps; |
| @@ -56,13 +56,13 @@ const MXFCodecUL ff_mxf_codec_uls[] = { · 55 unmodified lines | ||
| 56 | 56 | }; |
| 57 | 57 | |
| 58 | 58 | const MXFCodecUL ff_mxf_pixel_format_uls[] = { |
| 59 | − { { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x0A,0x04,0x01,0x02,0x01,0x01,0x02,0x01,0x01 }, 16, PIX_FMT_UYVY422 }, | |
| 60 | − { { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x0A,0x04,0x01,0x02,0x01,0x01,0x02,0x01,0x02 }, 16, PIX_FMT_YUYV422 }, | |
| 61 | − { { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }, 0, PIX_FMT_NONE }, | |
| 59 | + { { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x0A,0x04,0x01,0x02,0x01,0x01,0x02,0x01,0x01 }, 16, AV_PIX_FMT_UYVY422 }, | |
| 60 | + { { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x0A,0x04,0x01,0x02,0x01,0x01,0x02,0x01,0x02 }, 16, AV_PIX_FMT_YUYV422 }, | |
| 61 | + { { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 }, 0, AV_PIX_FMT_NONE }, | |
| 62 | 62 | }; |
| 63 | 63 | |
| 64 | 64 | static const struct { |
| 65 | − enum PixelFormat pix_fmt; | |
| 65 | + enum AVPixelFormat pix_fmt; | |
| 66 | 66 | const char data[16]; |
| 67 | 67 | } ff_mxf_pixel_layouts[] = { |
| 68 | 68 | /** |
| @@ -74,24 +74,24 @@ static const struct { · 5 unmodified lines | ||
| 74 | 74 | * Note: Do not use these for encoding descriptors for little-endian formats until we |
| 75 | 75 | * get samples or official word from SMPTE on how/if those can be encoded. |
| 76 | 76 | */ |
| 77 | − {PIX_FMT_ABGR, {'A', 8, 'B', 8, 'G', 8, 'R', 8 }}, | |
| 78 | − {PIX_FMT_ARGB, {'A', 8, 'R', 8, 'G', 8, 'B', 8 }}, | |
| 79 | − {PIX_FMT_BGR24, {'B', 8, 'G', 8, 'R', 8 }}, | |
| 80 | − {PIX_FMT_BGRA, {'B', 8, 'G', 8, 'R', 8, 'A', 8 }}, | |
| 81 | − {PIX_FMT_RGB24, {'R', 8, 'G', 8, 'B', 8 }}, | |
| 82 | − {PIX_FMT_RGB444BE,{'F', 4, 'R', 4, 'G', 4, 'B', 4 }}, | |
| 83 | − {PIX_FMT_RGB48BE, {'R', 8, 'r', 8, 'G', 8, 'g', 8, 'B', 8, 'b', 8 }}, | |
| 84 | − {PIX_FMT_RGB48BE, {'R', 16, 'G', 16, 'B', 16 }}, | |
| 85 | − {PIX_FMT_RGB48LE, {'r', 8, 'R', 8, 'g', 8, 'G', 8, 'b', 8, 'B', 8 }}, | |
| 86 | − {PIX_FMT_RGB555BE,{'F', 1, 'R', 5, 'G', 5, 'B', 5 }}, | |
| 87 | − {PIX_FMT_RGB565BE,{'R', 5, 'G', 6, 'B', 5 }}, | |
| 88 | − {PIX_FMT_RGBA, {'R', 8, 'G', 8, 'B', 8, 'A', 8 }}, | |
| 89 | − {PIX_FMT_PAL8, {'P', 8 }}, | |
| 77 | + {AV_PIX_FMT_ABGR, {'A', 8, 'B', 8, 'G', 8, 'R', 8 }}, | |
| 78 | + {AV_PIX_FMT_ARGB, {'A', 8, 'R', 8, 'G', 8, 'B', 8 }}, | |
| 79 | + {AV_PIX_FMT_BGR24, {'B', 8, 'G', 8, 'R', 8 }}, | |
| 80 | + {AV_PIX_FMT_BGRA, {'B', 8, 'G', 8, 'R', 8, 'A', 8 }}, | |
| 81 | + {AV_PIX_FMT_RGB24, {'R', 8, 'G', 8, 'B', 8 }}, | |
| 82 | + {AV_PIX_FMT_RGB444BE,{'F', 4, 'R', 4, 'G', 4, 'B', 4 }}, | |
| 83 | + {AV_PIX_FMT_RGB48BE, {'R', 8, 'r', 8, 'G', 8, 'g', 8, 'B', 8, 'b', 8 }}, | |
| 84 | + {AV_PIX_FMT_RGB48BE, {'R', 16, 'G', 16, 'B', 16 }}, | |
| 85 | + {AV_PIX_FMT_RGB48LE, {'r', 8, 'R', 8, 'g', 8, 'G', 8, 'b', 8, 'B', 8 }}, | |
| 86 | + {AV_PIX_FMT_RGB555BE,{'F', 1, 'R', 5, 'G', 5, 'B', 5 }}, | |
| 87 | + {AV_PIX_FMT_RGB565BE,{'R', 5, 'G', 6, 'B', 5 }}, | |
| 88 | + {AV_PIX_FMT_RGBA, {'R', 8, 'G', 8, 'B', 8, 'A', 8 }}, | |
| 89 | + {AV_PIX_FMT_PAL8, {'P', 8 }}, | |
| 90 | 90 | }; |
| 91 | 91 | |
| 92 | 92 | static const int num_pixel_layouts = FF_ARRAY_ELEMS(ff_mxf_pixel_layouts); |
| 93 | 93 | |
| 94 | −int ff_mxf_decode_pixel_layout(const char pixel_layout[16], enum PixelFormat *pix_fmt) | |
| 94 | +int ff_mxf_decode_pixel_layout(const char pixel_layout[16], enum AVPixelFormat *pix_fmt) | |
| 95 | 95 | { |
| 96 | 96 | int x; |
| 97 | 97 | |
| @@ -70,7 +70,7 @@ extern const MXFCodecUL ff_mxf_data_definition_uls[]; · 69 unmodified lines | ||
| 70 | 70 | extern const MXFCodecUL ff_mxf_codec_uls[]; |
| 71 | 71 | extern const MXFCodecUL ff_mxf_pixel_format_uls[]; |
| 72 | 72 | |
| 73 | −int ff_mxf_decode_pixel_layout(const char pixel_layout[16], enum PixelFormat *pix_fmt); | |
| 73 | +int ff_mxf_decode_pixel_layout(const char pixel_layout[16], enum AVPixelFormat *pix_fmt); | |
| 74 | 74 | |
| 75 | 75 | #define PRINT_KEY(pc, s, x) av_dlog(pc, "%s %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X\n", s, \ |
| 76 | 76 | (x)[0], (x)[1], (x)[2], (x)[3], (x)[4], (x)[5], (x)[6], (x)[7], (x)[8], (x)[9], (x)[10], (x)[11], (x)[12], (x)[13], (x)[14], (x)[15]) |
| @@ -144,7 +144,7 @@ typedef struct { · 143 unmodified lines | ||
| 144 | 144 | int linked_track_id; |
| 145 | 145 | uint8_t *extradata; |
| 146 | 146 | int extradata_size; |
| 147 | − enum PixelFormat pix_fmt; | |
| 147 | + enum AVPixelFormat pix_fmt; | |
| 148 | 148 | } MXFDescriptor; |
| 149 | 149 | |
| 150 | 150 | typedef struct { |
| @@ -798,7 +798,7 @@ static void mxf_read_pixel_layout(AVIOContext *pb, MXFDescriptor *descriptor) · 647 unmodified lines | ||
| 798 | 798 | static int mxf_read_generic_descriptor(void *arg, AVIOContext *pb, int tag, int size, UID uid, int64_t klv_offset) |
| 799 | 799 | { |
| 800 | 800 | MXFDescriptor *descriptor = arg; |
| 801 | − descriptor->pix_fmt = PIX_FMT_NONE; | |
| 801 | + descriptor->pix_fmt = AV_PIX_FMT_NONE; | |
| 802 | 802 | switch(tag) { |
| 803 | 803 | case 0x3F01: |
| 804 | 804 | descriptor->sub_descriptors_count = avio_rb32(pb); |
| @@ -1501,17 +1501,17 @@ static int mxf_parse_structural_metadata(MXFContext *mxf) · 696 unmodified lines | ||
| 1501 | 1501 | } |
| 1502 | 1502 | if (st->codec->codec_id == AV_CODEC_ID_RAWVIDEO) { |
| 1503 | 1503 | st->codec->pix_fmt = descriptor->pix_fmt; |
| 1504 | − if (st->codec->pix_fmt == PIX_FMT_NONE) { | |
| 1504 | + if (st->codec->pix_fmt == AV_PIX_FMT_NONE) { | |
| 1505 | 1505 | pix_fmt_ul = mxf_get_codec_ul(ff_mxf_pixel_format_uls, |
| 1506 | 1506 | &descriptor->essence_codec_ul); |
| 1507 | 1507 | st->codec->pix_fmt = pix_fmt_ul->id; |
| 1508 | − if (st->codec->pix_fmt == PIX_FMT_NONE) { | |
| 1508 | + if (st->codec->pix_fmt == AV_PIX_FMT_NONE) { | |
| 1509 | 1509 | /* support files created before RP224v10 by defaulting to UYVY422 |
| 1510 | 1510 | if subsampling is 4:2:2 and component depth is 8-bit */ |
| 1511 | 1511 | if (descriptor->horiz_subsampling == 2 && |
| 1512 | 1512 | descriptor->vert_subsampling == 1 && |
| 1513 | 1513 | descriptor->component_depth == 8) { |
| 1514 | − st->codec->pix_fmt = PIX_FMT_UYVY422; | |
| 1514 | + st->codec->pix_fmt = AV_PIX_FMT_UYVY422; | |
| 1515 | 1515 | } |
| 1516 | 1516 | } |
| 1517 | 1517 | } |
| @@ -44,7 +44,7 @@ · 43 unmodified lines | ||
| 44 | 44 | #define STREAM_DURATION 5.0 |
| 45 | 45 | #define STREAM_FRAME_RATE 25 /* 25 images/s */ |
| 46 | 46 | #define STREAM_NB_FRAMES ((int)(STREAM_DURATION * STREAM_FRAME_RATE)) |
| 47 | −#define STREAM_PIX_FMT PIX_FMT_YUV420P /* default pix_fmt */ | |
| 47 | +#define STREAM_PIX_FMT AV_PIX_FMT_YUV420P /* default pix_fmt */ | |
| 48 | 48 | |
| 49 | 49 | static int sws_flags = SWS_BICUBIC; |
| 50 | 50 | |
| @@ -234,7 +234,7 @@ static AVStream *add_video_stream(AVFormatContext *oc, enum AVCodecID codec_id) · 183 unmodified lines | ||
| 234 | 234 | return st; |
| 235 | 235 | } |
| 236 | 236 | |
| 237 | −static AVFrame *alloc_picture(enum PixelFormat pix_fmt, int width, int height) | |
| 237 | +static AVFrame *alloc_picture(enum AVPixelFormat pix_fmt, int width, int height) | |
| 238 | 238 | { |
| 239 | 239 | AVFrame *picture; |
| 240 | 240 | uint8_t *picture_buf; |
| @@ -289,8 +289,8 @@ static void open_video(AVFormatContext *oc, AVStream *st) · 48 unmodified lines | ||
| 289 | 289 | * picture is needed too. It is then converted to the required |
| 290 | 290 | * output format. */ |
| 291 | 291 | tmp_picture = NULL; |
| 292 | − if (c->pix_fmt != PIX_FMT_YUV420P) { | |
| 293 | − tmp_picture = alloc_picture(PIX_FMT_YUV420P, c->width, c->height); | |
| 292 | + if (c->pix_fmt != AV_PIX_FMT_YUV420P) { | |
| 293 | + tmp_picture = alloc_picture(AV_PIX_FMT_YUV420P, c->width, c->height); | |
| 294 | 294 | if (!tmp_picture) { |
| 295 | 295 | fprintf(stderr, "Could not allocate temporary picture\n"); |
| 296 | 296 | exit(1); |
| @@ -333,12 +333,12 @@ static void write_video_frame(AVFormatContext *oc, AVStream *st) · 36 unmodified lines | ||
| 333 | 333 | * frames if using B-frames, so we get the last frames by |
| 334 | 334 | * passing the same picture again. */ |
| 335 | 335 | } else { |
| 336 | − if (c->pix_fmt != PIX_FMT_YUV420P) { | |
| 336 | + if (c->pix_fmt != AV_PIX_FMT_YUV420P) { | |
| 337 | 337 | /* as we only generate a YUV420P picture, we must convert it |
| 338 | 338 | * to the codec pixel format if needed */ |
| 339 | 339 | if (img_convert_ctx == NULL) { |
| 340 | 340 | img_convert_ctx = sws_getContext(c->width, c->height, |
| 341 | − PIX_FMT_YUV420P, | |
| 341 | + AV_PIX_FMT_YUV420P, | |
| 342 | 342 | c->width, c->height, |
| 343 | 343 | c->pix_fmt, |
| 344 | 344 | sws_flags, NULL, NULL, NULL); |
| @@ -69,14 +69,14 @@ int ff_raw_read_header(AVFormatContext *s) · 68 unmodified lines | ||
| 69 | 69 | case AVMEDIA_TYPE_VIDEO: { |
| 70 | 70 | FFRawVideoDemuxerContext *s1 = s->priv_data; |
| 71 | 71 | int width = 0, height = 0, ret = 0; |
| 72 | − enum PixelFormat pix_fmt; | |
| 72 | + enum AVPixelFormat pix_fmt; | |
| 73 | 73 | AVRational framerate; |
| 74 | 74 | |
| 75 | 75 | if (s1->video_size && (ret = av_parse_video_size(&width, &height, s1->video_size)) < 0) { |
| 76 | 76 | av_log(s, AV_LOG_ERROR, "Couldn't parse video size.\n"); |
| 77 | 77 | goto fail; |
| 78 | 78 | } |
| 79 | − if ((pix_fmt = av_get_pix_fmt(s1->pixel_format)) == PIX_FMT_NONE) { | |
| 79 | + if ((pix_fmt = av_get_pix_fmt(s1->pixel_format)) == AV_PIX_FMT_NONE) { | |
| 80 | 80 | av_log(s, AV_LOG_ERROR, "No such pixel format: %s.\n", s1->pixel_format); |
| 81 | 81 | ret = AVERROR(EINVAL); |
| 82 | 82 | goto fail; |
| @@ -313,11 +313,11 @@ static int xiph_parse_fmtp_pair(AVStream* stream, · 312 unmodified lines | ||
| 313 | 313 | |
| 314 | 314 | if (!strcmp(attr, "sampling")) { |
| 315 | 315 | if (!strcmp(value, "YCbCr-4:2:0")) { |
| 316 | − codec->pix_fmt = PIX_FMT_YUV420P; | |
| 316 | + codec->pix_fmt = AV_PIX_FMT_YUV420P; | |
| 317 | 317 | } else if (!strcmp(value, "YCbCr-4:4:2")) { |
| 318 | − codec->pix_fmt = PIX_FMT_YUV422P; | |
| 318 | + codec->pix_fmt = AV_PIX_FMT_YUV422P; | |
| 319 | 319 | } else if (!strcmp(value, "YCbCr-4:4:4")) { |
| 320 | − codec->pix_fmt = PIX_FMT_YUV444P; | |
| 320 | + codec->pix_fmt = AV_PIX_FMT_YUV444P; | |
| 321 | 321 | } else { |
| 322 | 322 | av_log(codec, AV_LOG_ERROR, |
| 323 | 323 | "Unsupported pixel format %s\n", attr); |
| @@ -29,7 +29,7 @@ void ff_rtp_send_jpeg(AVFormatContext *s1, const uint8_t *buf, int size) · 28 unmodified lines | ||
| 29 | 29 | RTPMuxContext *s = s1->priv_data; |
| 30 | 30 | const uint8_t *qtables = NULL; |
| 31 | 31 | int nb_qtables = 0; |
| 32 | − uint8_t type = 1; /* default pixel format is PIX_FMT_YUVJ420P */ | |
| 32 | + uint8_t type = 1; /* default pixel format is AV_PIX_FMT_YUVJ420P */ | |
| 33 | 33 | uint8_t w, h; |
| 34 | 34 | uint8_t *p; |
| 35 | 35 | int off = 0; /* fragment offset of the current JPEG frame */ |
| @@ -44,9 +44,9 @@ void ff_rtp_send_jpeg(AVFormatContext *s1, const uint8_t *buf, int size) · 8 unmodified lines | ||
| 44 | 44 | h = s1->streams[0]->codec->height >> 3; |
| 45 | 45 | |
| 46 | 46 | /* check if pixel format is not the normal 420 case */ |
| 47 | − if (s1->streams[0]->codec->pix_fmt == PIX_FMT_YUVJ422P) { | |
| 47 | + if (s1->streams[0]->codec->pix_fmt == AV_PIX_FMT_YUVJ422P) { | |
| 48 | 48 | type = 0; |
| 49 | − } else if (s1->streams[0]->codec->pix_fmt == PIX_FMT_YUVJ420P) { | |
| 49 | + } else if (s1->streams[0]->codec->pix_fmt == AV_PIX_FMT_YUVJ420P) { | |
| 50 | 50 | type = 1; |
| 51 | 51 | } else { |
| 52 | 52 | av_log(s1, AV_LOG_ERROR, "Unsupported pixel format\n"); |
| @@ -521,13 +521,13 @@ static char *sdp_write_media_attributes(char *buff, int size, AVCodecContext *c, · 520 unmodified lines | ||
| 521 | 521 | return NULL; |
| 522 | 522 | |
| 523 | 523 | switch (c->pix_fmt) { |
| 524 | − case PIX_FMT_YUV420P: | |
| 524 | + case AV_PIX_FMT_YUV420P: | |
| 525 | 525 | pix_fmt = "YCbCr-4:2:0"; |
| 526 | 526 | break; |
| 527 | − case PIX_FMT_YUV422P: | |
| 527 | + case AV_PIX_FMT_YUV422P: | |
| 528 | 528 | pix_fmt = "YCbCr-4:2:2"; |
| 529 | 529 | break; |
| 530 | − case PIX_FMT_YUV444P: | |
| 530 | + case AV_PIX_FMT_YUV444P: | |
| 531 | 531 | pix_fmt = "YCbCr-4:4:4"; |
| 532 | 532 | break; |
| 533 | 533 | default: |
| @@ -150,7 +150,7 @@ static int film_read_header(AVFormatContext *s) · 149 unmodified lines | ||
| 150 | 150 | |
| 151 | 151 | if (film->video_type == AV_CODEC_ID_RAWVIDEO) { |
| 152 | 152 | if (scratch[20] == 24) { |
| 153 | − st->codec->pix_fmt = PIX_FMT_RGB24; | |
| 153 | + st->codec->pix_fmt = AV_PIX_FMT_RGB24; | |
| 154 | 154 | } else { |
| 155 | 155 | av_log(s, AV_LOG_ERROR, "raw video is using unhandled %dbpp\n", scratch[20]); |
| 156 | 156 | return -1; |
| @@ -124,7 +124,7 @@ static int siff_parse_vbv1(AVFormatContext *s, SIFFContext *c, AVIOContext *pb) · 123 unmodified lines | ||
| 124 | 124 | st->codec->codec_tag = MKTAG('V', 'B', 'V', '1'); |
| 125 | 125 | st->codec->width = width; |
| 126 | 126 | st->codec->height = height; |
| 127 | − st->codec->pix_fmt = PIX_FMT_PAL8; | |
| 127 | + st->codec->pix_fmt = AV_PIX_FMT_PAL8; | |
| 128 | 128 | avpriv_set_pts_info(st, 16, 1, 12); |
| 129 | 129 | |
| 130 | 130 | c->cur_frame = 0; |
| @@ -161,7 +161,7 @@ static int smacker_read_header(AVFormatContext *s) · 160 unmodified lines | ||
| 161 | 161 | smk->videoindex = st->index; |
| 162 | 162 | st->codec->width = smk->width; |
| 163 | 163 | st->codec->height = smk->height; |
| 164 | − st->codec->pix_fmt = PIX_FMT_PAL8; | |
| 164 | + st->codec->pix_fmt = AV_PIX_FMT_PAL8; | |
| 165 | 165 | st->codec->codec_type = AVMEDIA_TYPE_VIDEO; |
| 166 | 166 | st->codec->codec_id = AV_CODEC_ID_SMACKVIDEO; |
| 167 | 167 | st->codec->codec_tag = smk->magic; |
| @@ -124,7 +124,7 @@ static int tmv_read_header(AVFormatContext *s) · 123 unmodified lines | ||
| 124 | 124 | |
| 125 | 125 | vst->codec->codec_type = AVMEDIA_TYPE_VIDEO; |
| 126 | 126 | vst->codec->codec_id = AV_CODEC_ID_TMV; |
| 127 | − vst->codec->pix_fmt = PIX_FMT_PAL8; | |
| 127 | + vst->codec->pix_fmt = AV_PIX_FMT_PAL8; | |
| 128 | 128 | vst->codec->width = char_cols * 8; |
| 129 | 129 | vst->codec->height = char_rows * 8; |
| 130 | 130 | avpriv_set_pts_info(vst, 32, fps.den, fps.num); |
| @@ -2018,7 +2018,7 @@ static int has_codec_parameters(AVStream *st) · 2017 unmodified lines | ||
| 2018 | 2018 | break; |
| 2019 | 2019 | case AVMEDIA_TYPE_VIDEO: |
| 2020 | 2020 | val = avctx->width; |
| 2021 | − if (st->info->found_decoder >= 0 && avctx->pix_fmt == PIX_FMT_NONE) | |
| 2021 | + if (st->info->found_decoder >= 0 && avctx->pix_fmt == AV_PIX_FMT_NONE) | |
| 2022 | 2022 | return 0; |
| 2023 | 2023 | break; |
| 2024 | 2024 | default: |
| @@ -57,23 +57,23 @@ static int yuv4_generate_header(AVFormatContext *s, char* buf) · 56 unmodified lines | ||
| 57 | 57 | inter = st->codec->coded_frame->top_field_first ? 't' : 'b'; |
| 58 | 58 | |
| 59 | 59 | switch (st->codec->pix_fmt) { |
| 60 | − case PIX_FMT_GRAY8: | |
| 60 | + case AV_PIX_FMT_GRAY8: | |
| 61 | 61 | colorspace = " Cmono"; |
| 62 | 62 | break; |
| 63 | − case PIX_FMT_YUV411P: | |
| 63 | + case AV_PIX_FMT_YUV411P: | |
| 64 | 64 | colorspace = " C411 XYSCSS=411"; |
| 65 | 65 | break; |
| 66 | − case PIX_FMT_YUV420P: | |
| 66 | + case AV_PIX_FMT_YUV420P: | |
| 67 | 67 | switch (st->codec->chroma_sample_location) { |
| 68 | 68 | case AVCHROMA_LOC_TOPLEFT: colorspace = " C420paldv XYSCSS=420PALDV"; break; |
| 69 | 69 | case AVCHROMA_LOC_LEFT: colorspace = " C420mpeg2 XYSCSS=420MPEG2"; break; |
| 70 | 70 | default: colorspace = " C420jpeg XYSCSS=420JPEG"; break; |
| 71 | 71 | } |
| 72 | 72 | break; |
| 73 | − case PIX_FMT_YUV422P: | |
| 73 | + case AV_PIX_FMT_YUV422P: | |
| 74 | 74 | colorspace = " C422 XYSCSS=422"; |
| 75 | 75 | break; |
| 76 | − case PIX_FMT_YUV444P: | |
| 76 | + case AV_PIX_FMT_YUV444P: | |
| 77 | 77 | colorspace = " C444 XYSCSS=444"; |
| 78 | 78 | break; |
| 79 | 79 | } |
| @@ -126,7 +126,7 @@ static int yuv4_write_packet(AVFormatContext *s, AVPacket *pkt) · 46 unmodified lines | ||
| 126 | 126 | ptr += picture->linesize[0]; |
| 127 | 127 | } |
| 128 | 128 | |
| 129 | − if (st->codec->pix_fmt != PIX_FMT_GRAY8) { | |
| 129 | + if (st->codec->pix_fmt != AV_PIX_FMT_GRAY8) { | |
| 130 | 130 | // Adjust for smaller Cb and Cr planes |
| 131 | 131 | avcodec_get_chroma_sub_sample(st->codec->pix_fmt, &h_chroma_shift, |
| 132 | 132 | &v_chroma_shift); |
| @@ -155,13 +155,13 @@ static int yuv4_write_header(AVFormatContext *s) · 22 unmodified lines | ||
| 155 | 155 | if (s->nb_streams != 1) |
| 156 | 156 | return AVERROR(EIO); |
| 157 | 157 | |
| 158 | − if (s->streams[0]->codec->pix_fmt == PIX_FMT_YUV411P) { | |
| 158 | + if (s->streams[0]->codec->pix_fmt == AV_PIX_FMT_YUV411P) { | |
| 159 | 159 | av_log(s, AV_LOG_ERROR, "Warning: generating rarely used 4:1:1 YUV " |
| 160 | 160 | "stream, some mjpegtools might not work.\n"); |
| 161 | − } else if ((s->streams[0]->codec->pix_fmt != PIX_FMT_YUV420P) && | |
| 162 | − (s->streams[0]->codec->pix_fmt != PIX_FMT_YUV422P) && | |
| 163 | − (s->streams[0]->codec->pix_fmt != PIX_FMT_GRAY8) && | |
| 164 | − (s->streams[0]->codec->pix_fmt != PIX_FMT_YUV444P)) { | |
| 161 | + } else if ((s->streams[0]->codec->pix_fmt != AV_PIX_FMT_YUV420P) && | |
| 162 | + (s->streams[0]->codec->pix_fmt != AV_PIX_FMT_YUV422P) && | |
| 163 | + (s->streams[0]->codec->pix_fmt != AV_PIX_FMT_GRAY8) && | |
| 164 | + (s->streams[0]->codec->pix_fmt != AV_PIX_FMT_YUV444P)) { | |
| 165 | 165 | av_log(s, AV_LOG_ERROR, "ERROR: yuv4mpeg only handles yuv444p, " |
| 166 | 166 | "yuv422p, yuv420p, yuv411p and gray pixel formats. " |
| 167 | 167 | "Use -pix_fmt to select one.\n"); |
| @@ -199,7 +199,7 @@ static int yuv4_read_header(AVFormatContext *s) · 31 unmodified lines | ||
| 199 | 199 | AVIOContext *pb = s->pb; |
| 200 | 200 | int width = -1, height = -1, raten = 0, |
| 201 | 201 | rated = 0, aspectn = 0, aspectd = 0; |
| 202 | − enum PixelFormat pix_fmt = PIX_FMT_NONE, alt_pix_fmt = PIX_FMT_NONE; | |
| 202 | + enum AVPixelFormat pix_fmt = AV_PIX_FMT_NONE, alt_pix_fmt = AV_PIX_FMT_NONE; | |
| 203 | 203 | enum AVChromaLocation chroma_sample_location = AVCHROMA_LOC_UNSPECIFIED; |
| 204 | 204 | AVStream *st; |
| 205 | 205 | struct frame_attributes *s1 = s->priv_data; |
| @@ -236,29 +236,29 @@ static int yuv4_read_header(AVFormatContext *s) · 30 unmodified lines | ||
| 236 | 236 | break; |
| 237 | 237 | case 'C': // Color space |
| 238 | 238 | if (strncmp("420jpeg", tokstart, 7) == 0) { |
| 239 | − pix_fmt = PIX_FMT_YUV420P; | |
| 239 | + pix_fmt = AV_PIX_FMT_YUV420P; | |
| 240 | 240 | chroma_sample_location = AVCHROMA_LOC_CENTER; |
| 241 | 241 | } else if (strncmp("420mpeg2", tokstart, 8) == 0) { |
| 242 | − pix_fmt = PIX_FMT_YUV420P; | |
| 242 | + pix_fmt = AV_PIX_FMT_YUV420P; | |
| 243 | 243 | chroma_sample_location = AVCHROMA_LOC_LEFT; |
| 244 | 244 | } else if (strncmp("420paldv", tokstart, 8) == 0) { |
| 245 | − pix_fmt = PIX_FMT_YUV420P; | |
| 245 | + pix_fmt = AV_PIX_FMT_YUV420P; | |
| 246 | 246 | chroma_sample_location = AVCHROMA_LOC_TOPLEFT; |
| 247 | 247 | } else if (strncmp("420", tokstart, 3) == 0) { |
| 248 | − pix_fmt = PIX_FMT_YUV420P; | |
| 248 | + pix_fmt = AV_PIX_FMT_YUV420P; | |
| 249 | 249 | chroma_sample_location = AVCHROMA_LOC_CENTER; |
| 250 | 250 | } else if (strncmp("411", tokstart, 3) == 0) |
| 251 | − pix_fmt = PIX_FMT_YUV411P; | |
| 251 | + pix_fmt = AV_PIX_FMT_YUV411P; | |
| 252 | 252 | else if (strncmp("422", tokstart, 3) == 0) |
| 253 | − pix_fmt = PIX_FMT_YUV422P; | |
| 253 | + pix_fmt = AV_PIX_FMT_YUV422P; | |
| 254 | 254 | else if (strncmp("444alpha", tokstart, 8) == 0 ) { |
| 255 | 255 | av_log(s, AV_LOG_ERROR, "Cannot handle 4:4:4:4 " |
| 256 | 256 | "YUV4MPEG stream.\n"); |
| 257 | 257 | return -1; |
| 258 | 258 | } else if (strncmp("444", tokstart, 3) == 0) |
| 259 | − pix_fmt = PIX_FMT_YUV444P; | |
| 259 | + pix_fmt = AV_PIX_FMT_YUV444P; | |
| 260 | 260 | else if (strncmp("mono", tokstart, 4) == 0) { |
| 261 | − pix_fmt = PIX_FMT_GRAY8; | |
| 261 | + pix_fmt = AV_PIX_FMT_GRAY8; | |
| 262 | 262 | } else { |
| 263 | 263 | av_log(s, AV_LOG_ERROR, "YUV4MPEG stream contains an unknown " |
| 264 | 264 | "pixel format.\n"); |
| @@ -306,17 +306,17 @@ static int yuv4_read_header(AVFormatContext *s) · 41 unmodified lines | ||
| 306 | 306 | // Older nonstandard pixel format representation |
| 307 | 307 | tokstart += 6; |
| 308 | 308 | if (strncmp("420JPEG", tokstart, 7) == 0) |
| 309 | − alt_pix_fmt = PIX_FMT_YUV420P; | |
| 309 | + alt_pix_fmt = AV_PIX_FMT_YUV420P; | |
| 310 | 310 | else if (strncmp("420MPEG2", tokstart, 8) == 0) |
| 311 | − alt_pix_fmt = PIX_FMT_YUV420P; | |
| 311 | + alt_pix_fmt = AV_PIX_FMT_YUV420P; | |
| 312 | 312 | else if (strncmp("420PALDV", tokstart, 8) == 0) |
| 313 | − alt_pix_fmt = PIX_FMT_YUV420P; | |
| 313 | + alt_pix_fmt = AV_PIX_FMT_YUV420P; | |
| 314 | 314 | else if (strncmp("411", tokstart, 3) == 0) |
| 315 | − alt_pix_fmt = PIX_FMT_YUV411P; | |
| 315 | + alt_pix_fmt = AV_PIX_FMT_YUV411P; | |
| 316 | 316 | else if (strncmp("422", tokstart, 3) == 0) |
| 317 | − alt_pix_fmt = PIX_FMT_YUV422P; | |
| 317 | + alt_pix_fmt = AV_PIX_FMT_YUV422P; | |
| 318 | 318 | else if (strncmp("444", tokstart, 3) == 0) |
| 319 | − alt_pix_fmt = PIX_FMT_YUV444P; | |
| 319 | + alt_pix_fmt = AV_PIX_FMT_YUV444P; | |
| 320 | 320 | } |
| 321 | 321 | while (tokstart < header_end && *tokstart != 0x20) |
| 322 | 322 | tokstart++; |
| @@ -329,9 +329,9 @@ static int yuv4_read_header(AVFormatContext *s) · 6 unmodified lines | ||
| 329 | 329 | return -1; |
| 330 | 330 | } |
| 331 | 331 | |
| 332 | − if (pix_fmt == PIX_FMT_NONE) { | |
| 333 | − if (alt_pix_fmt == PIX_FMT_NONE) | |
| 334 | − pix_fmt = PIX_FMT_YUV420P; | |
| 332 | + if (pix_fmt == AV_PIX_FMT_NONE) { | |
| 333 | + if (alt_pix_fmt == AV_PIX_FMT_NONE) | |
| 334 | + pix_fmt = AV_PIX_FMT_YUV420P; | |
| 335 | 335 | else |
| 336 | 336 | pix_fmt = alt_pix_fmt; |
| 337 | 337 | } |
| @@ -45,7 +45,7 @@ void av_image_fill_max_pixsteps(int max_pixsteps[4], int max_pixstep_comps[4], · 44 unmodified lines | ||
| 45 | 45 | } |
| 46 | 46 | } |
| 47 | 47 | |
| 48 | −int av_image_get_linesize(enum PixelFormat pix_fmt, int width, int plane) | |
| 48 | +int av_image_get_linesize(enum AVPixelFormat pix_fmt, int width, int plane) | |
| 49 | 49 | { |
| 50 | 50 | const AVPixFmtDescriptor *desc = &av_pix_fmt_descriptors[pix_fmt]; |
| 51 | 51 | int max_step [4]; /* max pixel step for each plane */ |
| @@ -60,7 +60,7 @@ int av_image_get_linesize(enum PixelFormat pix_fmt, int width, int plane) · 8 unmodified lines | ||
| 60 | 60 | return max_step[plane] * (((width + (1 << s) - 1)) >> s); |
| 61 | 61 | } |
| 62 | 62 | |
| 63 | −int av_image_fill_linesizes(int linesizes[4], enum PixelFormat pix_fmt, int width) | |
| 63 | +int av_image_fill_linesizes(int linesizes[4], enum AVPixelFormat pix_fmt, int width) | |
| 64 | 64 | { |
| 65 | 65 | int i; |
| 66 | 66 | const AVPixFmtDescriptor *desc = &av_pix_fmt_descriptors[pix_fmt]; |
| @@ -69,7 +69,7 @@ int av_image_fill_linesizes(int linesizes[4], enum PixelFormat pix_fmt, int widt · 2 unmodified lines | ||
| 69 | 69 | |
| 70 | 70 | memset(linesizes, 0, 4*sizeof(linesizes[0])); |
| 71 | 71 | |
| 72 | − if ((unsigned)pix_fmt >= PIX_FMT_NB || desc->flags & PIX_FMT_HWACCEL) | |
| 72 | + if ((unsigned)pix_fmt >= AV_PIX_FMT_NB || desc->flags & PIX_FMT_HWACCEL) | |
| 73 | 73 | return AVERROR(EINVAL); |
| 74 | 74 | |
| 75 | 75 | if (desc->flags & PIX_FMT_BITSTREAM) { |
| @@ -91,7 +91,7 @@ int av_image_fill_linesizes(int linesizes[4], enum PixelFormat pix_fmt, int widt · 15 unmodified lines | ||
| 91 | 91 | return 0; |
| 92 | 92 | } |
| 93 | 93 | |
| 94 | −int av_image_fill_pointers(uint8_t *data[4], enum PixelFormat pix_fmt, int height, | |
| 94 | +int av_image_fill_pointers(uint8_t *data[4], enum AVPixelFormat pix_fmt, int height, | |
| 95 | 95 | uint8_t *ptr, const int linesizes[4]) |
| 96 | 96 | { |
| 97 | 97 | int i, total_size, size[4] = { 0 }, has_plane[4] = { 0 }; |
| @@ -99,7 +99,7 @@ int av_image_fill_pointers(uint8_t *data[4], enum PixelFormat pix_fmt, int heigh · 1 unmodified line | ||
| 99 | 99 | const AVPixFmtDescriptor *desc = &av_pix_fmt_descriptors[pix_fmt]; |
| 100 | 100 | memset(data , 0, sizeof(data[0])*4); |
| 101 | 101 | |
| 102 | − if ((unsigned)pix_fmt >= PIX_FMT_NB || desc->flags & PIX_FMT_HWACCEL) | |
| 102 | + if ((unsigned)pix_fmt >= AV_PIX_FMT_NB || desc->flags & PIX_FMT_HWACCEL) | |
| 103 | 103 | return AVERROR(EINVAL); |
| 104 | 104 | |
| 105 | 105 | data[0] = ptr; |
| @@ -133,7 +133,7 @@ int av_image_fill_pointers(uint8_t *data[4], enum PixelFormat pix_fmt, int heigh · 27 unmodified lines | ||
| 133 | 133 | return total_size; |
| 134 | 134 | } |
| 135 | 135 | |
| 136 | −int ff_set_systematic_pal2(uint32_t pal[256], enum PixelFormat pix_fmt) | |
| 136 | +int ff_set_systematic_pal2(uint32_t pal[256], enum AVPixelFormat pix_fmt) | |
| 137 | 137 | { |
| 138 | 138 | int i; |
| 139 | 139 | |
| @@ -141,27 +141,27 @@ int ff_set_systematic_pal2(uint32_t pal[256], enum PixelFormat pix_fmt) · 1 unmodified line | ||
| 141 | 141 | int r, g, b; |
| 142 | 142 | |
| 143 | 143 | switch (pix_fmt) { |
| 144 | − case PIX_FMT_RGB8: | |
| 144 | + case AV_PIX_FMT_RGB8: | |
| 145 | 145 | r = (i>>5 )*36; |
| 146 | 146 | g = ((i>>2)&7)*36; |
| 147 | 147 | b = (i&3 )*85; |
| 148 | 148 | break; |
| 149 | − case PIX_FMT_BGR8: | |
| 149 | + case AV_PIX_FMT_BGR8: | |
| 150 | 150 | b = (i>>6 )*85; |
| 151 | 151 | g = ((i>>3)&7)*36; |
| 152 | 152 | r = (i&7 )*36; |
| 153 | 153 | break; |
| 154 | − case PIX_FMT_RGB4_BYTE: | |
| 154 | + case AV_PIX_FMT_RGB4_BYTE: | |
| 155 | 155 | r = (i>>3 )*255; |
| 156 | 156 | g = ((i>>1)&3)*85; |
| 157 | 157 | b = (i&1 )*255; |
| 158 | 158 | break; |
| 159 | − case PIX_FMT_BGR4_BYTE: | |
| 159 | + case AV_PIX_FMT_BGR4_BYTE: | |
| 160 | 160 | b = (i>>3 )*255; |
| 161 | 161 | g = ((i>>1)&3)*85; |
| 162 | 162 | r = (i&1 )*255; |
| 163 | 163 | break; |
| 164 | − case PIX_FMT_GRAY8: | |
| 164 | + case AV_PIX_FMT_GRAY8: | |
| 165 | 165 | r = b = g = i; |
| 166 | 166 | break; |
| 167 | 167 | default: |
| @@ -174,7 +174,7 @@ int ff_set_systematic_pal2(uint32_t pal[256], enum PixelFormat pix_fmt) · 6 unmodified lines | ||
| 174 | 174 | } |
| 175 | 175 | |
| 176 | 176 | int av_image_alloc(uint8_t *pointers[4], int linesizes[4], |
| 177 | − int w, int h, enum PixelFormat pix_fmt, int align) | |
| 177 | + int w, int h, enum AVPixelFormat pix_fmt, int align) | |
| 178 | 178 | { |
| 179 | 179 | int i, ret; |
| 180 | 180 | uint8_t *buf; |
| @@ -237,7 +237,7 @@ void av_image_copy_plane(uint8_t *dst, int dst_linesize, · 56 unmodified lines | ||
| 237 | 237 | |
| 238 | 238 | void av_image_copy(uint8_t *dst_data[4], int dst_linesizes[4], |
| 239 | 239 | const uint8_t *src_data[4], const int src_linesizes[4], |
| 240 | − enum PixelFormat pix_fmt, int width, int height) | |
| 240 | + enum AVPixelFormat pix_fmt, int width, int height) | |
| 241 | 241 | { |
| 242 | 242 | const AVPixFmtDescriptor *desc = &av_pix_fmt_descriptors[pix_fmt]; |
| 243 | 243 | |
| @@ -55,7 +55,7 @@ void av_image_fill_max_pixsteps(int max_pixsteps[4], int max_pixstep_comps[4], · 54 unmodified lines | ||
| 55 | 55 | * |
| 56 | 56 | * @return the computed size in bytes |
| 57 | 57 | */ |
| 58 | −int av_image_get_linesize(enum PixelFormat pix_fmt, int width, int plane); | |
| 58 | +int av_image_get_linesize(enum AVPixelFormat pix_fmt, int width, int plane); | |
| 59 | 59 | |
| 60 | 60 | /** |
| 61 | 61 | * Fill plane linesizes for an image with pixel format pix_fmt and |
| @@ -64,7 +64,7 @@ int av_image_get_linesize(enum PixelFormat pix_fmt, int width, int plane); · 2 unmodified lines | ||
| 64 | 64 | * @param linesizes array to be filled with the linesize for each plane |
| 65 | 65 | * @return >= 0 in case of success, a negative error code otherwise |
| 66 | 66 | */ |
| 67 | −int av_image_fill_linesizes(int linesizes[4], enum PixelFormat pix_fmt, int width); | |
| 67 | +int av_image_fill_linesizes(int linesizes[4], enum AVPixelFormat pix_fmt, int width); | |
| 68 | 68 | |
| 69 | 69 | /** |
| 70 | 70 | * Fill plane data pointers for an image with pixel format pix_fmt and |
| @@ -77,7 +77,7 @@ int av_image_fill_linesizes(int linesizes[4], enum PixelFormat pix_fmt, int widt · 6 unmodified lines | ||
| 77 | 77 | * @return the size in bytes required for the image buffer, a negative |
| 78 | 78 | * error code in case of failure |
| 79 | 79 | */ |
| 80 | −int av_image_fill_pointers(uint8_t *data[4], enum PixelFormat pix_fmt, int height, | |
| 80 | +int av_image_fill_pointers(uint8_t *data[4], enum AVPixelFormat pix_fmt, int height, | |
| 81 | 81 | uint8_t *ptr, const int linesizes[4]); |
| 82 | 82 | |
| 83 | 83 | /** |
| @@ -91,7 +91,7 @@ int av_image_fill_pointers(uint8_t *data[4], enum PixelFormat pix_fmt, int heigh · 7 unmodified lines | ||
| 91 | 91 | * error code in case of failure |
| 92 | 92 | */ |
| 93 | 93 | int av_image_alloc(uint8_t *pointers[4], int linesizes[4], |
| 94 | − int w, int h, enum PixelFormat pix_fmt, int align); | |
| 94 | + int w, int h, enum AVPixelFormat pix_fmt, int align); | |
| 95 | 95 | |
| 96 | 96 | /** |
| 97 | 97 | * Copy image plane from src to dst. |
| @@ -114,7 +114,7 @@ void av_image_copy_plane(uint8_t *dst, int dst_linesize, · 16 unmodified lines | ||
| 114 | 114 | */ |
| 115 | 115 | void av_image_copy(uint8_t *dst_data[4], int dst_linesizes[4], |
| 116 | 116 | const uint8_t *src_data[4], const int src_linesizes[4], |
| 117 | − enum PixelFormat pix_fmt, int width, int height); | |
| 117 | + enum AVPixelFormat pix_fmt, int width, int height); | |
| 118 | 118 | |
| 119 | 119 | /** |
| 120 | 120 | * Check if the given dimension of an image is valid, meaning that all |
| @@ -128,7 +128,7 @@ void av_image_copy(uint8_t *dst_data[4], int dst_linesizes[4], · 7 unmodified lines | ||
| 128 | 128 | */ |
| 129 | 129 | int av_image_check_size(unsigned int w, unsigned int h, int log_offset, void *log_ctx); |
| 130 | 130 | |
| 131 | −int ff_set_systematic_pal2(uint32_t pal[256], enum PixelFormat pix_fmt); | |
| 131 | +int ff_set_systematic_pal2(uint32_t pal[256], enum AVPixelFormat pix_fmt); | |
| 132 | 132 | |
| 133 | 133 | /** |
| 134 | 134 | * @} |
| @@ -122,8 +122,8 @@ void av_write_image_line(const uint16_t *src, · 121 unmodified lines | ||
| 122 | 122 | } |
| 123 | 123 | } |
| 124 | 124 | |
| 125 | −const AVPixFmtDescriptor av_pix_fmt_descriptors[PIX_FMT_NB] = { | |
| 126 | − [PIX_FMT_YUV420P] = { | |
| 125 | +const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = { | |
| 126 | + [AV_PIX_FMT_YUV420P] = { | |
| 127 | 127 | .name = "yuv420p", |
| 128 | 128 | .nb_components = 3, |
| 129 | 129 | .log2_chroma_w = 1, |
| @@ -135,7 +135,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[PIX_FMT_NB] = { · 5 unmodified lines | ||
| 135 | 135 | }, |
| 136 | 136 | .flags = PIX_FMT_PLANAR, |
| 137 | 137 | }, |
| 138 | − [PIX_FMT_YUYV422] = { | |
| 138 | + [AV_PIX_FMT_YUYV422] = { | |
| 139 | 139 | .name = "yuyv422", |
| 140 | 140 | .nb_components = 3, |
| 141 | 141 | .log2_chroma_w = 1, |
| @@ -146,7 +146,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[PIX_FMT_NB] = { · 4 unmodified lines | ||
| 146 | 146 | { 0, 3, 4, 0, 7 }, /* V */ |
| 147 | 147 | }, |
| 148 | 148 | }, |
| 149 | − [PIX_FMT_RGB24] = { | |
| 149 | + [AV_PIX_FMT_RGB24] = { | |
| 150 | 150 | .name = "rgb24", |
| 151 | 151 | .nb_components = 3, |
| 152 | 152 | .log2_chroma_w = 0, |
| @@ -158,7 +158,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[PIX_FMT_NB] = { · 5 unmodified lines | ||
| 158 | 158 | }, |
| 159 | 159 | .flags = PIX_FMT_RGB, |
| 160 | 160 | }, |
| 161 | − [PIX_FMT_BGR24] = { | |
| 161 | + [AV_PIX_FMT_BGR24] = { | |
| 162 | 162 | .name = "bgr24", |
| 163 | 163 | .nb_components = 3, |
| 164 | 164 | .log2_chroma_w = 0, |
| @@ -170,7 +170,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[PIX_FMT_NB] = { · 5 unmodified lines | ||
| 170 | 170 | }, |
| 171 | 171 | .flags = PIX_FMT_RGB, |
| 172 | 172 | }, |
| 173 | − [PIX_FMT_YUV422P] = { | |
| 173 | + [AV_PIX_FMT_YUV422P] = { | |
| 174 | 174 | .name = "yuv422p", |
| 175 | 175 | .nb_components = 3, |
| 176 | 176 | .log2_chroma_w = 1, |
| @@ -182,7 +182,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[PIX_FMT_NB] = { · 5 unmodified lines | ||
| 182 | 182 | }, |
| 183 | 183 | .flags = PIX_FMT_PLANAR, |
| 184 | 184 | }, |
| 185 | − [PIX_FMT_YUV444P] = { | |
| 185 | + [AV_PIX_FMT_YUV444P] = { | |
| 186 | 186 | .name = "yuv444p", |
| 187 | 187 | .nb_components = 3, |
| 188 | 188 | .log2_chroma_w = 0, |
| @@ -194,7 +194,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[PIX_FMT_NB] = { · 5 unmodified lines | ||
| 194 | 194 | }, |
| 195 | 195 | .flags = PIX_FMT_PLANAR, |
| 196 | 196 | }, |
| 197 | − [PIX_FMT_YUV410P] = { | |
| 197 | + [AV_PIX_FMT_YUV410P] = { | |
| 198 | 198 | .name = "yuv410p", |
| 199 | 199 | .nb_components = 3, |
| 200 | 200 | .log2_chroma_w = 2, |
| @@ -206,7 +206,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[PIX_FMT_NB] = { · 5 unmodified lines | ||
| 206 | 206 | }, |
| 207 | 207 | .flags = PIX_FMT_PLANAR, |
| 208 | 208 | }, |
| 209 | − [PIX_FMT_YUV411P] = { | |
| 209 | + [AV_PIX_FMT_YUV411P] = { | |
| 210 | 210 | .name = "yuv411p", |
| 211 | 211 | .nb_components = 3, |
| 212 | 212 | .log2_chroma_w = 2, |
| @@ -218,7 +218,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[PIX_FMT_NB] = { · 5 unmodified lines | ||
| 218 | 218 | }, |
| 219 | 219 | .flags = PIX_FMT_PLANAR, |
| 220 | 220 | }, |
| 221 | − [PIX_FMT_GRAY8] = { | |
| 221 | + [AV_PIX_FMT_GRAY8] = { | |
| 222 | 222 | .name = "gray", |
| 223 | 223 | .nb_components = 1, |
| 224 | 224 | .log2_chroma_w = 0, |
| @@ -227,7 +227,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[PIX_FMT_NB] = { · 2 unmodified lines | ||
| 227 | 227 | { 0, 0, 1, 0, 7 }, /* Y */ |
| 228 | 228 | }, |
| 229 | 229 | }, |
| 230 | − [PIX_FMT_MONOWHITE] = { | |
| 230 | + [AV_PIX_FMT_MONOWHITE] = { | |
| 231 | 231 | .name = "monow", |
| 232 | 232 | .nb_components = 1, |
| 233 | 233 | .log2_chroma_w = 0, |
| @@ -237,7 +237,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[PIX_FMT_NB] = { · 3 unmodified lines | ||
| 237 | 237 | }, |
| 238 | 238 | .flags = PIX_FMT_BITSTREAM, |
| 239 | 239 | }, |
| 240 | − [PIX_FMT_MONOBLACK] = { | |
| 240 | + [AV_PIX_FMT_MONOBLACK] = { | |
| 241 | 241 | .name = "monob", |
| 242 | 242 | .nb_components = 1, |
| 243 | 243 | .log2_chroma_w = 0, |
| @@ -247,7 +247,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[PIX_FMT_NB] = { · 3 unmodified lines | ||
| 247 | 247 | }, |
| 248 | 248 | .flags = PIX_FMT_BITSTREAM, |
| 249 | 249 | }, |
| 250 | − [PIX_FMT_PAL8] = { | |
| 250 | + [AV_PIX_FMT_PAL8] = { | |
| 251 | 251 | .name = "pal8", |
| 252 | 252 | .nb_components = 1, |
| 253 | 253 | .log2_chroma_w = 0, |
| @@ -257,7 +257,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[PIX_FMT_NB] = { · 3 unmodified lines | ||
| 257 | 257 | }, |
| 258 | 258 | .flags = PIX_FMT_PAL, |
| 259 | 259 | }, |
| 260 | − [PIX_FMT_YUVJ420P] = { | |
| 260 | + [AV_PIX_FMT_YUVJ420P] = { | |
| 261 | 261 | .name = "yuvj420p", |
| 262 | 262 | .nb_components = 3, |
| 263 | 263 | .log2_chroma_w = 1, |
| @@ -269,7 +269,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[PIX_FMT_NB] = { · 5 unmodified lines | ||
| 269 | 269 | }, |
| 270 | 270 | .flags = PIX_FMT_PLANAR, |
| 271 | 271 | }, |
| 272 | − [PIX_FMT_YUVJ422P] = { | |
| 272 | + [AV_PIX_FMT_YUVJ422P] = { | |
| 273 | 273 | .name = "yuvj422p", |
| 274 | 274 | .nb_components = 3, |
| 275 | 275 | .log2_chroma_w = 1, |
| @@ -281,7 +281,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[PIX_FMT_NB] = { · 5 unmodified lines | ||
| 281 | 281 | }, |
| 282 | 282 | .flags = PIX_FMT_PLANAR, |
| 283 | 283 | }, |
| 284 | − [PIX_FMT_YUVJ444P] = { | |
| 284 | + [AV_PIX_FMT_YUVJ444P] = { | |
| 285 | 285 | .name = "yuvj444p", |
| 286 | 286 | .nb_components = 3, |
| 287 | 287 | .log2_chroma_w = 0, |
| @@ -293,15 +293,15 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[PIX_FMT_NB] = { · 5 unmodified lines | ||
| 293 | 293 | }, |
| 294 | 294 | .flags = PIX_FMT_PLANAR, |
| 295 | 295 | }, |
| 296 | − [PIX_FMT_XVMC_MPEG2_MC] = { | |
| 296 | + [AV_PIX_FMT_XVMC_MPEG2_MC] = { | |
| 297 | 297 | .name = "xvmcmc", |
| 298 | 298 | .flags = PIX_FMT_HWACCEL, |
| 299 | 299 | }, |
| 300 | − [PIX_FMT_XVMC_MPEG2_IDCT] = { | |
| 300 | + [AV_PIX_FMT_XVMC_MPEG2_IDCT] = { | |
| 301 | 301 | .name = "xvmcidct", |
| 302 | 302 | .flags = PIX_FMT_HWACCEL, |
| 303 | 303 | }, |
| 304 | − [PIX_FMT_UYVY422] = { | |
| 304 | + [AV_PIX_FMT_UYVY422] = { | |
| 305 | 305 | .name = "uyvy422", |
| 306 | 306 | .nb_components = 3, |
| 307 | 307 | .log2_chroma_w = 1, |
| @@ -312,7 +312,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[PIX_FMT_NB] = { · 4 unmodified lines | ||
| 312 | 312 | { 0, 3, 3, 0, 7 }, /* V */ |
| 313 | 313 | }, |
| 314 | 314 | }, |
| 315 | − [PIX_FMT_UYYVYY411] = { | |
| 315 | + [AV_PIX_FMT_UYYVYY411] = { | |
| 316 | 316 | .name = "uyyvyy411", |
| 317 | 317 | .nb_components = 3, |
| 318 | 318 | .log2_chroma_w = 2, |
| @@ -323,7 +323,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[PIX_FMT_NB] = { · 4 unmodified lines | ||
| 323 | 323 | { 0, 5, 4, 0, 7 }, /* V */ |
| 324 | 324 | }, |
| 325 | 325 | }, |
| 326 | − [PIX_FMT_BGR8] = { | |
| 326 | + [AV_PIX_FMT_BGR8] = { | |
| 327 | 327 | .name = "bgr8", |
| 328 | 328 | .nb_components = 3, |
| 329 | 329 | .log2_chroma_w = 0, |
| @@ -335,7 +335,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[PIX_FMT_NB] = { · 5 unmodified lines | ||
| 335 | 335 | }, |
| 336 | 336 | .flags = PIX_FMT_RGB | PIX_FMT_PSEUDOPAL, |
| 337 | 337 | }, |
| 338 | − [PIX_FMT_BGR4] = { | |
| 338 | + [AV_PIX_FMT_BGR4] = { | |
| 339 | 339 | .name = "bgr4", |
| 340 | 340 | .nb_components = 3, |
| 341 | 341 | .log2_chroma_w = 0, |
| @@ -347,7 +347,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[PIX_FMT_NB] = { · 5 unmodified lines | ||
| 347 | 347 | }, |
| 348 | 348 | .flags = PIX_FMT_BITSTREAM | PIX_FMT_RGB, |
| 349 | 349 | }, |
| 350 | − [PIX_FMT_BGR4_BYTE] = { | |
| 350 | + [AV_PIX_FMT_BGR4_BYTE] = { | |
| 351 | 351 | .name = "bgr4_byte", |
| 352 | 352 | .nb_components = 3, |
| 353 | 353 | .log2_chroma_w = 0, |
| @@ -359,7 +359,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[PIX_FMT_NB] = { · 5 unmodified lines | ||
| 359 | 359 | }, |
| 360 | 360 | .flags = PIX_FMT_RGB | PIX_FMT_PSEUDOPAL, |
| 361 | 361 | }, |
| 362 | − [PIX_FMT_RGB8] = { | |
| 362 | + [AV_PIX_FMT_RGB8] = { | |
| 363 | 363 | .name = "rgb8", |
| 364 | 364 | .nb_components = 3, |
| 365 | 365 | .log2_chroma_w = 0, |
| @@ -371,7 +371,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[PIX_FMT_NB] = { · 5 unmodified lines | ||
| 371 | 371 | }, |
| 372 | 372 | .flags = PIX_FMT_RGB | PIX_FMT_PSEUDOPAL, |
| 373 | 373 | }, |
| 374 | − [PIX_FMT_RGB4] = { | |
| 374 | + [AV_PIX_FMT_RGB4] = { | |
| 375 | 375 | .name = "rgb4", |
| 376 | 376 | .nb_components = 3, |
| 377 | 377 | .log2_chroma_w = 0, |
| @@ -383,7 +383,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[PIX_FMT_NB] = { · 5 unmodified lines | ||
| 383 | 383 | }, |
| 384 | 384 | .flags = PIX_FMT_BITSTREAM | PIX_FMT_RGB, |
| 385 | 385 | }, |
| 386 | − [PIX_FMT_RGB4_BYTE] = { | |
| 386 | + [AV_PIX_FMT_RGB4_BYTE] = { | |
| 387 | 387 | .name = "rgb4_byte", |
| 388 | 388 | .nb_components = 3, |
| 389 | 389 | .log2_chroma_w = 0, |
| @@ -395,7 +395,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[PIX_FMT_NB] = { · 5 unmodified lines | ||
| 395 | 395 | }, |
| 396 | 396 | .flags = PIX_FMT_RGB | PIX_FMT_PSEUDOPAL, |
| 397 | 397 | }, |
| 398 | − [PIX_FMT_NV12] = { | |
| 398 | + [AV_PIX_FMT_NV12] = { | |
| 399 | 399 | .name = "nv12", |
| 400 | 400 | .nb_components = 3, |
| 401 | 401 | .log2_chroma_w = 1, |
| @@ -407,7 +407,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[PIX_FMT_NB] = { · 5 unmodified lines | ||
| 407 | 407 | }, |
| 408 | 408 | .flags = PIX_FMT_PLANAR, |
| 409 | 409 | }, |
| 410 | − [PIX_FMT_NV21] = { | |
| 410 | + [AV_PIX_FMT_NV21] = { | |
| 411 | 411 | .name = "nv21", |
| 412 | 412 | .nb_components = 3, |
| 413 | 413 | .log2_chroma_w = 1, |
| @@ -419,7 +419,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[PIX_FMT_NB] = { · 5 unmodified lines | ||
| 419 | 419 | }, |
| 420 | 420 | .flags = PIX_FMT_PLANAR, |
| 421 | 421 | }, |
| 422 | − [PIX_FMT_ARGB] = { | |
| 422 | + [AV_PIX_FMT_ARGB] = { | |
| 423 | 423 | .name = "argb", |
| 424 | 424 | .nb_components = 4, |
| 425 | 425 | .log2_chroma_w = 0, |
| @@ -432,7 +432,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[PIX_FMT_NB] = { · 6 unmodified lines | ||
| 432 | 432 | }, |
| 433 | 433 | .flags = PIX_FMT_RGB, |
| 434 | 434 | }, |
| 435 | − [PIX_FMT_RGBA] = { | |
| 435 | + [AV_PIX_FMT_RGBA] = { | |
| 436 | 436 | .name = "rgba", |
| 437 | 437 | .nb_components = 4, |
| 438 | 438 | .log2_chroma_w = 0, |
| @@ -445,7 +445,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[PIX_FMT_NB] = { · 6 unmodified lines | ||
| 445 | 445 | }, |
| 446 | 446 | .flags = PIX_FMT_RGB, |
| 447 | 447 | }, |
| 448 | − [PIX_FMT_ABGR] = { | |
| 448 | + [AV_PIX_FMT_ABGR] = { | |
| 449 | 449 | .name = "abgr", |
| 450 | 450 | .nb_components = 4, |
| 451 | 451 | .log2_chroma_w = 0, |
| @@ -458,7 +458,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[PIX_FMT_NB] = { · 6 unmodified lines | ||
| 458 | 458 | }, |
| 459 | 459 | .flags = PIX_FMT_RGB, |
| 460 | 460 | }, |
| 461 | − [PIX_FMT_BGRA] = { | |
| 461 | + [AV_PIX_FMT_BGRA] = { | |
| 462 | 462 | .name = "bgra", |
| 463 | 463 | .nb_components = 4, |
| 464 | 464 | .log2_chroma_w = 0, |
| @@ -471,7 +471,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[PIX_FMT_NB] = { · 6 unmodified lines | ||
| 471 | 471 | }, |
| 472 | 472 | .flags = PIX_FMT_RGB, |
| 473 | 473 | }, |
| 474 | − [PIX_FMT_GRAY16BE] = { | |
| 474 | + [AV_PIX_FMT_GRAY16BE] = { | |
| 475 | 475 | .name = "gray16be", |
| 476 | 476 | .nb_components = 1, |
| 477 | 477 | .log2_chroma_w = 0, |
| @@ -481,7 +481,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[PIX_FMT_NB] = { · 3 unmodified lines | ||
| 481 | 481 | }, |
| 482 | 482 | .flags = PIX_FMT_BE, |
| 483 | 483 | }, |
| 484 | − [PIX_FMT_GRAY16LE] = { | |
| 484 | + [AV_PIX_FMT_GRAY16LE] = { | |
| 485 | 485 | .name = "gray16le", |
| 486 | 486 | .nb_components = 1, |
| 487 | 487 | .log2_chroma_w = 0, |
| @@ -490,7 +490,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[PIX_FMT_NB] = { · 2 unmodified lines | ||
| 490 | 490 | { 0, 1, 1, 0, 15 }, /* Y */ |
| 491 | 491 | }, |
| 492 | 492 | }, |
| 493 | − [PIX_FMT_YUV440P] = { | |
| 493 | + [AV_PIX_FMT_YUV440P] = { | |
| 494 | 494 | .name = "yuv440p", |
| 495 | 495 | .nb_components = 3, |
| 496 | 496 | .log2_chroma_w = 0, |
| @@ -502,7 +502,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[PIX_FMT_NB] = { · 5 unmodified lines | ||
| 502 | 502 | }, |
| 503 | 503 | .flags = PIX_FMT_PLANAR, |
| 504 | 504 | }, |
| 505 | − [PIX_FMT_YUVJ440P] = { | |
| 505 | + [AV_PIX_FMT_YUVJ440P] = { | |
| 506 | 506 | .name = "yuvj440p", |
| 507 | 507 | .nb_components = 3, |
| 508 | 508 | .log2_chroma_w = 0, |
| @@ -514,7 +514,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[PIX_FMT_NB] = { · 5 unmodified lines | ||
| 514 | 514 | }, |
| 515 | 515 | .flags = PIX_FMT_PLANAR, |
| 516 | 516 | }, |
| 517 | − [PIX_FMT_YUVA420P] = { | |
| 517 | + [AV_PIX_FMT_YUVA420P] = { | |
| 518 | 518 | .name = "yuva420p", |
| 519 | 519 | .nb_components = 4, |
| 520 | 520 | .log2_chroma_w = 1, |
| @@ -527,43 +527,43 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[PIX_FMT_NB] = { · 6 unmodified lines | ||
| 527 | 527 | }, |
| 528 | 528 | .flags = PIX_FMT_PLANAR, |
| 529 | 529 | }, |
| 530 | − [PIX_FMT_VDPAU_H264] = { | |
| 530 | + [AV_PIX_FMT_VDPAU_H264] = { | |
| 531 | 531 | .name = "vdpau_h264", |
| 532 | 532 | .log2_chroma_w = 1, |
| 533 | 533 | .log2_chroma_h = 1, |
| 534 | 534 | .flags = PIX_FMT_HWACCEL, |
| 535 | 535 | }, |
| 536 | − [PIX_FMT_VDPAU_MPEG1] = { | |
| 536 | + [AV_PIX_FMT_VDPAU_MPEG1] = { | |
| 537 | 537 | .name = "vdpau_mpeg1", |
| 538 | 538 | .log2_chroma_w = 1, |
| 539 | 539 | .log2_chroma_h = 1, |
| 540 | 540 | .flags = PIX_FMT_HWACCEL, |
| 541 | 541 | }, |
| 542 | − [PIX_FMT_VDPAU_MPEG2] = { | |
| 542 | + [AV_PIX_FMT_VDPAU_MPEG2] = { | |
| 543 | 543 | .name = "vdpau_mpeg2", |
| 544 | 544 | .log2_chroma_w = 1, |
| 545 | 545 | .log2_chroma_h = 1, |
| 546 | 546 | .flags = PIX_FMT_HWACCEL, |
| 547 | 547 | }, |
| 548 | − [PIX_FMT_VDPAU_WMV3] = { | |
| 548 | + [AV_PIX_FMT_VDPAU_WMV3] = { | |
| 549 | 549 | .name = "vdpau_wmv3", |
| 550 | 550 | .log2_chroma_w = 1, |
| 551 | 551 | .log2_chroma_h = 1, |
| 552 | 552 | .flags = PIX_FMT_HWACCEL, |
| 553 | 553 | }, |
| 554 | − [PIX_FMT_VDPAU_VC1] = { | |
| 554 | + [AV_PIX_FMT_VDPAU_VC1] = { | |
| 555 | 555 | .name = "vdpau_vc1", |
| 556 | 556 | .log2_chroma_w = 1, |
| 557 | 557 | .log2_chroma_h = 1, |
| 558 | 558 | .flags = PIX_FMT_HWACCEL, |
| 559 | 559 | }, |
| 560 | − [PIX_FMT_VDPAU_MPEG4] = { | |
| 560 | + [AV_PIX_FMT_VDPAU_MPEG4] = { | |
| 561 | 561 | .name = "vdpau_mpeg4", |
| 562 | 562 | .log2_chroma_w = 1, |
| 563 | 563 | .log2_chroma_h = 1, |
| 564 | 564 | .flags = PIX_FMT_HWACCEL, |
| 565 | 565 | }, |
| 566 | − [PIX_FMT_RGB48BE] = { | |
| 566 | + [AV_PIX_FMT_RGB48BE] = { | |
| 567 | 567 | .name = "rgb48be", |
| 568 | 568 | .nb_components = 3, |
| 569 | 569 | .log2_chroma_w = 0, |
| @@ -575,7 +575,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[PIX_FMT_NB] = { · 5 unmodified lines | ||
| 575 | 575 | }, |
| 576 | 576 | .flags = PIX_FMT_RGB | PIX_FMT_BE, |
| 577 | 577 | }, |
| 578 | − [PIX_FMT_RGB48LE] = { | |
| 578 | + [AV_PIX_FMT_RGB48LE] = { | |
| 579 | 579 | .name = "rgb48le", |
| 580 | 580 | .nb_components = 3, |
| 581 | 581 | .log2_chroma_w = 0, |
| @@ -587,7 +587,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[PIX_FMT_NB] = { · 5 unmodified lines | ||
| 587 | 587 | }, |
| 588 | 588 | .flags = PIX_FMT_RGB, |
| 589 | 589 | }, |
| 590 | − [PIX_FMT_RGB565BE] = { | |
| 590 | + [AV_PIX_FMT_RGB565BE] = { | |
| 591 | 591 | .name = "rgb565be", |
| 592 | 592 | .nb_components = 3, |
| 593 | 593 | .log2_chroma_w = 0, |
| @@ -599,7 +599,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[PIX_FMT_NB] = { · 5 unmodified lines | ||
| 599 | 599 | }, |
| 600 | 600 | .flags = PIX_FMT_BE | PIX_FMT_RGB, |
| 601 | 601 | }, |
| 602 | − [PIX_FMT_RGB565LE] = { | |
| 602 | + [AV_PIX_FMT_RGB565LE] = { | |
| 603 | 603 | .name = "rgb565le", |
| 604 | 604 | .nb_components = 3, |
| 605 | 605 | .log2_chroma_w = 0, |
| @@ -611,7 +611,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[PIX_FMT_NB] = { · 5 unmodified lines | ||
| 611 | 611 | }, |
| 612 | 612 | .flags = PIX_FMT_RGB, |
| 613 | 613 | }, |
| 614 | − [PIX_FMT_RGB555BE] = { | |
| 614 | + [AV_PIX_FMT_RGB555BE] = { | |
| 615 | 615 | .name = "rgb555be", |
| 616 | 616 | .nb_components = 3, |
| 617 | 617 | .log2_chroma_w = 0, |
| @@ -623,7 +623,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[PIX_FMT_NB] = { · 5 unmodified lines | ||
| 623 | 623 | }, |
| 624 | 624 | .flags = PIX_FMT_BE | PIX_FMT_RGB, |
| 625 | 625 | }, |
| 626 | − [PIX_FMT_RGB555LE] = { | |
| 626 | + [AV_PIX_FMT_RGB555LE] = { | |
| 627 | 627 | .name = "rgb555le", |
| 628 | 628 | .nb_components = 3, |
| 629 | 629 | .log2_chroma_w = 0, |
| @@ -635,7 +635,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[PIX_FMT_NB] = { · 5 unmodified lines | ||
| 635 | 635 | }, |
| 636 | 636 | .flags = PIX_FMT_RGB, |
| 637 | 637 | }, |
| 638 | − [PIX_FMT_RGB444BE] = { | |
| 638 | + [AV_PIX_FMT_RGB444BE] = { | |
| 639 | 639 | .name = "rgb444be", |
| 640 | 640 | .nb_components = 3, |
| 641 | 641 | .log2_chroma_w = 0, |
| @@ -647,7 +647,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[PIX_FMT_NB] = { · 5 unmodified lines | ||
| 647 | 647 | }, |
| 648 | 648 | .flags = PIX_FMT_BE | PIX_FMT_RGB, |
| 649 | 649 | }, |
| 650 | − [PIX_FMT_RGB444LE] = { | |
| 650 | + [AV_PIX_FMT_RGB444LE] = { | |
| 651 | 651 | .name = "rgb444le", |
| 652 | 652 | .nb_components = 3, |
| 653 | 653 | .log2_chroma_w = 0, |
| @@ -659,7 +659,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[PIX_FMT_NB] = { · 5 unmodified lines | ||
| 659 | 659 | }, |
| 660 | 660 | .flags = PIX_FMT_RGB, |
| 661 | 661 | }, |
| 662 | − [PIX_FMT_BGR48BE] = { | |
| 662 | + [AV_PIX_FMT_BGR48BE] = { | |
| 663 | 663 | .name = "bgr48be", |
| 664 | 664 | .nb_components = 3, |
| 665 | 665 | .log2_chroma_w = 0, |
| @@ -671,7 +671,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[PIX_FMT_NB] = { · 5 unmodified lines | ||
| 671 | 671 | }, |
| 672 | 672 | .flags = PIX_FMT_BE | PIX_FMT_RGB, |
| 673 | 673 | }, |
| 674 | − [PIX_FMT_BGR48LE] = { | |
| 674 | + [AV_PIX_FMT_BGR48LE] = { | |
| 675 | 675 | .name = "bgr48le", |
| 676 | 676 | .nb_components = 3, |
| 677 | 677 | .log2_chroma_w = 0, |
| @@ -683,7 +683,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[PIX_FMT_NB] = { · 5 unmodified lines | ||
| 683 | 683 | }, |
| 684 | 684 | .flags = PIX_FMT_RGB, |
| 685 | 685 | }, |
| 686 | − [PIX_FMT_BGR565BE] = { | |
| 686 | + [AV_PIX_FMT_BGR565BE] = { | |
| 687 | 687 | .name = "bgr565be", |
| 688 | 688 | .nb_components = 3, |
| 689 | 689 | .log2_chroma_w = 0, |
| @@ -695,7 +695,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[PIX_FMT_NB] = { · 5 unmodified lines | ||
| 695 | 695 | }, |
| 696 | 696 | .flags = PIX_FMT_BE | PIX_FMT_RGB, |
| 697 | 697 | }, |
| 698 | − [PIX_FMT_BGR565LE] = { | |
| 698 | + [AV_PIX_FMT_BGR565LE] = { | |
| 699 | 699 | .name = "bgr565le", |
| 700 | 700 | .nb_components = 3, |
| 701 | 701 | .log2_chroma_w = 0, |
| @@ -707,7 +707,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[PIX_FMT_NB] = { · 5 unmodified lines | ||
| 707 | 707 | }, |
| 708 | 708 | .flags = PIX_FMT_RGB, |
| 709 | 709 | }, |
| 710 | − [PIX_FMT_BGR555BE] = { | |
| 710 | + [AV_PIX_FMT_BGR555BE] = { | |
| 711 | 711 | .name = "bgr555be", |
| 712 | 712 | .nb_components = 3, |
| 713 | 713 | .log2_chroma_w = 0, |
| @@ -719,7 +719,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[PIX_FMT_NB] = { · 5 unmodified lines | ||
| 719 | 719 | }, |
| 720 | 720 | .flags = PIX_FMT_BE | PIX_FMT_RGB, |
| 721 | 721 | }, |
| 722 | − [PIX_FMT_BGR555LE] = { | |
| 722 | + [AV_PIX_FMT_BGR555LE] = { | |
| 723 | 723 | .name = "bgr555le", |
| 724 | 724 | .nb_components = 3, |
| 725 | 725 | .log2_chroma_w = 0, |
| @@ -731,7 +731,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[PIX_FMT_NB] = { · 5 unmodified lines | ||
| 731 | 731 | }, |
| 732 | 732 | .flags = PIX_FMT_RGB, |
| 733 | 733 | }, |
| 734 | − [PIX_FMT_BGR444BE] = { | |
| 734 | + [AV_PIX_FMT_BGR444BE] = { | |
| 735 | 735 | .name = "bgr444be", |
| 736 | 736 | .nb_components = 3, |
| 737 | 737 | .log2_chroma_w = 0, |
| @@ -743,7 +743,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[PIX_FMT_NB] = { · 5 unmodified lines | ||
| 743 | 743 | }, |
| 744 | 744 | .flags = PIX_FMT_BE | PIX_FMT_RGB, |
| 745 | 745 | }, |
| 746 | − [PIX_FMT_BGR444LE] = { | |
| 746 | + [AV_PIX_FMT_BGR444LE] = { | |
| 747 | 747 | .name = "bgr444le", |
| 748 | 748 | .nb_components = 3, |
| 749 | 749 | .log2_chroma_w = 0, |
| @@ -755,31 +755,31 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[PIX_FMT_NB] = { · 5 unmodified lines | ||
| 755 | 755 | }, |
| 756 | 756 | .flags = PIX_FMT_RGB, |
| 757 | 757 | }, |
| 758 | − [PIX_FMT_VAAPI_MOCO] = { | |
| 758 | + [AV_PIX_FMT_VAAPI_MOCO] = { | |
| 759 | 759 | .name = "vaapi_moco", |
| 760 | 760 | .log2_chroma_w = 1, |
| 761 | 761 | .log2_chroma_h = 1, |
| 762 | 762 | .flags = PIX_FMT_HWACCEL, |
| 763 | 763 | }, |
| 764 | − [PIX_FMT_VAAPI_IDCT] = { | |
| 764 | + [AV_PIX_FMT_VAAPI_IDCT] = { | |
| 765 | 765 | .name = "vaapi_idct", |
| 766 | 766 | .log2_chroma_w = 1, |
| 767 | 767 | .log2_chroma_h = 1, |
| 768 | 768 | .flags = PIX_FMT_HWACCEL, |
| 769 | 769 | }, |
| 770 | − [PIX_FMT_VAAPI_VLD] = { | |
| 770 | + [AV_PIX_FMT_VAAPI_VLD] = { | |
| 771 | 771 | .name = "vaapi_vld", |
| 772 | 772 | .log2_chroma_w = 1, |
| 773 | 773 | .log2_chroma_h = 1, |
| 774 | 774 | .flags = PIX_FMT_HWACCEL, |
| 775 | 775 | }, |
| 776 | − [PIX_FMT_VDA_VLD] = { | |
| 776 | + [AV_PIX_FMT_VDA_VLD] = { | |
| 777 | 777 | .name = "vda_vld", |
| 778 | 778 | .log2_chroma_w = 1, |
| 779 | 779 | .log2_chroma_h = 1, |
| 780 | 780 | .flags = PIX_FMT_HWACCEL, |
| 781 | 781 | }, |
| 782 | − [PIX_FMT_YUV420P9LE] = { | |
| 782 | + [AV_PIX_FMT_YUV420P9LE] = { | |
| 783 | 783 | .name = "yuv420p9le", |
| 784 | 784 | .nb_components = 3, |
| 785 | 785 | .log2_chroma_w = 1, |
| @@ -791,7 +791,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[PIX_FMT_NB] = { · 5 unmodified lines | ||
| 791 | 791 | }, |
| 792 | 792 | .flags = PIX_FMT_PLANAR, |
| 793 | 793 | }, |
| 794 | − [PIX_FMT_YUV420P9BE] = { | |
| 794 | + [AV_PIX_FMT_YUV420P9BE] = { | |
| 795 | 795 | .name = "yuv420p9be", |
| 796 | 796 | .nb_components = 3, |
| 797 | 797 | .log2_chroma_w = 1, |
| @@ -803,7 +803,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[PIX_FMT_NB] = { · 5 unmodified lines | ||
| 803 | 803 | }, |
| 804 | 804 | .flags = PIX_FMT_BE | PIX_FMT_PLANAR, |
| 805 | 805 | }, |
| 806 | − [PIX_FMT_YUV420P10LE] = { | |
| 806 | + [AV_PIX_FMT_YUV420P10LE] = { | |
| 807 | 807 | .name = "yuv420p10le", |
| 808 | 808 | .nb_components = 3, |
| 809 | 809 | .log2_chroma_w = 1, |
| @@ -815,7 +815,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[PIX_FMT_NB] = { · 5 unmodified lines | ||
| 815 | 815 | }, |
| 816 | 816 | .flags = PIX_FMT_PLANAR, |
| 817 | 817 | }, |
| 818 | − [PIX_FMT_YUV420P10BE] = { | |
| 818 | + [AV_PIX_FMT_YUV420P10BE] = { | |
| 819 | 819 | .name = "yuv420p10be", |
| 820 | 820 | .nb_components = 3, |
| 821 | 821 | .log2_chroma_w = 1, |
| @@ -827,7 +827,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[PIX_FMT_NB] = { · 5 unmodified lines | ||
| 827 | 827 | }, |
| 828 | 828 | .flags = PIX_FMT_BE | PIX_FMT_PLANAR, |
| 829 | 829 | }, |
| 830 | − [PIX_FMT_YUV420P16LE] = { | |
| 830 | + [AV_PIX_FMT_YUV420P16LE] = { | |
| 831 | 831 | .name = "yuv420p16le", |
| 832 | 832 | .nb_components = 3, |
| 833 | 833 | .log2_chroma_w = 1, |
| @@ -839,7 +839,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[PIX_FMT_NB] = { · 5 unmodified lines | ||
| 839 | 839 | }, |
| 840 | 840 | .flags = PIX_FMT_PLANAR, |
| 841 | 841 | }, |
| 842 | − [PIX_FMT_YUV420P16BE] = { | |
| 842 | + [AV_PIX_FMT_YUV420P16BE] = { | |
| 843 | 843 | .name = "yuv420p16be", |
| 844 | 844 | .nb_components = 3, |
| 845 | 845 | .log2_chroma_w = 1, |
| @@ -851,7 +851,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[PIX_FMT_NB] = { · 5 unmodified lines | ||
| 851 | 851 | }, |
| 852 | 852 | .flags = PIX_FMT_BE | PIX_FMT_PLANAR, |
| 853 | 853 | }, |
| 854 | − [PIX_FMT_YUV422P9LE] = { | |
| 854 | + [AV_PIX_FMT_YUV422P9LE] = { | |
| 855 | 855 | .name = "yuv422p9le", |
| 856 | 856 | .nb_components = 3, |
| 857 | 857 | .log2_chroma_w = 1, |
| @@ -863,7 +863,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[PIX_FMT_NB] = { · 5 unmodified lines | ||
| 863 | 863 | }, |
| 864 | 864 | .flags = PIX_FMT_PLANAR, |
| 865 | 865 | }, |
| 866 | − [PIX_FMT_YUV422P9BE] = { | |
| 866 | + [AV_PIX_FMT_YUV422P9BE] = { | |
| 867 | 867 | .name = "yuv422p9be", |
| 868 | 868 | .nb_components = 3, |
| 869 | 869 | .log2_chroma_w = 1, |
| @@ -875,7 +875,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[PIX_FMT_NB] = { · 5 unmodified lines | ||
| 875 | 875 | }, |
| 876 | 876 | .flags = PIX_FMT_BE | PIX_FMT_PLANAR, |
| 877 | 877 | }, |
| 878 | − [PIX_FMT_YUV422P10LE] = { | |
| 878 | + [AV_PIX_FMT_YUV422P10LE] = { | |
| 879 | 879 | .name = "yuv422p10le", |
| 880 | 880 | .nb_components = 3, |
| 881 | 881 | .log2_chroma_w = 1, |
| @@ -887,7 +887,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[PIX_FMT_NB] = { · 5 unmodified lines | ||
| 887 | 887 | }, |
| 888 | 888 | .flags = PIX_FMT_PLANAR, |
| 889 | 889 | }, |
| 890 | − [PIX_FMT_YUV422P10BE] = { | |
| 890 | + [AV_PIX_FMT_YUV422P10BE] = { | |
| 891 | 891 | .name = "yuv422p10be", |
| 892 | 892 | .nb_components = 3, |
| 893 | 893 | .log2_chroma_w = 1, |
| @@ -899,7 +899,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[PIX_FMT_NB] = { · 5 unmodified lines | ||
| 899 | 899 | }, |
| 900 | 900 | .flags = PIX_FMT_BE | PIX_FMT_PLANAR, |
| 901 | 901 | }, |
| 902 | − [PIX_FMT_YUV422P16LE] = { | |
| 902 | + [AV_PIX_FMT_YUV422P16LE] = { | |
| 903 | 903 | .name = "yuv422p16le", |
| 904 | 904 | .nb_components = 3, |
| 905 | 905 | .log2_chroma_w = 1, |
| @@ -911,7 +911,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[PIX_FMT_NB] = { · 5 unmodified lines | ||
| 911 | 911 | }, |
| 912 | 912 | .flags = PIX_FMT_PLANAR, |
| 913 | 913 | }, |
| 914 | − [PIX_FMT_YUV422P16BE] = { | |
| 914 | + [AV_PIX_FMT_YUV422P16BE] = { | |
| 915 | 915 | .name = "yuv422p16be", |
| 916 | 916 | .nb_components = 3, |
| 917 | 917 | .log2_chroma_w = 1, |
| @@ -923,7 +923,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[PIX_FMT_NB] = { · 5 unmodified lines | ||
| 923 | 923 | }, |
| 924 | 924 | .flags = PIX_FMT_BE | PIX_FMT_PLANAR, |
| 925 | 925 | }, |
| 926 | − [PIX_FMT_YUV444P16LE] = { | |
| 926 | + [AV_PIX_FMT_YUV444P16LE] = { | |
| 927 | 927 | .name = "yuv444p16le", |
| 928 | 928 | .nb_components = 3, |
| 929 | 929 | .log2_chroma_w = 0, |
| @@ -935,7 +935,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[PIX_FMT_NB] = { · 5 unmodified lines | ||
| 935 | 935 | }, |
| 936 | 936 | .flags = PIX_FMT_PLANAR, |
| 937 | 937 | }, |
| 938 | − [PIX_FMT_YUV444P16BE] = { | |
| 938 | + [AV_PIX_FMT_YUV444P16BE] = { | |
| 939 | 939 | .name = "yuv444p16be", |
| 940 | 940 | .nb_components = 3, |
| 941 | 941 | .log2_chroma_w = 0, |
| @@ -947,7 +947,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[PIX_FMT_NB] = { · 5 unmodified lines | ||
| 947 | 947 | }, |
| 948 | 948 | .flags = PIX_FMT_BE | PIX_FMT_PLANAR, |
| 949 | 949 | }, |
| 950 | − [PIX_FMT_YUV444P10LE] = { | |
| 950 | + [AV_PIX_FMT_YUV444P10LE] = { | |
| 951 | 951 | .name = "yuv444p10le", |
| 952 | 952 | .nb_components = 3, |
| 953 | 953 | .log2_chroma_w = 0, |
| @@ -959,7 +959,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[PIX_FMT_NB] = { · 5 unmodified lines | ||
| 959 | 959 | }, |
| 960 | 960 | .flags = PIX_FMT_PLANAR, |
| 961 | 961 | }, |
| 962 | − [PIX_FMT_YUV444P10BE] = { | |
| 962 | + [AV_PIX_FMT_YUV444P10BE] = { | |
| 963 | 963 | .name = "yuv444p10be", |
| 964 | 964 | .nb_components = 3, |
| 965 | 965 | .log2_chroma_w = 0, |
| @@ -971,7 +971,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[PIX_FMT_NB] = { · 5 unmodified lines | ||
| 971 | 971 | }, |
| 972 | 972 | .flags = PIX_FMT_BE | PIX_FMT_PLANAR, |
| 973 | 973 | }, |
| 974 | − [PIX_FMT_YUV444P9LE] = { | |
| 974 | + [AV_PIX_FMT_YUV444P9LE] = { | |
| 975 | 975 | .name = "yuv444p9le", |
| 976 | 976 | .nb_components = 3, |
| 977 | 977 | .log2_chroma_w = 0, |
| @@ -983,7 +983,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[PIX_FMT_NB] = { · 5 unmodified lines | ||
| 983 | 983 | }, |
| 984 | 984 | .flags = PIX_FMT_PLANAR, |
| 985 | 985 | }, |
| 986 | − [PIX_FMT_YUV444P9BE] = { | |
| 986 | + [AV_PIX_FMT_YUV444P9BE] = { | |
| 987 | 987 | .name = "yuv444p9be", |
| 988 | 988 | .nb_components = 3, |
| 989 | 989 | .log2_chroma_w = 0, |
| @@ -995,13 +995,13 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[PIX_FMT_NB] = { · 5 unmodified lines | ||
| 995 | 995 | }, |
| 996 | 996 | .flags = PIX_FMT_BE | PIX_FMT_PLANAR, |
| 997 | 997 | }, |
| 998 | − [PIX_FMT_DXVA2_VLD] = { | |
| 998 | + [AV_PIX_FMT_DXVA2_VLD] = { | |
| 999 | 999 | .name = "dxva2_vld", |
| 1000 | 1000 | .log2_chroma_w = 1, |
| 1001 | 1001 | .log2_chroma_h = 1, |
| 1002 | 1002 | .flags = PIX_FMT_HWACCEL, |
| 1003 | 1003 | }, |
| 1004 | − [PIX_FMT_Y400A] = { | |
| 1004 | + [AV_PIX_FMT_Y400A] = { | |
| 1005 | 1005 | .name = "y400a", |
| 1006 | 1006 | .nb_components = 2, |
| 1007 | 1007 | .comp = { |
| @@ -1009,7 +1009,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[PIX_FMT_NB] = { · 1 unmodified line | ||
| 1009 | 1009 | { 0, 1, 2, 0, 7 }, /* A */ |
| 1010 | 1010 | }, |
| 1011 | 1011 | }, |
| 1012 | − [PIX_FMT_GBRP] = { | |
| 1012 | + [AV_PIX_FMT_GBRP] = { | |
| 1013 | 1013 | .name = "gbrp", |
| 1014 | 1014 | .nb_components = 3, |
| 1015 | 1015 | .log2_chroma_w = 0, |
| @@ -1021,7 +1021,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[PIX_FMT_NB] = { · 5 unmodified lines | ||
| 1021 | 1021 | }, |
| 1022 | 1022 | .flags = PIX_FMT_PLANAR | PIX_FMT_RGB, |
| 1023 | 1023 | }, |
| 1024 | − [PIX_FMT_GBRP9LE] = { | |
| 1024 | + [AV_PIX_FMT_GBRP9LE] = { | |
| 1025 | 1025 | .name = "gbrp9le", |
| 1026 | 1026 | .nb_components = 3, |
| 1027 | 1027 | .log2_chroma_w = 0, |
| @@ -1033,7 +1033,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[PIX_FMT_NB] = { · 5 unmodified lines | ||
| 1033 | 1033 | }, |
| 1034 | 1034 | .flags = PIX_FMT_PLANAR | PIX_FMT_RGB, |
| 1035 | 1035 | }, |
| 1036 | − [PIX_FMT_GBRP9BE] = { | |
| 1036 | + [AV_PIX_FMT_GBRP9BE] = { | |
| 1037 | 1037 | .name = "gbrp9be", |
| 1038 | 1038 | .nb_components = 3, |
| 1039 | 1039 | .log2_chroma_w = 0, |
| @@ -1045,7 +1045,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[PIX_FMT_NB] = { · 5 unmodified lines | ||
| 1045 | 1045 | }, |
| 1046 | 1046 | .flags = PIX_FMT_BE | PIX_FMT_PLANAR | PIX_FMT_RGB, |
| 1047 | 1047 | }, |
| 1048 | − [PIX_FMT_GBRP10LE] = { | |
| 1048 | + [AV_PIX_FMT_GBRP10LE] = { | |
| 1049 | 1049 | .name = "gbrp10le", |
| 1050 | 1050 | .nb_components = 3, |
| 1051 | 1051 | .log2_chroma_w = 0, |
| @@ -1057,7 +1057,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[PIX_FMT_NB] = { · 5 unmodified lines | ||
| 1057 | 1057 | }, |
| 1058 | 1058 | .flags = PIX_FMT_PLANAR | PIX_FMT_RGB, |
| 1059 | 1059 | }, |
| 1060 | − [PIX_FMT_GBRP10BE] = { | |
| 1060 | + [AV_PIX_FMT_GBRP10BE] = { | |
| 1061 | 1061 | .name = "gbrp10be", |
| 1062 | 1062 | .nb_components = 3, |
| 1063 | 1063 | .log2_chroma_w = 0, |
| @@ -1069,7 +1069,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[PIX_FMT_NB] = { · 5 unmodified lines | ||
| 1069 | 1069 | }, |
| 1070 | 1070 | .flags = PIX_FMT_BE | PIX_FMT_PLANAR | PIX_FMT_RGB, |
| 1071 | 1071 | }, |
| 1072 | − [PIX_FMT_GBRP16LE] = { | |
| 1072 | + [AV_PIX_FMT_GBRP16LE] = { | |
| 1073 | 1073 | .name = "gbrp16le", |
| 1074 | 1074 | .nb_components = 3, |
| 1075 | 1075 | .log2_chroma_w = 0, |
| @@ -1081,7 +1081,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[PIX_FMT_NB] = { · 5 unmodified lines | ||
| 1081 | 1081 | }, |
| 1082 | 1082 | .flags = PIX_FMT_PLANAR | PIX_FMT_RGB, |
| 1083 | 1083 | }, |
| 1084 | − [PIX_FMT_GBRP16BE] = { | |
| 1084 | + [AV_PIX_FMT_GBRP16BE] = { | |
| 1085 | 1085 | .name = "gbrp16be", |
| 1086 | 1086 | .nb_components = 3, |
| 1087 | 1087 | .log2_chroma_w = 0, |
| @@ -1095,21 +1095,21 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[PIX_FMT_NB] = { · 7 unmodified lines | ||
| 1095 | 1095 | }, |
| 1096 | 1096 | }; |
| 1097 | 1097 | |
| 1098 | −static enum PixelFormat get_pix_fmt_internal(const char *name) | |
| 1098 | +static enum AVPixelFormat get_pix_fmt_internal(const char *name) | |
| 1099 | 1099 | { |
| 1100 | − enum PixelFormat pix_fmt; | |
| 1100 | + enum AVPixelFormat pix_fmt; | |
| 1101 | 1101 | |
| 1102 | − for (pix_fmt = 0; pix_fmt < PIX_FMT_NB; pix_fmt++) | |
| 1102 | + for (pix_fmt = 0; pix_fmt < AV_PIX_FMT_NB; pix_fmt++) | |
| 1103 | 1103 | if (av_pix_fmt_descriptors[pix_fmt].name && |
| 1104 | 1104 | !strcmp(av_pix_fmt_descriptors[pix_fmt].name, name)) |
| 1105 | 1105 | return pix_fmt; |
| 1106 | 1106 | |
| 1107 | − return PIX_FMT_NONE; | |
| 1107 | + return AV_PIX_FMT_NONE; | |
| 1108 | 1108 | } |
| 1109 | 1109 | |
| 1110 | −const char *av_get_pix_fmt_name(enum PixelFormat pix_fmt) | |
| 1110 | +const char *av_get_pix_fmt_name(enum AVPixelFormat pix_fmt) | |
| 1111 | 1111 | { |
| 1112 | − return (unsigned)pix_fmt < PIX_FMT_NB ? | |
| 1112 | + return (unsigned)pix_fmt < AV_PIX_FMT_NB ? | |
| 1113 | 1113 | av_pix_fmt_descriptors[pix_fmt].name : NULL; |
| 1114 | 1114 | } |
| 1115 | 1115 | |
| @@ -1119,9 +1119,9 @@ const char *av_get_pix_fmt_name(enum PixelFormat pix_fmt) · 3 unmodified lines | ||
| 1119 | 1119 | # define X_NE(be, le) le |
| 1120 | 1120 | #endif |
| 1121 | 1121 | |
| 1122 | −enum PixelFormat av_get_pix_fmt(const char *name) | |
| 1122 | +enum AVPixelFormat av_get_pix_fmt(const char *name) | |
| 1123 | 1123 | { |
| 1124 | − enum PixelFormat pix_fmt; | |
| 1124 | + enum AVPixelFormat pix_fmt; | |
| 1125 | 1125 | |
| 1126 | 1126 | if (!strcmp(name, "rgb32")) |
| 1127 | 1127 | name = X_NE("argb", "bgra"); |
| @@ -1129,7 +1129,7 @@ enum PixelFormat av_get_pix_fmt(const char *name) · 1 unmodified line | ||
| 1129 | 1129 | name = X_NE("abgr", "rgba"); |
| 1130 | 1130 | |
| 1131 | 1131 | pix_fmt = get_pix_fmt_internal(name); |
| 1132 | − if (pix_fmt == PIX_FMT_NONE) { | |
| 1132 | + if (pix_fmt == AV_PIX_FMT_NONE) { | |
| 1133 | 1133 | char name2[32]; |
| 1134 | 1134 | |
| 1135 | 1135 | snprintf(name2, sizeof(name2), "%s%s", name, X_NE("be", "le")); |
| @@ -1151,7 +1151,7 @@ int av_get_bits_per_pixel(const AVPixFmtDescriptor *pixdesc) · 15 unmodified lines | ||
| 1151 | 1151 | return bits >> log2_pixels; |
| 1152 | 1152 | } |
| 1153 | 1153 | |
| 1154 | −char *av_get_pix_fmt_string (char *buf, int buf_size, enum PixelFormat pix_fmt) | |
| 1154 | +char *av_get_pix_fmt_string (char *buf, int buf_size, enum AVPixelFormat pix_fmt) | |
| 1155 | 1155 | { |
| 1156 | 1156 | /* print header */ |
| 1157 | 1157 | if (pix_fmt < 0) { |
| @@ -148,7 +148,7 @@ void av_write_image_line(const uint16_t *src, uint8_t *data[4], const int linesi · 147 unmodified lines | ||
| 148 | 148 | * |
| 149 | 149 | * Finally if no pixel format has been found, returns PIX_FMT_NONE. |
| 150 | 150 | */ |
| 151 | −enum PixelFormat av_get_pix_fmt(const char *name); | |
| 151 | +enum AVPixelFormat av_get_pix_fmt(const char *name); | |
| 152 | 152 | |
| 153 | 153 | /** |
| 154 | 154 | * Return the short name for a pixel format, NULL in case pix_fmt is |
| @@ -156,7 +156,7 @@ enum PixelFormat av_get_pix_fmt(const char *name); · 1 unmodified line | ||
| 156 | 156 | * |
| 157 | 157 | * @see av_get_pix_fmt(), av_get_pix_fmt_string() |
| 158 | 158 | */ |
| 159 | −const char *av_get_pix_fmt_name(enum PixelFormat pix_fmt); | |
| 159 | +const char *av_get_pix_fmt_name(enum AVPixelFormat pix_fmt); | |
| 160 | 160 | |
| 161 | 161 | /** |
| 162 | 162 | * Print in buf the string corresponding to the pixel format with |
| @@ -168,7 +168,7 @@ const char *av_get_pix_fmt_name(enum PixelFormat pix_fmt); · 5 unmodified lines | ||
| 168 | 168 | * corresponding info string, or a negative value to print the |
| 169 | 169 | * corresponding header. |
| 170 | 170 | */ |
| 171 | −char *av_get_pix_fmt_string (char *buf, int buf_size, enum PixelFormat pix_fmt); | |
| 171 | +char *av_get_pix_fmt_string (char *buf, int buf_size, enum AVPixelFormat pix_fmt); | |
| 172 | 172 | |
| 173 | 173 | /** |
| 174 | 174 | * Return the number of bits per pixel used by the pixel format |
| @@ -73,12 +73,12 @@ static int yuyvtoyv12_unscaled(SwsContext *c, const uint8_t *src[], · 72 unmodified lines | ||
| 73 | 73 | |
| 74 | 74 | void ff_bfin_get_unscaled_swscale(SwsContext *c) |
| 75 | 75 | { |
| 76 | − if (c->dstFormat == PIX_FMT_YUV420P && c->srcFormat == PIX_FMT_UYVY422) { | |
| 76 | + if (c->dstFormat == AV_PIX_FMT_YUV420P && c->srcFormat == AV_PIX_FMT_UYVY422) { | |
| 77 | 77 | av_log(NULL, AV_LOG_VERBOSE, |
| 78 | 78 | "selecting Blackfin optimized uyvytoyv12_unscaled\n"); |
| 79 | 79 | c->swScale = uyvytoyv12_unscaled; |
| 80 | 80 | } |
| 81 | − if (c->dstFormat == PIX_FMT_YUV420P && c->srcFormat == PIX_FMT_YUYV422) { | |
| 81 | + if (c->dstFormat == AV_PIX_FMT_YUV420P && c->srcFormat == AV_PIX_FMT_YUYV422) { | |
| 82 | 82 | av_log(NULL, AV_LOG_VERBOSE, |
| 83 | 83 | "selecting Blackfin optimized yuyvtoyv12_unscaled\n"); |
| 84 | 84 | c->swScale = yuyvtoyv12_unscaled; |
| @@ -172,22 +172,22 @@ SwsFunc ff_yuv2rgb_get_func_ptr_bfin(SwsContext *c) · 171 unmodified lines | ||
| 172 | 172 | SwsFunc f; |
| 173 | 173 | |
| 174 | 174 | switch (c->dstFormat) { |
| 175 | − case PIX_FMT_RGB555: | |
| 175 | + case AV_PIX_FMT_RGB555: | |
| 176 | 176 | f = bfin_yuv420_rgb555; |
| 177 | 177 | break; |
| 178 | − case PIX_FMT_BGR555: | |
| 178 | + case AV_PIX_FMT_BGR555: | |
| 179 | 179 | f = bfin_yuv420_bgr555; |
| 180 | 180 | break; |
| 181 | − case PIX_FMT_RGB565: | |
| 181 | + case AV_PIX_FMT_RGB565: | |
| 182 | 182 | f = bfin_yuv420_rgb565; |
| 183 | 183 | break; |
| 184 | − case PIX_FMT_BGR565: | |
| 184 | + case AV_PIX_FMT_BGR565: | |
| 185 | 185 | f = bfin_yuv420_bgr565; |
| 186 | 186 | break; |
| 187 | − case PIX_FMT_RGB24: | |
| 187 | + case AV_PIX_FMT_RGB24: | |
| 188 | 188 | f = bfin_yuv420_rgb24; |
| 189 | 189 | break; |
| 190 | − case PIX_FMT_BGR24: | |
| 190 | + case AV_PIX_FMT_BGR24: | |
| 191 | 191 | f = bfin_yuv420_bgr24; |
| 192 | 192 | break; |
| 193 | 193 | default: |
| @@ -48,12 +48,12 @@ · 47 unmodified lines | ||
| 48 | 48 | |
| 49 | 49 | #define input_pixel(pos) (isBE(origin) ? AV_RB16(pos) : AV_RL16(pos)) |
| 50 | 50 | |
| 51 | −#define r ((origin == PIX_FMT_BGR48BE || origin == PIX_FMT_BGR48LE) ? b_r : r_b) | |
| 52 | −#define b ((origin == PIX_FMT_BGR48BE || origin == PIX_FMT_BGR48LE) ? r_b : b_r) | |
| 51 | +#define r ((origin == AV_PIX_FMT_BGR48BE || origin == AV_PIX_FMT_BGR48LE) ? b_r : r_b) | |
| 52 | +#define b ((origin == AV_PIX_FMT_BGR48BE || origin == AV_PIX_FMT_BGR48LE) ? r_b : b_r) | |
| 53 | 53 | |
| 54 | 54 | static av_always_inline void rgb48ToY_c_template(uint16_t *dst, |
| 55 | 55 | const uint16_t *src, int width, |
| 56 | − enum PixelFormat origin) | |
| 56 | + enum AVPixelFormat origin) | |
| 57 | 57 | { |
| 58 | 58 | int i; |
| 59 | 59 | for (i = 0; i < width; i++) { |
| @@ -70,7 +70,7 @@ static av_always_inline void rgb48ToUV_c_template(uint16_t *dstU, · 10 unmodified lines | ||
| 70 | 70 | const uint16_t *src1, |
| 71 | 71 | const uint16_t *src2, |
| 72 | 72 | int width, |
| 73 | − enum PixelFormat origin) | |
| 73 | + enum AVPixelFormat origin) | |
| 74 | 74 | { |
| 75 | 75 | int i; |
| 76 | 76 | assert(src1 == src2); |
| @@ -89,7 +89,7 @@ static av_always_inline void rgb48ToUV_half_c_template(uint16_t *dstU, · 12 unmodified lines | ||
| 89 | 89 | const uint16_t *src1, |
| 90 | 90 | const uint16_t *src2, |
| 91 | 91 | int width, |
| 92 | − enum PixelFormat origin) | |
| 92 | + enum AVPixelFormat origin) | |
| 93 | 93 | { |
| 94 | 94 | int i; |
| 95 | 95 | assert(src1 == src2); |
| @@ -149,15 +149,15 @@ static void pattern ## 48 ## BE_LE ## ToUV_half_c(uint8_t *_dstU, \ · 53 unmodified lines | ||
| 149 | 149 | rgb48ToUV_half_c_template(dstU, dstV, src1, src2, width, origin); \ |
| 150 | 150 | } |
| 151 | 151 | |
| 152 | −rgb48funcs(rgb, LE, PIX_FMT_RGB48LE) | |
| 153 | −rgb48funcs(rgb, BE, PIX_FMT_RGB48BE) | |
| 154 | −rgb48funcs(bgr, LE, PIX_FMT_BGR48LE) | |
| 155 | −rgb48funcs(bgr, BE, PIX_FMT_BGR48BE) | |
| 152 | +rgb48funcs(rgb, LE, AV_PIX_FMT_RGB48LE) | |
| 153 | +rgb48funcs(rgb, BE, AV_PIX_FMT_RGB48BE) | |
| 154 | +rgb48funcs(bgr, LE, AV_PIX_FMT_BGR48LE) | |
| 155 | +rgb48funcs(bgr, BE, AV_PIX_FMT_BGR48BE) | |
| 156 | 156 | |
| 157 | −#define input_pixel(i) ((origin == PIX_FMT_RGBA || \ | |
| 158 | − origin == PIX_FMT_BGRA || \ | |
| 159 | − origin == PIX_FMT_ARGB || \ | |
| 160 | − origin == PIX_FMT_ABGR) \ | |
| 157 | +#define input_pixel(i) ((origin == AV_PIX_FMT_RGBA || \ | |
| 158 | + origin == AV_PIX_FMT_BGRA || \ | |
| 159 | + origin == AV_PIX_FMT_ARGB || \ | |
| 160 | + origin == AV_PIX_FMT_ABGR) \ | |
| 161 | 161 | ? AV_RN32A(&src[(i) * 4]) \ |
| 162 | 162 | : (isBE(origin) ? AV_RB16(&src[(i) * 2]) \ |
| 163 | 163 | : AV_RL16(&src[(i) * 2]))) |
| @@ -165,7 +165,7 @@ rgb48funcs(bgr, BE, PIX_FMT_BGR48BE) · 1 unmodified line | ||
| 165 | 165 | static av_always_inline void rgb16_32ToY_c_template(uint8_t *dst, |
| 166 | 166 | const uint8_t *src, |
| 167 | 167 | int width, |
| 168 | − enum PixelFormat origin, | |
| 168 | + enum AVPixelFormat origin, | |
| 169 | 169 | int shr, int shg, |
| 170 | 170 | int shb, int shp, |
| 171 | 171 | int maskr, int maskg, |
| @@ -190,7 +190,7 @@ static av_always_inline void rgb16_32ToUV_c_template(uint8_t *dstU, · 18 unmodified lines | ||
| 190 | 190 | uint8_t *dstV, |
| 191 | 191 | const uint8_t *src, |
| 192 | 192 | int width, |
| 193 | − enum PixelFormat origin, | |
| 193 | + enum AVPixelFormat origin, | |
| 194 | 194 | int shr, int shg, |
| 195 | 195 | int shb, int shp, |
| 196 | 196 | int maskr, int maskg, |
| @@ -217,7 +217,7 @@ static av_always_inline void rgb16_32ToUV_half_c_template(uint8_t *dstU, · 20 unmodified lines | ||
| 217 | 217 | uint8_t *dstV, |
| 218 | 218 | const uint8_t *src, |
| 219 | 219 | int width, |
| 220 | − enum PixelFormat origin, | |
| 220 | + enum AVPixelFormat origin, | |
| 221 | 221 | int shr, int shg, |
| 222 | 222 | int shb, int shp, |
| 223 | 223 | int maskr, int maskg, |
| @@ -241,8 +241,8 @@ static av_always_inline void rgb16_32ToUV_half_c_template(uint8_t *dstU, · 17 unmodified lines | ||
| 241 | 241 | |
| 242 | 242 | b = (rb & maskb) >> shb; |
| 243 | 243 | if (shp || |
| 244 | − origin == PIX_FMT_BGR565LE || origin == PIX_FMT_BGR565BE || | |
| 245 | − origin == PIX_FMT_RGB565LE || origin == PIX_FMT_RGB565BE) { | |
| 244 | + origin == AV_PIX_FMT_BGR565LE || origin == AV_PIX_FMT_BGR565BE || | |
| 245 | + origin == AV_PIX_FMT_RGB565LE || origin == AV_PIX_FMT_RGB565BE) { | |
| 246 | 246 | g >>= shg; |
| 247 | 247 | } else { |
| 248 | 248 | g = (g & maskg) >> shg; |
| @@ -285,22 +285,22 @@ static void name ## ToUV_half_c(uint8_t *dstU, uint8_t *dstV, \ · 36 unmodified lines | ||
| 285 | 285 | rsh, gsh, bsh, S); \ |
| 286 | 286 | } |
| 287 | 287 | |
| 288 | −rgb16_32_wrapper(PIX_FMT_BGR32, bgr32, 16, 0, 0, 0, 0xFF0000, 0xFF00, 0x00FF, 8, 0, 8, RGB2YUV_SHIFT + 8) | |
| 289 | −rgb16_32_wrapper(PIX_FMT_BGR32_1, bgr321, 16, 0, 0, 8, 0xFF0000, 0xFF00, 0x00FF, 8, 0, 8, RGB2YUV_SHIFT + 8) | |
| 290 | −rgb16_32_wrapper(PIX_FMT_RGB32, rgb32, 0, 0, 16, 0, 0x00FF, 0xFF00, 0xFF0000, 8, 0, 8, RGB2YUV_SHIFT + 8) | |
| 291 | −rgb16_32_wrapper(PIX_FMT_RGB32_1, rgb321, 0, 0, 16, 8, 0x00FF, 0xFF00, 0xFF0000, 8, 0, 8, RGB2YUV_SHIFT + 8) | |
| 292 | −rgb16_32_wrapper(PIX_FMT_BGR565LE, bgr16le, 0, 0, 0, 0, 0x001F, 0x07E0, 0xF800, 11, 5, 0, RGB2YUV_SHIFT + 8) | |
| 293 | −rgb16_32_wrapper(PIX_FMT_BGR555LE, bgr15le, 0, 0, 0, 0, 0x001F, 0x03E0, 0x7C00, 10, 5, 0, RGB2YUV_SHIFT + 7) | |
| 294 | −rgb16_32_wrapper(PIX_FMT_BGR444LE, bgr12le, 0, 0, 0, 0, 0x000F, 0x00F0, 0x0F00, 8, 4, 0, RGB2YUV_SHIFT + 4) | |
| 295 | −rgb16_32_wrapper(PIX_FMT_RGB565LE, rgb16le, 0, 0, 0, 0, 0xF800, 0x07E0, 0x001F, 0, 5, 11, RGB2YUV_SHIFT + 8) | |
| 296 | −rgb16_32_wrapper(PIX_FMT_RGB555LE, rgb15le, 0, 0, 0, 0, 0x7C00, 0x03E0, 0x001F, 0, 5, 10, RGB2YUV_SHIFT + 7) | |
| 297 | −rgb16_32_wrapper(PIX_FMT_RGB444LE, rgb12le, 0, 0, 0, 0, 0x0F00, 0x00F0, 0x000F, 0, 4, 8, RGB2YUV_SHIFT + 4) | |
| 298 | −rgb16_32_wrapper(PIX_FMT_BGR565BE, bgr16be, 0, 0, 0, 0, 0x001F, 0x07E0, 0xF800, 11, 5, 0, RGB2YUV_SHIFT + 8) | |
| 299 | −rgb16_32_wrapper(PIX_FMT_BGR555BE, bgr15be, 0, 0, 0, 0, 0x001F, 0x03E0, 0x7C00, 10, 5, 0, RGB2YUV_SHIFT + 7) | |
| 300 | −rgb16_32_wrapper(PIX_FMT_BGR444BE, bgr12be, 0, 0, 0, 0, 0x000F, 0x00F0, 0x0F00, 8, 4, 0, RGB2YUV_SHIFT + 4) | |
| 301 | −rgb16_32_wrapper(PIX_FMT_RGB565BE, rgb16be, 0, 0, 0, 0, 0xF800, 0x07E0, 0x001F, 0, 5, 11, RGB2YUV_SHIFT + 8) | |
| 302 | −rgb16_32_wrapper(PIX_FMT_RGB555BE, rgb15be, 0, 0, 0, 0, 0x7C00, 0x03E0, 0x001F, 0, 5, 10, RGB2YUV_SHIFT + 7) | |
| 303 | −rgb16_32_wrapper(PIX_FMT_RGB444BE, rgb12be, 0, 0, 0, 0, 0x0F00, 0x00F0, 0x000F, 0, 4, 8, RGB2YUV_SHIFT + 4) | |
| 288 | +rgb16_32_wrapper(AV_PIX_FMT_BGR32, bgr32, 16, 0, 0, 0, 0xFF0000, 0xFF00, 0x00FF, 8, 0, 8, RGB2YUV_SHIFT + 8) | |
| 289 | +rgb16_32_wrapper(AV_PIX_FMT_BGR32_1, bgr321, 16, 0, 0, 8, 0xFF0000, 0xFF00, 0x00FF, 8, 0, 8, RGB2YUV_SHIFT + 8) | |
| 290 | +rgb16_32_wrapper(AV_PIX_FMT_RGB32, rgb32, 0, 0, 16, 0, 0x00FF, 0xFF00, 0xFF0000, 8, 0, 8, RGB2YUV_SHIFT + 8) | |
| 291 | +rgb16_32_wrapper(AV_PIX_FMT_RGB32_1, rgb321, 0, 0, 16, 8, 0x00FF, 0xFF00, 0xFF0000, 8, 0, 8, RGB2YUV_SHIFT + 8) | |
| 292 | +rgb16_32_wrapper(AV_PIX_FMT_BGR565LE, bgr16le, 0, 0, 0, 0, 0x001F, 0x07E0, 0xF800, 11, 5, 0, RGB2YUV_SHIFT + 8) | |
| 293 | +rgb16_32_wrapper(AV_PIX_FMT_BGR555LE, bgr15le, 0, 0, 0, 0, 0x001F, 0x03E0, 0x7C00, 10, 5, 0, RGB2YUV_SHIFT + 7) | |
| 294 | +rgb16_32_wrapper(AV_PIX_FMT_BGR444LE, bgr12le, 0, 0, 0, 0, 0x000F, 0x00F0, 0x0F00, 8, 4, 0, RGB2YUV_SHIFT + 4) | |
| 295 | +rgb16_32_wrapper(AV_PIX_FMT_RGB565LE, rgb16le, 0, 0, 0, 0, 0xF800, 0x07E0, 0x001F, 0, 5, 11, RGB2YUV_SHIFT + 8) | |
| 296 | +rgb16_32_wrapper(AV_PIX_FMT_RGB555LE, rgb15le, 0, 0, 0, 0, 0x7C00, 0x03E0, 0x001F, 0, 5, 10, RGB2YUV_SHIFT + 7) | |
| 297 | +rgb16_32_wrapper(AV_PIX_FMT_RGB444LE, rgb12le, 0, 0, 0, 0, 0x0F00, 0x00F0, 0x000F, 0, 4, 8, RGB2YUV_SHIFT + 4) | |
| 298 | +rgb16_32_wrapper(AV_PIX_FMT_BGR565BE, bgr16be, 0, 0, 0, 0, 0x001F, 0x07E0, 0xF800, 11, 5, 0, RGB2YUV_SHIFT + 8) | |
| 299 | +rgb16_32_wrapper(AV_PIX_FMT_BGR555BE, bgr15be, 0, 0, 0, 0, 0x001F, 0x03E0, 0x7C00, 10, 5, 0, RGB2YUV_SHIFT + 7) | |
| 300 | +rgb16_32_wrapper(AV_PIX_FMT_BGR444BE, bgr12be, 0, 0, 0, 0, 0x000F, 0x00F0, 0x0F00, 8, 4, 0, RGB2YUV_SHIFT + 4) | |
| 301 | +rgb16_32_wrapper(AV_PIX_FMT_RGB565BE, rgb16be, 0, 0, 0, 0, 0xF800, 0x07E0, 0x001F, 0, 5, 11, RGB2YUV_SHIFT + 8) | |
| 302 | +rgb16_32_wrapper(AV_PIX_FMT_RGB555BE, rgb15be, 0, 0, 0, 0, 0x7C00, 0x03E0, 0x001F, 0, 5, 10, RGB2YUV_SHIFT + 7) | |
| 303 | +rgb16_32_wrapper(AV_PIX_FMT_RGB444BE, rgb12be, 0, 0, 0, 0, 0x0F00, 0x00F0, 0x000F, 0, 4, 8, RGB2YUV_SHIFT + 4) | |
| 304 | 304 | |
| 305 | 305 | static void abgrToA_c(uint8_t *dst, const uint8_t *src, int width, |
| 306 | 306 | uint32_t *unused) |
| @@ -670,211 +670,211 @@ static void planar_rgb16be_to_uv(uint8_t *dstU, uint8_t *dstV, · 363 unmodified lines | ||
| 670 | 670 | |
| 671 | 671 | av_cold void ff_sws_init_input_funcs(SwsContext *c) |
| 672 | 672 | { |
| 673 | − enum PixelFormat srcFormat = c->srcFormat; | |
| 673 | + enum AVPixelFormat srcFormat = c->srcFormat; | |
| 674 | 674 | |
| 675 | 675 | c->chrToYV12 = NULL; |
| 676 | 676 | switch (srcFormat) { |
| 677 | − case PIX_FMT_YUYV422: | |
| 677 | + case AV_PIX_FMT_YUYV422: | |
| 678 | 678 | c->chrToYV12 = yuy2ToUV_c; |
| 679 | 679 | break; |
| 680 | − case PIX_FMT_UYVY422: | |
| 680 | + case AV_PIX_FMT_UYVY422: | |
| 681 | 681 | c->chrToYV12 = uyvyToUV_c; |
| 682 | 682 | break; |
| 683 | − case PIX_FMT_NV12: | |
| 683 | + case AV_PIX_FMT_NV12: | |
| 684 | 684 | c->chrToYV12 = nv12ToUV_c; |
| 685 | 685 | break; |
| 686 | − case PIX_FMT_NV21: | |
| 686 | + case AV_PIX_FMT_NV21: | |
| 687 | 687 | c->chrToYV12 = nv21ToUV_c; |
| 688 | 688 | break; |
| 689 | − case PIX_FMT_RGB8: | |
| 690 | − case PIX_FMT_BGR8: | |
| 691 | − case PIX_FMT_PAL8: | |
| 692 | − case PIX_FMT_BGR4_BYTE: | |
| 693 | − case PIX_FMT_RGB4_BYTE: | |
| 689 | + case AV_PIX_FMT_RGB8: | |
| 690 | + case AV_PIX_FMT_BGR8: | |
| 691 | + case AV_PIX_FMT_PAL8: | |
| 692 | + case AV_PIX_FMT_BGR4_BYTE: | |
| 693 | + case AV_PIX_FMT_RGB4_BYTE: | |
| 694 | 694 | c->chrToYV12 = palToUV_c; |
| 695 | 695 | break; |
| 696 | − case PIX_FMT_GBRP9LE: | |
| 696 | + case AV_PIX_FMT_GBRP9LE: | |
| 697 | 697 | c->readChrPlanar = planar_rgb9le_to_uv; |
| 698 | 698 | break; |
| 699 | − case PIX_FMT_GBRP10LE: | |
| 699 | + case AV_PIX_FMT_GBRP10LE: | |
| 700 | 700 | c->readChrPlanar = planar_rgb10le_to_uv; |
| 701 | 701 | break; |
| 702 | − case PIX_FMT_GBRP16LE: | |
| 702 | + case AV_PIX_FMT_GBRP16LE: | |
| 703 | 703 | c->readChrPlanar = planar_rgb16le_to_uv; |
| 704 | 704 | break; |
| 705 | − case PIX_FMT_GBRP9BE: | |
| 705 | + case AV_PIX_FMT_GBRP9BE: | |
| 706 | 706 | c->readChrPlanar = planar_rgb9be_to_uv; |
| 707 | 707 | break; |
| 708 | − case PIX_FMT_GBRP10BE: | |
| 708 | + case AV_PIX_FMT_GBRP10BE: | |
| 709 | 709 | c->readChrPlanar = planar_rgb10be_to_uv; |
| 710 | 710 | break; |
| 711 | − case PIX_FMT_GBRP16BE: | |
| 711 | + case AV_PIX_FMT_GBRP16BE: | |
| 712 | 712 | c->readChrPlanar = planar_rgb16be_to_uv; |
| 713 | 713 | break; |
| 714 | − case PIX_FMT_GBRP: | |
| 714 | + case AV_PIX_FMT_GBRP: | |
| 715 | 715 | c->readChrPlanar = planar_rgb_to_uv; |
| 716 | 716 | break; |
| 717 | 717 | #if HAVE_BIGENDIAN |
| 718 | − case PIX_FMT_YUV444P9LE: | |
| 719 | − case PIX_FMT_YUV422P9LE: | |
| 720 | − case PIX_FMT_YUV420P9LE: | |
| 721 | − case PIX_FMT_YUV422P10LE: | |
| 722 | − case PIX_FMT_YUV444P10LE: | |
| 723 | − case PIX_FMT_YUV420P10LE: | |
| 724 | − case PIX_FMT_YUV420P16LE: | |
| 725 | − case PIX_FMT_YUV422P16LE: | |
| 726 | − case PIX_FMT_YUV444P16LE: | |
| 718 | + case AV_PIX_FMT_YUV444P9LE: | |
| 719 | + case AV_PIX_FMT_YUV422P9LE: | |
| 720 | + case AV_PIX_FMT_YUV420P9LE: | |
| 721 | + case AV_PIX_FMT_YUV422P10LE: | |
| 722 | + case AV_PIX_FMT_YUV444P10LE: | |
| 723 | + case AV_PIX_FMT_YUV420P10LE: | |
| 724 | + case AV_PIX_FMT_YUV420P16LE: | |
| 725 | + case AV_PIX_FMT_YUV422P16LE: | |
| 726 | + case AV_PIX_FMT_YUV444P16LE: | |
| 727 | 727 | c->chrToYV12 = bswap16UV_c; |
| 728 | 728 | break; |
| 729 | 729 | #else |
| 730 | − case PIX_FMT_YUV444P9BE: | |
| 731 | − case PIX_FMT_YUV422P9BE: | |
| 732 | − case PIX_FMT_YUV420P9BE: | |
| 733 | − case PIX_FMT_YUV444P10BE: | |
| 734 | − case PIX_FMT_YUV422P10BE: | |
| 735 | − case PIX_FMT_YUV420P10BE: | |
| 736 | − case PIX_FMT_YUV420P16BE: | |
| 737 | − case PIX_FMT_YUV422P16BE: | |
| 738 | − case PIX_FMT_YUV444P16BE: | |
| 730 | + case AV_PIX_FMT_YUV444P9BE: | |
| 731 | + case AV_PIX_FMT_YUV422P9BE: | |
| 732 | + case AV_PIX_FMT_YUV420P9BE: | |
| 733 | + case AV_PIX_FMT_YUV444P10BE: | |
| 734 | + case AV_PIX_FMT_YUV422P10BE: | |
| 735 | + case AV_PIX_FMT_YUV420P10BE: | |
| 736 | + case AV_PIX_FMT_YUV420P16BE: | |
| 737 | + case AV_PIX_FMT_YUV422P16BE: | |
| 738 | + case AV_PIX_FMT_YUV444P16BE: | |
| 739 | 739 | c->chrToYV12 = bswap16UV_c; |
| 740 | 740 | break; |
| 741 | 741 | #endif |
| 742 | 742 | } |
| 743 | 743 | if (c->chrSrcHSubSample) { |
| 744 | 744 | switch (srcFormat) { |
| 745 | − case PIX_FMT_RGB48BE: | |
| 745 | + case AV_PIX_FMT_RGB48BE: | |
| 746 | 746 | c->chrToYV12 = rgb48BEToUV_half_c; |
| 747 | 747 | break; |
| 748 | − case PIX_FMT_RGB48LE: | |
| 748 | + case AV_PIX_FMT_RGB48LE: | |
| 749 | 749 | c->chrToYV12 = rgb48LEToUV_half_c; |
| 750 | 750 | break; |
| 751 | − case PIX_FMT_BGR48BE: | |
| 751 | + case AV_PIX_FMT_BGR48BE: | |
| 752 | 752 | c->chrToYV12 = bgr48BEToUV_half_c; |
| 753 | 753 | break; |
| 754 | − case PIX_FMT_BGR48LE: | |
| 754 | + case AV_PIX_FMT_BGR48LE: | |
| 755 | 755 | c->chrToYV12 = bgr48LEToUV_half_c; |
| 756 | 756 | break; |
| 757 | − case PIX_FMT_RGB32: | |
| 757 | + case AV_PIX_FMT_RGB32: | |
| 758 | 758 | c->chrToYV12 = bgr32ToUV_half_c; |
| 759 | 759 | break; |
| 760 | − case PIX_FMT_RGB32_1: | |
| 760 | + case AV_PIX_FMT_RGB32_1: | |
| 761 | 761 | c->chrToYV12 = bgr321ToUV_half_c; |
| 762 | 762 | break; |
| 763 | − case PIX_FMT_BGR24: | |
| 763 | + case AV_PIX_FMT_BGR24: | |
| 764 | 764 | c->chrToYV12 = bgr24ToUV_half_c; |
| 765 | 765 | break; |
| 766 | − case PIX_FMT_BGR565LE: | |
| 766 | + case AV_PIX_FMT_BGR565LE: | |
| 767 | 767 | c->chrToYV12 = bgr16leToUV_half_c; |
| 768 | 768 | break; |
| 769 | − case PIX_FMT_BGR565BE: | |
| 769 | + case AV_PIX_FMT_BGR565BE: | |
| 770 | 770 | c->chrToYV12 = bgr16beToUV_half_c; |
| 771 | 771 | break; |
| 772 | − case PIX_FMT_BGR555LE: | |
| 772 | + case AV_PIX_FMT_BGR555LE: | |
| 773 | 773 | c->chrToYV12 = bgr15leToUV_half_c; |
| 774 | 774 | break; |
| 775 | − case PIX_FMT_BGR555BE: | |
| 775 | + case AV_PIX_FMT_BGR555BE: | |
| 776 | 776 | c->chrToYV12 = bgr15beToUV_half_c; |
| 777 | 777 | break; |
| 778 | − case PIX_FMT_BGR444LE: | |
| 778 | + case AV_PIX_FMT_BGR444LE: | |
| 779 | 779 | c->chrToYV12 = bgr12leToUV_half_c; |
| 780 | 780 | break; |
| 781 | − case PIX_FMT_BGR444BE: | |
| 781 | + case AV_PIX_FMT_BGR444BE: | |
| 782 | 782 | c->chrToYV12 = bgr12beToUV_half_c; |
| 783 | 783 | break; |
| 784 | − case PIX_FMT_BGR32: | |
| 784 | + case AV_PIX_FMT_BGR32: | |
| 785 | 785 | c->chrToYV12 = rgb32ToUV_half_c; |
| 786 | 786 | break; |
| 787 | − case PIX_FMT_BGR32_1: | |
| 787 | + case AV_PIX_FMT_BGR32_1: | |
| 788 | 788 | c->chrToYV12 = rgb321ToUV_half_c; |
| 789 | 789 | break; |
| 790 | − case PIX_FMT_RGB24: | |
| 790 | + case AV_PIX_FMT_RGB24: | |
| 791 | 791 | c->chrToYV12 = rgb24ToUV_half_c; |
| 792 | 792 | break; |
| 793 | − case PIX_FMT_RGB565LE: | |
| 793 | + case AV_PIX_FMT_RGB565LE: | |
| 794 | 794 | c->chrToYV12 = rgb16leToUV_half_c; |
| 795 | 795 | break; |
| 796 | − case PIX_FMT_RGB565BE: | |
| 796 | + case AV_PIX_FMT_RGB565BE: | |
| 797 | 797 | c->chrToYV12 = rgb16beToUV_half_c; |
| 798 | 798 | break; |
| 799 | − case PIX_FMT_RGB555LE: | |
| 799 | + case AV_PIX_FMT_RGB555LE: | |
| 800 | 800 | c->chrToYV12 = rgb15leToUV_half_c; |
| 801 | 801 | break; |
| 802 | − case PIX_FMT_RGB555BE: | |
| 802 | + case AV_PIX_FMT_RGB555BE: | |
| 803 | 803 | c->chrToYV12 = rgb15beToUV_half_c; |
| 804 | 804 | break; |
| 805 | − case PIX_FMT_RGB444LE: | |
| 805 | + case AV_PIX_FMT_RGB444LE: | |
| 806 | 806 | c->chrToYV12 = rgb12leToUV_half_c; |
| 807 | 807 | break; |
| 808 | − case PIX_FMT_RGB444BE: | |
| 808 | + case AV_PIX_FMT_RGB444BE: | |
| 809 | 809 | c->chrToYV12 = rgb12beToUV_half_c; |
| 810 | 810 | break; |
| 811 | 811 | } |
| 812 | 812 | } else { |
| 813 | 813 | switch (srcFormat) { |
| 814 | − case PIX_FMT_RGB48BE: | |
| 814 | + case AV_PIX_FMT_RGB48BE: | |
| 815 | 815 | c->chrToYV12 = rgb48BEToUV_c; |
| 816 | 816 | break; |
| 817 | − case PIX_FMT_RGB48LE: | |
| 817 | + case AV_PIX_FMT_RGB48LE: | |
| 818 | 818 | c->chrToYV12 = rgb48LEToUV_c; |
| 819 | 819 | break; |
| 820 | − case PIX_FMT_BGR48BE: | |
| 820 | + case AV_PIX_FMT_BGR48BE: | |
| 821 | 821 | c->chrToYV12 = bgr48BEToUV_c; |
| 822 | 822 | break; |
| 823 | − case PIX_FMT_BGR48LE: | |
| 823 | + case AV_PIX_FMT_BGR48LE: | |
| 824 | 824 | c->chrToYV12 = bgr48LEToUV_c; |
| 825 | 825 | break; |
| 826 | − case PIX_FMT_RGB32: | |
| 826 | + case AV_PIX_FMT_RGB32: | |
| 827 | 827 | c->chrToYV12 = bgr32ToUV_c; |
| 828 | 828 | break; |
| 829 | − case PIX_FMT_RGB32_1: | |
| 829 | + case AV_PIX_FMT_RGB32_1: | |
| 830 | 830 | c->chrToYV12 = bgr321ToUV_c; |
| 831 | 831 | break; |
| 832 | − case PIX_FMT_BGR24: | |
| 832 | + case AV_PIX_FMT_BGR24: | |
| 833 | 833 | c->chrToYV12 = bgr24ToUV_c; |
| 834 | 834 | break; |
| 835 | − case PIX_FMT_BGR565LE: | |
| 835 | + case AV_PIX_FMT_BGR565LE: | |
| 836 | 836 | c->chrToYV12 = bgr16leToUV_c; |
| 837 | 837 | break; |
| 838 | − case PIX_FMT_BGR565BE: | |
| 838 | + case AV_PIX_FMT_BGR565BE: | |
| 839 | 839 | c->chrToYV12 = bgr16beToUV_c; |
| 840 | 840 | break; |
| 841 | − case PIX_FMT_BGR555LE: | |
| 841 | + case AV_PIX_FMT_BGR555LE: | |
| 842 | 842 | c->chrToYV12 = bgr15leToUV_c; |
| 843 | 843 | break; |
| 844 | − case PIX_FMT_BGR555BE: | |
| 844 | + case AV_PIX_FMT_BGR555BE: | |
| 845 | 845 | c->chrToYV12 = bgr15beToUV_c; |
| 846 | 846 | break; |
| 847 | − case PIX_FMT_BGR444LE: | |
| 847 | + case AV_PIX_FMT_BGR444LE: | |
| 848 | 848 | c->chrToYV12 = bgr12leToUV_c; |
| 849 | 849 | break; |
| 850 | − case PIX_FMT_BGR444BE: | |
| 850 | + case AV_PIX_FMT_BGR444BE: | |
| 851 | 851 | c->chrToYV12 = bgr12beToUV_c; |
| 852 | 852 | break; |
| 853 | − case PIX_FMT_BGR32: | |
| 853 | + case AV_PIX_FMT_BGR32: | |
| 854 | 854 | c->chrToYV12 = rgb32ToUV_c; |
| 855 | 855 | break; |
| 856 | − case PIX_FMT_BGR32_1: | |
| 856 | + case AV_PIX_FMT_BGR32_1: | |
| 857 | 857 | c->chrToYV12 = rgb321ToUV_c; |
| 858 | 858 | break; |
| 859 | − case PIX_FMT_RGB24: | |
| 859 | + case AV_PIX_FMT_RGB24: | |
| 860 | 860 | c->chrToYV12 = rgb24ToUV_c; |
| 861 | 861 | break; |
| 862 | − case PIX_FMT_RGB565LE: | |
| 862 | + case AV_PIX_FMT_RGB565LE: | |
| 863 | 863 | c->chrToYV12 = rgb16leToUV_c; |
| 864 | 864 | break; |
| 865 | − case PIX_FMT_RGB565BE: | |
| 865 | + case AV_PIX_FMT_RGB565BE: | |
| 866 | 866 | c->chrToYV12 = rgb16beToUV_c; |
| 867 | 867 | break; |
| 868 | − case PIX_FMT_RGB555LE: | |
| 868 | + case AV_PIX_FMT_RGB555LE: | |
| 869 | 869 | c->chrToYV12 = rgb15leToUV_c; |
| 870 | 870 | break; |
| 871 | − case PIX_FMT_RGB555BE: | |
| 871 | + case AV_PIX_FMT_RGB555BE: | |
| 872 | 872 | c->chrToYV12 = rgb15beToUV_c; |
| 873 | 873 | break; |
| 874 | − case PIX_FMT_RGB444LE: | |
| 874 | + case AV_PIX_FMT_RGB444LE: | |
| 875 | 875 | c->chrToYV12 = rgb12leToUV_c; |
| 876 | 876 | break; |
| 877 | − case PIX_FMT_RGB444BE: | |
| 877 | + case AV_PIX_FMT_RGB444BE: | |
| 878 | 878 | c->chrToYV12 = rgb12beToUV_c; |
| 879 | 879 | break; |
| 880 | 880 | } |
| @@ -883,152 +883,152 @@ av_cold void ff_sws_init_input_funcs(SwsContext *c) · 2 unmodified lines | ||
| 883 | 883 | c->lumToYV12 = NULL; |
| 884 | 884 | c->alpToYV12 = NULL; |
| 885 | 885 | switch (srcFormat) { |
| 886 | − case PIX_FMT_GBRP9LE: | |
| 886 | + case AV_PIX_FMT_GBRP9LE: | |
| 887 | 887 | c->readLumPlanar = planar_rgb9le_to_y; |
| 888 | 888 | break; |
| 889 | − case PIX_FMT_GBRP10LE: | |
| 889 | + case AV_PIX_FMT_GBRP10LE: | |
| 890 | 890 | c->readLumPlanar = planar_rgb10le_to_y; |
| 891 | 891 | break; |
| 892 | − case PIX_FMT_GBRP16LE: | |
| 892 | + case AV_PIX_FMT_GBRP16LE: | |
| 893 | 893 | c->readLumPlanar = planar_rgb16le_to_y; |
| 894 | 894 | break; |
| 895 | − case PIX_FMT_GBRP9BE: | |
| 895 | + case AV_PIX_FMT_GBRP9BE: | |
| 896 | 896 | c->readLumPlanar = planar_rgb9be_to_y; |
| 897 | 897 | break; |
| 898 | − case PIX_FMT_GBRP10BE: | |
| 898 | + case AV_PIX_FMT_GBRP10BE: | |
| 899 | 899 | c->readLumPlanar = planar_rgb10be_to_y; |
| 900 | 900 | break; |
| 901 | − case PIX_FMT_GBRP16BE: | |
| 901 | + case AV_PIX_FMT_GBRP16BE: | |
| 902 | 902 | c->readLumPlanar = planar_rgb16be_to_y; |
| 903 | 903 | break; |
| 904 | − case PIX_FMT_GBRP: | |
| 904 | + case AV_PIX_FMT_GBRP: | |
| 905 | 905 | c->readLumPlanar = planar_rgb_to_y; |
| 906 | 906 | break; |
| 907 | 907 | #if HAVE_BIGENDIAN |
| 908 | − case PIX_FMT_YUV444P9LE: | |
| 909 | − case PIX_FMT_YUV422P9LE: | |
| 910 | − case PIX_FMT_YUV420P9LE: | |
| 911 | − case PIX_FMT_YUV444P10LE: | |
| 912 | − case PIX_FMT_YUV422P10LE: | |
| 913 | − case PIX_FMT_YUV420P10LE: | |
| 914 | − case PIX_FMT_YUV420P16LE: | |
| 915 | − case PIX_FMT_YUV422P16LE: | |
| 916 | − case PIX_FMT_YUV444P16LE: | |
| 917 | − case PIX_FMT_GRAY16LE: | |
| 908 | + case AV_PIX_FMT_YUV444P9LE: | |
| 909 | + case AV_PIX_FMT_YUV422P9LE: | |
| 910 | + case AV_PIX_FMT_YUV420P9LE: | |
| 911 | + case AV_PIX_FMT_YUV444P10LE: | |
| 912 | + case AV_PIX_FMT_YUV422P10LE: | |
| 913 | + case AV_PIX_FMT_YUV420P10LE: | |
| 914 | + case AV_PIX_FMT_YUV420P16LE: | |
| 915 | + case AV_PIX_FMT_YUV422P16LE: | |
| 916 | + case AV_PIX_FMT_YUV444P16LE: | |
| 917 | + case AV_PIX_FMT_GRAY16LE: | |
| 918 | 918 | c->lumToYV12 = bswap16Y_c; |
| 919 | 919 | break; |
| 920 | 920 | #else |
| 921 | − case PIX_FMT_YUV444P9BE: | |
| 922 | − case PIX_FMT_YUV422P9BE: | |
| 923 | − case PIX_FMT_YUV420P9BE: | |
| 924 | − case PIX_FMT_YUV444P10BE: | |
| 925 | − case PIX_FMT_YUV422P10BE: | |
| 926 | − case PIX_FMT_YUV420P10BE: | |
| 927 | − case PIX_FMT_YUV420P16BE: | |
| 928 | − case PIX_FMT_YUV422P16BE: | |
| 929 | − case PIX_FMT_YUV444P16BE: | |
| 930 | − case PIX_FMT_GRAY16BE: | |
| 921 | + case AV_PIX_FMT_YUV444P9BE: | |
| 922 | + case AV_PIX_FMT_YUV422P9BE: | |
| 923 | + case AV_PIX_FMT_YUV420P9BE: | |
| 924 | + case AV_PIX_FMT_YUV444P10BE: | |
| 925 | + case AV_PIX_FMT_YUV422P10BE: | |
| 926 | + case AV_PIX_FMT_YUV420P10BE: | |
| 927 | + case AV_PIX_FMT_YUV420P16BE: | |
| 928 | + case AV_PIX_FMT_YUV422P16BE: | |
| 929 | + case AV_PIX_FMT_YUV444P16BE: | |
| 930 | + case AV_PIX_FMT_GRAY16BE: | |
| 931 | 931 | c->lumToYV12 = bswap16Y_c; |
| 932 | 932 | break; |
| 933 | 933 | #endif |
| 934 | − case PIX_FMT_YUYV422: | |
| 935 | − case PIX_FMT_Y400A: | |
| 934 | + case AV_PIX_FMT_YUYV422: | |
| 935 | + case AV_PIX_FMT_Y400A: | |
| 936 | 936 | c->lumToYV12 = yuy2ToY_c; |
| 937 | 937 | break; |
| 938 | − case PIX_FMT_UYVY422: | |
| 938 | + case AV_PIX_FMT_UYVY422: | |
| 939 | 939 | c->lumToYV12 = uyvyToY_c; |
| 940 | 940 | break; |
| 941 | − case PIX_FMT_BGR24: | |
| 941 | + case AV_PIX_FMT_BGR24: | |
| 942 | 942 | c->lumToYV12 = bgr24ToY_c; |
| 943 | 943 | break; |
| 944 | − case PIX_FMT_BGR565LE: | |
| 944 | + case AV_PIX_FMT_BGR565LE: | |
| 945 | 945 | c->lumToYV12 = bgr16leToY_c; |
| 946 | 946 | break; |
| 947 | − case PIX_FMT_BGR565BE: | |
| 947 | + case AV_PIX_FMT_BGR565BE: | |
| 948 | 948 | c->lumToYV12 = bgr16beToY_c; |
| 949 | 949 | break; |
| 950 | − case PIX_FMT_BGR555LE: | |
| 950 | + case AV_PIX_FMT_BGR555LE: | |
| 951 | 951 | c->lumToYV12 = bgr15leToY_c; |
| 952 | 952 | break; |
| 953 | − case PIX_FMT_BGR555BE: | |
| 953 | + case AV_PIX_FMT_BGR555BE: | |
| 954 | 954 | c->lumToYV12 = bgr15beToY_c; |
| 955 | 955 | break; |
| 956 | − case PIX_FMT_BGR444LE: | |
| 956 | + case AV_PIX_FMT_BGR444LE: | |
| 957 | 957 | c->lumToYV12 = bgr12leToY_c; |
| 958 | 958 | break; |
| 959 | − case PIX_FMT_BGR444BE: | |
| 959 | + case AV_PIX_FMT_BGR444BE: | |
| 960 | 960 | c->lumToYV12 = bgr12beToY_c; |
| 961 | 961 | break; |
| 962 | − case PIX_FMT_RGB24: | |
| 962 | + case AV_PIX_FMT_RGB24: | |
| 963 | 963 | c->lumToYV12 = rgb24ToY_c; |
| 964 | 964 | break; |
| 965 | − case PIX_FMT_RGB565LE: | |
| 965 | + case AV_PIX_FMT_RGB565LE: | |
| 966 | 966 | c->lumToYV12 = rgb16leToY_c; |
| 967 | 967 | break; |
| 968 | − case PIX_FMT_RGB565BE: | |
| 968 | + case AV_PIX_FMT_RGB565BE: | |
| 969 | 969 | c->lumToYV12 = rgb16beToY_c; |
| 970 | 970 | break; |
| 971 | − case PIX_FMT_RGB555LE: | |
| 971 | + case AV_PIX_FMT_RGB555LE: | |
| 972 | 972 | c->lumToYV12 = rgb15leToY_c; |
| 973 | 973 | break; |
| 974 | − case PIX_FMT_RGB555BE: | |
| 974 | + case AV_PIX_FMT_RGB555BE: | |
| 975 | 975 | c->lumToYV12 = rgb15beToY_c; |
| 976 | 976 | break; |
| 977 | − case PIX_FMT_RGB444LE: | |
| 977 | + case AV_PIX_FMT_RGB444LE: | |
| 978 | 978 | c->lumToYV12 = rgb12leToY_c; |
| 979 | 979 | break; |
| 980 | − case PIX_FMT_RGB444BE: | |
| 980 | + case AV_PIX_FMT_RGB444BE: | |
| 981 | 981 | c->lumToYV12 = rgb12beToY_c; |
| 982 | 982 | break; |
| 983 | − case PIX_FMT_RGB8: | |
| 984 | − case PIX_FMT_BGR8: | |
| 985 | − case PIX_FMT_PAL8: | |
| 986 | − case PIX_FMT_BGR4_BYTE: | |
| 987 | − case PIX_FMT_RGB4_BYTE: | |
| 983 | + case AV_PIX_FMT_RGB8: | |
| 984 | + case AV_PIX_FMT_BGR8: | |
| 985 | + case AV_PIX_FMT_PAL8: | |
| 986 | + case AV_PIX_FMT_BGR4_BYTE: | |
| 987 | + case AV_PIX_FMT_RGB4_BYTE: | |
| 988 | 988 | c->lumToYV12 = palToY_c; |
| 989 | 989 | break; |
| 990 | − case PIX_FMT_MONOBLACK: | |
| 990 | + case AV_PIX_FMT_MONOBLACK: | |
| 991 | 991 | c->lumToYV12 = monoblack2Y_c; |
| 992 | 992 | break; |
| 993 | − case PIX_FMT_MONOWHITE: | |
| 993 | + case AV_PIX_FMT_MONOWHITE: | |
| 994 | 994 | c->lumToYV12 = monowhite2Y_c; |
| 995 | 995 | break; |
| 996 | − case PIX_FMT_RGB32: | |
| 996 | + case AV_PIX_FMT_RGB32: | |
| 997 | 997 | c->lumToYV12 = bgr32ToY_c; |
| 998 | 998 | break; |
| 999 | − case PIX_FMT_RGB32_1: | |
| 999 | + case AV_PIX_FMT_RGB32_1: | |
| 1000 | 1000 | c->lumToYV12 = bgr321ToY_c; |
| 1001 | 1001 | break; |
| 1002 | − case PIX_FMT_BGR32: | |
| 1002 | + case AV_PIX_FMT_BGR32: | |
| 1003 | 1003 | c->lumToYV12 = rgb32ToY_c; |
| 1004 | 1004 | break; |
| 1005 | − case PIX_FMT_BGR32_1: | |
| 1005 | + case AV_PIX_FMT_BGR32_1: | |
| 1006 | 1006 | c->lumToYV12 = rgb321ToY_c; |
| 1007 | 1007 | break; |
| 1008 | − case PIX_FMT_RGB48BE: | |
| 1008 | + case AV_PIX_FMT_RGB48BE: | |
| 1009 | 1009 | c->lumToYV12 = rgb48BEToY_c; |
| 1010 | 1010 | break; |
| 1011 | − case PIX_FMT_RGB48LE: | |
| 1011 | + case AV_PIX_FMT_RGB48LE: | |
| 1012 | 1012 | c->lumToYV12 = rgb48LEToY_c; |
| 1013 | 1013 | break; |
| 1014 | − case PIX_FMT_BGR48BE: | |
| 1014 | + case AV_PIX_FMT_BGR48BE: | |
| 1015 | 1015 | c->lumToYV12 = bgr48BEToY_c; |
| 1016 | 1016 | break; |
| 1017 | − case PIX_FMT_BGR48LE: | |
| 1017 | + case AV_PIX_FMT_BGR48LE: | |
| 1018 | 1018 | c->lumToYV12 = bgr48LEToY_c; |
| 1019 | 1019 | break; |
| 1020 | 1020 | } |
| 1021 | 1021 | if (c->alpPixBuf) { |
| 1022 | 1022 | switch (srcFormat) { |
| 1023 | − case PIX_FMT_BGRA: | |
| 1024 | − case PIX_FMT_RGBA: | |
| 1023 | + case AV_PIX_FMT_BGRA: | |
| 1024 | + case AV_PIX_FMT_RGBA: | |
| 1025 | 1025 | c->alpToYV12 = rgbaToA_c; |
| 1026 | 1026 | break; |
| 1027 | − case PIX_FMT_ABGR: | |
| 1028 | − case PIX_FMT_ARGB: | |
| 1027 | + case AV_PIX_FMT_ABGR: | |
| 1028 | + case AV_PIX_FMT_ARGB: | |
| 1029 | 1029 | c->alpToYV12 = abgrToA_c; |
| 1030 | 1030 | break; |
| 1031 | − case PIX_FMT_Y400A: | |
| 1031 | + case AV_PIX_FMT_Y400A: | |
| 1032 | 1032 | c->alpToYV12 = uyvyToY_c; |
| 1033 | 1033 | break; |
| 1034 | 1034 | } |
| @@ -56,8 +56,8 @@ static const AVOption options[] = { · 55 unmodified lines | ||
| 56 | 56 | { "srch", "source height", OFFSET(srcH), AV_OPT_TYPE_INT, { .i64 = 16 }, 1, INT_MAX, VE }, |
| 57 | 57 | { "dstw", "destination width", OFFSET(dstW), AV_OPT_TYPE_INT, { .i64 = 16 }, 1, INT_MAX, VE }, |
| 58 | 58 | { "dsth", "destination height", OFFSET(dstH), AV_OPT_TYPE_INT, { .i64 = 16 }, 1, INT_MAX, VE }, |
| 59 | − { "src_format", "source format", OFFSET(srcFormat), AV_OPT_TYPE_INT, { .i64 = DEFAULT }, 0, PIX_FMT_NB - 1, VE }, | |
| 60 | − { "dst_format", "destination format", OFFSET(dstFormat), AV_OPT_TYPE_INT, { .i64 = DEFAULT }, 0, PIX_FMT_NB - 1, VE }, | |
| 59 | + { "src_format", "source format", OFFSET(srcFormat), AV_OPT_TYPE_INT, { .i64 = DEFAULT }, 0, AV_PIX_FMT_NB - 1, VE }, | |
| 60 | + { "dst_format", "destination format", OFFSET(dstFormat), AV_OPT_TYPE_INT, { .i64 = DEFAULT }, 0, AV_PIX_FMT_NB - 1, VE }, | |
| 61 | 61 | { "src_range", "source range", OFFSET(srcRange), AV_OPT_TYPE_INT, { .i64 = DEFAULT }, 0, 1, VE }, |
| 62 | 62 | { "dst_range", "destination range", OFFSET(dstRange), AV_OPT_TYPE_INT, { .i64 = DEFAULT }, 0, 1, VE }, |
| 63 | 63 | { "param0", "scaler param 0", OFFSET(param[0]), AV_OPT_TYPE_DOUBLE, { .dbl = SWS_PARAM_DEFAULT }, INT_MIN, INT_MAX, VE }, |
| @@ -264,11 +264,11 @@ static void yuv2nv12cX_c(SwsContext *c, const int16_t *chrFilter, int chrFilterS · 263 unmodified lines | ||
| 264 | 264 | const int16_t **chrUSrc, const int16_t **chrVSrc, |
| 265 | 265 | uint8_t *dest, int chrDstW) |
| 266 | 266 | { |
| 267 | − enum PixelFormat dstFormat = c->dstFormat; | |
| 267 | + enum AVPixelFormat dstFormat = c->dstFormat; | |
| 268 | 268 | const uint8_t *chrDither = c->chrDither8; |
| 269 | 269 | int i; |
| 270 | 270 | |
| 271 | − if (dstFormat == PIX_FMT_NV12) | |
| 271 | + if (dstFormat == AV_PIX_FMT_NV12) | |
| 272 | 272 | for (i=0; i<chrDstW; i++) { |
| 273 | 273 | int u = chrDither[i & 7] << 12; |
| 274 | 274 | int v = chrDither[(i + 3) & 7] << 12; |
| @@ -300,7 +300,7 @@ static void yuv2nv12cX_c(SwsContext *c, const int16_t *chrFilter, int chrFilterS · 25 unmodified lines | ||
| 300 | 300 | acc <<= 1; \ |
| 301 | 301 | acc |= (val) >= (128 + 110) |
| 302 | 302 | #define output_pixel(pos, acc) \ |
| 303 | − if (target == PIX_FMT_MONOBLACK) { \ | |
| 303 | + if (target == AV_PIX_FMT_MONOBLACK) { \ | |
| 304 | 304 | pos = acc; \ |
| 305 | 305 | } else { \ |
| 306 | 306 | pos = ~acc; \ |
| @@ -312,7 +312,7 @@ yuv2mono_X_c_template(SwsContext *c, const int16_t *lumFilter, · 5 unmodified lines | ||
| 312 | 312 | const int16_t *chrFilter, const int16_t **chrUSrc, |
| 313 | 313 | const int16_t **chrVSrc, int chrFilterSize, |
| 314 | 314 | const int16_t **alpSrc, uint8_t *dest, int dstW, |
| 315 | − int y, enum PixelFormat target) | |
| 315 | + int y, enum AVPixelFormat target) | |
| 316 | 316 | { |
| 317 | 317 | const uint8_t * const d128=dither_8x8_220[y&7]; |
| 318 | 318 | int i; |
| @@ -350,7 +350,7 @@ yuv2mono_2_c_template(SwsContext *c, const int16_t *buf[2], · 31 unmodified lines | ||
| 350 | 350 | const int16_t *ubuf[2], const int16_t *vbuf[2], |
| 351 | 351 | const int16_t *abuf[2], uint8_t *dest, int dstW, |
| 352 | 352 | int yalpha, int uvalpha, int y, |
| 353 | − enum PixelFormat target) | |
| 353 | + enum AVPixelFormat target) | |
| 354 | 354 | { |
| 355 | 355 | const int16_t *buf0 = buf[0], *buf1 = buf[1]; |
| 356 | 356 | const uint8_t * const d128 = dither_8x8_220[y & 7]; |
| @@ -385,7 +385,7 @@ static av_always_inline void · 28 unmodified lines | ||
| 385 | 385 | yuv2mono_1_c_template(SwsContext *c, const int16_t *buf0, |
| 386 | 386 | const int16_t *ubuf[2], const int16_t *vbuf[2], |
| 387 | 387 | const int16_t *abuf0, uint8_t *dest, int dstW, |
| 388 | − int uvalpha, int y, enum PixelFormat target) | |
| 388 | + int uvalpha, int y, enum AVPixelFormat target) | |
| 389 | 389 | { |
| 390 | 390 | const uint8_t * const d128 = dither_8x8_220[y & 7]; |
| 391 | 391 | int i; |
| @@ -441,11 +441,11 @@ static void name ## ext ## _1_c(SwsContext *c, const int16_t *buf0, \ · 49 unmodified lines | ||
| 441 | 441 | y, fmt); \ |
| 442 | 442 | } |
| 443 | 443 | |
| 444 | −YUV2PACKEDWRAPPER(yuv2mono,, white, PIX_FMT_MONOWHITE) | |
| 445 | −YUV2PACKEDWRAPPER(yuv2mono,, black, PIX_FMT_MONOBLACK) | |
| 444 | +YUV2PACKEDWRAPPER(yuv2mono,, white, AV_PIX_FMT_MONOWHITE) | |
| 445 | +YUV2PACKEDWRAPPER(yuv2mono,, black, AV_PIX_FMT_MONOBLACK) | |
| 446 | 446 | |
| 447 | 447 | #define output_pixels(pos, Y1, U, Y2, V) \ |
| 448 | − if (target == PIX_FMT_YUYV422) { \ | |
| 448 | + if (target == AV_PIX_FMT_YUYV422) { \ | |
| 449 | 449 | dest[pos + 0] = Y1; \ |
| 450 | 450 | dest[pos + 1] = U; \ |
| 451 | 451 | dest[pos + 2] = Y2; \ |
| @@ -463,7 +463,7 @@ yuv2422_X_c_template(SwsContext *c, const int16_t *lumFilter, · 11 unmodified lines | ||
| 463 | 463 | const int16_t *chrFilter, const int16_t **chrUSrc, |
| 464 | 464 | const int16_t **chrVSrc, int chrFilterSize, |
| 465 | 465 | const int16_t **alpSrc, uint8_t *dest, int dstW, |
| 466 | − int y, enum PixelFormat target) | |
| 466 | + int y, enum AVPixelFormat target) | |
| 467 | 467 | { |
| 468 | 468 | int i; |
| 469 | 469 | |
| @@ -501,7 +501,7 @@ yuv2422_2_c_template(SwsContext *c, const int16_t *buf[2], · 31 unmodified lines | ||
| 501 | 501 | const int16_t *ubuf[2], const int16_t *vbuf[2], |
| 502 | 502 | const int16_t *abuf[2], uint8_t *dest, int dstW, |
| 503 | 503 | int yalpha, int uvalpha, int y, |
| 504 | − enum PixelFormat target) | |
| 504 | + enum AVPixelFormat target) | |
| 505 | 505 | { |
| 506 | 506 | const int16_t *buf0 = buf[0], *buf1 = buf[1], |
| 507 | 507 | *ubuf0 = ubuf[0], *ubuf1 = ubuf[1], |
| @@ -529,7 +529,7 @@ static av_always_inline void · 21 unmodified lines | ||
| 529 | 529 | yuv2422_1_c_template(SwsContext *c, const int16_t *buf0, |
| 530 | 530 | const int16_t *ubuf[2], const int16_t *vbuf[2], |
| 531 | 531 | const int16_t *abuf0, uint8_t *dest, int dstW, |
| 532 | − int uvalpha, int y, enum PixelFormat target) | |
| 532 | + int uvalpha, int y, enum AVPixelFormat target) | |
| 533 | 533 | { |
| 534 | 534 | const int16_t *ubuf0 = ubuf[0], *vbuf0 = vbuf[0]; |
| 535 | 535 | int i; |
| @@ -568,11 +568,11 @@ yuv2422_1_c_template(SwsContext *c, const int16_t *buf0, · 32 unmodified lines | ||
| 568 | 568 | |
| 569 | 569 | #undef output_pixels |
| 570 | 570 | |
| 571 | −YUV2PACKEDWRAPPER(yuv2, 422, yuyv422, PIX_FMT_YUYV422) | |
| 572 | −YUV2PACKEDWRAPPER(yuv2, 422, uyvy422, PIX_FMT_UYVY422) | |
| 571 | +YUV2PACKEDWRAPPER(yuv2, 422, yuyv422, AV_PIX_FMT_YUYV422) | |
| 572 | +YUV2PACKEDWRAPPER(yuv2, 422, uyvy422, AV_PIX_FMT_UYVY422) | |
| 573 | 573 | |
| 574 | −#define R_B ((target == PIX_FMT_RGB48LE || target == PIX_FMT_RGB48BE) ? R : B) | |
| 575 | −#define B_R ((target == PIX_FMT_RGB48LE || target == PIX_FMT_RGB48BE) ? B : R) | |
| 574 | +#define R_B ((target == AV_PIX_FMT_RGB48LE || target == AV_PIX_FMT_RGB48BE) ? R : B) | |
| 575 | +#define B_R ((target == AV_PIX_FMT_RGB48LE || target == AV_PIX_FMT_RGB48BE) ? B : R) | |
| 576 | 576 | #define output_pixel(pos, val) \ |
| 577 | 577 | if (isBE(target)) { \ |
| 578 | 578 | AV_WB16(pos, val); \ |
| @@ -586,7 +586,7 @@ yuv2rgb48_X_c_template(SwsContext *c, const int16_t *lumFilter, · 7 unmodified lines | ||
| 586 | 586 | const int16_t *chrFilter, const int32_t **chrUSrc, |
| 587 | 587 | const int32_t **chrVSrc, int chrFilterSize, |
| 588 | 588 | const int32_t **alpSrc, uint16_t *dest, int dstW, |
| 589 | − int y, enum PixelFormat target) | |
| 589 | + int y, enum AVPixelFormat target) | |
| 590 | 590 | { |
| 591 | 591 | int i; |
| 592 | 592 | |
| @@ -644,7 +644,7 @@ yuv2rgb48_2_c_template(SwsContext *c, const int32_t *buf[2], · 51 unmodified lines | ||
| 644 | 644 | const int32_t *ubuf[2], const int32_t *vbuf[2], |
| 645 | 645 | const int32_t *abuf[2], uint16_t *dest, int dstW, |
| 646 | 646 | int yalpha, int uvalpha, int y, |
| 647 | − enum PixelFormat target) | |
| 647 | + enum AVPixelFormat target) | |
| 648 | 648 | { |
| 649 | 649 | const int32_t *buf0 = buf[0], *buf1 = buf[1], |
| 650 | 650 | *ubuf0 = ubuf[0], *ubuf1 = ubuf[1], |
| @@ -685,7 +685,7 @@ static av_always_inline void · 34 unmodified lines | ||
| 685 | 685 | yuv2rgb48_1_c_template(SwsContext *c, const int32_t *buf0, |
| 686 | 686 | const int32_t *ubuf[2], const int32_t *vbuf[2], |
| 687 | 687 | const int32_t *abuf0, uint16_t *dest, int dstW, |
| 688 | − int uvalpha, int y, enum PixelFormat target) | |
| 688 | + int uvalpha, int y, enum AVPixelFormat target) | |
| 689 | 689 | { |
| 690 | 690 | const int32_t *ubuf0 = ubuf[0], *vbuf0 = vbuf[0]; |
| 691 | 691 | int i; |
| @@ -798,10 +798,10 @@ static void name ## ext ## _1_c(SwsContext *c, const int16_t *_buf0, \ · 106 unmodified lines | ||
| 798 | 798 | dstW, uvalpha, y, fmt); \ |
| 799 | 799 | } |
| 800 | 800 | |
| 801 | −YUV2PACKED16WRAPPER(yuv2, rgb48, rgb48be, PIX_FMT_RGB48BE) | |
| 802 | −YUV2PACKED16WRAPPER(yuv2, rgb48, rgb48le, PIX_FMT_RGB48LE) | |
| 803 | −YUV2PACKED16WRAPPER(yuv2, rgb48, bgr48be, PIX_FMT_BGR48BE) | |
| 804 | −YUV2PACKED16WRAPPER(yuv2, rgb48, bgr48le, PIX_FMT_BGR48LE) | |
| 801 | +YUV2PACKED16WRAPPER(yuv2, rgb48, rgb48be, AV_PIX_FMT_RGB48BE) | |
| 802 | +YUV2PACKED16WRAPPER(yuv2, rgb48, rgb48le, AV_PIX_FMT_RGB48LE) | |
| 803 | +YUV2PACKED16WRAPPER(yuv2, rgb48, bgr48be, AV_PIX_FMT_BGR48BE) | |
| 804 | +YUV2PACKED16WRAPPER(yuv2, rgb48, bgr48le, AV_PIX_FMT_BGR48LE) | |
| 805 | 805 | |
| 806 | 806 | /* |
| 807 | 807 | * Write out 2 RGB pixels in the target pixel format. This function takes a |
| @@ -815,23 +815,23 @@ static av_always_inline void · 7 unmodified lines | ||
| 815 | 815 | yuv2rgb_write(uint8_t *_dest, int i, unsigned Y1, unsigned Y2, |
| 816 | 816 | unsigned A1, unsigned A2, |
| 817 | 817 | const void *_r, const void *_g, const void *_b, int y, |
| 818 | − enum PixelFormat target, int hasAlpha) | |
| 818 | + enum AVPixelFormat target, int hasAlpha) | |
| 819 | 819 | { |
| 820 | − if (target == PIX_FMT_ARGB || target == PIX_FMT_RGBA || | |
| 821 | − target == PIX_FMT_ABGR || target == PIX_FMT_BGRA) { | |
| 820 | + if (target == AV_PIX_FMT_ARGB || target == AV_PIX_FMT_RGBA || | |
| 821 | + target == AV_PIX_FMT_ABGR || target == AV_PIX_FMT_BGRA) { | |
| 822 | 822 | uint32_t *dest = (uint32_t *) _dest; |
| 823 | 823 | const uint32_t *r = (const uint32_t *) _r; |
| 824 | 824 | const uint32_t *g = (const uint32_t *) _g; |
| 825 | 825 | const uint32_t *b = (const uint32_t *) _b; |
| 826 | 826 | |
| 827 | 827 | #if CONFIG_SMALL |
| 828 | − int sh = hasAlpha ? ((target == PIX_FMT_RGB32_1 || target == PIX_FMT_BGR32_1) ? 0 : 24) : 0; | |
| 828 | + int sh = hasAlpha ? ((target == AV_PIX_FMT_RGB32_1 || target == AV_PIX_FMT_BGR32_1) ? 0 : 24) : 0; | |
| 829 | 829 | |
| 830 | 830 | dest[i * 2 + 0] = r[Y1] + g[Y1] + b[Y1] + (hasAlpha ? A1 << sh : 0); |
| 831 | 831 | dest[i * 2 + 1] = r[Y2] + g[Y2] + b[Y2] + (hasAlpha ? A2 << sh : 0); |
| 832 | 832 | #else |
| 833 | 833 | if (hasAlpha) { |
| 834 | − int sh = (target == PIX_FMT_RGB32_1 || target == PIX_FMT_BGR32_1) ? 0 : 24; | |
| 834 | + int sh = (target == AV_PIX_FMT_RGB32_1 || target == AV_PIX_FMT_BGR32_1) ? 0 : 24; | |
| 835 | 835 | |
| 836 | 836 | dest[i * 2 + 0] = r[Y1] + g[Y1] + b[Y1] + (A1 << sh); |
| 837 | 837 | dest[i * 2 + 1] = r[Y2] + g[Y2] + b[Y2] + (A2 << sh); |
| @@ -840,14 +840,14 @@ yuv2rgb_write(uint8_t *_dest, int i, unsigned Y1, unsigned Y2, · 2 unmodified lines | ||
| 840 | 840 | dest[i * 2 + 1] = r[Y2] + g[Y2] + b[Y2]; |
| 841 | 841 | } |
| 842 | 842 | #endif |
| 843 | − } else if (target == PIX_FMT_RGB24 || target == PIX_FMT_BGR24) { | |
| 843 | + } else if (target == AV_PIX_FMT_RGB24 || target == AV_PIX_FMT_BGR24) { | |
| 844 | 844 | uint8_t *dest = (uint8_t *) _dest; |
| 845 | 845 | const uint8_t *r = (const uint8_t *) _r; |
| 846 | 846 | const uint8_t *g = (const uint8_t *) _g; |
| 847 | 847 | const uint8_t *b = (const uint8_t *) _b; |
| 848 | 848 | |
| 849 | −#define r_b ((target == PIX_FMT_RGB24) ? r : b) | |
| 850 | −#define b_r ((target == PIX_FMT_RGB24) ? b : r) | |
| 849 | +#define r_b ((target == AV_PIX_FMT_RGB24) ? r : b) | |
| 850 | +#define b_r ((target == AV_PIX_FMT_RGB24) ? b : r) | |
| 851 | 851 | dest[i * 6 + 0] = r_b[Y1]; |
| 852 | 852 | dest[i * 6 + 1] = g[Y1]; |
| 853 | 853 | dest[i * 6 + 2] = b_r[Y1]; |
| @@ -856,23 +856,23 @@ yuv2rgb_write(uint8_t *_dest, int i, unsigned Y1, unsigned Y2, · 2 unmodified lines | ||
| 856 | 856 | dest[i * 6 + 5] = b_r[Y2]; |
| 857 | 857 | #undef r_b |
| 858 | 858 | #undef b_r |
| 859 | − } else if (target == PIX_FMT_RGB565 || target == PIX_FMT_BGR565 || | |
| 860 | − target == PIX_FMT_RGB555 || target == PIX_FMT_BGR555 || | |
| 861 | − target == PIX_FMT_RGB444 || target == PIX_FMT_BGR444) { | |
| 859 | + } else if (target == AV_PIX_FMT_RGB565 || target == AV_PIX_FMT_BGR565 || | |
| 860 | + target == AV_PIX_FMT_RGB555 || target == AV_PIX_FMT_BGR555 || | |
| 861 | + target == AV_PIX_FMT_RGB444 || target == AV_PIX_FMT_BGR444) { | |
| 862 | 862 | uint16_t *dest = (uint16_t *) _dest; |
| 863 | 863 | const uint16_t *r = (const uint16_t *) _r; |
| 864 | 864 | const uint16_t *g = (const uint16_t *) _g; |
| 865 | 865 | const uint16_t *b = (const uint16_t *) _b; |
| 866 | 866 | int dr1, dg1, db1, dr2, dg2, db2; |
| 867 | 867 | |
| 868 | − if (target == PIX_FMT_RGB565 || target == PIX_FMT_BGR565) { | |
| 868 | + if (target == AV_PIX_FMT_RGB565 || target == AV_PIX_FMT_BGR565) { | |
| 869 | 869 | dr1 = dither_2x2_8[ y & 1 ][0]; |
| 870 | 870 | dg1 = dither_2x2_4[ y & 1 ][0]; |
| 871 | 871 | db1 = dither_2x2_8[(y & 1) ^ 1][0]; |
| 872 | 872 | dr2 = dither_2x2_8[ y & 1 ][1]; |
| 873 | 873 | dg2 = dither_2x2_4[ y & 1 ][1]; |
| 874 | 874 | db2 = dither_2x2_8[(y & 1) ^ 1][1]; |
| 875 | − } else if (target == PIX_FMT_RGB555 || target == PIX_FMT_BGR555) { | |
| 875 | + } else if (target == AV_PIX_FMT_RGB555 || target == AV_PIX_FMT_BGR555) { | |
| 876 | 876 | dr1 = dither_2x2_8[ y & 1 ][0]; |
| 877 | 877 | dg1 = dither_2x2_8[ y & 1 ][1]; |
| 878 | 878 | db1 = dither_2x2_8[(y & 1) ^ 1][0]; |
| @@ -897,7 +897,7 @@ yuv2rgb_write(uint8_t *_dest, int i, unsigned Y1, unsigned Y2, · 18 unmodified lines | ||
| 897 | 897 | const uint8_t *b = (const uint8_t *) _b; |
| 898 | 898 | int dr1, dg1, db1, dr2, dg2, db2; |
| 899 | 899 | |
| 900 | − if (target == PIX_FMT_RGB8 || target == PIX_FMT_BGR8) { | |
| 900 | + if (target == AV_PIX_FMT_RGB8 || target == AV_PIX_FMT_BGR8) { | |
| 901 | 901 | const uint8_t * const d64 = dither_8x8_73[y & 7]; |
| 902 | 902 | const uint8_t * const d32 = dither_8x8_32[y & 7]; |
| 903 | 903 | dr1 = dg1 = d32[(i * 2 + 0) & 7]; |
| @@ -913,7 +913,7 @@ yuv2rgb_write(uint8_t *_dest, int i, unsigned Y1, unsigned Y2, · 9 unmodified lines | ||
| 913 | 913 | dg2 = d64[(i * 2 + 1) & 7]; |
| 914 | 914 | } |
| 915 | 915 | |
| 916 | − if (target == PIX_FMT_RGB4 || target == PIX_FMT_BGR4) { | |
| 916 | + if (target == AV_PIX_FMT_RGB4 || target == AV_PIX_FMT_BGR4) { | |
| 917 | 917 | dest[i] = r[Y1 + dr1] + g[Y1 + dg1] + b[Y1 + db1] + |
| 918 | 918 | ((r[Y2 + dr2] + g[Y2 + dg2] + b[Y2 + db2]) << 4); |
| 919 | 919 | } else { |
| @@ -929,7 +929,7 @@ yuv2rgb_X_c_template(SwsContext *c, const int16_t *lumFilter, · 9 unmodified lines | ||
| 929 | 929 | const int16_t *chrFilter, const int16_t **chrUSrc, |
| 930 | 930 | const int16_t **chrVSrc, int chrFilterSize, |
| 931 | 931 | const int16_t **alpSrc, uint8_t *dest, int dstW, |
| 932 | − int y, enum PixelFormat target, int hasAlpha) | |
| 932 | + int y, enum AVPixelFormat target, int hasAlpha) | |
| 933 | 933 | { |
| 934 | 934 | int i; |
| 935 | 935 | |
| @@ -989,7 +989,7 @@ yuv2rgb_2_c_template(SwsContext *c, const int16_t *buf[2], · 53 unmodified lines | ||
| 989 | 989 | const int16_t *ubuf[2], const int16_t *vbuf[2], |
| 990 | 990 | const int16_t *abuf[2], uint8_t *dest, int dstW, |
| 991 | 991 | int yalpha, int uvalpha, int y, |
| 992 | − enum PixelFormat target, int hasAlpha) | |
| 992 | + enum AVPixelFormat target, int hasAlpha) | |
| 993 | 993 | { |
| 994 | 994 | const int16_t *buf0 = buf[0], *buf1 = buf[1], |
| 995 | 995 | *ubuf0 = ubuf[0], *ubuf1 = ubuf[1], |
| @@ -1033,7 +1033,7 @@ static av_always_inline void · 37 unmodified lines | ||
| 1033 | 1033 | yuv2rgb_1_c_template(SwsContext *c, const int16_t *buf0, |
| 1034 | 1034 | const int16_t *ubuf[2], const int16_t *vbuf[2], |
| 1035 | 1035 | const int16_t *abuf0, uint8_t *dest, int dstW, |
| 1036 | − int uvalpha, int y, enum PixelFormat target, | |
| 1036 | + int uvalpha, int y, enum AVPixelFormat target, | |
| 1037 | 1037 | int hasAlpha) |
| 1038 | 1038 | { |
| 1039 | 1039 | const int16_t *ubuf0 = ubuf[0], *vbuf0 = vbuf[0]; |
| @@ -1132,24 +1132,24 @@ static void name ## ext ## _1_c(SwsContext *c, const int16_t *buf0, \ · 92 unmodified lines | ||
| 1132 | 1132 | } |
| 1133 | 1133 | |
| 1134 | 1134 | #if CONFIG_SMALL |
| 1135 | −YUV2RGBWRAPPER(yuv2rgb,, 32_1, PIX_FMT_RGB32_1, CONFIG_SWSCALE_ALPHA && c->alpPixBuf) | |
| 1136 | −YUV2RGBWRAPPER(yuv2rgb,, 32, PIX_FMT_RGB32, CONFIG_SWSCALE_ALPHA && c->alpPixBuf) | |
| 1135 | +YUV2RGBWRAPPER(yuv2rgb,, 32_1, AV_PIX_FMT_RGB32_1, CONFIG_SWSCALE_ALPHA && c->alpPixBuf) | |
| 1136 | +YUV2RGBWRAPPER(yuv2rgb,, 32, AV_PIX_FMT_RGB32, CONFIG_SWSCALE_ALPHA && c->alpPixBuf) | |
| 1137 | 1137 | #else |
| 1138 | 1138 | #if CONFIG_SWSCALE_ALPHA |
| 1139 | −YUV2RGBWRAPPER(yuv2rgb,, a32_1, PIX_FMT_RGB32_1, 1) | |
| 1140 | −YUV2RGBWRAPPER(yuv2rgb,, a32, PIX_FMT_RGB32, 1) | |
| 1139 | +YUV2RGBWRAPPER(yuv2rgb,, a32_1, AV_PIX_FMT_RGB32_1, 1) | |
| 1140 | +YUV2RGBWRAPPER(yuv2rgb,, a32, AV_PIX_FMT_RGB32, 1) | |
| 1141 | 1141 | #endif |
| 1142 | −YUV2RGBWRAPPER(yuv2rgb,, x32_1, PIX_FMT_RGB32_1, 0) | |
| 1143 | −YUV2RGBWRAPPER(yuv2rgb,, x32, PIX_FMT_RGB32, 0) | |
| 1142 | +YUV2RGBWRAPPER(yuv2rgb,, x32_1, AV_PIX_FMT_RGB32_1, 0) | |
| 1143 | +YUV2RGBWRAPPER(yuv2rgb,, x32, AV_PIX_FMT_RGB32, 0) | |
| 1144 | 1144 | #endif |
| 1145 | −YUV2RGBWRAPPER(yuv2, rgb, rgb24, PIX_FMT_RGB24, 0) | |
| 1146 | −YUV2RGBWRAPPER(yuv2, rgb, bgr24, PIX_FMT_BGR24, 0) | |
| 1147 | −YUV2RGBWRAPPER(yuv2rgb,, 16, PIX_FMT_RGB565, 0) | |
| 1148 | −YUV2RGBWRAPPER(yuv2rgb,, 15, PIX_FMT_RGB555, 0) | |
| 1149 | −YUV2RGBWRAPPER(yuv2rgb,, 12, PIX_FMT_RGB444, 0) | |
| 1150 | −YUV2RGBWRAPPER(yuv2rgb,, 8, PIX_FMT_RGB8, 0) | |
| 1151 | −YUV2RGBWRAPPER(yuv2rgb,, 4, PIX_FMT_RGB4, 0) | |
| 1152 | −YUV2RGBWRAPPER(yuv2rgb,, 4b, PIX_FMT_RGB4_BYTE, 0) | |
| 1145 | +YUV2RGBWRAPPER(yuv2, rgb, rgb24, AV_PIX_FMT_RGB24, 0) | |
| 1146 | +YUV2RGBWRAPPER(yuv2, rgb, bgr24, AV_PIX_FMT_BGR24, 0) | |
| 1147 | +YUV2RGBWRAPPER(yuv2rgb,, 16, AV_PIX_FMT_RGB565, 0) | |
| 1148 | +YUV2RGBWRAPPER(yuv2rgb,, 15, AV_PIX_FMT_RGB555, 0) | |
| 1149 | +YUV2RGBWRAPPER(yuv2rgb,, 12, AV_PIX_FMT_RGB444, 0) | |
| 1150 | +YUV2RGBWRAPPER(yuv2rgb,, 8, AV_PIX_FMT_RGB8, 0) | |
| 1151 | +YUV2RGBWRAPPER(yuv2rgb,, 4, AV_PIX_FMT_RGB4, 0) | |
| 1152 | +YUV2RGBWRAPPER(yuv2rgb,, 4b, AV_PIX_FMT_RGB4_BYTE, 0) | |
| 1153 | 1153 | |
| 1154 | 1154 | static av_always_inline void |
| 1155 | 1155 | yuv2rgb_full_X_c_template(SwsContext *c, const int16_t *lumFilter, |
| @@ -1157,10 +1157,10 @@ yuv2rgb_full_X_c_template(SwsContext *c, const int16_t *lumFilter, · 1 unmodified line | ||
| 1157 | 1157 | const int16_t *chrFilter, const int16_t **chrUSrc, |
| 1158 | 1158 | const int16_t **chrVSrc, int chrFilterSize, |
| 1159 | 1159 | const int16_t **alpSrc, uint8_t *dest, |
| 1160 | − int dstW, int y, enum PixelFormat target, int hasAlpha) | |
| 1160 | + int dstW, int y, enum AVPixelFormat target, int hasAlpha) | |
| 1161 | 1161 | { |
| 1162 | 1162 | int i; |
| 1163 | − int step = (target == PIX_FMT_RGB24 || target == PIX_FMT_BGR24) ? 3 : 4; | |
| 1163 | + int step = (target == AV_PIX_FMT_RGB24 || target == AV_PIX_FMT_BGR24) ? 3 : 4; | |
| 1164 | 1164 | |
| 1165 | 1165 | for (i = 0; i < dstW; i++) { |
| 1166 | 1166 | int j; |
| @@ -1201,36 +1201,36 @@ yuv2rgb_full_X_c_template(SwsContext *c, const int16_t *lumFilter, · 34 unmodified lines | ||
| 1201 | 1201 | } |
| 1202 | 1202 | |
| 1203 | 1203 | switch(target) { |
| 1204 | − case PIX_FMT_ARGB: | |
| 1204 | + case AV_PIX_FMT_ARGB: | |
| 1205 | 1205 | dest[0] = hasAlpha ? A : 255; |
| 1206 | 1206 | dest[1] = R >> 22; |
| 1207 | 1207 | dest[2] = G >> 22; |
| 1208 | 1208 | dest[3] = B >> 22; |
| 1209 | 1209 | break; |
| 1210 | − case PIX_FMT_RGB24: | |
| 1210 | + case AV_PIX_FMT_RGB24: | |
| 1211 | 1211 | dest[0] = R >> 22; |
| 1212 | 1212 | dest[1] = G >> 22; |
| 1213 | 1213 | dest[2] = B >> 22; |
| 1214 | 1214 | break; |
| 1215 | − case PIX_FMT_RGBA: | |
| 1215 | + case AV_PIX_FMT_RGBA: | |
| 1216 | 1216 | dest[0] = R >> 22; |
| 1217 | 1217 | dest[1] = G >> 22; |
| 1218 | 1218 | dest[2] = B >> 22; |
| 1219 | 1219 | dest[3] = hasAlpha ? A : 255; |
| 1220 | 1220 | break; |
| 1221 | − case PIX_FMT_ABGR: | |
| 1221 | + case AV_PIX_FMT_ABGR: | |
| 1222 | 1222 | dest[0] = hasAlpha ? A : 255; |
| 1223 | 1223 | dest[1] = B >> 22; |
| 1224 | 1224 | dest[2] = G >> 22; |
| 1225 | 1225 | dest[3] = R >> 22; |
| 1226 | 1226 | dest += 4; |
| 1227 | 1227 | break; |
| 1228 | − case PIX_FMT_BGR24: | |
| 1228 | + case AV_PIX_FMT_BGR24: | |
| 1229 | 1229 | dest[0] = B >> 22; |
| 1230 | 1230 | dest[1] = G >> 22; |
| 1231 | 1231 | dest[2] = R >> 22; |
| 1232 | 1232 | break; |
| 1233 | − case PIX_FMT_BGRA: | |
| 1233 | + case AV_PIX_FMT_BGRA: | |
| 1234 | 1234 | dest[0] = B >> 22; |
| 1235 | 1235 | dest[1] = G >> 22; |
| 1236 | 1236 | dest[2] = R >> 22; |
| @@ -1242,24 +1242,24 @@ yuv2rgb_full_X_c_template(SwsContext *c, const int16_t *lumFilter, · 5 unmodified lines | ||
| 1242 | 1242 | } |
| 1243 | 1243 | |
| 1244 | 1244 | #if CONFIG_SMALL |
| 1245 | −YUV2RGBWRAPPERX(yuv2, rgb_full, bgra32_full, PIX_FMT_BGRA, CONFIG_SWSCALE_ALPHA && c->alpPixBuf) | |
| 1246 | −YUV2RGBWRAPPERX(yuv2, rgb_full, abgr32_full, PIX_FMT_ABGR, CONFIG_SWSCALE_ALPHA && c->alpPixBuf) | |
| 1247 | −YUV2RGBWRAPPERX(yuv2, rgb_full, rgba32_full, PIX_FMT_RGBA, CONFIG_SWSCALE_ALPHA && c->alpPixBuf) | |
| 1248 | −YUV2RGBWRAPPERX(yuv2, rgb_full, argb32_full, PIX_FMT_ARGB, CONFIG_SWSCALE_ALPHA && c->alpPixBuf) | |
| 1245 | +YUV2RGBWRAPPERX(yuv2, rgb_full, bgra32_full, AV_PIX_FMT_BGRA, CONFIG_SWSCALE_ALPHA && c->alpPixBuf) | |
| 1246 | +YUV2RGBWRAPPERX(yuv2, rgb_full, abgr32_full, AV_PIX_FMT_ABGR, CONFIG_SWSCALE_ALPHA && c->alpPixBuf) | |
| 1247 | +YUV2RGBWRAPPERX(yuv2, rgb_full, rgba32_full, AV_PIX_FMT_RGBA, CONFIG_SWSCALE_ALPHA && c->alpPixBuf) | |
| 1248 | +YUV2RGBWRAPPERX(yuv2, rgb_full, argb32_full, AV_PIX_FMT_ARGB, CONFIG_SWSCALE_ALPHA && c->alpPixBuf) | |
| 1249 | 1249 | #else |
| 1250 | 1250 | #if CONFIG_SWSCALE_ALPHA |
| 1251 | −YUV2RGBWRAPPERX(yuv2, rgb_full, bgra32_full, PIX_FMT_BGRA, 1) | |
| 1252 | −YUV2RGBWRAPPERX(yuv2, rgb_full, abgr32_full, PIX_FMT_ABGR, 1) | |
| 1253 | −YUV2RGBWRAPPERX(yuv2, rgb_full, rgba32_full, PIX_FMT_RGBA, 1) | |
| 1254 | −YUV2RGBWRAPPERX(yuv2, rgb_full, argb32_full, PIX_FMT_ARGB, 1) | |
| 1251 | +YUV2RGBWRAPPERX(yuv2, rgb_full, bgra32_full, AV_PIX_FMT_BGRA, 1) | |
| 1252 | +YUV2RGBWRAPPERX(yuv2, rgb_full, abgr32_full, AV_PIX_FMT_ABGR, 1) | |
| 1253 | +YUV2RGBWRAPPERX(yuv2, rgb_full, rgba32_full, AV_PIX_FMT_RGBA, 1) | |
| 1254 | +YUV2RGBWRAPPERX(yuv2, rgb_full, argb32_full, AV_PIX_FMT_ARGB, 1) | |
| 1255 | 1255 | #endif |
| 1256 | −YUV2RGBWRAPPERX(yuv2, rgb_full, bgrx32_full, PIX_FMT_BGRA, 0) | |
| 1257 | −YUV2RGBWRAPPERX(yuv2, rgb_full, xbgr32_full, PIX_FMT_ABGR, 0) | |
| 1258 | −YUV2RGBWRAPPERX(yuv2, rgb_full, rgbx32_full, PIX_FMT_RGBA, 0) | |
| 1259 | −YUV2RGBWRAPPERX(yuv2, rgb_full, xrgb32_full, PIX_FMT_ARGB, 0) | |
| 1256 | +YUV2RGBWRAPPERX(yuv2, rgb_full, bgrx32_full, AV_PIX_FMT_BGRA, 0) | |
| 1257 | +YUV2RGBWRAPPERX(yuv2, rgb_full, xbgr32_full, AV_PIX_FMT_ABGR, 0) | |
| 1258 | +YUV2RGBWRAPPERX(yuv2, rgb_full, rgbx32_full, AV_PIX_FMT_RGBA, 0) | |
| 1259 | +YUV2RGBWRAPPERX(yuv2, rgb_full, xrgb32_full, AV_PIX_FMT_ARGB, 0) | |
| 1260 | 1260 | #endif |
| 1261 | −YUV2RGBWRAPPERX(yuv2, rgb_full, bgr24_full, PIX_FMT_BGR24, 0) | |
| 1262 | −YUV2RGBWRAPPERX(yuv2, rgb_full, rgb24_full, PIX_FMT_RGB24, 0) | |
| 1261 | +YUV2RGBWRAPPERX(yuv2, rgb_full, bgr24_full, AV_PIX_FMT_BGR24, 0) | |
| 1262 | +YUV2RGBWRAPPERX(yuv2, rgb_full, rgb24_full, AV_PIX_FMT_RGB24, 0) | |
| 1263 | 1263 | |
| 1264 | 1264 | av_cold void ff_sws_init_output_funcs(SwsContext *c, |
| 1265 | 1265 | yuv2planar1_fn *yuv2plane1, |
| @@ -1269,7 +1269,7 @@ av_cold void ff_sws_init_output_funcs(SwsContext *c, · 3 unmodified lines | ||
| 1269 | 1269 | yuv2packed2_fn *yuv2packed2, |
| 1270 | 1270 | yuv2packedX_fn *yuv2packedX) |
| 1271 | 1271 | { |
| 1272 | − enum PixelFormat dstFormat = c->dstFormat; | |
| 1272 | + enum AVPixelFormat dstFormat = c->dstFormat; | |
| 1273 | 1273 | |
| 1274 | 1274 | if (is16BPS(dstFormat)) { |
| 1275 | 1275 | *yuv2planeX = isBE(dstFormat) ? yuv2planeX_16BE_c : yuv2planeX_16LE_c; |
| @@ -1285,13 +1285,13 @@ av_cold void ff_sws_init_output_funcs(SwsContext *c, · 9 unmodified lines | ||
| 1285 | 1285 | } else { |
| 1286 | 1286 | *yuv2plane1 = yuv2plane1_8_c; |
| 1287 | 1287 | *yuv2planeX = yuv2planeX_8_c; |
| 1288 | − if (dstFormat == PIX_FMT_NV12 || dstFormat == PIX_FMT_NV21) | |
| 1288 | + if (dstFormat == AV_PIX_FMT_NV12 || dstFormat == AV_PIX_FMT_NV21) | |
| 1289 | 1289 | *yuv2nv12cX = yuv2nv12cX_c; |
| 1290 | 1290 | } |
| 1291 | 1291 | |
| 1292 | 1292 | if(c->flags & SWS_FULL_CHR_H_INT) { |
| 1293 | 1293 | switch (dstFormat) { |
| 1294 | − case PIX_FMT_RGBA: | |
| 1294 | + case AV_PIX_FMT_RGBA: | |
| 1295 | 1295 | #if CONFIG_SMALL |
| 1296 | 1296 | *yuv2packedX = yuv2rgba32_full_X_c; |
| 1297 | 1297 | #else |
| @@ -1305,7 +1305,7 @@ av_cold void ff_sws_init_output_funcs(SwsContext *c, · 7 unmodified lines | ||
| 1305 | 1305 | } |
| 1306 | 1306 | #endif /* !CONFIG_SMALL */ |
| 1307 | 1307 | break; |
| 1308 | − case PIX_FMT_ARGB: | |
| 1308 | + case AV_PIX_FMT_ARGB: | |
| 1309 | 1309 | #if CONFIG_SMALL |
| 1310 | 1310 | *yuv2packedX = yuv2argb32_full_X_c; |
| 1311 | 1311 | #else |
| @@ -1319,7 +1319,7 @@ av_cold void ff_sws_init_output_funcs(SwsContext *c, · 7 unmodified lines | ||
| 1319 | 1319 | } |
| 1320 | 1320 | #endif /* !CONFIG_SMALL */ |
| 1321 | 1321 | break; |
| 1322 | − case PIX_FMT_BGRA: | |
| 1322 | + case AV_PIX_FMT_BGRA: | |
| 1323 | 1323 | #if CONFIG_SMALL |
| 1324 | 1324 | *yuv2packedX = yuv2bgra32_full_X_c; |
| 1325 | 1325 | #else |
| @@ -1333,7 +1333,7 @@ av_cold void ff_sws_init_output_funcs(SwsContext *c, · 7 unmodified lines | ||
| 1333 | 1333 | } |
| 1334 | 1334 | #endif /* !CONFIG_SMALL */ |
| 1335 | 1335 | break; |
| 1336 | − case PIX_FMT_ABGR: | |
| 1336 | + case AV_PIX_FMT_ABGR: | |
| 1337 | 1337 | #if CONFIG_SMALL |
| 1338 | 1338 | *yuv2packedX = yuv2abgr32_full_X_c; |
| 1339 | 1339 | #else |
| @@ -1347,37 +1347,37 @@ av_cold void ff_sws_init_output_funcs(SwsContext *c, · 7 unmodified lines | ||
| 1347 | 1347 | } |
| 1348 | 1348 | #endif /* !CONFIG_SMALL */ |
| 1349 | 1349 | break; |
| 1350 | − case PIX_FMT_RGB24: | |
| 1350 | + case AV_PIX_FMT_RGB24: | |
| 1351 | 1351 | *yuv2packedX = yuv2rgb24_full_X_c; |
| 1352 | 1352 | break; |
| 1353 | − case PIX_FMT_BGR24: | |
| 1353 | + case AV_PIX_FMT_BGR24: | |
| 1354 | 1354 | *yuv2packedX = yuv2bgr24_full_X_c; |
| 1355 | 1355 | break; |
| 1356 | 1356 | } |
| 1357 | 1357 | } else { |
| 1358 | 1358 | switch (dstFormat) { |
| 1359 | − case PIX_FMT_RGB48LE: | |
| 1359 | + case AV_PIX_FMT_RGB48LE: | |
| 1360 | 1360 | *yuv2packed1 = yuv2rgb48le_1_c; |
| 1361 | 1361 | *yuv2packed2 = yuv2rgb48le_2_c; |
| 1362 | 1362 | *yuv2packedX = yuv2rgb48le_X_c; |
| 1363 | 1363 | break; |
| 1364 | − case PIX_FMT_RGB48BE: | |
| 1364 | + case AV_PIX_FMT_RGB48BE: | |
| 1365 | 1365 | *yuv2packed1 = yuv2rgb48be_1_c; |
| 1366 | 1366 | *yuv2packed2 = yuv2rgb48be_2_c; |
| 1367 | 1367 | *yuv2packedX = yuv2rgb48be_X_c; |
| 1368 | 1368 | break; |
| 1369 | − case PIX_FMT_BGR48LE: | |
| 1369 | + case AV_PIX_FMT_BGR48LE: | |
| 1370 | 1370 | *yuv2packed1 = yuv2bgr48le_1_c; |
| 1371 | 1371 | *yuv2packed2 = yuv2bgr48le_2_c; |
| 1372 | 1372 | *yuv2packedX = yuv2bgr48le_X_c; |
| 1373 | 1373 | break; |
| 1374 | − case PIX_FMT_BGR48BE: | |
| 1374 | + case AV_PIX_FMT_BGR48BE: | |
| 1375 | 1375 | *yuv2packed1 = yuv2bgr48be_1_c; |
| 1376 | 1376 | *yuv2packed2 = yuv2bgr48be_2_c; |
| 1377 | 1377 | *yuv2packedX = yuv2bgr48be_X_c; |
| 1378 | 1378 | break; |
| 1379 | − case PIX_FMT_RGB32: | |
| 1380 | − case PIX_FMT_BGR32: | |
| 1379 | + case AV_PIX_FMT_RGB32: | |
| 1380 | + case AV_PIX_FMT_BGR32: | |
| 1381 | 1381 | #if CONFIG_SMALL |
| 1382 | 1382 | *yuv2packed1 = yuv2rgb32_1_c; |
| 1383 | 1383 | *yuv2packed2 = yuv2rgb32_2_c; |
| @@ -1397,8 +1397,8 @@ av_cold void ff_sws_init_output_funcs(SwsContext *c, · 13 unmodified lines | ||
| 1397 | 1397 | } |
| 1398 | 1398 | #endif /* !CONFIG_SMALL */ |
| 1399 | 1399 | break; |
| 1400 | − case PIX_FMT_RGB32_1: | |
| 1401 | − case PIX_FMT_BGR32_1: | |
| 1400 | + case AV_PIX_FMT_RGB32_1: | |
| 1401 | + case AV_PIX_FMT_BGR32_1: | |
| 1402 | 1402 | #if CONFIG_SMALL |
| 1403 | 1403 | *yuv2packed1 = yuv2rgb32_1_1_c; |
| 1404 | 1404 | *yuv2packed2 = yuv2rgb32_1_2_c; |
| @@ -1418,54 +1418,54 @@ av_cold void ff_sws_init_output_funcs(SwsContext *c, · 13 unmodified lines | ||
| 1418 | 1418 | } |
| 1419 | 1419 | #endif /* !CONFIG_SMALL */ |
| 1420 | 1420 | break; |
| 1421 | − case PIX_FMT_RGB24: | |
| 1421 | + case AV_PIX_FMT_RGB24: | |
| 1422 | 1422 | *yuv2packed1 = yuv2rgb24_1_c; |
| 1423 | 1423 | *yuv2packed2 = yuv2rgb24_2_c; |
| 1424 | 1424 | *yuv2packedX = yuv2rgb24_X_c; |
| 1425 | 1425 | break; |
| 1426 | − case PIX_FMT_BGR24: | |
| 1426 | + case AV_PIX_FMT_BGR24: | |
| 1427 | 1427 | *yuv2packed1 = yuv2bgr24_1_c; |
| 1428 | 1428 | *yuv2packed2 = yuv2bgr24_2_c; |
| 1429 | 1429 | *yuv2packedX = yuv2bgr24_X_c; |
| 1430 | 1430 | break; |
| 1431 | − case PIX_FMT_RGB565LE: | |
| 1432 | − case PIX_FMT_RGB565BE: | |
| 1433 | − case PIX_FMT_BGR565LE: | |
| 1434 | − case PIX_FMT_BGR565BE: | |
| 1431 | + case AV_PIX_FMT_RGB565LE: | |
| 1432 | + case AV_PIX_FMT_RGB565BE: | |
| 1433 | + case AV_PIX_FMT_BGR565LE: | |
| 1434 | + case AV_PIX_FMT_BGR565BE: | |
| 1435 | 1435 | *yuv2packed1 = yuv2rgb16_1_c; |
| 1436 | 1436 | *yuv2packed2 = yuv2rgb16_2_c; |
| 1437 | 1437 | *yuv2packedX = yuv2rgb16_X_c; |
| 1438 | 1438 | break; |
| 1439 | − case PIX_FMT_RGB555LE: | |
| 1440 | − case PIX_FMT_RGB555BE: | |
| 1441 | − case PIX_FMT_BGR555LE: | |
| 1442 | − case PIX_FMT_BGR555BE: | |
| 1439 | + case AV_PIX_FMT_RGB555LE: | |
| 1440 | + case AV_PIX_FMT_RGB555BE: | |
| 1441 | + case AV_PIX_FMT_BGR555LE: | |
| 1442 | + case AV_PIX_FMT_BGR555BE: | |
| 1443 | 1443 | *yuv2packed1 = yuv2rgb15_1_c; |
| 1444 | 1444 | *yuv2packed2 = yuv2rgb15_2_c; |
| 1445 | 1445 | *yuv2packedX = yuv2rgb15_X_c; |
| 1446 | 1446 | break; |
| 1447 | − case PIX_FMT_RGB444LE: | |
| 1448 | − case PIX_FMT_RGB444BE: | |
| 1449 | − case PIX_FMT_BGR444LE: | |
| 1450 | − case PIX_FMT_BGR444BE: | |
| 1447 | + case AV_PIX_FMT_RGB444LE: | |
| 1448 | + case AV_PIX_FMT_RGB444BE: | |
| 1449 | + case AV_PIX_FMT_BGR444LE: | |
| 1450 | + case AV_PIX_FMT_BGR444BE: | |
| 1451 | 1451 | *yuv2packed1 = yuv2rgb12_1_c; |
| 1452 | 1452 | *yuv2packed2 = yuv2rgb12_2_c; |
| 1453 | 1453 | *yuv2packedX = yuv2rgb12_X_c; |
| 1454 | 1454 | break; |
| 1455 | − case PIX_FMT_RGB8: | |
| 1456 | − case PIX_FMT_BGR8: | |
| 1455 | + case AV_PIX_FMT_RGB8: | |
| 1456 | + case AV_PIX_FMT_BGR8: | |
| 1457 | 1457 | *yuv2packed1 = yuv2rgb8_1_c; |
| 1458 | 1458 | *yuv2packed2 = yuv2rgb8_2_c; |
| 1459 | 1459 | *yuv2packedX = yuv2rgb8_X_c; |
| 1460 | 1460 | break; |
| 1461 | − case PIX_FMT_RGB4: | |
| 1462 | − case PIX_FMT_BGR4: | |
| 1461 | + case AV_PIX_FMT_RGB4: | |
| 1462 | + case AV_PIX_FMT_BGR4: | |
| 1463 | 1463 | *yuv2packed1 = yuv2rgb4_1_c; |
| 1464 | 1464 | *yuv2packed2 = yuv2rgb4_2_c; |
| 1465 | 1465 | *yuv2packedX = yuv2rgb4_X_c; |
| 1466 | 1466 | break; |
| 1467 | − case PIX_FMT_RGB4_BYTE: | |
| 1468 | − case PIX_FMT_BGR4_BYTE: | |
| 1467 | + case AV_PIX_FMT_RGB4_BYTE: | |
| 1468 | + case AV_PIX_FMT_BGR4_BYTE: | |
| 1469 | 1469 | *yuv2packed1 = yuv2rgb4b_1_c; |
| 1470 | 1470 | *yuv2packed2 = yuv2rgb4b_2_c; |
| 1471 | 1471 | *yuv2packedX = yuv2rgb4b_X_c; |
| @@ -1473,22 +1473,22 @@ av_cold void ff_sws_init_output_funcs(SwsContext *c, · 1 unmodified line | ||
| 1473 | 1473 | } |
| 1474 | 1474 | } |
| 1475 | 1475 | switch (dstFormat) { |
| 1476 | − case PIX_FMT_MONOWHITE: | |
| 1476 | + case AV_PIX_FMT_MONOWHITE: | |
| 1477 | 1477 | *yuv2packed1 = yuv2monowhite_1_c; |
| 1478 | 1478 | *yuv2packed2 = yuv2monowhite_2_c; |
| 1479 | 1479 | *yuv2packedX = yuv2monowhite_X_c; |
| 1480 | 1480 | break; |
| 1481 | − case PIX_FMT_MONOBLACK: | |
| 1481 | + case AV_PIX_FMT_MONOBLACK: | |
| 1482 | 1482 | *yuv2packed1 = yuv2monoblack_1_c; |
| 1483 | 1483 | *yuv2packed2 = yuv2monoblack_2_c; |
| 1484 | 1484 | *yuv2packedX = yuv2monoblack_X_c; |
| 1485 | 1485 | break; |
| 1486 | − case PIX_FMT_YUYV422: | |
| 1486 | + case AV_PIX_FMT_YUYV422: | |
| 1487 | 1487 | *yuv2packed1 = yuv2yuyv422_1_c; |
| 1488 | 1488 | *yuv2packed2 = yuv2yuyv422_2_c; |
| 1489 | 1489 | *yuv2packedX = yuv2yuyv422_X_c; |
| 1490 | 1490 | break; |
| 1491 | − case PIX_FMT_UYVY422: | |
| 1491 | + case AV_PIX_FMT_UYVY422: | |
| 1492 | 1492 | *yuv2packed1 = yuv2uyvy422_1_c; |
| 1493 | 1493 | *yuv2packed2 = yuv2uyvy422_2_c; |
| 1494 | 1494 | *yuv2packedX = yuv2uyvy422_X_c; |
| @@ -287,7 +287,7 @@ static void hScale_altivec_real(SwsContext *c, int16_t *dst, int dstW, · 286 unmodified lines | ||
| 287 | 287 | |
| 288 | 288 | av_cold void ff_sws_init_swScale_altivec(SwsContext *c) |
| 289 | 289 | { |
| 290 | − enum PixelFormat dstFormat = c->dstFormat; | |
| 290 | + enum AVPixelFormat dstFormat = c->dstFormat; | |
| 291 | 291 | |
| 292 | 292 | if (!(av_get_cpu_flags() & AV_CPU_FLAG_ALTIVEC)) |
| 293 | 293 | return; |
| @@ -296,7 +296,7 @@ av_cold void ff_sws_init_swScale_altivec(SwsContext *c) · 2 unmodified lines | ||
| 296 | 296 | c->hyScale = c->hcScale = hScale_altivec_real; |
| 297 | 297 | } |
| 298 | 298 | if (!is16BPS(dstFormat) && !is9_OR_10BPS(dstFormat) && |
| 299 | − dstFormat != PIX_FMT_NV12 && dstFormat != PIX_FMT_NV21 && | |
| 299 | + dstFormat != AV_PIX_FMT_NV12 && dstFormat != AV_PIX_FMT_NV21 && | |
| 300 | 300 | !c->alpPixBuf) { |
| 301 | 301 | c->yuv2planeX = yuv2planeX_altivec; |
| 302 | 302 | } |
| @@ -305,22 +305,22 @@ av_cold void ff_sws_init_swScale_altivec(SwsContext *c) · 2 unmodified lines | ||
| 305 | 305 | * match what's found in the body of ff_yuv2packedX_altivec() */ |
| 306 | 306 | if (!(c->flags & (SWS_BITEXACT | SWS_FULL_CHR_H_INT)) && !c->alpPixBuf) { |
| 307 | 307 | switch (c->dstFormat) { |
| 308 | − case PIX_FMT_ABGR: | |
| 308 | + case AV_PIX_FMT_ABGR: | |
| 309 | 309 | c->yuv2packedX = ff_yuv2abgr_X_altivec; |
| 310 | 310 | break; |
| 311 | − case PIX_FMT_BGRA: | |
| 311 | + case AV_PIX_FMT_BGRA: | |
| 312 | 312 | c->yuv2packedX = ff_yuv2bgra_X_altivec; |
| 313 | 313 | break; |
| 314 | − case PIX_FMT_ARGB: | |
| 314 | + case AV_PIX_FMT_ARGB: | |
| 315 | 315 | c->yuv2packedX = ff_yuv2argb_X_altivec; |
| 316 | 316 | break; |
| 317 | − case PIX_FMT_RGBA: | |
| 317 | + case AV_PIX_FMT_RGBA: | |
| 318 | 318 | c->yuv2packedX = ff_yuv2rgba_X_altivec; |
| 319 | 319 | break; |
| 320 | − case PIX_FMT_BGR24: | |
| 320 | + case AV_PIX_FMT_BGR24: | |
| 321 | 321 | c->yuv2packedX = ff_yuv2bgr24_X_altivec; |
| 322 | 322 | break; |
| 323 | − case PIX_FMT_RGB24: | |
| 323 | + case AV_PIX_FMT_RGB24: | |
| 324 | 324 | c->yuv2packedX = ff_yuv2rgb24_X_altivec; |
| 325 | 325 | break; |
| 326 | 326 | } |
| @@ -552,41 +552,41 @@ av_cold SwsFunc ff_yuv2rgb_init_altivec(SwsContext *c) · 551 unmodified lines | ||
| 552 | 552 | return NULL; |
| 553 | 553 | |
| 554 | 554 | switch (c->srcFormat) { |
| 555 | − case PIX_FMT_YUV410P: | |
| 556 | − case PIX_FMT_YUV420P: | |
| 555 | + case AV_PIX_FMT_YUV410P: | |
| 556 | + case AV_PIX_FMT_YUV420P: | |
| 557 | 557 | /*case IMGFMT_CLPL: ??? */ |
| 558 | − case PIX_FMT_GRAY8: | |
| 559 | − case PIX_FMT_NV12: | |
| 560 | − case PIX_FMT_NV21: | |
| 558 | + case AV_PIX_FMT_GRAY8: | |
| 559 | + case AV_PIX_FMT_NV12: | |
| 560 | + case AV_PIX_FMT_NV21: | |
| 561 | 561 | if ((c->srcH & 0x1) != 0) |
| 562 | 562 | return NULL; |
| 563 | 563 | |
| 564 | 564 | switch (c->dstFormat) { |
| 565 | − case PIX_FMT_RGB24: | |
| 565 | + case AV_PIX_FMT_RGB24: | |
| 566 | 566 | av_log(c, AV_LOG_WARNING, "ALTIVEC: Color Space RGB24\n"); |
| 567 | 567 | return altivec_yuv2_rgb24; |
| 568 | − case PIX_FMT_BGR24: | |
| 568 | + case AV_PIX_FMT_BGR24: | |
| 569 | 569 | av_log(c, AV_LOG_WARNING, "ALTIVEC: Color Space BGR24\n"); |
| 570 | 570 | return altivec_yuv2_bgr24; |
| 571 | − case PIX_FMT_ARGB: | |
| 571 | + case AV_PIX_FMT_ARGB: | |
| 572 | 572 | av_log(c, AV_LOG_WARNING, "ALTIVEC: Color Space ARGB\n"); |
| 573 | 573 | return altivec_yuv2_argb; |
| 574 | − case PIX_FMT_ABGR: | |
| 574 | + case AV_PIX_FMT_ABGR: | |
| 575 | 575 | av_log(c, AV_LOG_WARNING, "ALTIVEC: Color Space ABGR\n"); |
| 576 | 576 | return altivec_yuv2_abgr; |
| 577 | − case PIX_FMT_RGBA: | |
| 577 | + case AV_PIX_FMT_RGBA: | |
| 578 | 578 | av_log(c, AV_LOG_WARNING, "ALTIVEC: Color Space RGBA\n"); |
| 579 | 579 | return altivec_yuv2_rgba; |
| 580 | − case PIX_FMT_BGRA: | |
| 580 | + case AV_PIX_FMT_BGRA: | |
| 581 | 581 | av_log(c, AV_LOG_WARNING, "ALTIVEC: Color Space BGRA\n"); |
| 582 | 582 | return altivec_yuv2_bgra; |
| 583 | 583 | default: return NULL; |
| 584 | 584 | } |
| 585 | 585 | break; |
| 586 | 586 | |
| 587 | − case PIX_FMT_UYVY422: | |
| 587 | + case AV_PIX_FMT_UYVY422: | |
| 588 | 588 | switch (c->dstFormat) { |
| 589 | − case PIX_FMT_BGR32: | |
| 589 | + case AV_PIX_FMT_BGR32: | |
| 590 | 590 | av_log(c, AV_LOG_WARNING, "ALTIVEC: Color Space UYVY -> RGB32\n"); |
| 591 | 591 | return altivec_uyvy_rgb32; |
| 592 | 592 | default: return NULL; |
| @@ -635,7 +635,7 @@ static av_always_inline void ff_yuv2packedX_altivec(SwsContext *c, · 42 unmodified lines | ||
| 635 | 635 | const int16_t **alpSrc, |
| 636 | 636 | uint8_t *dest, |
| 637 | 637 | int dstW, int dstY, |
| 638 | − enum PixelFormat target) | |
| 638 | + enum AVPixelFormat target) | |
| 639 | 639 | { |
| 640 | 640 | int i, j; |
| 641 | 641 | vector signed short X, X0, X1, Y0, U0, V0, Y1, U1, V1, U, V; |
| @@ -710,22 +710,22 @@ static av_always_inline void ff_yuv2packedX_altivec(SwsContext *c, · 68 unmodified lines | ||
| 710 | 710 | B = vec_packclp(B0, B1); |
| 711 | 711 | |
| 712 | 712 | switch (target) { |
| 713 | − case PIX_FMT_ABGR: | |
| 713 | + case AV_PIX_FMT_ABGR: | |
| 714 | 714 | out_abgr(R, G, B, out); |
| 715 | 715 | break; |
| 716 | − case PIX_FMT_BGRA: | |
| 716 | + case AV_PIX_FMT_BGRA: | |
| 717 | 717 | out_bgra(R, G, B, out); |
| 718 | 718 | break; |
| 719 | − case PIX_FMT_RGBA: | |
| 719 | + case AV_PIX_FMT_RGBA: | |
| 720 | 720 | out_rgba(R, G, B, out); |
| 721 | 721 | break; |
| 722 | − case PIX_FMT_ARGB: | |
| 722 | + case AV_PIX_FMT_ARGB: | |
| 723 | 723 | out_argb(R, G, B, out); |
| 724 | 724 | break; |
| 725 | − case PIX_FMT_RGB24: | |
| 725 | + case AV_PIX_FMT_RGB24: | |
| 726 | 726 | out_rgb24(R, G, B, out); |
| 727 | 727 | break; |
| 728 | − case PIX_FMT_BGR24: | |
| 728 | + case AV_PIX_FMT_BGR24: | |
| 729 | 729 | out_bgr24(R, G, B, out); |
| 730 | 730 | break; |
| 731 | 731 | default: |
| @@ -802,22 +802,22 @@ static av_always_inline void ff_yuv2packedX_altivec(SwsContext *c, · 70 unmodified lines | ||
| 802 | 802 | |
| 803 | 803 | nout = (vector unsigned char *) scratch; |
| 804 | 804 | switch (target) { |
| 805 | − case PIX_FMT_ABGR: | |
| 805 | + case AV_PIX_FMT_ABGR: | |
| 806 | 806 | out_abgr(R, G, B, nout); |
| 807 | 807 | break; |
| 808 | − case PIX_FMT_BGRA: | |
| 808 | + case AV_PIX_FMT_BGRA: | |
| 809 | 809 | out_bgra(R, G, B, nout); |
| 810 | 810 | break; |
| 811 | − case PIX_FMT_RGBA: | |
| 811 | + case AV_PIX_FMT_RGBA: | |
| 812 | 812 | out_rgba(R, G, B, nout); |
| 813 | 813 | break; |
| 814 | − case PIX_FMT_ARGB: | |
| 814 | + case AV_PIX_FMT_ARGB: | |
| 815 | 815 | out_argb(R, G, B, nout); |
| 816 | 816 | break; |
| 817 | − case PIX_FMT_RGB24: | |
| 817 | + case AV_PIX_FMT_RGB24: | |
| 818 | 818 | out_rgb24(R, G, B, nout); |
| 819 | 819 | break; |
| 820 | − case PIX_FMT_BGR24: | |
| 820 | + case AV_PIX_FMT_BGR24: | |
| 821 | 821 | out_bgr24(R, G, B, nout); |
| 822 | 822 | break; |
| 823 | 823 | default: |
| @@ -850,9 +850,9 @@ void ff_yuv2 ## suffix ## _X_altivec(SwsContext *c, \ · 26 unmodified lines | ||
| 850 | 850 | dest, dstW, dstY, pixfmt); \ |
| 851 | 851 | } |
| 852 | 852 | |
| 853 | −YUV2PACKEDX_WRAPPER(abgr, PIX_FMT_ABGR); | |
| 854 | −YUV2PACKEDX_WRAPPER(bgra, PIX_FMT_BGRA); | |
| 855 | −YUV2PACKEDX_WRAPPER(argb, PIX_FMT_ARGB); | |
| 856 | −YUV2PACKEDX_WRAPPER(rgba, PIX_FMT_RGBA); | |
| 857 | −YUV2PACKEDX_WRAPPER(rgb24, PIX_FMT_RGB24); | |
| 858 | −YUV2PACKEDX_WRAPPER(bgr24, PIX_FMT_BGR24); | |
| 853 | +YUV2PACKEDX_WRAPPER(abgr, AV_PIX_FMT_ABGR); | |
| 854 | +YUV2PACKEDX_WRAPPER(bgra, AV_PIX_FMT_BGRA); | |
| 855 | +YUV2PACKEDX_WRAPPER(argb, AV_PIX_FMT_ARGB); | |
| 856 | +YUV2PACKEDX_WRAPPER(rgba, AV_PIX_FMT_RGBA); | |
| 857 | +YUV2PACKEDX_WRAPPER(rgb24, AV_PIX_FMT_RGB24); | |
| 858 | +YUV2PACKEDX_WRAPPER(bgr24, AV_PIX_FMT_BGR24); | |
| @@ -182,13 +182,13 @@ static int yv12touyvy_unscaled_altivec(SwsContext *c, const uint8_t *src[], · 181 unmodified lines | ||
| 182 | 182 | void ff_swscale_get_unscaled_altivec(SwsContext *c) |
| 183 | 183 | { |
| 184 | 184 | if ((av_get_cpu_flags() & AV_CPU_FLAG_ALTIVEC) && !(c->srcW & 15) && |
| 185 | − !(c->flags & SWS_BITEXACT) && c->srcFormat == PIX_FMT_YUV420P) { | |
| 186 | − enum PixelFormat dstFormat = c->dstFormat; | |
| 185 | + !(c->flags & SWS_BITEXACT) && c->srcFormat == AV_PIX_FMT_YUV420P) { | |
| 186 | + enum AVPixelFormat dstFormat = c->dstFormat; | |
| 187 | 187 | |
| 188 | 188 | // unscaled YV12 -> packed YUV, we want speed |
| 189 | − if (dstFormat == PIX_FMT_YUYV422) | |
| 189 | + if (dstFormat == AV_PIX_FMT_YUYV422) | |
| 190 | 190 | c->swScale = yv12toyuy2_unscaled_altivec; |
| 191 | − else if (dstFormat == PIX_FMT_UYVY422) | |
| 191 | + else if (dstFormat == AV_PIX_FMT_UYVY422) | |
| 192 | 192 | c->swScale = yv12touyvy_unscaled_altivec; |
| 193 | 193 | } |
| 194 | 194 | } |
| @@ -199,11 +199,11 @@ av_cold SwsFunc ff_yuv2rgb_init_vis(SwsContext *c) · 198 unmodified lines | ||
| 199 | 199 | c->sparc_coeffs[3] = (((int16_t)c->vOffset * (int16_t)c->vgCoeff >> 11) & 0xffff) * 0x0001000100010001ULL; |
| 200 | 200 | c->sparc_coeffs[4] = (((int16_t)c->vOffset * (int16_t)c->vrCoeff >> 11) & 0xffff) * 0x0001000100010001ULL; |
| 201 | 201 | |
| 202 | − if (c->dstFormat == PIX_FMT_RGB32 && c->srcFormat == PIX_FMT_YUV422P && (c->dstW & 7) == 0) { | |
| 202 | + if (c->dstFormat == AV_PIX_FMT_RGB32 && c->srcFormat == AV_PIX_FMT_YUV422P && (c->dstW & 7) == 0) { | |
| 203 | 203 | av_log(c, AV_LOG_INFO, |
| 204 | 204 | "SPARC VIS accelerated YUV422P -> RGB32 (WARNING: alpha value is wrong)\n"); |
| 205 | 205 | return vis_422P_ARGB32; |
| 206 | − } else if (c->dstFormat == PIX_FMT_RGB32 && c->srcFormat == PIX_FMT_YUV420P && (c->dstW & 7) == 0) { | |
| 206 | + } else if (c->dstFormat == AV_PIX_FMT_RGB32 && c->srcFormat == AV_PIX_FMT_YUV420P && (c->dstW & 7) == 0) { | |
| 207 | 207 | av_log(c, AV_LOG_INFO, |
| 208 | 208 | "SPARC VIS accelerated YUV420P -> RGB32 (WARNING: alpha value is wrong)\n"); |
| 209 | 209 | return vis_420P_ARGB32; |
| @@ -36,20 +36,20 @@ · 35 unmodified lines | ||
| 36 | 36 | /* HACK Duplicated from swscale_internal.h. |
| 37 | 37 | * Should be removed when a cleaner pixel format system exists. */ |
| 38 | 38 | #define isGray(x) \ |
| 39 | − ((x) == PIX_FMT_GRAY8 || \ | |
| 40 | − (x) == PIX_FMT_Y400A || \ | |
| 41 | − (x) == PIX_FMT_GRAY16BE || \ | |
| 42 | − (x) == PIX_FMT_GRAY16LE) | |
| 39 | + ((x) == AV_PIX_FMT_GRAY8 || \ | |
| 40 | + (x) == AV_PIX_FMT_Y400A || \ | |
| 41 | + (x) == AV_PIX_FMT_GRAY16BE || \ | |
| 42 | + (x) == AV_PIX_FMT_GRAY16LE) | |
| 43 | 43 | #define hasChroma(x) \ |
| 44 | 44 | (!(isGray(x) || \ |
| 45 | − (x) == PIX_FMT_MONOBLACK || \ | |
| 46 | − (x) == PIX_FMT_MONOWHITE)) | |
| 45 | + (x) == AV_PIX_FMT_MONOBLACK || \ | |
| 46 | + (x) == AV_PIX_FMT_MONOWHITE)) | |
| 47 | 47 | #define isALPHA(x) \ |
| 48 | − ((x) == PIX_FMT_BGR32 || \ | |
| 49 | − (x) == PIX_FMT_BGR32_1 || \ | |
| 50 | − (x) == PIX_FMT_RGB32 || \ | |
| 51 | − (x) == PIX_FMT_RGB32_1 || \ | |
| 52 | − (x) == PIX_FMT_YUVA420P) | |
| 48 | + ((x) == AV_PIX_FMT_BGR32 || \ | |
| 49 | + (x) == AV_PIX_FMT_BGR32_1 || \ | |
| 50 | + (x) == AV_PIX_FMT_RGB32 || \ | |
| 51 | + (x) == AV_PIX_FMT_RGB32_1 || \ | |
| 52 | + (x) == AV_PIX_FMT_YUVA420P) | |
| 53 | 53 | |
| 54 | 54 | static uint64_t getSSD(uint8_t *src1, uint8_t *src2, int stride1, |
| 55 | 55 | int stride2, int w, int h) |
| @@ -77,11 +77,11 @@ struct Results { · 21 unmodified lines | ||
| 77 | 77 | // test by ref -> src -> dst -> out & compare out against ref |
| 78 | 78 | // ref & out are YV12 |
| 79 | 79 | static int doTest(uint8_t *ref[4], int refStride[4], int w, int h, |
| 80 | − enum PixelFormat srcFormat, enum PixelFormat dstFormat, | |
| 80 | + enum AVPixelFormat srcFormat, enum AVPixelFormat dstFormat, | |
| 81 | 81 | int srcW, int srcH, int dstW, int dstH, int flags, |
| 82 | 82 | struct Results *r) |
| 83 | 83 | { |
| 84 | − static enum PixelFormat cur_srcFormat; | |
| 84 | + static enum AVPixelFormat cur_srcFormat; | |
| 85 | 85 | static int cur_srcW, cur_srcH; |
| 86 | 86 | static uint8_t *src[4]; |
| 87 | 87 | static int srcStride[4]; |
| @@ -111,11 +111,11 @@ static int doTest(uint8_t *ref[4], int refStride[4], int w, int h, · 23 unmodified lines | ||
| 111 | 111 | goto end; |
| 112 | 112 | } |
| 113 | 113 | } |
| 114 | − srcContext = sws_getContext(w, h, PIX_FMT_YUVA420P, srcW, srcH, | |
| 114 | + srcContext = sws_getContext(w, h, AV_PIX_FMT_YUVA420P, srcW, srcH, | |
| 115 | 115 | srcFormat, SWS_BILINEAR, NULL, NULL, NULL); |
| 116 | 116 | if (!srcContext) { |
| 117 | 117 | fprintf(stderr, "Failed to get %s ---> %s\n", |
| 118 | − av_pix_fmt_descriptors[PIX_FMT_YUVA420P].name, | |
| 118 | + av_pix_fmt_descriptors[AV_PIX_FMT_YUVA420P].name, | |
| 119 | 119 | av_pix_fmt_descriptors[srcFormat].name); |
| 120 | 120 | res = -1; |
| 121 | 121 | goto end; |
| @@ -184,12 +184,12 @@ static int doTest(uint8_t *ref[4], int refStride[4], int w, int h, · 62 unmodified lines | ||
| 184 | 184 | } |
| 185 | 185 | } |
| 186 | 186 | outContext = sws_getContext(dstW, dstH, dstFormat, w, h, |
| 187 | − PIX_FMT_YUVA420P, SWS_BILINEAR, | |
| 187 | + AV_PIX_FMT_YUVA420P, SWS_BILINEAR, | |
| 188 | 188 | NULL, NULL, NULL); |
| 189 | 189 | if (!outContext) { |
| 190 | 190 | fprintf(stderr, "Failed to get %s ---> %s\n", |
| 191 | 191 | av_pix_fmt_descriptors[dstFormat].name, |
| 192 | − av_pix_fmt_descriptors[PIX_FMT_YUVA420P].name); | |
| 192 | + av_pix_fmt_descriptors[AV_PIX_FMT_YUVA420P].name); | |
| 193 | 193 | res = -1; |
| 194 | 194 | goto end; |
| 195 | 195 | } |
| @@ -232,8 +232,8 @@ end: · 36 unmodified lines | ||
| 232 | 232 | } |
| 233 | 233 | |
| 234 | 234 | static void selfTest(uint8_t *ref[4], int refStride[4], int w, int h, |
| 235 | − enum PixelFormat srcFormat_in, | |
| 236 | − enum PixelFormat dstFormat_in) | |
| 235 | + enum AVPixelFormat srcFormat_in, | |
| 236 | + enum AVPixelFormat dstFormat_in) | |
| 237 | 237 | { |
| 238 | 238 | const int flags[] = { SWS_FAST_BILINEAR, SWS_BILINEAR, SWS_BICUBIC, |
| 239 | 239 | SWS_X, SWS_POINT, SWS_AREA, 0 }; |
| @@ -241,16 +241,16 @@ static void selfTest(uint8_t *ref[4], int refStride[4], int w, int h, · 1 unmodified line | ||
| 241 | 241 | const int srcH = h; |
| 242 | 242 | const int dstW[] = { srcW - srcW / 3, srcW, srcW + srcW / 3, 0 }; |
| 243 | 243 | const int dstH[] = { srcH - srcH / 3, srcH, srcH + srcH / 3, 0 }; |
| 244 | − enum PixelFormat srcFormat, dstFormat; | |
| 244 | + enum AVPixelFormat srcFormat, dstFormat; | |
| 245 | 245 | |
| 246 | − for (srcFormat = srcFormat_in != PIX_FMT_NONE ? srcFormat_in : 0; | |
| 247 | − srcFormat < PIX_FMT_NB; srcFormat++) { | |
| 246 | + for (srcFormat = srcFormat_in != AV_PIX_FMT_NONE ? srcFormat_in : 0; | |
| 247 | + srcFormat < AV_PIX_FMT_NB; srcFormat++) { | |
| 248 | 248 | if (!sws_isSupportedInput(srcFormat) || |
| 249 | 249 | !sws_isSupportedOutput(srcFormat)) |
| 250 | 250 | continue; |
| 251 | 251 | |
| 252 | − for (dstFormat = dstFormat_in != PIX_FMT_NONE ? dstFormat_in : 0; | |
| 253 | − dstFormat < PIX_FMT_NB; dstFormat++) { | |
| 252 | + for (dstFormat = dstFormat_in != AV_PIX_FMT_NONE ? dstFormat_in : 0; | |
| 253 | + dstFormat < AV_PIX_FMT_NB; dstFormat++) { | |
| 254 | 254 | int i, j, k; |
| 255 | 255 | int res = 0; |
| 256 | 256 | |
| @@ -270,26 +270,26 @@ static void selfTest(uint8_t *ref[4], int refStride[4], int w, int h, · 13 unmodified lines | ||
| 270 | 270 | srcFormat, dstFormat, |
| 271 | 271 | srcW, srcH, dstW[i], dstH[j], flags[k], |
| 272 | 272 | NULL); |
| 273 | − if (dstFormat_in != PIX_FMT_NONE) | |
| 273 | + if (dstFormat_in != AV_PIX_FMT_NONE) | |
| 274 | 274 | break; |
| 275 | 275 | } |
| 276 | − if (srcFormat_in != PIX_FMT_NONE) | |
| 276 | + if (srcFormat_in != AV_PIX_FMT_NONE) | |
| 277 | 277 | break; |
| 278 | 278 | } |
| 279 | 279 | } |
| 280 | 280 | |
| 281 | 281 | static int fileTest(uint8_t *ref[4], int refStride[4], int w, int h, FILE *fp, |
| 282 | − enum PixelFormat srcFormat_in, | |
| 283 | − enum PixelFormat dstFormat_in) | |
| 282 | + enum AVPixelFormat srcFormat_in, | |
| 283 | + enum AVPixelFormat dstFormat_in) | |
| 284 | 284 | { |
| 285 | 285 | char buf[256]; |
| 286 | 286 | |
| 287 | 287 | while (fgets(buf, sizeof(buf), fp)) { |
| 288 | 288 | struct Results r; |
| 289 | − enum PixelFormat srcFormat; | |
| 289 | + enum AVPixelFormat srcFormat; | |
| 290 | 290 | char srcStr[12]; |
| 291 | 291 | int srcW, srcH; |
| 292 | − enum PixelFormat dstFormat; | |
| 292 | + enum AVPixelFormat dstFormat; | |
| 293 | 293 | char dstStr[12]; |
| 294 | 294 | int dstW, dstH; |
| 295 | 295 | int flags; |
| @@ -308,12 +308,12 @@ static int fileTest(uint8_t *ref[4], int refStride[4], int w, int h, FILE *fp, · 12 unmodified lines | ||
| 308 | 308 | srcFormat = av_get_pix_fmt(srcStr); |
| 309 | 309 | dstFormat = av_get_pix_fmt(dstStr); |
| 310 | 310 | |
| 311 | − if (srcFormat == PIX_FMT_NONE || dstFormat == PIX_FMT_NONE) { | |
| 311 | + if (srcFormat == AV_PIX_FMT_NONE || dstFormat == AV_PIX_FMT_NONE) { | |
| 312 | 312 | fprintf(stderr, "malformed input file\n"); |
| 313 | 313 | return -1; |
| 314 | 314 | } |
| 315 | − if ((srcFormat_in != PIX_FMT_NONE && srcFormat_in != srcFormat) || | |
| 316 | − (dstFormat_in != PIX_FMT_NONE && dstFormat_in != dstFormat)) | |
| 315 | + if ((srcFormat_in != AV_PIX_FMT_NONE && srcFormat_in != srcFormat) || | |
| 316 | + (dstFormat_in != AV_PIX_FMT_NONE && dstFormat_in != dstFormat)) | |
| 317 | 317 | continue; |
| 318 | 318 | if (ret != 12) { |
| 319 | 319 | printf("%s", buf); |
| @@ -334,8 +334,8 @@ static int fileTest(uint8_t *ref[4], int refStride[4], int w, int h, FILE *fp, · 14 unmodified lines | ||
| 334 | 334 | |
| 335 | 335 | int main(int argc, char **argv) |
| 336 | 336 | { |
| 337 | − enum PixelFormat srcFormat = PIX_FMT_NONE; | |
| 338 | − enum PixelFormat dstFormat = PIX_FMT_NONE; | |
| 337 | + enum AVPixelFormat srcFormat = AV_PIX_FMT_NONE; | |
| 338 | + enum AVPixelFormat dstFormat = AV_PIX_FMT_NONE; | |
| 339 | 339 | uint8_t *rgb_data = av_malloc(W * H * 4); |
| 340 | 340 | uint8_t *rgb_src[4] = { rgb_data, NULL, NULL, NULL }; |
| 341 | 341 | int rgb_stride[4] = { 4 * W, 0, 0, 0 }; |
| @@ -351,8 +351,8 @@ int main(int argc, char **argv) · 9 unmodified lines | ||
| 351 | 351 | if (!rgb_data || !data) |
| 352 | 352 | return -1; |
| 353 | 353 | |
| 354 | − sws = sws_getContext(W / 12, H / 12, PIX_FMT_RGB32, W, H, | |
| 355 | − PIX_FMT_YUVA420P, SWS_BILINEAR, NULL, NULL, NULL); | |
| 354 | + sws = sws_getContext(W / 12, H / 12, AV_PIX_FMT_RGB32, W, H, | |
| 355 | + AV_PIX_FMT_YUVA420P, SWS_BILINEAR, NULL, NULL, NULL); | |
| 356 | 356 | |
| 357 | 357 | av_lfg_init(&rand, 1); |
| 358 | 358 | |
| @@ -377,13 +377,13 @@ int main(int argc, char **argv) · 18 unmodified lines | ||
| 377 | 377 | goto end; |
| 378 | 378 | } else if (!strcmp(argv[i], "-src")) { |
| 379 | 379 | srcFormat = av_get_pix_fmt(argv[i + 1]); |
| 380 | − if (srcFormat == PIX_FMT_NONE) { | |
| 380 | + if (srcFormat == AV_PIX_FMT_NONE) { | |
| 381 | 381 | fprintf(stderr, "invalid pixel format %s\n", argv[i + 1]); |
| 382 | 382 | return -1; |
| 383 | 383 | } |
| 384 | 384 | } else if (!strcmp(argv[i], "-dst")) { |
| 385 | 385 | dstFormat = av_get_pix_fmt(argv[i + 1]); |
| 386 | − if (dstFormat == PIX_FMT_NONE) { | |
| 386 | + if (dstFormat == AV_PIX_FMT_NONE) { | |
| 387 | 387 | fprintf(stderr, "invalid pixel format %s\n", argv[i + 1]); |
| 388 | 388 | return -1; |
| 389 | 389 | } |
| @@ -326,7 +326,7 @@ static int swScale(SwsContext *c, const uint8_t *src[], · 325 unmodified lines | ||
| 326 | 326 | const int chrSrcW = c->chrSrcW; |
| 327 | 327 | const int lumXInc = c->lumXInc; |
| 328 | 328 | const int chrXInc = c->chrXInc; |
| 329 | − const enum PixelFormat dstFormat = c->dstFormat; | |
| 329 | + const enum AVPixelFormat dstFormat = c->dstFormat; | |
| 330 | 330 | const int flags = c->flags; |
| 331 | 331 | int32_t *vLumFilterPos = c->vLumFilterPos; |
| 332 | 332 | int32_t *vChrFilterPos = c->vChrFilterPos; |
| @@ -677,7 +677,7 @@ static int swScale(SwsContext *c, const uint8_t *src[], · 344 unmodified lines | ||
| 677 | 677 | |
| 678 | 678 | static av_cold void sws_init_swScale_c(SwsContext *c) |
| 679 | 679 | { |
| 680 | − enum PixelFormat srcFormat = c->srcFormat; | |
| 680 | + enum AVPixelFormat srcFormat = c->srcFormat; | |
| 681 | 681 | |
| 682 | 682 | ff_sws_init_output_funcs(c, &c->yuv2plane1, &c->yuv2planeX, |
| 683 | 683 | &c->yuv2nv12cX, &c->yuv2packed1, |
| @@ -721,7 +721,7 @@ static av_cold void sws_init_swScale_c(SwsContext *c) · 37 unmodified lines | ||
| 721 | 721 | } |
| 722 | 722 | |
| 723 | 723 | if (!(isGray(srcFormat) || isGray(c->dstFormat) || |
| 724 | − srcFormat == PIX_FMT_MONOBLACK || srcFormat == PIX_FMT_MONOWHITE)) | |
| 724 | + srcFormat == AV_PIX_FMT_MONOBLACK || srcFormat == AV_PIX_FMT_MONOWHITE)) | |
| 725 | 725 | c->needs_hcscale = 1; |
| 726 | 726 | } |
| 727 | 727 | |
| @@ -134,13 +134,13 @@ struct SwsContext; · 133 unmodified lines | ||
| 134 | 134 | * Return a positive value if pix_fmt is a supported input format, 0 |
| 135 | 135 | * otherwise. |
| 136 | 136 | */ |
| 137 | −int sws_isSupportedInput(enum PixelFormat pix_fmt); | |
| 137 | +int sws_isSupportedInput(enum AVPixelFormat pix_fmt); | |
| 138 | 138 | |
| 139 | 139 | /** |
| 140 | 140 | * Return a positive value if pix_fmt is a supported output format, 0 |
| 141 | 141 | * otherwise. |
| 142 | 142 | */ |
| 143 | −int sws_isSupportedOutput(enum PixelFormat pix_fmt); | |
| 143 | +int sws_isSupportedOutput(enum AVPixelFormat pix_fmt); | |
| 144 | 144 | |
| 145 | 145 | /** |
| 146 | 146 | * Allocate an empty SwsContext. This must be filled and passed to |
| @@ -180,8 +180,8 @@ void sws_freeContext(struct SwsContext *swsContext); · 33 unmodified lines | ||
| 180 | 180 | * written |
| 181 | 181 | * @deprecated Use sws_getCachedContext() instead. |
| 182 | 182 | */ |
| 183 | −struct SwsContext *sws_getContext(int srcW, int srcH, enum PixelFormat srcFormat, | |
| 184 | − int dstW, int dstH, enum PixelFormat dstFormat, | |
| 183 | +struct SwsContext *sws_getContext(int srcW, int srcH, enum AVPixelFormat srcFormat, | |
| 184 | + int dstW, int dstH, enum AVPixelFormat dstFormat, | |
| 185 | 185 | int flags, SwsFilter *srcFilter, |
| 186 | 186 | SwsFilter *dstFilter, const double *param); |
| 187 | 187 | #endif |
| @@ -301,8 +301,8 @@ void sws_freeFilter(SwsFilter *filter); · 113 unmodified lines | ||
| 301 | 301 | * are assumed to remain the same. |
| 302 | 302 | */ |
| 303 | 303 | struct SwsContext *sws_getCachedContext(struct SwsContext *context, |
| 304 | − int srcW, int srcH, enum PixelFormat srcFormat, | |
| 305 | − int dstW, int dstH, enum PixelFormat dstFormat, | |
| 304 | + int srcW, int srcH, enum AVPixelFormat srcFormat, | |
| 305 | + int dstW, int dstH, enum AVPixelFormat dstFormat, | |
| 306 | 306 | int flags, SwsFilter *srcFilter, |
| 307 | 307 | SwsFilter *dstFilter, const double *param); |
| 308 | 308 | |
| @@ -238,8 +238,8 @@ typedef struct SwsContext { · 237 unmodified lines | ||
| 238 | 238 | int chrDstH; ///< Height of destination chroma planes. |
| 239 | 239 | int lumXInc, chrXInc; |
| 240 | 240 | int lumYInc, chrYInc; |
| 241 | − enum PixelFormat dstFormat; ///< Destination pixel format. | |
| 242 | − enum PixelFormat srcFormat; ///< Source pixel format. | |
| 241 | + enum AVPixelFormat dstFormat; ///< Destination pixel format. | |
| 242 | + enum AVPixelFormat srcFormat; ///< Source pixel format. | |
| 243 | 243 | int dstFormatBpp; ///< Number of bits per pixel of the destination pixel format. |
| 244 | 244 | int srcFormatBpp; ///< Number of bits per pixel of the source pixel format. |
| 245 | 245 | int dstBpc, srcBpc; |
| @@ -540,7 +540,7 @@ SwsFunc ff_yuv2rgb_init_altivec(SwsContext *c); · 294 unmodified lines | ||
| 540 | 540 | SwsFunc ff_yuv2rgb_get_func_ptr_bfin(SwsContext *c); |
| 541 | 541 | void ff_bfin_get_unscaled_swscale(SwsContext *c); |
| 542 | 542 | |
| 543 | −const char *sws_format_name(enum PixelFormat format); | |
| 543 | +const char *sws_format_name(enum AVPixelFormat format); | |
| 544 | 544 | |
| 545 | 545 | #define is16BPS(x) \ |
| 546 | 546 | (av_pix_fmt_descriptors[x].comp[0].depth_minus1 == 15) |
| @@ -569,47 +569,47 @@ const char *sws_format_name(enum PixelFormat format); · 22 unmodified lines | ||
| 569 | 569 | av_pix_fmt_descriptors[x].nb_components <= 2) |
| 570 | 570 | #else |
| 571 | 571 | #define isGray(x) \ |
| 572 | − ((x) == PIX_FMT_GRAY8 || \ | |
| 573 | − (x) == PIX_FMT_Y400A || \ | |
| 574 | − (x) == PIX_FMT_GRAY16BE || \ | |
| 575 | − (x) == PIX_FMT_GRAY16LE) | |
| 572 | + ((x) == AV_PIX_FMT_GRAY8 || \ | |
| 573 | + (x) == AV_PIX_FMT_Y400A || \ | |
| 574 | + (x) == AV_PIX_FMT_GRAY16BE || \ | |
| 575 | + (x) == AV_PIX_FMT_GRAY16LE) | |
| 576 | 576 | #endif |
| 577 | 577 | |
| 578 | 578 | #define isRGBinInt(x) \ |
| 579 | − ((x) == PIX_FMT_RGB48BE || \ | |
| 580 | − (x) == PIX_FMT_RGB48LE || \ | |
| 581 | − (x) == PIX_FMT_RGB32 || \ | |
| 582 | − (x) == PIX_FMT_RGB32_1 || \ | |
| 583 | − (x) == PIX_FMT_RGB24 || \ | |
| 584 | − (x) == PIX_FMT_RGB565BE || \ | |
| 585 | − (x) == PIX_FMT_RGB565LE || \ | |
| 586 | − (x) == PIX_FMT_RGB555BE || \ | |
| 587 | − (x) == PIX_FMT_RGB555LE || \ | |
| 588 | − (x) == PIX_FMT_RGB444BE || \ | |
| 589 | − (x) == PIX_FMT_RGB444LE || \ | |
| 590 | − (x) == PIX_FMT_RGB8 || \ | |
| 591 | − (x) == PIX_FMT_RGB4 || \ | |
| 592 | − (x) == PIX_FMT_RGB4_BYTE || \ | |
| 593 | − (x) == PIX_FMT_MONOBLACK || \ | |
| 594 | − (x) == PIX_FMT_MONOWHITE) | |
| 579 | + ((x) == AV_PIX_FMT_RGB48BE || \ | |
| 580 | + (x) == AV_PIX_FMT_RGB48LE || \ | |
| 581 | + (x) == AV_PIX_FMT_RGB32 || \ | |
| 582 | + (x) == AV_PIX_FMT_RGB32_1 || \ | |
| 583 | + (x) == AV_PIX_FMT_RGB24 || \ | |
| 584 | + (x) == AV_PIX_FMT_RGB565BE || \ | |
| 585 | + (x) == AV_PIX_FMT_RGB565LE || \ | |
| 586 | + (x) == AV_PIX_FMT_RGB555BE || \ | |
| 587 | + (x) == AV_PIX_FMT_RGB555LE || \ | |
| 588 | + (x) == AV_PIX_FMT_RGB444BE || \ | |
| 589 | + (x) == AV_PIX_FMT_RGB444LE || \ | |
| 590 | + (x) == AV_PIX_FMT_RGB8 || \ | |
| 591 | + (x) == AV_PIX_FMT_RGB4 || \ | |
| 592 | + (x) == AV_PIX_FMT_RGB4_BYTE || \ | |
| 593 | + (x) == AV_PIX_FMT_MONOBLACK || \ | |
| 594 | + (x) == AV_PIX_FMT_MONOWHITE) | |
| 595 | 595 | |
| 596 | 596 | #define isBGRinInt(x) \ |
| 597 | − ((x) == PIX_FMT_BGR48BE || \ | |
| 598 | − (x) == PIX_FMT_BGR48LE || \ | |
| 599 | − (x) == PIX_FMT_BGR32 || \ | |
| 600 | − (x) == PIX_FMT_BGR32_1 || \ | |
| 601 | − (x) == PIX_FMT_BGR24 || \ | |
| 602 | − (x) == PIX_FMT_BGR565BE || \ | |
| 603 | − (x) == PIX_FMT_BGR565LE || \ | |
| 604 | − (x) == PIX_FMT_BGR555BE || \ | |
| 605 | − (x) == PIX_FMT_BGR555LE || \ | |
| 606 | − (x) == PIX_FMT_BGR444BE || \ | |
| 607 | − (x) == PIX_FMT_BGR444LE || \ | |
| 608 | − (x) == PIX_FMT_BGR8 || \ | |
| 609 | − (x) == PIX_FMT_BGR4 || \ | |
| 610 | − (x) == PIX_FMT_BGR4_BYTE || \ | |
| 611 | − (x) == PIX_FMT_MONOBLACK || \ | |
| 612 | − (x) == PIX_FMT_MONOWHITE) | |
| 597 | + ((x) == AV_PIX_FMT_BGR48BE || \ | |
| 598 | + (x) == AV_PIX_FMT_BGR48LE || \ | |
| 599 | + (x) == AV_PIX_FMT_BGR32 || \ | |
| 600 | + (x) == AV_PIX_FMT_BGR32_1 || \ | |
| 601 | + (x) == AV_PIX_FMT_BGR24 || \ | |
| 602 | + (x) == AV_PIX_FMT_BGR565BE || \ | |
| 603 | + (x) == AV_PIX_FMT_BGR565LE || \ | |
| 604 | + (x) == AV_PIX_FMT_BGR555BE || \ | |
| 605 | + (x) == AV_PIX_FMT_BGR555LE || \ | |
| 606 | + (x) == AV_PIX_FMT_BGR444BE || \ | |
| 607 | + (x) == AV_PIX_FMT_BGR444LE || \ | |
| 608 | + (x) == AV_PIX_FMT_BGR8 || \ | |
| 609 | + (x) == AV_PIX_FMT_BGR4 || \ | |
| 610 | + (x) == AV_PIX_FMT_BGR4_BYTE || \ | |
| 611 | + (x) == AV_PIX_FMT_MONOBLACK || \ | |
| 612 | + (x) == AV_PIX_FMT_MONOWHITE) | |
| 613 | 613 | |
| 614 | 614 | #define isAnyRGB(x) \ |
| 615 | 615 | (isRGBinInt(x) || \ |
| @@ -622,7 +622,7 @@ const char *sws_format_name(enum PixelFormat format); · 6 unmodified lines | ||
| 622 | 622 | #define isPacked(x) \ |
| 623 | 623 | ((av_pix_fmt_descriptors[x].nb_components >= 2 && \ |
| 624 | 624 | !(av_pix_fmt_descriptors[x].flags & PIX_FMT_PLANAR)) || \ |
| 625 | − (x) == PIX_FMT_PAL8) | |
| 625 | + (x) == AV_PIX_FMT_PAL8) | |
| 626 | 626 | |
| 627 | 627 | #define isPlanar(x) \ |
| 628 | 628 | (av_pix_fmt_descriptors[x].nb_components >= 2 && \ |
| @@ -638,7 +638,7 @@ const char *sws_format_name(enum PixelFormat format); · 9 unmodified lines | ||
| 638 | 638 | |
| 639 | 639 | #define usePal(x) ((av_pix_fmt_descriptors[x].flags & PIX_FMT_PAL) || \ |
| 640 | 640 | (av_pix_fmt_descriptors[x].flags & PIX_FMT_PSEUDOPAL) || \ |
| 641 | − (x) == PIX_FMT_Y400A) | |
| 641 | + (x) == AV_PIX_FMT_Y400A) | |
| 642 | 642 | |
| 643 | 643 | extern const uint64_t ff_dither4[2]; |
| 644 | 644 | extern const uint64_t ff_dither8[2]; |
| @@ -125,7 +125,7 @@ static int planarToNv12Wrapper(SwsContext *c, const uint8_t *src[], · 124 unmodified lines | ||
| 125 | 125 | copyPlane(src[0], srcStride[0], srcSliceY, srcSliceH, c->srcW, |
| 126 | 126 | dstParam[0], dstStride[0]); |
| 127 | 127 | |
| 128 | − if (c->dstFormat == PIX_FMT_NV12) | |
| 128 | + if (c->dstFormat == AV_PIX_FMT_NV12) | |
| 129 | 129 | interleaveBytes(src[1], src[2], dst, c->srcW / 2, srcSliceH / 2, |
| 130 | 130 | srcStride[1], srcStride[2], dstStride[0]); |
| 131 | 131 | else |
| @@ -302,31 +302,31 @@ static int palToRgbWrapper(SwsContext *c, const uint8_t *src[], int srcStride[], · 170 unmodified lines | ||
| 302 | 302 | int srcSliceY, int srcSliceH, uint8_t *dst[], |
| 303 | 303 | int dstStride[]) |
| 304 | 304 | { |
| 305 | − const enum PixelFormat srcFormat = c->srcFormat; | |
| 306 | − const enum PixelFormat dstFormat = c->dstFormat; | |
| 305 | + const enum AVPixelFormat srcFormat = c->srcFormat; | |
| 306 | + const enum AVPixelFormat dstFormat = c->dstFormat; | |
| 307 | 307 | void (*conv)(const uint8_t *src, uint8_t *dst, int num_pixels, |
| 308 | 308 | const uint8_t *palette) = NULL; |
| 309 | 309 | int i; |
| 310 | 310 | uint8_t *dstPtr = dst[0] + dstStride[0] * srcSliceY; |
| 311 | 311 | const uint8_t *srcPtr = src[0]; |
| 312 | 312 | |
| 313 | − if (srcFormat == PIX_FMT_Y400A) { | |
| 313 | + if (srcFormat == AV_PIX_FMT_Y400A) { | |
| 314 | 314 | switch (dstFormat) { |
| 315 | − case PIX_FMT_RGB32 : conv = gray8aToPacked32; break; | |
| 316 | − case PIX_FMT_BGR32 : conv = gray8aToPacked32; break; | |
| 317 | − case PIX_FMT_BGR32_1: conv = gray8aToPacked32_1; break; | |
| 318 | − case PIX_FMT_RGB32_1: conv = gray8aToPacked32_1; break; | |
| 319 | − case PIX_FMT_RGB24 : conv = gray8aToPacked24; break; | |
| 320 | − case PIX_FMT_BGR24 : conv = gray8aToPacked24; break; | |
| 315 | + case AV_PIX_FMT_RGB32 : conv = gray8aToPacked32; break; | |
| 316 | + case AV_PIX_FMT_BGR32 : conv = gray8aToPacked32; break; | |
| 317 | + case AV_PIX_FMT_BGR32_1: conv = gray8aToPacked32_1; break; | |
| 318 | + case AV_PIX_FMT_RGB32_1: conv = gray8aToPacked32_1; break; | |
| 319 | + case AV_PIX_FMT_RGB24 : conv = gray8aToPacked24; break; | |
| 320 | + case AV_PIX_FMT_BGR24 : conv = gray8aToPacked24; break; | |
| 321 | 321 | } |
| 322 | 322 | } else if (usePal(srcFormat)) { |
| 323 | 323 | switch (dstFormat) { |
| 324 | − case PIX_FMT_RGB32 : conv = sws_convertPalette8ToPacked32; break; | |
| 325 | − case PIX_FMT_BGR32 : conv = sws_convertPalette8ToPacked32; break; | |
| 326 | − case PIX_FMT_BGR32_1: conv = sws_convertPalette8ToPacked32; break; | |
| 327 | − case PIX_FMT_RGB32_1: conv = sws_convertPalette8ToPacked32; break; | |
| 328 | − case PIX_FMT_RGB24 : conv = sws_convertPalette8ToPacked24; break; | |
| 329 | − case PIX_FMT_BGR24 : conv = sws_convertPalette8ToPacked24; break; | |
| 324 | + case AV_PIX_FMT_RGB32 : conv = sws_convertPalette8ToPacked32; break; | |
| 325 | + case AV_PIX_FMT_BGR32 : conv = sws_convertPalette8ToPacked32; break; | |
| 326 | + case AV_PIX_FMT_BGR32_1: conv = sws_convertPalette8ToPacked32; break; | |
| 327 | + case AV_PIX_FMT_RGB32_1: conv = sws_convertPalette8ToPacked32; break; | |
| 328 | + case AV_PIX_FMT_RGB24 : conv = sws_convertPalette8ToPacked24; break; | |
| 329 | + case AV_PIX_FMT_BGR24 : conv = sws_convertPalette8ToPacked24; break; | |
| 330 | 330 | } |
| 331 | 331 | } |
| 332 | 332 | |
| @@ -396,7 +396,7 @@ static int planarRgbToRgbWrapper(SwsContext *c, const uint8_t *src[], · 63 unmodified lines | ||
| 396 | 396 | uint8_t *dst[], int dstStride[]) |
| 397 | 397 | { |
| 398 | 398 | int alpha_first = 0; |
| 399 | − if (c->srcFormat != PIX_FMT_GBRP) { | |
| 399 | + if (c->srcFormat != AV_PIX_FMT_GBRP) { | |
| 400 | 400 | av_log(c, AV_LOG_ERROR, "unsupported planar RGB conversion %s -> %s\n", |
| 401 | 401 | av_get_pix_fmt_name(c->srcFormat), |
| 402 | 402 | av_get_pix_fmt_name(c->dstFormat)); |
| @@ -404,32 +404,32 @@ static int planarRgbToRgbWrapper(SwsContext *c, const uint8_t *src[], · 1 unmodified line | ||
| 404 | 404 | } |
| 405 | 405 | |
| 406 | 406 | switch (c->dstFormat) { |
| 407 | − case PIX_FMT_BGR24: | |
| 407 | + case AV_PIX_FMT_BGR24: | |
| 408 | 408 | gbr24ptopacked24((const uint8_t *[]) { src[1], src[0], src[2] }, |
| 409 | 409 | (int []) { srcStride[1], srcStride[0], srcStride[2] }, |
| 410 | 410 | dst[0] + srcSliceY * dstStride[0], dstStride[0], |
| 411 | 411 | srcSliceH, c->srcW); |
| 412 | 412 | break; |
| 413 | 413 | |
| 414 | − case PIX_FMT_RGB24: | |
| 414 | + case AV_PIX_FMT_RGB24: | |
| 415 | 415 | gbr24ptopacked24((const uint8_t *[]) { src[2], src[0], src[1] }, |
| 416 | 416 | (int []) { srcStride[2], srcStride[0], srcStride[1] }, |
| 417 | 417 | dst[0] + srcSliceY * dstStride[0], dstStride[0], |
| 418 | 418 | srcSliceH, c->srcW); |
| 419 | 419 | break; |
| 420 | 420 | |
| 421 | − case PIX_FMT_ARGB: | |
| 421 | + case AV_PIX_FMT_ARGB: | |
| 422 | 422 | alpha_first = 1; |
| 423 | − case PIX_FMT_RGBA: | |
| 423 | + case AV_PIX_FMT_RGBA: | |
| 424 | 424 | gbr24ptopacked32((const uint8_t *[]) { src[2], src[0], src[1] }, |
| 425 | 425 | (int []) { srcStride[2], srcStride[0], srcStride[1] }, |
| 426 | 426 | dst[0] + srcSliceY * dstStride[0], dstStride[0], |
| 427 | 427 | srcSliceH, alpha_first, c->srcW); |
| 428 | 428 | break; |
| 429 | 429 | |
| 430 | − case PIX_FMT_ABGR: | |
| 430 | + case AV_PIX_FMT_ABGR: | |
| 431 | 431 | alpha_first = 1; |
| 432 | − case PIX_FMT_BGRA: | |
| 432 | + case AV_PIX_FMT_BGRA: | |
| 433 | 433 | gbr24ptopacked32((const uint8_t *[]) { src[1], src[0], src[2] }, |
| 434 | 434 | (int []) { srcStride[1], srcStride[0], srcStride[2] }, |
| 435 | 435 | dst[0] + srcSliceY * dstStride[0], dstStride[0], |
| @@ -447,18 +447,18 @@ static int planarRgbToRgbWrapper(SwsContext *c, const uint8_t *src[], · 11 unmodified lines | ||
| 447 | 447 | } |
| 448 | 448 | |
| 449 | 449 | #define isRGBA32(x) ( \ |
| 450 | − (x) == PIX_FMT_ARGB \ | |
| 451 | − || (x) == PIX_FMT_RGBA \ | |
| 452 | − || (x) == PIX_FMT_BGRA \ | |
| 453 | − || (x) == PIX_FMT_ABGR \ | |
| 450 | + (x) == AV_PIX_FMT_ARGB \ | |
| 451 | + || (x) == AV_PIX_FMT_RGBA \ | |
| 452 | + || (x) == AV_PIX_FMT_BGRA \ | |
| 453 | + || (x) == AV_PIX_FMT_ABGR \ | |
| 454 | 454 | ) |
| 455 | 455 | |
| 456 | 456 | /* {RGB,BGR}{15,16,24,32,32_1} -> {RGB,BGR}{15,16,24,32} */ |
| 457 | 457 | typedef void (* rgbConvFn) (const uint8_t *, uint8_t *, int); |
| 458 | 458 | static rgbConvFn findRgbConvFn(SwsContext *c) |
| 459 | 459 | { |
| 460 | − const enum PixelFormat srcFormat = c->srcFormat; | |
| 461 | − const enum PixelFormat dstFormat = c->dstFormat; | |
| 460 | + const enum AVPixelFormat srcFormat = c->srcFormat; | |
| 461 | + const enum AVPixelFormat dstFormat = c->dstFormat; | |
| 462 | 462 | const int srcId = c->srcFormatBpp; |
| 463 | 463 | const int dstId = c->dstFormatBpp; |
| 464 | 464 | rgbConvFn conv = NULL; |
| @@ -471,7 +471,7 @@ static rgbConvFn findRgbConvFn(SwsContext *c) · 6 unmodified lines | ||
| 471 | 471 | if (IS_NOT_NE(srcId, srcFormat) || IS_NOT_NE(dstId, dstFormat)) |
| 472 | 472 | return NULL; |
| 473 | 473 | |
| 474 | −#define CONV_IS(src, dst) (srcFormat == PIX_FMT_##src && dstFormat == PIX_FMT_##dst) | |
| 474 | +#define CONV_IS(src, dst) (srcFormat == AV_PIX_FMT_##src && dstFormat == AV_PIX_FMT_##dst) | |
| 475 | 475 | |
| 476 | 476 | if (isRGBA32(srcFormat) && isRGBA32(dstFormat)) { |
| 477 | 477 | if ( CONV_IS(ABGR, RGBA) |
| @@ -536,8 +536,8 @@ static int rgbToRgbWrapper(SwsContext *c, const uint8_t *src[], int srcStride[], · 58 unmodified lines | ||
| 536 | 536 | int dstStride[]) |
| 537 | 537 | |
| 538 | 538 | { |
| 539 | − const enum PixelFormat srcFormat = c->srcFormat; | |
| 540 | − const enum PixelFormat dstFormat = c->dstFormat; | |
| 539 | + const enum AVPixelFormat srcFormat = c->srcFormat; | |
| 540 | + const enum AVPixelFormat dstFormat = c->dstFormat; | |
| 541 | 541 | const int srcBpp = (c->srcFormatBpp + 7) >> 3; |
| 542 | 542 | const int dstBpp = (c->dstFormatBpp + 7) >> 3; |
| 543 | 543 | rgbConvFn conv = findRgbConvFn(c); |
| @@ -548,11 +548,11 @@ static int rgbToRgbWrapper(SwsContext *c, const uint8_t *src[], int srcStride[], · 4 unmodified lines | ||
| 548 | 548 | } else { |
| 549 | 549 | const uint8_t *srcPtr = src[0]; |
| 550 | 550 | uint8_t *dstPtr = dst[0]; |
| 551 | − if ((srcFormat == PIX_FMT_RGB32_1 || srcFormat == PIX_FMT_BGR32_1) && | |
| 551 | + if ((srcFormat == AV_PIX_FMT_RGB32_1 || srcFormat == AV_PIX_FMT_BGR32_1) && | |
| 552 | 552 | !isRGBA32(dstFormat)) |
| 553 | 553 | srcPtr += ALT32_CORR; |
| 554 | 554 | |
| 555 | − if ((dstFormat == PIX_FMT_RGB32_1 || dstFormat == PIX_FMT_BGR32_1) && | |
| 555 | + if ((dstFormat == AV_PIX_FMT_RGB32_1 || dstFormat == AV_PIX_FMT_BGR32_1) && | |
| 556 | 556 | !isRGBA32(srcFormat)) |
| 557 | 557 | dstPtr += ALT32_CORR; |
| 558 | 558 | |
| @@ -860,8 +860,8 @@ static int planarCopyWrapper(SwsContext *c, const uint8_t *src[], · 301 unmodified lines | ||
| 860 | 860 | |
| 861 | 861 | void ff_get_unscaled_swscale(SwsContext *c) |
| 862 | 862 | { |
| 863 | − const enum PixelFormat srcFormat = c->srcFormat; | |
| 864 | − const enum PixelFormat dstFormat = c->dstFormat; | |
| 863 | + const enum AVPixelFormat srcFormat = c->srcFormat; | |
| 864 | + const enum AVPixelFormat dstFormat = c->dstFormat; | |
| 865 | 865 | const int flags = c->flags; |
| 866 | 866 | const int dstH = c->dstH; |
| 867 | 867 | int needsDither; |
| @@ -871,26 +871,26 @@ void ff_get_unscaled_swscale(SwsContext *c) · 3 unmodified lines | ||
| 871 | 871 | (c->dstFormatBpp < c->srcFormatBpp || (!isAnyRGB(srcFormat))); |
| 872 | 872 | |
| 873 | 873 | /* yv12_to_nv12 */ |
| 874 | − if ((srcFormat == PIX_FMT_YUV420P || srcFormat == PIX_FMT_YUVA420P) && | |
| 875 | − (dstFormat == PIX_FMT_NV12 || dstFormat == PIX_FMT_NV21)) { | |
| 874 | + if ((srcFormat == AV_PIX_FMT_YUV420P || srcFormat == AV_PIX_FMT_YUVA420P) && | |
| 875 | + (dstFormat == AV_PIX_FMT_NV12 || dstFormat == AV_PIX_FMT_NV21)) { | |
| 876 | 876 | c->swScale = planarToNv12Wrapper; |
| 877 | 877 | } |
| 878 | 878 | /* yuv2bgr */ |
| 879 | − if ((srcFormat == PIX_FMT_YUV420P || srcFormat == PIX_FMT_YUV422P || | |
| 880 | − srcFormat == PIX_FMT_YUVA420P) && isAnyRGB(dstFormat) && | |
| 879 | + if ((srcFormat == AV_PIX_FMT_YUV420P || srcFormat == AV_PIX_FMT_YUV422P || | |
| 880 | + srcFormat == AV_PIX_FMT_YUVA420P) && isAnyRGB(dstFormat) && | |
| 881 | 881 | !(flags & SWS_ACCURATE_RND) && !(dstH & 1)) { |
| 882 | 882 | c->swScale = ff_yuv2rgb_get_func_ptr(c); |
| 883 | 883 | } |
| 884 | 884 | |
| 885 | − if (srcFormat == PIX_FMT_YUV410P && | |
| 886 | − (dstFormat == PIX_FMT_YUV420P || dstFormat == PIX_FMT_YUVA420P) && | |
| 885 | + if (srcFormat == AV_PIX_FMT_YUV410P && | |
| 886 | + (dstFormat == AV_PIX_FMT_YUV420P || dstFormat == AV_PIX_FMT_YUVA420P) && | |
| 887 | 887 | !(flags & SWS_BITEXACT)) { |
| 888 | 888 | c->swScale = yvu9ToYv12Wrapper; |
| 889 | 889 | } |
| 890 | 890 | |
| 891 | 891 | /* bgr24toYV12 */ |
| 892 | − if (srcFormat == PIX_FMT_BGR24 && | |
| 893 | − (dstFormat == PIX_FMT_YUV420P || dstFormat == PIX_FMT_YUVA420P) && | |
| 892 | + if (srcFormat == AV_PIX_FMT_BGR24 && | |
| 893 | + (dstFormat == AV_PIX_FMT_YUV420P || dstFormat == AV_PIX_FMT_YUVA420P) && | |
| 894 | 894 | !(flags & SWS_ACCURATE_RND)) |
| 895 | 895 | c->swScale = bgr24ToYv12Wrapper; |
| 896 | 896 | |
| @@ -903,66 +903,66 @@ void ff_get_unscaled_swscale(SwsContext *c) · 6 unmodified lines | ||
| 903 | 903 | c->swScale = planarRgbToRgbWrapper; |
| 904 | 904 | |
| 905 | 905 | /* bswap 16 bits per pixel/component packed formats */ |
| 906 | − if (IS_DIFFERENT_ENDIANESS(srcFormat, dstFormat, PIX_FMT_BGR444) || | |
| 907 | − IS_DIFFERENT_ENDIANESS(srcFormat, dstFormat, PIX_FMT_BGR48) || | |
| 908 | − IS_DIFFERENT_ENDIANESS(srcFormat, dstFormat, PIX_FMT_BGR555) || | |
| 909 | − IS_DIFFERENT_ENDIANESS(srcFormat, dstFormat, PIX_FMT_BGR565) || | |
| 910 | − IS_DIFFERENT_ENDIANESS(srcFormat, dstFormat, PIX_FMT_GRAY16) || | |
| 911 | − IS_DIFFERENT_ENDIANESS(srcFormat, dstFormat, PIX_FMT_RGB444) || | |
| 912 | − IS_DIFFERENT_ENDIANESS(srcFormat, dstFormat, PIX_FMT_RGB48) || | |
| 913 | − IS_DIFFERENT_ENDIANESS(srcFormat, dstFormat, PIX_FMT_RGB555) || | |
| 914 | − IS_DIFFERENT_ENDIANESS(srcFormat, dstFormat, PIX_FMT_RGB565)) | |
| 906 | + if (IS_DIFFERENT_ENDIANESS(srcFormat, dstFormat, AV_PIX_FMT_BGR444) || | |
| 907 | + IS_DIFFERENT_ENDIANESS(srcFormat, dstFormat, AV_PIX_FMT_BGR48) || | |
| 908 | + IS_DIFFERENT_ENDIANESS(srcFormat, dstFormat, AV_PIX_FMT_BGR555) || | |
| 909 | + IS_DIFFERENT_ENDIANESS(srcFormat, dstFormat, AV_PIX_FMT_BGR565) || | |
| 910 | + IS_DIFFERENT_ENDIANESS(srcFormat, dstFormat, AV_PIX_FMT_GRAY16) || | |
| 911 | + IS_DIFFERENT_ENDIANESS(srcFormat, dstFormat, AV_PIX_FMT_RGB444) || | |
| 912 | + IS_DIFFERENT_ENDIANESS(srcFormat, dstFormat, AV_PIX_FMT_RGB48) || | |
| 913 | + IS_DIFFERENT_ENDIANESS(srcFormat, dstFormat, AV_PIX_FMT_RGB555) || | |
| 914 | + IS_DIFFERENT_ENDIANESS(srcFormat, dstFormat, AV_PIX_FMT_RGB565)) | |
| 915 | 915 | c->swScale = packed_16bpc_bswap; |
| 916 | 916 | |
| 917 | 917 | if ((usePal(srcFormat) && ( |
| 918 | − dstFormat == PIX_FMT_RGB32 || | |
| 919 | − dstFormat == PIX_FMT_RGB32_1 || | |
| 920 | − dstFormat == PIX_FMT_RGB24 || | |
| 921 | − dstFormat == PIX_FMT_BGR32 || | |
| 922 | − dstFormat == PIX_FMT_BGR32_1 || | |
| 923 | − dstFormat == PIX_FMT_BGR24))) | |
| 918 | + dstFormat == AV_PIX_FMT_RGB32 || | |
| 919 | + dstFormat == AV_PIX_FMT_RGB32_1 || | |
| 920 | + dstFormat == AV_PIX_FMT_RGB24 || | |
| 921 | + dstFormat == AV_PIX_FMT_BGR32 || | |
| 922 | + dstFormat == AV_PIX_FMT_BGR32_1 || | |
| 923 | + dstFormat == AV_PIX_FMT_BGR24))) | |
| 924 | 924 | c->swScale = palToRgbWrapper; |
| 925 | 925 | |
| 926 | − if (srcFormat == PIX_FMT_YUV422P) { | |
| 927 | − if (dstFormat == PIX_FMT_YUYV422) | |
| 926 | + if (srcFormat == AV_PIX_FMT_YUV422P) { | |
| 927 | + if (dstFormat == AV_PIX_FMT_YUYV422) | |
| 928 | 928 | c->swScale = yuv422pToYuy2Wrapper; |
| 929 | − else if (dstFormat == PIX_FMT_UYVY422) | |
| 929 | + else if (dstFormat == AV_PIX_FMT_UYVY422) | |
| 930 | 930 | c->swScale = yuv422pToUyvyWrapper; |
| 931 | 931 | } |
| 932 | 932 | |
| 933 | 933 | /* LQ converters if -sws 0 or -sws 4*/ |
| 934 | 934 | if (c->flags&(SWS_FAST_BILINEAR|SWS_POINT)) { |
| 935 | 935 | /* yv12_to_yuy2 */ |
| 936 | − if (srcFormat == PIX_FMT_YUV420P || srcFormat == PIX_FMT_YUVA420P) { | |
| 937 | − if (dstFormat == PIX_FMT_YUYV422) | |
| 936 | + if (srcFormat == AV_PIX_FMT_YUV420P || srcFormat == AV_PIX_FMT_YUVA420P) { | |
| 937 | + if (dstFormat == AV_PIX_FMT_YUYV422) | |
| 938 | 938 | c->swScale = planarToYuy2Wrapper; |
| 939 | − else if (dstFormat == PIX_FMT_UYVY422) | |
| 939 | + else if (dstFormat == AV_PIX_FMT_UYVY422) | |
| 940 | 940 | c->swScale = planarToUyvyWrapper; |
| 941 | 941 | } |
| 942 | 942 | } |
| 943 | − if (srcFormat == PIX_FMT_YUYV422 && | |
| 944 | − (dstFormat == PIX_FMT_YUV420P || dstFormat == PIX_FMT_YUVA420P)) | |
| 943 | + if (srcFormat == AV_PIX_FMT_YUYV422 && | |
| 944 | + (dstFormat == AV_PIX_FMT_YUV420P || dstFormat == AV_PIX_FMT_YUVA420P)) | |
| 945 | 945 | c->swScale = yuyvToYuv420Wrapper; |
| 946 | − if (srcFormat == PIX_FMT_UYVY422 && | |
| 947 | − (dstFormat == PIX_FMT_YUV420P || dstFormat == PIX_FMT_YUVA420P)) | |
| 946 | + if (srcFormat == AV_PIX_FMT_UYVY422 && | |
| 947 | + (dstFormat == AV_PIX_FMT_YUV420P || dstFormat == AV_PIX_FMT_YUVA420P)) | |
| 948 | 948 | c->swScale = uyvyToYuv420Wrapper; |
| 949 | − if (srcFormat == PIX_FMT_YUYV422 && dstFormat == PIX_FMT_YUV422P) | |
| 949 | + if (srcFormat == AV_PIX_FMT_YUYV422 && dstFormat == AV_PIX_FMT_YUV422P) | |
| 950 | 950 | c->swScale = yuyvToYuv422Wrapper; |
| 951 | − if (srcFormat == PIX_FMT_UYVY422 && dstFormat == PIX_FMT_YUV422P) | |
| 951 | + if (srcFormat == AV_PIX_FMT_UYVY422 && dstFormat == AV_PIX_FMT_YUV422P) | |
| 952 | 952 | c->swScale = uyvyToYuv422Wrapper; |
| 953 | 953 | |
| 954 | 954 | /* simple copy */ |
| 955 | 955 | if ( srcFormat == dstFormat || |
| 956 | − (srcFormat == PIX_FMT_YUVA420P && dstFormat == PIX_FMT_YUV420P) || | |
| 957 | − (srcFormat == PIX_FMT_YUV420P && dstFormat == PIX_FMT_YUVA420P) || | |
| 956 | + (srcFormat == AV_PIX_FMT_YUVA420P && dstFormat == AV_PIX_FMT_YUV420P) || | |
| 957 | + (srcFormat == AV_PIX_FMT_YUV420P && dstFormat == AV_PIX_FMT_YUVA420P) || | |
| 958 | 958 | (isPlanarYUV(srcFormat) && isGray(dstFormat)) || |
| 959 | 959 | (isPlanarYUV(dstFormat) && isGray(srcFormat)) || |
| 960 | 960 | (isGray(dstFormat) && isGray(srcFormat)) || |
| 961 | 961 | (isPlanarYUV(srcFormat) && isPlanarYUV(dstFormat) && |
| 962 | 962 | c->chrDstHSubSample == c->chrSrcHSubSample && |
| 963 | 963 | c->chrDstVSubSample == c->chrSrcVSubSample && |
| 964 | − dstFormat != PIX_FMT_NV12 && dstFormat != PIX_FMT_NV21 && | |
| 965 | − srcFormat != PIX_FMT_NV12 && srcFormat != PIX_FMT_NV21)) | |
| 964 | + dstFormat != AV_PIX_FMT_NV12 && dstFormat != AV_PIX_FMT_NV21 && | |
| 965 | + srcFormat != AV_PIX_FMT_NV12 && srcFormat != AV_PIX_FMT_NV21)) | |
| 966 | 966 | { |
| 967 | 967 | if (isPacked(c->srcFormat)) |
| 968 | 968 | c->swScale = packedCopyWrapper; |
| @@ -988,7 +988,7 @@ static void reset_ptr(const uint8_t *src[], int format) · 19 unmodified lines | ||
| 988 | 988 | } |
| 989 | 989 | } |
| 990 | 990 | |
| 991 | −static int check_image_pointers(uint8_t *data[4], enum PixelFormat pix_fmt, | |
| 991 | +static int check_image_pointers(uint8_t *data[4], enum AVPixelFormat pix_fmt, | |
| 992 | 992 | const int linesizes[4]) |
| 993 | 993 | { |
| 994 | 994 | const AVPixFmtDescriptor *desc = &av_pix_fmt_descriptors[pix_fmt]; |
| @@ -1041,28 +1041,28 @@ int attribute_align_arg sws_scale(struct SwsContext *c, · 46 unmodified lines | ||
| 1041 | 1041 | if (usePal(c->srcFormat)) { |
| 1042 | 1042 | for (i = 0; i < 256; i++) { |
| 1043 | 1043 | int p, r, g, b, y, u, v; |
| 1044 | − if (c->srcFormat == PIX_FMT_PAL8) { | |
| 1044 | + if (c->srcFormat == AV_PIX_FMT_PAL8) { | |
| 1045 | 1045 | p = ((const uint32_t *)(srcSlice[1]))[i]; |
| 1046 | 1046 | r = (p >> 16) & 0xFF; |
| 1047 | 1047 | g = (p >> 8) & 0xFF; |
| 1048 | 1048 | b = p & 0xFF; |
| 1049 | − } else if (c->srcFormat == PIX_FMT_RGB8) { | |
| 1049 | + } else if (c->srcFormat == AV_PIX_FMT_RGB8) { | |
| 1050 | 1050 | r = ( i >> 5 ) * 36; |
| 1051 | 1051 | g = ((i >> 2) & 7) * 36; |
| 1052 | 1052 | b = ( i & 3) * 85; |
| 1053 | − } else if (c->srcFormat == PIX_FMT_BGR8) { | |
| 1053 | + } else if (c->srcFormat == AV_PIX_FMT_BGR8) { | |
| 1054 | 1054 | b = ( i >> 6 ) * 85; |
| 1055 | 1055 | g = ((i >> 3) & 7) * 36; |
| 1056 | 1056 | r = ( i & 7) * 36; |
| 1057 | − } else if (c->srcFormat == PIX_FMT_RGB4_BYTE) { | |
| 1057 | + } else if (c->srcFormat == AV_PIX_FMT_RGB4_BYTE) { | |
| 1058 | 1058 | r = ( i >> 3 ) * 255; |
| 1059 | 1059 | g = ((i >> 1) & 3) * 85; |
| 1060 | 1060 | b = ( i & 1) * 255; |
| 1061 | − } else if (c->srcFormat == PIX_FMT_GRAY8 || | |
| 1062 | − c->srcFormat == PIX_FMT_Y400A) { | |
| 1061 | + } else if (c->srcFormat == AV_PIX_FMT_GRAY8 || | |
| 1062 | + c->srcFormat == AV_PIX_FMT_Y400A) { | |
| 1063 | 1063 | r = g = b = i; |
| 1064 | 1064 | } else { |
| 1065 | − assert(c->srcFormat == PIX_FMT_BGR4_BYTE); | |
| 1065 | + assert(c->srcFormat == AV_PIX_FMT_BGR4_BYTE); | |
| 1066 | 1066 | b = ( i >> 3 ) * 255; |
| 1067 | 1067 | g = ((i >> 1) & 3) * 85; |
| 1068 | 1068 | r = ( i & 1) * 255; |
| @@ -1073,27 +1073,27 @@ int attribute_align_arg sws_scale(struct SwsContext *c, · 4 unmodified lines | ||
| 1073 | 1073 | c->pal_yuv[i] = y + (u << 8) + (v << 16); |
| 1074 | 1074 | |
| 1075 | 1075 | switch (c->dstFormat) { |
| 1076 | − case PIX_FMT_BGR32: | |
| 1076 | + case AV_PIX_FMT_BGR32: | |
| 1077 | 1077 | #if !HAVE_BIGENDIAN |
| 1078 | − case PIX_FMT_RGB24: | |
| 1078 | + case AV_PIX_FMT_RGB24: | |
| 1079 | 1079 | #endif |
| 1080 | 1080 | c->pal_rgb[i] = r + (g << 8) + (b << 16); |
| 1081 | 1081 | break; |
| 1082 | − case PIX_FMT_BGR32_1: | |
| 1082 | + case AV_PIX_FMT_BGR32_1: | |
| 1083 | 1083 | #if HAVE_BIGENDIAN |
| 1084 | − case PIX_FMT_BGR24: | |
| 1084 | + case AV_PIX_FMT_BGR24: | |
| 1085 | 1085 | #endif |
| 1086 | 1086 | c->pal_rgb[i] = (r + (g << 8) + (b << 16)) << 8; |
| 1087 | 1087 | break; |
| 1088 | − case PIX_FMT_RGB32_1: | |
| 1088 | + case AV_PIX_FMT_RGB32_1: | |
| 1089 | 1089 | #if HAVE_BIGENDIAN |
| 1090 | − case PIX_FMT_RGB24: | |
| 1090 | + case AV_PIX_FMT_RGB24: | |
| 1091 | 1091 | #endif |
| 1092 | 1092 | c->pal_rgb[i] = (b + (g << 8) + (r << 16)) << 8; |
| 1093 | 1093 | break; |
| 1094 | − case PIX_FMT_RGB32: | |
| 1094 | + case AV_PIX_FMT_RGB32: | |
| 1095 | 1095 | #if !HAVE_BIGENDIAN |
| 1096 | − case PIX_FMT_BGR24: | |
| 1096 | + case AV_PIX_FMT_BGR24: | |
| 1097 | 1097 | #endif |
| 1098 | 1098 | default: |
| 1099 | 1099 | c->pal_rgb[i] = b + (g << 8) + (r << 16); |
| @@ -73,102 +73,102 @@ typedef struct FormatEntry { · 72 unmodified lines | ||
| 73 | 73 | int is_supported_in, is_supported_out; |
| 74 | 74 | } FormatEntry; |
| 75 | 75 | |
| 76 | −static const FormatEntry format_entries[PIX_FMT_NB] = { | |
| 77 | − [PIX_FMT_YUV420P] = { 1, 1 }, | |
| 78 | − [PIX_FMT_YUYV422] = { 1, 1 }, | |
| 79 | − [PIX_FMT_RGB24] = { 1, 1 }, | |
| 80 | − [PIX_FMT_BGR24] = { 1, 1 }, | |
| 81 | − [PIX_FMT_YUV422P] = { 1, 1 }, | |
| 82 | − [PIX_FMT_YUV444P] = { 1, 1 }, | |
| 83 | − [PIX_FMT_YUV410P] = { 1, 1 }, | |
| 84 | − [PIX_FMT_YUV411P] = { 1, 1 }, | |
| 85 | − [PIX_FMT_GRAY8] = { 1, 1 }, | |
| 86 | − [PIX_FMT_MONOWHITE] = { 1, 1 }, | |
| 87 | − [PIX_FMT_MONOBLACK] = { 1, 1 }, | |
| 88 | − [PIX_FMT_PAL8] = { 1, 0 }, | |
| 89 | − [PIX_FMT_YUVJ420P] = { 1, 1 }, | |
| 90 | − [PIX_FMT_YUVJ422P] = { 1, 1 }, | |
| 91 | − [PIX_FMT_YUVJ444P] = { 1, 1 }, | |
| 92 | − [PIX_FMT_UYVY422] = { 1, 1 }, | |
| 93 | − [PIX_FMT_UYYVYY411] = { 0, 0 }, | |
| 94 | − [PIX_FMT_BGR8] = { 1, 1 }, | |
| 95 | − [PIX_FMT_BGR4] = { 0, 1 }, | |
| 96 | − [PIX_FMT_BGR4_BYTE] = { 1, 1 }, | |
| 97 | − [PIX_FMT_RGB8] = { 1, 1 }, | |
| 98 | − [PIX_FMT_RGB4] = { 0, 1 }, | |
| 99 | − [PIX_FMT_RGB4_BYTE] = { 1, 1 }, | |
| 100 | − [PIX_FMT_NV12] = { 1, 1 }, | |
| 101 | − [PIX_FMT_NV21] = { 1, 1 }, | |
| 102 | − [PIX_FMT_ARGB] = { 1, 1 }, | |
| 103 | − [PIX_FMT_RGBA] = { 1, 1 }, | |
| 104 | − [PIX_FMT_ABGR] = { 1, 1 }, | |
| 105 | − [PIX_FMT_BGRA] = { 1, 1 }, | |
| 106 | − [PIX_FMT_GRAY16BE] = { 1, 1 }, | |
| 107 | − [PIX_FMT_GRAY16LE] = { 1, 1 }, | |
| 108 | − [PIX_FMT_YUV440P] = { 1, 1 }, | |
| 109 | − [PIX_FMT_YUVJ440P] = { 1, 1 }, | |
| 110 | − [PIX_FMT_YUVA420P] = { 1, 1 }, | |
| 111 | − [PIX_FMT_RGB48BE] = { 1, 1 }, | |
| 112 | − [PIX_FMT_RGB48LE] = { 1, 1 }, | |
| 113 | − [PIX_FMT_RGB565BE] = { 1, 1 }, | |
| 114 | − [PIX_FMT_RGB565LE] = { 1, 1 }, | |
| 115 | − [PIX_FMT_RGB555BE] = { 1, 1 }, | |
| 116 | − [PIX_FMT_RGB555LE] = { 1, 1 }, | |
| 117 | − [PIX_FMT_BGR565BE] = { 1, 1 }, | |
| 118 | − [PIX_FMT_BGR565LE] = { 1, 1 }, | |
| 119 | − [PIX_FMT_BGR555BE] = { 1, 1 }, | |
| 120 | − [PIX_FMT_BGR555LE] = { 1, 1 }, | |
| 121 | − [PIX_FMT_YUV420P16LE] = { 1, 1 }, | |
| 122 | − [PIX_FMT_YUV420P16BE] = { 1, 1 }, | |
| 123 | − [PIX_FMT_YUV422P16LE] = { 1, 1 }, | |
| 124 | − [PIX_FMT_YUV422P16BE] = { 1, 1 }, | |
| 125 | − [PIX_FMT_YUV444P16LE] = { 1, 1 }, | |
| 126 | − [PIX_FMT_YUV444P16BE] = { 1, 1 }, | |
| 127 | − [PIX_FMT_RGB444LE] = { 1, 1 }, | |
| 128 | − [PIX_FMT_RGB444BE] = { 1, 1 }, | |
| 129 | − [PIX_FMT_BGR444LE] = { 1, 1 }, | |
| 130 | − [PIX_FMT_BGR444BE] = { 1, 1 }, | |
| 131 | − [PIX_FMT_Y400A] = { 1, 0 }, | |
| 132 | − [PIX_FMT_BGR48BE] = { 1, 1 }, | |
| 133 | − [PIX_FMT_BGR48LE] = { 1, 1 }, | |
| 134 | − [PIX_FMT_YUV420P9BE] = { 1, 1 }, | |
| 135 | − [PIX_FMT_YUV420P9LE] = { 1, 1 }, | |
| 136 | − [PIX_FMT_YUV420P10BE] = { 1, 1 }, | |
| 137 | − [PIX_FMT_YUV420P10LE] = { 1, 1 }, | |
| 138 | − [PIX_FMT_YUV422P9BE] = { 1, 1 }, | |
| 139 | − [PIX_FMT_YUV422P9LE] = { 1, 1 }, | |
| 140 | − [PIX_FMT_YUV422P10BE] = { 1, 1 }, | |
| 141 | − [PIX_FMT_YUV422P10LE] = { 1, 1 }, | |
| 142 | − [PIX_FMT_YUV444P9BE] = { 1, 1 }, | |
| 143 | − [PIX_FMT_YUV444P9LE] = { 1, 1 }, | |
| 144 | − [PIX_FMT_YUV444P10BE] = { 1, 1 }, | |
| 145 | − [PIX_FMT_YUV444P10LE] = { 1, 1 }, | |
| 146 | − [PIX_FMT_GBRP] = { 1, 0 }, | |
| 147 | − [PIX_FMT_GBRP9LE] = { 1, 0 }, | |
| 148 | − [PIX_FMT_GBRP9BE] = { 1, 0 }, | |
| 149 | − [PIX_FMT_GBRP10LE] = { 1, 0 }, | |
| 150 | − [PIX_FMT_GBRP10BE] = { 1, 0 }, | |
| 151 | − [PIX_FMT_GBRP16LE] = { 1, 0 }, | |
| 152 | − [PIX_FMT_GBRP16BE] = { 1, 0 }, | |
| 76 | +static const FormatEntry format_entries[AV_PIX_FMT_NB] = { | |
| 77 | + [AV_PIX_FMT_YUV420P] = { 1, 1 }, | |
| 78 | + [AV_PIX_FMT_YUYV422] = { 1, 1 }, | |
| 79 | + [AV_PIX_FMT_RGB24] = { 1, 1 }, | |
| 80 | + [AV_PIX_FMT_BGR24] = { 1, 1 }, | |
| 81 | + [AV_PIX_FMT_YUV422P] = { 1, 1 }, | |
| 82 | + [AV_PIX_FMT_YUV444P] = { 1, 1 }, | |
| 83 | + [AV_PIX_FMT_YUV410P] = { 1, 1 }, | |
| 84 | + [AV_PIX_FMT_YUV411P] = { 1, 1 }, | |
| 85 | + [AV_PIX_FMT_GRAY8] = { 1, 1 }, | |
| 86 | + [AV_PIX_FMT_MONOWHITE] = { 1, 1 }, | |
| 87 | + [AV_PIX_FMT_MONOBLACK] = { 1, 1 }, | |
| 88 | + [AV_PIX_FMT_PAL8] = { 1, 0 }, | |
| 89 | + [AV_PIX_FMT_YUVJ420P] = { 1, 1 }, | |
| 90 | + [AV_PIX_FMT_YUVJ422P] = { 1, 1 }, | |
| 91 | + [AV_PIX_FMT_YUVJ444P] = { 1, 1 }, | |
| 92 | + [AV_PIX_FMT_UYVY422] = { 1, 1 }, | |
| 93 | + [AV_PIX_FMT_UYYVYY411] = { 0, 0 }, | |
| 94 | + [AV_PIX_FMT_BGR8] = { 1, 1 }, | |
| 95 | + [AV_PIX_FMT_BGR4] = { 0, 1 }, | |
| 96 | + [AV_PIX_FMT_BGR4_BYTE] = { 1, 1 }, | |
| 97 | + [AV_PIX_FMT_RGB8] = { 1, 1 }, | |
| 98 | + [AV_PIX_FMT_RGB4] = { 0, 1 }, | |
| 99 | + [AV_PIX_FMT_RGB4_BYTE] = { 1, 1 }, | |
| 100 | + [AV_PIX_FMT_NV12] = { 1, 1 }, | |
| 101 | + [AV_PIX_FMT_NV21] = { 1, 1 }, | |
| 102 | + [AV_PIX_FMT_ARGB] = { 1, 1 }, | |
| 103 | + [AV_PIX_FMT_RGBA] = { 1, 1 }, | |
| 104 | + [AV_PIX_FMT_ABGR] = { 1, 1 }, | |
| 105 | + [AV_PIX_FMT_BGRA] = { 1, 1 }, | |
| 106 | + [AV_PIX_FMT_GRAY16BE] = { 1, 1 }, | |
| 107 | + [AV_PIX_FMT_GRAY16LE] = { 1, 1 }, | |
| 108 | + [AV_PIX_FMT_YUV440P] = { 1, 1 }, | |
| 109 | + [AV_PIX_FMT_YUVJ440P] = { 1, 1 }, | |
| 110 | + [AV_PIX_FMT_YUVA420P] = { 1, 1 }, | |
| 111 | + [AV_PIX_FMT_RGB48BE] = { 1, 1 }, | |
| 112 | + [AV_PIX_FMT_RGB48LE] = { 1, 1 }, | |
| 113 | + [AV_PIX_FMT_RGB565BE] = { 1, 1 }, | |
| 114 | + [AV_PIX_FMT_RGB565LE] = { 1, 1 }, | |
| 115 | + [AV_PIX_FMT_RGB555BE] = { 1, 1 }, | |
| 116 | + [AV_PIX_FMT_RGB555LE] = { 1, 1 }, | |
| 117 | + [AV_PIX_FMT_BGR565BE] = { 1, 1 }, | |
| 118 | + [AV_PIX_FMT_BGR565LE] = { 1, 1 }, | |
| 119 | + [AV_PIX_FMT_BGR555BE] = { 1, 1 }, | |
| 120 | + [AV_PIX_FMT_BGR555LE] = { 1, 1 }, | |
| 121 | + [AV_PIX_FMT_YUV420P16LE] = { 1, 1 }, | |
| 122 | + [AV_PIX_FMT_YUV420P16BE] = { 1, 1 }, | |
| 123 | + [AV_PIX_FMT_YUV422P16LE] = { 1, 1 }, | |
| 124 | + [AV_PIX_FMT_YUV422P16BE] = { 1, 1 }, | |
| 125 | + [AV_PIX_FMT_YUV444P16LE] = { 1, 1 }, | |
| 126 | + [AV_PIX_FMT_YUV444P16BE] = { 1, 1 }, | |
| 127 | + [AV_PIX_FMT_RGB444LE] = { 1, 1 }, | |
| 128 | + [AV_PIX_FMT_RGB444BE] = { 1, 1 }, | |
| 129 | + [AV_PIX_FMT_BGR444LE] = { 1, 1 }, | |
| 130 | + [AV_PIX_FMT_BGR444BE] = { 1, 1 }, | |
| 131 | + [AV_PIX_FMT_Y400A] = { 1, 0 }, | |
| 132 | + [AV_PIX_FMT_BGR48BE] = { 1, 1 }, | |
| 133 | + [AV_PIX_FMT_BGR48LE] = { 1, 1 }, | |
| 134 | + [AV_PIX_FMT_YUV420P9BE] = { 1, 1 }, | |
| 135 | + [AV_PIX_FMT_YUV420P9LE] = { 1, 1 }, | |
| 136 | + [AV_PIX_FMT_YUV420P10BE] = { 1, 1 }, | |
| 137 | + [AV_PIX_FMT_YUV420P10LE] = { 1, 1 }, | |
| 138 | + [AV_PIX_FMT_YUV422P9BE] = { 1, 1 }, | |
| 139 | + [AV_PIX_FMT_YUV422P9LE] = { 1, 1 }, | |
| 140 | + [AV_PIX_FMT_YUV422P10BE] = { 1, 1 }, | |
| 141 | + [AV_PIX_FMT_YUV422P10LE] = { 1, 1 }, | |
| 142 | + [AV_PIX_FMT_YUV444P9BE] = { 1, 1 }, | |
| 143 | + [AV_PIX_FMT_YUV444P9LE] = { 1, 1 }, | |
| 144 | + [AV_PIX_FMT_YUV444P10BE] = { 1, 1 }, | |
| 145 | + [AV_PIX_FMT_YUV444P10LE] = { 1, 1 }, | |
| 146 | + [AV_PIX_FMT_GBRP] = { 1, 0 }, | |
| 147 | + [AV_PIX_FMT_GBRP9LE] = { 1, 0 }, | |
| 148 | + [AV_PIX_FMT_GBRP9BE] = { 1, 0 }, | |
| 149 | + [AV_PIX_FMT_GBRP10LE] = { 1, 0 }, | |
| 150 | + [AV_PIX_FMT_GBRP10BE] = { 1, 0 }, | |
| 151 | + [AV_PIX_FMT_GBRP16LE] = { 1, 0 }, | |
| 152 | + [AV_PIX_FMT_GBRP16BE] = { 1, 0 }, | |
| 153 | 153 | }; |
| 154 | 154 | |
| 155 | −int sws_isSupportedInput(enum PixelFormat pix_fmt) | |
| 155 | +int sws_isSupportedInput(enum AVPixelFormat pix_fmt) | |
| 156 | 156 | { |
| 157 | − return (unsigned)pix_fmt < PIX_FMT_NB ? | |
| 157 | + return (unsigned)pix_fmt < AV_PIX_FMT_NB ? | |
| 158 | 158 | format_entries[pix_fmt].is_supported_in : 0; |
| 159 | 159 | } |
| 160 | 160 | |
| 161 | −int sws_isSupportedOutput(enum PixelFormat pix_fmt) | |
| 161 | +int sws_isSupportedOutput(enum AVPixelFormat pix_fmt) | |
| 162 | 162 | { |
| 163 | − return (unsigned)pix_fmt < PIX_FMT_NB ? | |
| 163 | + return (unsigned)pix_fmt < AV_PIX_FMT_NB ? | |
| 164 | 164 | format_entries[pix_fmt].is_supported_out : 0; |
| 165 | 165 | } |
| 166 | 166 | |
| 167 | 167 | extern const int32_t ff_yuv2rgb_coeffs[8][4]; |
| 168 | 168 | |
| 169 | −const char *sws_format_name(enum PixelFormat format) | |
| 169 | +const char *sws_format_name(enum AVPixelFormat format) | |
| 170 | 170 | { |
| 171 | − if ((unsigned)format < PIX_FMT_NB && av_pix_fmt_descriptors[format].name) | |
| 171 | + if ((unsigned)format < AV_PIX_FMT_NB && av_pix_fmt_descriptors[format].name) | |
| 172 | 172 | return av_pix_fmt_descriptors[format].name; |
| 173 | 173 | else |
| 174 | 174 | return "Unknown format"; |
| @@ -743,7 +743,7 @@ static int initMMX2HScaler(int dstW, int xInc, uint8_t *filterCode, · 568 unmodified lines | ||
| 743 | 743 | } |
| 744 | 744 | #endif /* HAVE_MMXEXT_INLINE */ |
| 745 | 745 | |
| 746 | −static void getSubSampleFactors(int *h, int *v, enum PixelFormat format) | |
| 746 | +static void getSubSampleFactors(int *h, int *v, enum AVPixelFormat format) | |
| 747 | 747 | { |
| 748 | 748 | *h = av_pix_fmt_descriptors[format].log2_chroma_w; |
| 749 | 749 | *v = av_pix_fmt_descriptors[format].log2_chroma_h; |
| @@ -795,20 +795,20 @@ int sws_getColorspaceDetails(struct SwsContext *c, int **inv_table, · 45 unmodified lines | ||
| 795 | 795 | return 0; |
| 796 | 796 | } |
| 797 | 797 | |
| 798 | −static int handle_jpeg(enum PixelFormat *format) | |
| 798 | +static int handle_jpeg(enum AVPixelFormat *format) | |
| 799 | 799 | { |
| 800 | 800 | switch (*format) { |
| 801 | − case PIX_FMT_YUVJ420P: | |
| 802 | − *format = PIX_FMT_YUV420P; | |
| 801 | + case AV_PIX_FMT_YUVJ420P: | |
| 802 | + *format = AV_PIX_FMT_YUV420P; | |
| 803 | 803 | return 1; |
| 804 | − case PIX_FMT_YUVJ422P: | |
| 805 | − *format = PIX_FMT_YUV422P; | |
| 804 | + case AV_PIX_FMT_YUVJ422P: | |
| 805 | + *format = AV_PIX_FMT_YUV422P; | |
| 806 | 806 | return 1; |
| 807 | − case PIX_FMT_YUVJ444P: | |
| 808 | − *format = PIX_FMT_YUV444P; | |
| 807 | + case AV_PIX_FMT_YUVJ444P: | |
| 808 | + *format = AV_PIX_FMT_YUV444P; | |
| 809 | 809 | return 1; |
| 810 | − case PIX_FMT_YUVJ440P: | |
| 811 | − *format = PIX_FMT_YUV440P; | |
| 810 | + case AV_PIX_FMT_YUVJ440P: | |
| 811 | + *format = AV_PIX_FMT_YUV440P; | |
| 812 | 812 | return 1; |
| 813 | 813 | default: |
| 814 | 814 | return 0; |
| @@ -839,8 +839,8 @@ av_cold int sws_init_context(SwsContext *c, SwsFilter *srcFilter, · 24 unmodified lines | ||
| 839 | 839 | int dst_stride = FFALIGN(dstW * sizeof(int16_t) + 16, 16); |
| 840 | 840 | int dst_stride_px = dst_stride >> 1; |
| 841 | 841 | int flags, cpu_flags; |
| 842 | − enum PixelFormat srcFormat = c->srcFormat; | |
| 843 | − enum PixelFormat dstFormat = c->dstFormat; | |
| 842 | + enum AVPixelFormat srcFormat = c->srcFormat; | |
| 843 | + enum AVPixelFormat dstFormat = c->dstFormat; | |
| 844 | 844 | |
| 845 | 845 | cpu_flags = av_get_cpu_flags(); |
| 846 | 846 | flags = c->flags; |
| @@ -913,12 +913,12 @@ av_cold int sws_init_context(SwsContext *c, SwsFilter *srcFilter, · 66 unmodified lines | ||
| 913 | 913 | * chroma interpolation */ |
| 914 | 914 | if (flags & SWS_FULL_CHR_H_INT && |
| 915 | 915 | isAnyRGB(dstFormat) && |
| 916 | − dstFormat != PIX_FMT_RGBA && | |
| 917 | − dstFormat != PIX_FMT_ARGB && | |
| 918 | − dstFormat != PIX_FMT_BGRA && | |
| 919 | − dstFormat != PIX_FMT_ABGR && | |
| 920 | − dstFormat != PIX_FMT_RGB24 && | |
| 921 | − dstFormat != PIX_FMT_BGR24) { | |
| 916 | + dstFormat != AV_PIX_FMT_RGBA && | |
| 917 | + dstFormat != AV_PIX_FMT_ARGB && | |
| 918 | + dstFormat != AV_PIX_FMT_BGRA && | |
| 919 | + dstFormat != AV_PIX_FMT_ABGR && | |
| 920 | + dstFormat != AV_PIX_FMT_RGB24 && | |
| 921 | + dstFormat != AV_PIX_FMT_BGR24) { | |
| 922 | 922 | av_log(c, AV_LOG_ERROR, |
| 923 | 923 | "full chroma interpolation for destination format '%s' not yet implemented\n", |
| 924 | 924 | sws_format_name(dstFormat)); |
| @@ -936,9 +936,9 @@ av_cold int sws_init_context(SwsContext *c, SwsFilter *srcFilter, · 11 unmodified lines | ||
| 936 | 936 | /* drop every other pixel for chroma calculation unless user |
| 937 | 937 | * wants full chroma */ |
| 938 | 938 | if (isAnyRGB(srcFormat) && !(flags & SWS_FULL_CHR_H_INP) && |
| 939 | − srcFormat != PIX_FMT_RGB8 && srcFormat != PIX_FMT_BGR8 && | |
| 940 | − srcFormat != PIX_FMT_RGB4 && srcFormat != PIX_FMT_BGR4 && | |
| 941 | − srcFormat != PIX_FMT_RGB4_BYTE && srcFormat != PIX_FMT_BGR4_BYTE && | |
| 939 | + srcFormat != AV_PIX_FMT_RGB8 && srcFormat != AV_PIX_FMT_BGR8 && | |
| 940 | + srcFormat != AV_PIX_FMT_RGB4 && srcFormat != AV_PIX_FMT_BGR4 && | |
| 941 | + srcFormat != AV_PIX_FMT_RGB4_BYTE && srcFormat != AV_PIX_FMT_BGR4_BYTE && | |
| 942 | 942 | ((dstW >> c->chrDstHSubSample) <= (srcW >> 1) || |
| 943 | 943 | (flags & SWS_FAST_BILINEAR))) |
| 944 | 944 | c->chrSrcHSubSample = 1; |
| @@ -1199,9 +1199,9 @@ av_cold int sws_init_context(SwsContext *c, SwsFilter *srcFilter, · 254 unmodified lines | ||
| 1199 | 1199 | av_log(c, AV_LOG_INFO, "from %s to %s%s ", |
| 1200 | 1200 | sws_format_name(srcFormat), |
| 1201 | 1201 | #ifdef DITHER1XBPP |
| 1202 | − dstFormat == PIX_FMT_BGR555 || dstFormat == PIX_FMT_BGR565 || | |
| 1203 | − dstFormat == PIX_FMT_RGB444BE || dstFormat == PIX_FMT_RGB444LE || | |
| 1204 | − dstFormat == PIX_FMT_BGR444BE || dstFormat == PIX_FMT_BGR444LE ? | |
| 1202 | + dstFormat == AV_PIX_FMT_BGR555 || dstFormat == AV_PIX_FMT_BGR565 || | |
| 1203 | + dstFormat == AV_PIX_FMT_RGB444BE || dstFormat == AV_PIX_FMT_RGB444LE || | |
| 1204 | + dstFormat == AV_PIX_FMT_BGR444BE || dstFormat == AV_PIX_FMT_BGR444LE ? | |
| 1205 | 1205 | "dithered " : "", |
| 1206 | 1206 | #else |
| 1207 | 1207 | "", |
| @@ -1236,8 +1236,8 @@ fail: // FIXME replace things by appropriate error codes · 28 unmodified lines | ||
| 1236 | 1236 | } |
| 1237 | 1237 | |
| 1238 | 1238 | #if FF_API_SWS_GETCONTEXT |
| 1239 | −SwsContext *sws_getContext(int srcW, int srcH, enum PixelFormat srcFormat, | |
| 1240 | − int dstW, int dstH, enum PixelFormat dstFormat, | |
| 1239 | +SwsContext *sws_getContext(int srcW, int srcH, enum AVPixelFormat srcFormat, | |
| 1240 | + int dstW, int dstH, enum AVPixelFormat dstFormat, | |
| 1241 | 1241 | int flags, SwsFilter *srcFilter, |
| 1242 | 1242 | SwsFilter *dstFilter, const double *param) |
| 1243 | 1243 | { |
| @@ -1647,9 +1647,9 @@ void sws_freeContext(SwsContext *c) · 403 unmodified lines | ||
| 1647 | 1647 | } |
| 1648 | 1648 | |
| 1649 | 1649 | struct SwsContext *sws_getCachedContext(struct SwsContext *context, int srcW, |
| 1650 | − int srcH, enum PixelFormat srcFormat, | |
| 1650 | + int srcH, enum AVPixelFormat srcFormat, | |
| 1651 | 1651 | int dstW, int dstH, |
| 1652 | − enum PixelFormat dstFormat, int flags, | |
| 1652 | + enum AVPixelFormat dstFormat, int flags, | |
| 1653 | 1653 | SwsFilter *srcFilter, |
| 1654 | 1654 | SwsFilter *dstFilter, |
| 1655 | 1655 | const double *param) |
| @@ -111,7 +111,7 @@ void updateMMXDitherTables(SwsContext *c, int dstY, int lumBufIndex, int chrBufI · 110 unmodified lines | ||
| 111 | 111 | const int firstChrSrcY= vChrFilterPos[chrDstY]; //First line needed as input |
| 112 | 112 | |
| 113 | 113 | c->blueDither= ff_dither8[dstY&1]; |
| 114 | − if (c->dstFormat == PIX_FMT_RGB555 || c->dstFormat == PIX_FMT_BGR555) | |
| 114 | + if (c->dstFormat == AV_PIX_FMT_RGB555 || c->dstFormat == AV_PIX_FMT_BGR555) | |
| 115 | 115 | c->greenDither= ff_dither8[dstY&1]; |
| 116 | 116 | else |
| 117 | 117 | c->greenDither= ff_dither4[dstY&1]; |
| @@ -351,7 +351,7 @@ switch(c->dstBpc){ \ · 233 unmodified lines | ||
| 351 | 351 | default: vscalefn = ff_yuv2plane1_8_ ## opt1; break; \ |
| 352 | 352 | } |
| 353 | 353 | #define case_rgb(x, X, opt) \ |
| 354 | − case PIX_FMT_ ## X: \ | |
| 354 | + case AV_PIX_FMT_ ## X: \ | |
| 355 | 355 | c->lumToYV12 = ff_ ## x ## ToY_ ## opt; \ |
| 356 | 356 | if (!c->chrSrcHSubSample) \ |
| 357 | 357 | c->chrToYV12 = ff_ ## x ## ToUV_ ## opt; \ |
| @@ -363,23 +363,23 @@ switch(c->dstBpc){ \ · 5 unmodified lines | ||
| 363 | 363 | ASSIGN_VSCALE_FUNC(c->yuv2plane1, mmx, mmx2, cpu_flags & AV_CPU_FLAG_MMXEXT); |
| 364 | 364 | |
| 365 | 365 | switch (c->srcFormat) { |
| 366 | − case PIX_FMT_Y400A: | |
| 366 | + case AV_PIX_FMT_Y400A: | |
| 367 | 367 | c->lumToYV12 = ff_yuyvToY_mmx; |
| 368 | 368 | if (c->alpPixBuf) |
| 369 | 369 | c->alpToYV12 = ff_uyvyToY_mmx; |
| 370 | 370 | break; |
| 371 | − case PIX_FMT_YUYV422: | |
| 371 | + case AV_PIX_FMT_YUYV422: | |
| 372 | 372 | c->lumToYV12 = ff_yuyvToY_mmx; |
| 373 | 373 | c->chrToYV12 = ff_yuyvToUV_mmx; |
| 374 | 374 | break; |
| 375 | − case PIX_FMT_UYVY422: | |
| 375 | + case AV_PIX_FMT_UYVY422: | |
| 376 | 376 | c->lumToYV12 = ff_uyvyToY_mmx; |
| 377 | 377 | c->chrToYV12 = ff_uyvyToUV_mmx; |
| 378 | 378 | break; |
| 379 | − case PIX_FMT_NV12: | |
| 379 | + case AV_PIX_FMT_NV12: | |
| 380 | 380 | c->chrToYV12 = ff_nv12ToUV_mmx; |
| 381 | 381 | break; |
| 382 | − case PIX_FMT_NV21: | |
| 382 | + case AV_PIX_FMT_NV21: | |
| 383 | 383 | c->chrToYV12 = ff_nv21ToUV_mmx; |
| 384 | 384 | break; |
| 385 | 385 | case_rgb(rgb24, RGB24, mmx); |
| @@ -412,23 +412,23 @@ switch(c->dstBpc){ \ · 26 unmodified lines | ||
| 412 | 412 | ASSIGN_VSCALE_FUNC(c->yuv2plane1, sse2, sse2, 1); |
| 413 | 413 | |
| 414 | 414 | switch (c->srcFormat) { |
| 415 | − case PIX_FMT_Y400A: | |
| 415 | + case AV_PIX_FMT_Y400A: | |
| 416 | 416 | c->lumToYV12 = ff_yuyvToY_sse2; |
| 417 | 417 | if (c->alpPixBuf) |
| 418 | 418 | c->alpToYV12 = ff_uyvyToY_sse2; |
| 419 | 419 | break; |
| 420 | − case PIX_FMT_YUYV422: | |
| 420 | + case AV_PIX_FMT_YUYV422: | |
| 421 | 421 | c->lumToYV12 = ff_yuyvToY_sse2; |
| 422 | 422 | c->chrToYV12 = ff_yuyvToUV_sse2; |
| 423 | 423 | break; |
| 424 | − case PIX_FMT_UYVY422: | |
| 424 | + case AV_PIX_FMT_UYVY422: | |
| 425 | 425 | c->lumToYV12 = ff_uyvyToY_sse2; |
| 426 | 426 | c->chrToYV12 = ff_uyvyToUV_sse2; |
| 427 | 427 | break; |
| 428 | − case PIX_FMT_NV12: | |
| 428 | + case AV_PIX_FMT_NV12: | |
| 429 | 429 | c->chrToYV12 = ff_nv12ToUV_sse2; |
| 430 | 430 | break; |
| 431 | − case PIX_FMT_NV21: | |
| 431 | + case AV_PIX_FMT_NV21: | |
| 432 | 432 | c->chrToYV12 = ff_nv21ToUV_sse2; |
| 433 | 433 | break; |
| 434 | 434 | case_rgb(rgb24, RGB24, sse2); |
| @@ -468,16 +468,16 @@ switch(c->dstBpc){ \ · 33 unmodified lines | ||
| 468 | 468 | ASSIGN_VSCALE_FUNC(c->yuv2plane1, avx, avx, 1); |
| 469 | 469 | |
| 470 | 470 | switch (c->srcFormat) { |
| 471 | − case PIX_FMT_YUYV422: | |
| 471 | + case AV_PIX_FMT_YUYV422: | |
| 472 | 472 | c->chrToYV12 = ff_yuyvToUV_avx; |
| 473 | 473 | break; |
| 474 | − case PIX_FMT_UYVY422: | |
| 474 | + case AV_PIX_FMT_UYVY422: | |
| 475 | 475 | c->chrToYV12 = ff_uyvyToUV_avx; |
| 476 | 476 | break; |
| 477 | − case PIX_FMT_NV12: | |
| 477 | + case AV_PIX_FMT_NV12: | |
| 478 | 478 | c->chrToYV12 = ff_nv12ToUV_avx; |
| 479 | 479 | break; |
| 480 | − case PIX_FMT_NV21: | |
| 480 | + case AV_PIX_FMT_NV21: | |
| 481 | 481 | c->chrToYV12 = ff_nv21ToUV_avx; |
| 482 | 482 | break; |
| 483 | 483 | case_rgb(rgb24, RGB24, avx); |
| @@ -1557,30 +1557,30 @@ static void RENAME(hcscale_fast)(SwsContext *c, int16_t *dst1, int16_t *dst2, · 1556 unmodified lines | ||
| 1557 | 1557 | |
| 1558 | 1558 | static av_cold void RENAME(sws_init_swScale)(SwsContext *c) |
| 1559 | 1559 | { |
| 1560 | − enum PixelFormat dstFormat = c->dstFormat; | |
| 1560 | + enum AVPixelFormat dstFormat = c->dstFormat; | |
| 1561 | 1561 | |
| 1562 | 1562 | if (!is16BPS(dstFormat) && !is9_OR_10BPS(dstFormat) && |
| 1563 | − dstFormat != PIX_FMT_NV12 && dstFormat != PIX_FMT_NV21) { | |
| 1563 | + dstFormat != AV_PIX_FMT_NV12 && dstFormat != AV_PIX_FMT_NV21) { | |
| 1564 | 1564 | if (!(c->flags & SWS_BITEXACT)) { |
| 1565 | 1565 | if (c->flags & SWS_ACCURATE_RND) { |
| 1566 | 1566 | if (!(c->flags & SWS_FULL_CHR_H_INT)) { |
| 1567 | 1567 | switch (c->dstFormat) { |
| 1568 | − case PIX_FMT_RGB32: c->yuv2packedX = RENAME(yuv2rgb32_X_ar); break; | |
| 1569 | − case PIX_FMT_BGR24: c->yuv2packedX = RENAME(yuv2bgr24_X_ar); break; | |
| 1570 | − case PIX_FMT_RGB555: c->yuv2packedX = RENAME(yuv2rgb555_X_ar); break; | |
| 1571 | − case PIX_FMT_RGB565: c->yuv2packedX = RENAME(yuv2rgb565_X_ar); break; | |
| 1572 | − case PIX_FMT_YUYV422: c->yuv2packedX = RENAME(yuv2yuyv422_X_ar); break; | |
| 1568 | + case AV_PIX_FMT_RGB32: c->yuv2packedX = RENAME(yuv2rgb32_X_ar); break; | |
| 1569 | + case AV_PIX_FMT_BGR24: c->yuv2packedX = RENAME(yuv2bgr24_X_ar); break; | |
| 1570 | + case AV_PIX_FMT_RGB555: c->yuv2packedX = RENAME(yuv2rgb555_X_ar); break; | |
| 1571 | + case AV_PIX_FMT_RGB565: c->yuv2packedX = RENAME(yuv2rgb565_X_ar); break; | |
| 1572 | + case AV_PIX_FMT_YUYV422: c->yuv2packedX = RENAME(yuv2yuyv422_X_ar); break; | |
| 1573 | 1573 | default: break; |
| 1574 | 1574 | } |
| 1575 | 1575 | } |
| 1576 | 1576 | } else { |
| 1577 | 1577 | if (!(c->flags & SWS_FULL_CHR_H_INT)) { |
| 1578 | 1578 | switch (c->dstFormat) { |
| 1579 | − case PIX_FMT_RGB32: c->yuv2packedX = RENAME(yuv2rgb32_X); break; | |
| 1580 | − case PIX_FMT_BGR24: c->yuv2packedX = RENAME(yuv2bgr24_X); break; | |
| 1581 | − case PIX_FMT_RGB555: c->yuv2packedX = RENAME(yuv2rgb555_X); break; | |
| 1582 | − case PIX_FMT_RGB565: c->yuv2packedX = RENAME(yuv2rgb565_X); break; | |
| 1583 | − case PIX_FMT_YUYV422: c->yuv2packedX = RENAME(yuv2yuyv422_X); break; | |
| 1579 | + case AV_PIX_FMT_RGB32: c->yuv2packedX = RENAME(yuv2rgb32_X); break; | |
| 1580 | + case AV_PIX_FMT_BGR24: c->yuv2packedX = RENAME(yuv2bgr24_X); break; | |
| 1581 | + case AV_PIX_FMT_RGB555: c->yuv2packedX = RENAME(yuv2rgb555_X); break; | |
| 1582 | + case AV_PIX_FMT_RGB565: c->yuv2packedX = RENAME(yuv2rgb565_X); break; | |
| 1583 | + case AV_PIX_FMT_YUYV422: c->yuv2packedX = RENAME(yuv2yuyv422_X); break; | |
| 1584 | 1584 | default: break; |
| 1585 | 1585 | } |
| 1586 | 1586 | } |
| @@ -1588,23 +1588,23 @@ static av_cold void RENAME(sws_init_swScale)(SwsContext *c) · 1 unmodified line | ||
| 1588 | 1588 | } |
| 1589 | 1589 | if (!(c->flags & SWS_FULL_CHR_H_INT)) { |
| 1590 | 1590 | switch (c->dstFormat) { |
| 1591 | − case PIX_FMT_RGB32: | |
| 1591 | + case AV_PIX_FMT_RGB32: | |
| 1592 | 1592 | c->yuv2packed1 = RENAME(yuv2rgb32_1); |
| 1593 | 1593 | c->yuv2packed2 = RENAME(yuv2rgb32_2); |
| 1594 | 1594 | break; |
| 1595 | − case PIX_FMT_BGR24: | |
| 1595 | + case AV_PIX_FMT_BGR24: | |
| 1596 | 1596 | c->yuv2packed1 = RENAME(yuv2bgr24_1); |
| 1597 | 1597 | c->yuv2packed2 = RENAME(yuv2bgr24_2); |
| 1598 | 1598 | break; |
| 1599 | − case PIX_FMT_RGB555: | |
| 1599 | + case AV_PIX_FMT_RGB555: | |
| 1600 | 1600 | c->yuv2packed1 = RENAME(yuv2rgb555_1); |
| 1601 | 1601 | c->yuv2packed2 = RENAME(yuv2rgb555_2); |
| 1602 | 1602 | break; |
| 1603 | − case PIX_FMT_RGB565: | |
| 1603 | + case AV_PIX_FMT_RGB565: | |
| 1604 | 1604 | c->yuv2packed1 = RENAME(yuv2rgb565_1); |
| 1605 | 1605 | c->yuv2packed2 = RENAME(yuv2rgb565_2); |
| 1606 | 1606 | break; |
| 1607 | − case PIX_FMT_YUYV422: | |
| 1607 | + case AV_PIX_FMT_YUYV422: | |
| 1608 | 1608 | c->yuv2packed1 = RENAME(yuv2yuyv422_1); |
| 1609 | 1609 | c->yuv2packed2 = RENAME(yuv2yuyv422_2); |
| 1610 | 1610 | break; |
| @@ -74,39 +74,39 @@ av_cold SwsFunc ff_yuv2rgb_init_mmx(SwsContext *c) · 73 unmodified lines | ||
| 74 | 74 | #if HAVE_INLINE_ASM |
| 75 | 75 | int cpu_flags = av_get_cpu_flags(); |
| 76 | 76 | |
| 77 | − if (c->srcFormat != PIX_FMT_YUV420P && | |
| 78 | − c->srcFormat != PIX_FMT_YUVA420P) | |
| 77 | + if (c->srcFormat != AV_PIX_FMT_YUV420P && | |
| 78 | + c->srcFormat != AV_PIX_FMT_YUVA420P) | |
| 79 | 79 | return NULL; |
| 80 | 80 | |
| 81 | 81 | #if HAVE_MMXEXT_INLINE |
| 82 | 82 | if (cpu_flags & AV_CPU_FLAG_MMXEXT) { |
| 83 | 83 | switch (c->dstFormat) { |
| 84 | − case PIX_FMT_RGB24: return yuv420_rgb24_MMX2; | |
| 85 | − case PIX_FMT_BGR24: return yuv420_bgr24_MMX2; | |
| 84 | + case AV_PIX_FMT_RGB24: return yuv420_rgb24_MMX2; | |
| 85 | + case AV_PIX_FMT_BGR24: return yuv420_bgr24_MMX2; | |
| 86 | 86 | } |
| 87 | 87 | } |
| 88 | 88 | #endif |
| 89 | 89 | |
| 90 | 90 | if (cpu_flags & AV_CPU_FLAG_MMX) { |
| 91 | 91 | switch (c->dstFormat) { |
| 92 | − case PIX_FMT_RGB32: | |
| 93 | − if (c->srcFormat == PIX_FMT_YUVA420P) { | |
| 92 | + case AV_PIX_FMT_RGB32: | |
| 93 | + if (c->srcFormat == AV_PIX_FMT_YUVA420P) { | |
| 94 | 94 | #if HAVE_7REGS && CONFIG_SWSCALE_ALPHA |
| 95 | 95 | return yuva420_rgb32_MMX; |
| 96 | 96 | #endif |
| 97 | 97 | break; |
| 98 | 98 | } else return yuv420_rgb32_MMX; |
| 99 | − case PIX_FMT_BGR32: | |
| 100 | − if (c->srcFormat == PIX_FMT_YUVA420P) { | |
| 99 | + case AV_PIX_FMT_BGR32: | |
| 100 | + if (c->srcFormat == AV_PIX_FMT_YUVA420P) { | |
| 101 | 101 | #if HAVE_7REGS && CONFIG_SWSCALE_ALPHA |
| 102 | 102 | return yuva420_bgr32_MMX; |
| 103 | 103 | #endif |
| 104 | 104 | break; |
| 105 | 105 | } else return yuv420_bgr32_MMX; |
| 106 | − case PIX_FMT_RGB24: return yuv420_rgb24_MMX; | |
| 107 | − case PIX_FMT_BGR24: return yuv420_bgr24_MMX; | |
| 108 | − case PIX_FMT_RGB565: return yuv420_rgb16_MMX; | |
| 109 | − case PIX_FMT_RGB555: return yuv420_rgb15_MMX; | |
| 106 | + case AV_PIX_FMT_RGB24: return yuv420_rgb24_MMX; | |
| 107 | + case AV_PIX_FMT_BGR24: return yuv420_bgr24_MMX; | |
| 108 | + case AV_PIX_FMT_RGB565: return yuv420_rgb16_MMX; | |
| 109 | + case AV_PIX_FMT_RGB555: return yuv420_rgb15_MMX; | |
| 110 | 110 | } |
| 111 | 111 | } |
| 112 | 112 | #endif /* HAVE_INLINE_ASM */ |
| @@ -43,7 +43,7 @@ · 42 unmodified lines | ||
| 43 | 43 | if (h_size * depth > FFABS(dstStride[0])) \ |
| 44 | 44 | h_size -= 8; \ |
| 45 | 45 | \ |
| 46 | − if (c->srcFormat == PIX_FMT_YUV422P) { \ | |
| 46 | + if (c->srcFormat == AV_PIX_FMT_YUV422P) { \ | |
| 47 | 47 | srcStride[1] *= 2; \ |
| 48 | 48 | srcStride[2] *= 2; \ |
| 49 | 49 | } \ |
| @@ -124,7 +124,7 @@ const int *sws_getCoefficients(int colorspace) · 123 unmodified lines | ||
| 124 | 124 | { \ |
| 125 | 125 | int y; \ |
| 126 | 126 | \ |
| 127 | − if (!alpha && c->srcFormat == PIX_FMT_YUV422P) { \ | |
| 127 | + if (!alpha && c->srcFormat == AV_PIX_FMT_YUV422P) { \ | |
| 128 | 128 | srcStride[1] *= 2; \ |
| 129 | 129 | srcStride[2] *= 2; \ |
| 130 | 130 | } \ |
| @@ -582,44 +582,44 @@ SwsFunc ff_yuv2rgb_get_func_ptr(SwsContext *c) · 451 unmodified lines | ||
| 582 | 582 | sws_format_name(c->srcFormat), sws_format_name(c->dstFormat)); |
| 583 | 583 | |
| 584 | 584 | switch (c->dstFormat) { |
| 585 | − case PIX_FMT_BGR48BE: | |
| 586 | − case PIX_FMT_BGR48LE: | |
| 585 | + case AV_PIX_FMT_BGR48BE: | |
| 586 | + case AV_PIX_FMT_BGR48LE: | |
| 587 | 587 | return yuv2rgb_c_bgr48; |
| 588 | − case PIX_FMT_RGB48BE: | |
| 589 | − case PIX_FMT_RGB48LE: | |
| 588 | + case AV_PIX_FMT_RGB48BE: | |
| 589 | + case AV_PIX_FMT_RGB48LE: | |
| 590 | 590 | return yuv2rgb_c_48; |
| 591 | − case PIX_FMT_ARGB: | |
| 592 | − case PIX_FMT_ABGR: | |
| 593 | − if (CONFIG_SWSCALE_ALPHA && c->srcFormat == PIX_FMT_YUVA420P) | |
| 591 | + case AV_PIX_FMT_ARGB: | |
| 592 | + case AV_PIX_FMT_ABGR: | |
| 593 | + if (CONFIG_SWSCALE_ALPHA && c->srcFormat == AV_PIX_FMT_YUVA420P) | |
| 594 | 594 | return yuva2argb_c; |
| 595 | − case PIX_FMT_RGBA: | |
| 596 | − case PIX_FMT_BGRA: | |
| 597 | − if (CONFIG_SWSCALE_ALPHA && c->srcFormat == PIX_FMT_YUVA420P) | |
| 595 | + case AV_PIX_FMT_RGBA: | |
| 596 | + case AV_PIX_FMT_BGRA: | |
| 597 | + if (CONFIG_SWSCALE_ALPHA && c->srcFormat == AV_PIX_FMT_YUVA420P) | |
| 598 | 598 | return yuva2rgba_c; |
| 599 | 599 | else |
| 600 | 600 | return yuv2rgb_c_32; |
| 601 | − case PIX_FMT_RGB24: | |
| 601 | + case AV_PIX_FMT_RGB24: | |
| 602 | 602 | return yuv2rgb_c_24_rgb; |
| 603 | − case PIX_FMT_BGR24: | |
| 603 | + case AV_PIX_FMT_BGR24: | |
| 604 | 604 | return yuv2rgb_c_24_bgr; |
| 605 | − case PIX_FMT_RGB565: | |
| 606 | − case PIX_FMT_BGR565: | |
| 607 | − case PIX_FMT_RGB555: | |
| 608 | − case PIX_FMT_BGR555: | |
| 605 | + case AV_PIX_FMT_RGB565: | |
| 606 | + case AV_PIX_FMT_BGR565: | |
| 607 | + case AV_PIX_FMT_RGB555: | |
| 608 | + case AV_PIX_FMT_BGR555: | |
| 609 | 609 | return yuv2rgb_c_16; |
| 610 | − case PIX_FMT_RGB444: | |
| 611 | − case PIX_FMT_BGR444: | |
| 610 | + case AV_PIX_FMT_RGB444: | |
| 611 | + case AV_PIX_FMT_BGR444: | |
| 612 | 612 | return yuv2rgb_c_12_ordered_dither; |
| 613 | − case PIX_FMT_RGB8: | |
| 614 | − case PIX_FMT_BGR8: | |
| 613 | + case AV_PIX_FMT_RGB8: | |
| 614 | + case AV_PIX_FMT_BGR8: | |
| 615 | 615 | return yuv2rgb_c_8_ordered_dither; |
| 616 | − case PIX_FMT_RGB4: | |
| 617 | − case PIX_FMT_BGR4: | |
| 616 | + case AV_PIX_FMT_RGB4: | |
| 617 | + case AV_PIX_FMT_BGR4: | |
| 618 | 618 | return yuv2rgb_c_4_ordered_dither; |
| 619 | − case PIX_FMT_RGB4_BYTE: | |
| 620 | − case PIX_FMT_BGR4_BYTE: | |
| 619 | + case AV_PIX_FMT_RGB4_BYTE: | |
| 620 | + case AV_PIX_FMT_BGR4_BYTE: | |
| 621 | 621 | return yuv2rgb_c_4b_ordered_dither; |
| 622 | − case PIX_FMT_MONOBLACK: | |
| 622 | + case AV_PIX_FMT_MONOBLACK: | |
| 623 | 623 | return yuv2rgb_c_1_ordered_dither; |
| 624 | 624 | default: |
| 625 | 625 | assert(0); |
| @@ -670,25 +670,25 @@ av_cold int ff_yuv2rgb_c_init_tables(SwsContext *c, const int inv_table[4], · 44 unmodified lines | ||
| 670 | 670 | int fullRange, int brightness, |
| 671 | 671 | int contrast, int saturation) |
| 672 | 672 | { |
| 673 | − const int isRgb = c->dstFormat == PIX_FMT_RGB32 || | |
| 674 | − c->dstFormat == PIX_FMT_RGB32_1 || | |
| 675 | − c->dstFormat == PIX_FMT_BGR24 || | |
| 676 | − c->dstFormat == PIX_FMT_RGB565BE || | |
| 677 | − c->dstFormat == PIX_FMT_RGB565LE || | |
| 678 | − c->dstFormat == PIX_FMT_RGB555BE || | |
| 679 | − c->dstFormat == PIX_FMT_RGB555LE || | |
| 680 | − c->dstFormat == PIX_FMT_RGB444BE || | |
| 681 | − c->dstFormat == PIX_FMT_RGB444LE || | |
| 682 | − c->dstFormat == PIX_FMT_RGB8 || | |
| 683 | − c->dstFormat == PIX_FMT_RGB4 || | |
| 684 | − c->dstFormat == PIX_FMT_RGB4_BYTE || | |
| 685 | − c->dstFormat == PIX_FMT_MONOBLACK; | |
| 686 | − const int isNotNe = c->dstFormat == PIX_FMT_NE(RGB565LE, RGB565BE) || | |
| 687 | − c->dstFormat == PIX_FMT_NE(RGB555LE, RGB555BE) || | |
| 688 | − c->dstFormat == PIX_FMT_NE(RGB444LE, RGB444BE) || | |
| 689 | − c->dstFormat == PIX_FMT_NE(BGR565LE, BGR565BE) || | |
| 690 | − c->dstFormat == PIX_FMT_NE(BGR555LE, BGR555BE) || | |
| 691 | − c->dstFormat == PIX_FMT_NE(BGR444LE, BGR444BE); | |
| 673 | + const int isRgb = c->dstFormat == AV_PIX_FMT_RGB32 || | |
| 674 | + c->dstFormat == AV_PIX_FMT_RGB32_1 || | |
| 675 | + c->dstFormat == AV_PIX_FMT_BGR24 || | |
| 676 | + c->dstFormat == AV_PIX_FMT_RGB565BE || | |
| 677 | + c->dstFormat == AV_PIX_FMT_RGB565LE || | |
| 678 | + c->dstFormat == AV_PIX_FMT_RGB555BE || | |
| 679 | + c->dstFormat == AV_PIX_FMT_RGB555LE || | |
| 680 | + c->dstFormat == AV_PIX_FMT_RGB444BE || | |
| 681 | + c->dstFormat == AV_PIX_FMT_RGB444LE || | |
| 682 | + c->dstFormat == AV_PIX_FMT_RGB8 || | |
| 683 | + c->dstFormat == AV_PIX_FMT_RGB4 || | |
| 684 | + c->dstFormat == AV_PIX_FMT_RGB4_BYTE || | |
| 685 | + c->dstFormat == AV_PIX_FMT_MONOBLACK; | |
| 686 | + const int isNotNe = c->dstFormat == AV_PIX_FMT_NE(RGB565LE, RGB565BE) || | |
| 687 | + c->dstFormat == AV_PIX_FMT_NE(RGB555LE, RGB555BE) || | |
| 688 | + c->dstFormat == AV_PIX_FMT_NE(RGB444LE, RGB444BE) || | |
| 689 | + c->dstFormat == AV_PIX_FMT_NE(BGR565LE, BGR565BE) || | |
| 690 | + c->dstFormat == AV_PIX_FMT_NE(BGR555LE, BGR555BE) || | |
| 691 | + c->dstFormat == AV_PIX_FMT_NE(BGR444LE, BGR444BE); | |
| 692 | 692 | const int bpp = c->dstFormatBpp; |
| 693 | 693 | uint8_t *y_table; |
| 694 | 694 | uint16_t *y_table16; |
| @@ -856,8 +856,8 @@ av_cold int ff_yuv2rgb_c_init_tables(SwsContext *c, const int inv_table[4], · 161 unmodified lines | ||
| 856 | 856 | fill_gv_table(c->table_gV, 1, cgv); |
| 857 | 857 | break; |
| 858 | 858 | case 32: |
| 859 | − base = (c->dstFormat == PIX_FMT_RGB32_1 || | |
| 860 | − c->dstFormat == PIX_FMT_BGR32_1) ? 8 : 0; | |
| 859 | + base = (c->dstFormat == AV_PIX_FMT_RGB32_1 || | |
| 860 | + c->dstFormat == AV_PIX_FMT_BGR32_1) ? 8 : 0; | |
| 861 | 861 | rbase = base + (isRgb ? 16 : 0); |
| 862 | 862 | gbase = base + 8; |
| 863 | 863 | bbase = base + (isRgb ? 0 : 16); |