@ -148,25 +148,12 @@ static int pnm_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
return 0 ;
}
static av_cold int pnm_encode_init ( AVCodecContext * avctx )
{
# if FF_API_CODED_FRAME
FF_DISABLE_DEPRECATION_WARNINGS
avctx - > coded_frame - > pict_type = AV_PICTURE_TYPE_I ;
avctx - > coded_frame - > key_frame = 1 ;
FF_ENABLE_DEPRECATION_WARNINGS
# endif
return 0 ;
}
# if CONFIG_PGM_ENCODER
AVCodec ff_pgm_encoder = {
. name = " pgm " ,
. long_name = NULL_IF_CONFIG_SMALL ( " PGM (Portable GrayMap) image " ) ,
. type = AVMEDIA_TYPE_VIDEO ,
. id = AV_CODEC_ID_PGM ,
. init = pnm_encode_init ,
. encode2 = pnm_encode_frame ,
. pix_fmts = ( const enum AVPixelFormat [ ] ) {
AV_PIX_FMT_GRAY8 , AV_PIX_FMT_GRAY16BE , AV_PIX_FMT_NONE
@ -181,7 +168,6 @@ AVCodec ff_pgmyuv_encoder = {
. long_name = NULL_IF_CONFIG_SMALL ( " PGMYUV (Portable GrayMap YUV) image " ) ,
. type = AVMEDIA_TYPE_VIDEO ,
. id = AV_CODEC_ID_PGMYUV ,
. init = pnm_encode_init ,
. encode2 = pnm_encode_frame ,
. pix_fmts = ( const enum AVPixelFormat [ ] ) {
AV_PIX_FMT_YUV420P , AV_PIX_FMT_YUV420P16BE , AV_PIX_FMT_NONE
@ -196,7 +182,6 @@ AVCodec ff_ppm_encoder = {
. long_name = NULL_IF_CONFIG_SMALL ( " PPM (Portable PixelMap) image " ) ,
. type = AVMEDIA_TYPE_VIDEO ,
. id = AV_CODEC_ID_PPM ,
. init = pnm_encode_init ,
. encode2 = pnm_encode_frame ,
. pix_fmts = ( const enum AVPixelFormat [ ] ) {
AV_PIX_FMT_RGB24 , AV_PIX_FMT_RGB48BE , AV_PIX_FMT_NONE
@ -211,7 +196,6 @@ AVCodec ff_pbm_encoder = {
. long_name = NULL_IF_CONFIG_SMALL ( " PBM (Portable BitMap) image " ) ,
. type = AVMEDIA_TYPE_VIDEO ,
. id = AV_CODEC_ID_PBM ,
. init = pnm_encode_init ,
. encode2 = pnm_encode_frame ,
. pix_fmts = ( const enum AVPixelFormat [ ] ) { AV_PIX_FMT_MONOWHITE ,
AV_PIX_FMT_NONE } ,
@ -225,7 +209,6 @@ AVCodec ff_pfm_encoder = {
. long_name = NULL_IF_CONFIG_SMALL ( " PFM (Portable FloatMap) image " ) ,
. type = AVMEDIA_TYPE_VIDEO ,
. id = AV_CODEC_ID_PFM ,
. init = pnm_encode_init ,
. encode2 = pnm_encode_frame ,
. pix_fmts = ( const enum AVPixelFormat [ ] ) { AV_PIX_FMT_GBRPF32 ,
AV_PIX_FMT_NONE } ,