Mercurial > libavcodec.hg
comparison pnmenc.c @ 10146:38cfe222e1a4 libavcodec
Mark all pix_fmts and supported_framerates compound literals as const.
Makes no difference for gcc but at least icc can put them in .rodata then.
author | reimar |
---|---|
date | Sun, 06 Sep 2009 16:09:21 +0000 |
parents | 7f15f8f14e97 |
children | 9d31db7bec63 |
comparison
equal
deleted
inserted
replaced
10145:7955db355703 | 10146:38cfe222e1a4 |
---|---|
372 common_init, | 372 common_init, |
373 NULL, | 373 NULL, |
374 NULL, | 374 NULL, |
375 pnm_decode_frame, | 375 pnm_decode_frame, |
376 CODEC_CAP_DR1, | 376 CODEC_CAP_DR1, |
377 .pix_fmts= (enum PixelFormat[]){PIX_FMT_GRAY8, PIX_FMT_GRAY16BE, PIX_FMT_NONE}, | 377 .pix_fmts= (const enum PixelFormat[]){PIX_FMT_GRAY8, PIX_FMT_GRAY16BE, PIX_FMT_NONE}, |
378 .long_name= NULL_IF_CONFIG_SMALL("PGM (Portable GrayMap) image"), | 378 .long_name= NULL_IF_CONFIG_SMALL("PGM (Portable GrayMap) image"), |
379 }; | 379 }; |
380 #endif | 380 #endif |
381 | 381 |
382 #if CONFIG_PGM_ENCODER | 382 #if CONFIG_PGM_ENCODER |
385 CODEC_TYPE_VIDEO, | 385 CODEC_TYPE_VIDEO, |
386 CODEC_ID_PGM, | 386 CODEC_ID_PGM, |
387 sizeof(PNMContext), | 387 sizeof(PNMContext), |
388 common_init, | 388 common_init, |
389 pnm_encode_frame, | 389 pnm_encode_frame, |
390 .pix_fmts= (enum PixelFormat[]){PIX_FMT_GRAY8, PIX_FMT_GRAY16BE, PIX_FMT_NONE}, | 390 .pix_fmts= (const enum PixelFormat[]){PIX_FMT_GRAY8, PIX_FMT_GRAY16BE, PIX_FMT_NONE}, |
391 .long_name= NULL_IF_CONFIG_SMALL("PGM (Portable GrayMap) image"), | 391 .long_name= NULL_IF_CONFIG_SMALL("PGM (Portable GrayMap) image"), |
392 }; | 392 }; |
393 #endif // CONFIG_PGM_ENCODER | 393 #endif // CONFIG_PGM_ENCODER |
394 | 394 |
395 #if CONFIG_PGMYUV_DECODER | 395 #if CONFIG_PGMYUV_DECODER |
401 common_init, | 401 common_init, |
402 NULL, | 402 NULL, |
403 NULL, | 403 NULL, |
404 pnm_decode_frame, | 404 pnm_decode_frame, |
405 CODEC_CAP_DR1, | 405 CODEC_CAP_DR1, |
406 .pix_fmts= (enum PixelFormat[]){PIX_FMT_YUV420P, PIX_FMT_NONE}, | 406 .pix_fmts= (const enum PixelFormat[]){PIX_FMT_YUV420P, PIX_FMT_NONE}, |
407 .long_name= NULL_IF_CONFIG_SMALL("PGMYUV (Portable GrayMap YUV) image"), | 407 .long_name= NULL_IF_CONFIG_SMALL("PGMYUV (Portable GrayMap YUV) image"), |
408 }; | 408 }; |
409 #endif | 409 #endif |
410 | 410 |
411 #if CONFIG_PGMYUV_ENCODER | 411 #if CONFIG_PGMYUV_ENCODER |
414 CODEC_TYPE_VIDEO, | 414 CODEC_TYPE_VIDEO, |
415 CODEC_ID_PGMYUV, | 415 CODEC_ID_PGMYUV, |
416 sizeof(PNMContext), | 416 sizeof(PNMContext), |
417 common_init, | 417 common_init, |
418 pnm_encode_frame, | 418 pnm_encode_frame, |
419 .pix_fmts= (enum PixelFormat[]){PIX_FMT_YUV420P, PIX_FMT_NONE}, | 419 .pix_fmts= (const enum PixelFormat[]){PIX_FMT_YUV420P, PIX_FMT_NONE}, |
420 .long_name= NULL_IF_CONFIG_SMALL("PGMYUV (Portable GrayMap YUV) image"), | 420 .long_name= NULL_IF_CONFIG_SMALL("PGMYUV (Portable GrayMap YUV) image"), |
421 }; | 421 }; |
422 #endif // CONFIG_PGMYUV_ENCODER | 422 #endif // CONFIG_PGMYUV_ENCODER |
423 | 423 |
424 #if CONFIG_PPM_DECODER | 424 #if CONFIG_PPM_DECODER |
430 common_init, | 430 common_init, |
431 NULL, | 431 NULL, |
432 NULL, | 432 NULL, |
433 pnm_decode_frame, | 433 pnm_decode_frame, |
434 CODEC_CAP_DR1, | 434 CODEC_CAP_DR1, |
435 .pix_fmts= (enum PixelFormat[]){PIX_FMT_RGB24, PIX_FMT_RGB48BE, PIX_FMT_NONE}, | 435 .pix_fmts= (const enum PixelFormat[]){PIX_FMT_RGB24, PIX_FMT_RGB48BE, PIX_FMT_NONE}, |
436 .long_name= NULL_IF_CONFIG_SMALL("PPM (Portable PixelMap) image"), | 436 .long_name= NULL_IF_CONFIG_SMALL("PPM (Portable PixelMap) image"), |
437 }; | 437 }; |
438 #endif | 438 #endif |
439 | 439 |
440 #if CONFIG_PPM_ENCODER | 440 #if CONFIG_PPM_ENCODER |
443 CODEC_TYPE_VIDEO, | 443 CODEC_TYPE_VIDEO, |
444 CODEC_ID_PPM, | 444 CODEC_ID_PPM, |
445 sizeof(PNMContext), | 445 sizeof(PNMContext), |
446 common_init, | 446 common_init, |
447 pnm_encode_frame, | 447 pnm_encode_frame, |
448 .pix_fmts= (enum PixelFormat[]){PIX_FMT_RGB24, PIX_FMT_RGB48BE, PIX_FMT_NONE}, | 448 .pix_fmts= (const enum PixelFormat[]){PIX_FMT_RGB24, PIX_FMT_RGB48BE, PIX_FMT_NONE}, |
449 .long_name= NULL_IF_CONFIG_SMALL("PPM (Portable PixelMap) image"), | 449 .long_name= NULL_IF_CONFIG_SMALL("PPM (Portable PixelMap) image"), |
450 }; | 450 }; |
451 #endif // CONFIG_PPM_ENCODER | 451 #endif // CONFIG_PPM_ENCODER |
452 | 452 |
453 #if CONFIG_PBM_DECODER | 453 #if CONFIG_PBM_DECODER |
459 common_init, | 459 common_init, |
460 NULL, | 460 NULL, |
461 NULL, | 461 NULL, |
462 pnm_decode_frame, | 462 pnm_decode_frame, |
463 CODEC_CAP_DR1, | 463 CODEC_CAP_DR1, |
464 .pix_fmts= (enum PixelFormat[]){PIX_FMT_MONOWHITE, PIX_FMT_NONE}, | 464 .pix_fmts= (const enum PixelFormat[]){PIX_FMT_MONOWHITE, PIX_FMT_NONE}, |
465 .long_name= NULL_IF_CONFIG_SMALL("PBM (Portable BitMap) image"), | 465 .long_name= NULL_IF_CONFIG_SMALL("PBM (Portable BitMap) image"), |
466 }; | 466 }; |
467 #endif | 467 #endif |
468 | 468 |
469 #if CONFIG_PBM_ENCODER | 469 #if CONFIG_PBM_ENCODER |
472 CODEC_TYPE_VIDEO, | 472 CODEC_TYPE_VIDEO, |
473 CODEC_ID_PBM, | 473 CODEC_ID_PBM, |
474 sizeof(PNMContext), | 474 sizeof(PNMContext), |
475 common_init, | 475 common_init, |
476 pnm_encode_frame, | 476 pnm_encode_frame, |
477 .pix_fmts= (enum PixelFormat[]){PIX_FMT_MONOWHITE, PIX_FMT_NONE}, | 477 .pix_fmts= (const enum PixelFormat[]){PIX_FMT_MONOWHITE, PIX_FMT_NONE}, |
478 .long_name= NULL_IF_CONFIG_SMALL("PBM (Portable BitMap) image"), | 478 .long_name= NULL_IF_CONFIG_SMALL("PBM (Portable BitMap) image"), |
479 }; | 479 }; |
480 #endif // CONFIG_PBM_ENCODER | 480 #endif // CONFIG_PBM_ENCODER |
481 | 481 |
482 #if CONFIG_PAM_DECODER | 482 #if CONFIG_PAM_DECODER |
488 common_init, | 488 common_init, |
489 NULL, | 489 NULL, |
490 NULL, | 490 NULL, |
491 pnm_decode_frame, | 491 pnm_decode_frame, |
492 CODEC_CAP_DR1, | 492 CODEC_CAP_DR1, |
493 .pix_fmts= (enum PixelFormat[]){PIX_FMT_RGB24, PIX_FMT_RGB32, PIX_FMT_GRAY8, PIX_FMT_MONOWHITE, PIX_FMT_NONE}, | 493 .pix_fmts= (const enum PixelFormat[]){PIX_FMT_RGB24, PIX_FMT_RGB32, PIX_FMT_GRAY8, PIX_FMT_MONOWHITE, PIX_FMT_NONE}, |
494 .long_name= NULL_IF_CONFIG_SMALL("PAM (Portable AnyMap) image"), | 494 .long_name= NULL_IF_CONFIG_SMALL("PAM (Portable AnyMap) image"), |
495 }; | 495 }; |
496 #endif | 496 #endif |
497 | 497 |
498 #if CONFIG_PAM_ENCODER | 498 #if CONFIG_PAM_ENCODER |
501 CODEC_TYPE_VIDEO, | 501 CODEC_TYPE_VIDEO, |
502 CODEC_ID_PAM, | 502 CODEC_ID_PAM, |
503 sizeof(PNMContext), | 503 sizeof(PNMContext), |
504 common_init, | 504 common_init, |
505 pam_encode_frame, | 505 pam_encode_frame, |
506 .pix_fmts= (enum PixelFormat[]){PIX_FMT_RGB24, PIX_FMT_RGB32, PIX_FMT_GRAY8, PIX_FMT_MONOWHITE, PIX_FMT_NONE}, | 506 .pix_fmts= (const enum PixelFormat[]){PIX_FMT_RGB24, PIX_FMT_RGB32, PIX_FMT_GRAY8, PIX_FMT_MONOWHITE, PIX_FMT_NONE}, |
507 .long_name= NULL_IF_CONFIG_SMALL("PAM (Portable AnyMap) image"), | 507 .long_name= NULL_IF_CONFIG_SMALL("PAM (Portable AnyMap) image"), |
508 }; | 508 }; |
509 #endif // CONFIG_PAM_ENCODER | 509 #endif // CONFIG_PAM_ENCODER |