X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;ds=sidebyside;f=libavcodec%2Fpnmdec.c;h=e0e9f665516981386b35a203c3faf13f9fcf70e6;hb=f907615f0813e8499f06a7eebccf1c63fce87c8e;hp=b9f20c0569d80e6aa2e7d365ee8318d95f812886;hpb=975a1447f76e8d30fc01e6ea5466c84faf3d76e4;p=ffmpeg diff --git a/libavcodec/pnmdec.c b/libavcodec/pnmdec.c index b9f20c0569d..e0e9f665516 100644 --- a/libavcodec/pnmdec.c +++ b/libavcodec/pnmdec.c @@ -189,85 +189,75 @@ static int pnm_decode_frame(AVCodecContext *avctx, void *data, #if CONFIG_PGM_DECODER AVCodec ff_pgm_decoder = { - "pgm", - AVMEDIA_TYPE_VIDEO, - CODEC_ID_PGM, - sizeof(PNMContext), - ff_pnm_init, - NULL, - ff_pnm_end, - pnm_decode_frame, - CODEC_CAP_DR1, + .name = "pgm", + .type = AVMEDIA_TYPE_VIDEO, + .id = CODEC_ID_PGM, + .priv_data_size = sizeof(PNMContext), + .init = ff_pnm_init, + .close = ff_pnm_end, + .decode = pnm_decode_frame, + .capabilities = CODEC_CAP_DR1, .pix_fmts = (const enum PixelFormat[]){PIX_FMT_GRAY8, PIX_FMT_GRAY16BE, PIX_FMT_NONE}, - .max_lowres = 5, .long_name = NULL_IF_CONFIG_SMALL("PGM (Portable GrayMap) image"), }; #endif #if CONFIG_PGMYUV_DECODER AVCodec ff_pgmyuv_decoder = { - "pgmyuv", - AVMEDIA_TYPE_VIDEO, - CODEC_ID_PGMYUV, - sizeof(PNMContext), - ff_pnm_init, - NULL, - ff_pnm_end, - pnm_decode_frame, - CODEC_CAP_DR1, + .name = "pgmyuv", + .type = AVMEDIA_TYPE_VIDEO, + .id = CODEC_ID_PGMYUV, + .priv_data_size = sizeof(PNMContext), + .init = ff_pnm_init, + .close = ff_pnm_end, + .decode = pnm_decode_frame, + .capabilities = CODEC_CAP_DR1, .pix_fmts = (const enum PixelFormat[]){PIX_FMT_YUV420P, PIX_FMT_NONE}, - .max_lowres = 5, .long_name = NULL_IF_CONFIG_SMALL("PGMYUV (Portable GrayMap YUV) image"), }; #endif #if CONFIG_PPM_DECODER AVCodec ff_ppm_decoder = { - "ppm", - AVMEDIA_TYPE_VIDEO, - CODEC_ID_PPM, - sizeof(PNMContext), - ff_pnm_init, - NULL, - ff_pnm_end, - pnm_decode_frame, - CODEC_CAP_DR1, + .name = "ppm", + .type = AVMEDIA_TYPE_VIDEO, + .id = CODEC_ID_PPM, + .priv_data_size = sizeof(PNMContext), + .init = ff_pnm_init, + .close = ff_pnm_end, + .decode = pnm_decode_frame, + .capabilities = CODEC_CAP_DR1, .pix_fmts = (const enum PixelFormat[]){PIX_FMT_RGB24, PIX_FMT_RGB48BE, PIX_FMT_NONE}, - .max_lowres = 5, .long_name = NULL_IF_CONFIG_SMALL("PPM (Portable PixelMap) image"), }; #endif #if CONFIG_PBM_DECODER AVCodec ff_pbm_decoder = { - "pbm", - AVMEDIA_TYPE_VIDEO, - CODEC_ID_PBM, - sizeof(PNMContext), - ff_pnm_init, - NULL, - ff_pnm_end, - pnm_decode_frame, - CODEC_CAP_DR1, + .name = "pbm", + .type = AVMEDIA_TYPE_VIDEO, + .id = CODEC_ID_PBM, + .priv_data_size = sizeof(PNMContext), + .init = ff_pnm_init, + .close = ff_pnm_end, + .decode = pnm_decode_frame, + .capabilities = CODEC_CAP_DR1, .pix_fmts = (const enum PixelFormat[]){PIX_FMT_MONOWHITE, PIX_FMT_NONE}, - .max_lowres = 5, .long_name = NULL_IF_CONFIG_SMALL("PBM (Portable BitMap) image"), }; #endif #if CONFIG_PAM_DECODER AVCodec ff_pam_decoder = { - "pam", - AVMEDIA_TYPE_VIDEO, - CODEC_ID_PAM, - sizeof(PNMContext), - ff_pnm_init, - NULL, - ff_pnm_end, - pnm_decode_frame, - CODEC_CAP_DR1, + .name = "pam", + .type = AVMEDIA_TYPE_VIDEO, + .id = CODEC_ID_PAM, + .priv_data_size = sizeof(PNMContext), + .init = ff_pnm_init, + .close = ff_pnm_end, + .decode = pnm_decode_frame, + .capabilities = CODEC_CAP_DR1, .pix_fmts = (const enum PixelFormat[]){PIX_FMT_RGB24, PIX_FMT_RGB32, PIX_FMT_GRAY8, PIX_FMT_MONOWHITE, PIX_FMT_NONE}, - .max_lowres = 5, .long_name = NULL_IF_CONFIG_SMALL("PAM (Portable AnyMap) image"), }; #endif