Skip to content

Commit

Permalink
cosmetics: Align codec declarations
Browse files Browse the repository at this point in the history
Also break some long lines, remove codec function placeholder comments
and add spaces in sample/pixel format lists.

Signed-off-by: Martin Storsjö <martin@martin.st>
  • Loading branch information
mstorsjo committed Apr 6, 2012
1 parent 6d27d8b commit 00c3b67
Show file tree
Hide file tree
Showing 200 changed files with 731 additions and 638 deletions.
40 changes: 20 additions & 20 deletions libavcodec/aacdec.c
Original file line number Diff line number Diff line change
Expand Up @@ -2773,18 +2773,18 @@ static av_cold int latm_decode_init(AVCodecContext *avctx)


AVCodec ff_aac_decoder = {
.name = "aac",
.type = AVMEDIA_TYPE_AUDIO,
.id = CODEC_ID_AAC,
.priv_data_size = sizeof(AACContext),
.init = aac_decode_init,
.close = aac_decode_close,
.decode = aac_decode_frame,
.long_name = NULL_IF_CONFIG_SMALL("Advanced Audio Coding"),
.sample_fmts = (const enum AVSampleFormat[]) {
.name = "aac",
.type = AVMEDIA_TYPE_AUDIO,
.id = CODEC_ID_AAC,
.priv_data_size = sizeof(AACContext),
.init = aac_decode_init,
.close = aac_decode_close,
.decode = aac_decode_frame,
.long_name = NULL_IF_CONFIG_SMALL("Advanced Audio Coding"),
.sample_fmts = (const enum AVSampleFormat[]) {
AV_SAMPLE_FMT_FLT, AV_SAMPLE_FMT_S16, AV_SAMPLE_FMT_NONE
},
.capabilities = CODEC_CAP_CHANNEL_CONF | CODEC_CAP_DR1,
.capabilities = CODEC_CAP_CHANNEL_CONF | CODEC_CAP_DR1,
.channel_layouts = aac_channel_layout,
};

Expand All @@ -2794,17 +2794,17 @@ AVCodec ff_aac_decoder = {
To do a more complex LATM demuxing a separate LATM demuxer should be used.
*/
AVCodec ff_aac_latm_decoder = {
.name = "aac_latm",
.type = AVMEDIA_TYPE_AUDIO,
.id = CODEC_ID_AAC_LATM,
.priv_data_size = sizeof(struct LATMContext),
.init = latm_decode_init,
.close = aac_decode_close,
.decode = latm_decode_frame,
.long_name = NULL_IF_CONFIG_SMALL("AAC LATM (Advanced Audio Codec LATM syntax)"),
.sample_fmts = (const enum AVSampleFormat[]) {
.name = "aac_latm",
.type = AVMEDIA_TYPE_AUDIO,
.id = CODEC_ID_AAC_LATM,
.priv_data_size = sizeof(struct LATMContext),
.init = latm_decode_init,
.close = aac_decode_close,
.decode = latm_decode_frame,
.long_name = NULL_IF_CONFIG_SMALL("AAC LATM (Advanced Audio Codec LATM syntax)"),
.sample_fmts = (const enum AVSampleFormat[]) {
AV_SAMPLE_FMT_FLT, AV_SAMPLE_FMT_S16, AV_SAMPLE_FMT_NONE
},
.capabilities = CODEC_CAP_CHANNEL_CONF | CODEC_CAP_DR1,
.capabilities = CODEC_CAP_CHANNEL_CONF | CODEC_CAP_DR1,
.channel_layouts = aac_channel_layout,
};
10 changes: 6 additions & 4 deletions libavcodec/aacenc.c
Original file line number Diff line number Diff line change
Expand Up @@ -817,8 +817,10 @@ AVCodec ff_aac_encoder = {
.init = aac_encode_init,
.encode2 = aac_encode_frame,
.close = aac_encode_end,
.capabilities = CODEC_CAP_SMALL_LAST_FRAME | CODEC_CAP_DELAY | CODEC_CAP_EXPERIMENTAL,
.sample_fmts = (const enum AVSampleFormat[]){AV_SAMPLE_FMT_FLT,AV_SAMPLE_FMT_NONE},
.long_name = NULL_IF_CONFIG_SMALL("Advanced Audio Coding"),
.priv_class = &aacenc_class,
.capabilities = CODEC_CAP_SMALL_LAST_FRAME | CODEC_CAP_DELAY |
CODEC_CAP_EXPERIMENTAL,
.sample_fmts = (const enum AVSampleFormat[]){ AV_SAMPLE_FMT_FLT,
AV_SAMPLE_FMT_NONE },
.long_name = NULL_IF_CONFIG_SMALL("Advanced Audio Coding"),
.priv_class = &aacenc_class,
};
2 changes: 1 addition & 1 deletion libavcodec/aasc.c
Original file line number Diff line number Diff line change
Expand Up @@ -118,5 +118,5 @@ AVCodec ff_aasc_decoder = {
.close = aasc_decode_end,
.decode = aasc_decode_frame,
.capabilities = CODEC_CAP_DR1,
.long_name = NULL_IF_CONFIG_SMALL("Autodesk RLE"),
.long_name = NULL_IF_CONFIG_SMALL("Autodesk RLE"),
};
21 changes: 11 additions & 10 deletions libavcodec/ac3enc_fixed.c
Original file line number Diff line number Diff line change
Expand Up @@ -141,16 +141,17 @@ static av_cold int ac3_fixed_encode_init(AVCodecContext *avctx)


AVCodec ff_ac3_fixed_encoder = {
.name = "ac3_fixed",
.type = AVMEDIA_TYPE_AUDIO,
.id = CODEC_ID_AC3,
.priv_data_size = sizeof(AC3EncodeContext),
.init = ac3_fixed_encode_init,
.encode2 = ff_ac3_fixed_encode_frame,
.close = ff_ac3_encode_close,
.sample_fmts = (const enum AVSampleFormat[]){AV_SAMPLE_FMT_S16,AV_SAMPLE_FMT_NONE},
.long_name = NULL_IF_CONFIG_SMALL("ATSC A/52A (AC-3)"),
.priv_class = &ac3enc_class,
.name = "ac3_fixed",
.type = AVMEDIA_TYPE_AUDIO,
.id = CODEC_ID_AC3,
.priv_data_size = sizeof(AC3EncodeContext),
.init = ac3_fixed_encode_init,
.encode2 = ff_ac3_fixed_encode_frame,
.close = ff_ac3_encode_close,
.sample_fmts = (const enum AVSampleFormat[]){ AV_SAMPLE_FMT_S16,
AV_SAMPLE_FMT_NONE },
.long_name = NULL_IF_CONFIG_SMALL("ATSC A/52A (AC-3)"),
.priv_class = &ac3enc_class,
.channel_layouts = ff_ac3_channel_layouts,
.defaults = ac3_defaults,
};
21 changes: 11 additions & 10 deletions libavcodec/ac3enc_float.c
Original file line number Diff line number Diff line change
Expand Up @@ -139,16 +139,17 @@ static CoefType calc_cpl_coord(CoefSumType energy_ch, CoefSumType energy_cpl)

#if CONFIG_AC3_ENCODER
AVCodec ff_ac3_encoder = {
.name = "ac3",
.type = AVMEDIA_TYPE_AUDIO,
.id = CODEC_ID_AC3,
.priv_data_size = sizeof(AC3EncodeContext),
.init = ff_ac3_encode_init,
.encode2 = ff_ac3_float_encode_frame,
.close = ff_ac3_encode_close,
.sample_fmts = (const enum AVSampleFormat[]){AV_SAMPLE_FMT_FLT,AV_SAMPLE_FMT_NONE},
.long_name = NULL_IF_CONFIG_SMALL("ATSC A/52A (AC-3)"),
.priv_class = &ac3enc_class,
.name = "ac3",
.type = AVMEDIA_TYPE_AUDIO,
.id = CODEC_ID_AC3,
.priv_data_size = sizeof(AC3EncodeContext),
.init = ff_ac3_encode_init,
.encode2 = ff_ac3_float_encode_frame,
.close = ff_ac3_encode_close,
.sample_fmts = (const enum AVSampleFormat[]){ AV_SAMPLE_FMT_FLT,
AV_SAMPLE_FMT_NONE },
.long_name = NULL_IF_CONFIG_SMALL("ATSC A/52A (AC-3)"),
.priv_class = &ac3enc_class,
.channel_layouts = ff_ac3_channel_layouts,
.defaults = ac3_defaults,
};
Expand Down
4 changes: 2 additions & 2 deletions libavcodec/adpcmenc.c
Original file line number Diff line number Diff line change
Expand Up @@ -726,8 +726,8 @@ AVCodec ff_ ## name_ ## _encoder = { \
.init = adpcm_encode_init, \
.encode2 = adpcm_encode_frame, \
.close = adpcm_encode_close, \
.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_S16, \
AV_SAMPLE_FMT_NONE}, \
.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_S16, \
AV_SAMPLE_FMT_NONE }, \
.long_name = NULL_IF_CONFIG_SMALL(long_name_), \
}

Expand Down
2 changes: 1 addition & 1 deletion libavcodec/alac.c
Original file line number Diff line number Diff line change
Expand Up @@ -661,5 +661,5 @@ AVCodec ff_alac_decoder = {
.close = alac_decode_close,
.decode = alac_decode_frame,
.capabilities = CODEC_CAP_DR1,
.long_name = NULL_IF_CONFIG_SMALL("ALAC (Apple Lossless Audio Codec)"),
.long_name = NULL_IF_CONFIG_SMALL("ALAC (Apple Lossless Audio Codec)"),
};
6 changes: 3 additions & 3 deletions libavcodec/alsdec.c
Original file line number Diff line number Diff line change
Expand Up @@ -1745,7 +1745,7 @@ AVCodec ff_als_decoder = {
.init = decode_init,
.close = decode_end,
.decode = decode_frame,
.flush = flush,
.capabilities = CODEC_CAP_SUBFRAMES | CODEC_CAP_DR1,
.long_name = NULL_IF_CONFIG_SMALL("MPEG-4 Audio Lossless Coding (ALS)"),
.flush = flush,
.capabilities = CODEC_CAP_SUBFRAMES | CODEC_CAP_DR1,
.long_name = NULL_IF_CONFIG_SMALL("MPEG-4 Audio Lossless Coding (ALS)"),
};
3 changes: 2 additions & 1 deletion libavcodec/amrnbdec.c
Original file line number Diff line number Diff line change
Expand Up @@ -1063,5 +1063,6 @@ AVCodec ff_amrnb_decoder = {
.decode = amrnb_decode_frame,
.capabilities = CODEC_CAP_DR1,
.long_name = NULL_IF_CONFIG_SMALL("Adaptive Multi-Rate NarrowBand"),
.sample_fmts = (const enum AVSampleFormat[]){AV_SAMPLE_FMT_FLT,AV_SAMPLE_FMT_NONE},
.sample_fmts = (const enum AVSampleFormat[]){ AV_SAMPLE_FMT_FLT,
AV_SAMPLE_FMT_NONE },
};
3 changes: 2 additions & 1 deletion libavcodec/amrwbdec.c
Original file line number Diff line number Diff line change
Expand Up @@ -1243,5 +1243,6 @@ AVCodec ff_amrwb_decoder = {
.decode = amrwb_decode_frame,
.capabilities = CODEC_CAP_DR1,
.long_name = NULL_IF_CONFIG_SMALL("Adaptive Multi-Rate WideBand"),
.sample_fmts = (const enum AVSampleFormat[]){AV_SAMPLE_FMT_FLT,AV_SAMPLE_FMT_NONE},
.sample_fmts = (const enum AVSampleFormat[]){ AV_SAMPLE_FMT_FLT,
AV_SAMPLE_FMT_NONE },
};
2 changes: 1 addition & 1 deletion libavcodec/anm.c
Original file line number Diff line number Diff line change
Expand Up @@ -191,5 +191,5 @@ AVCodec ff_anm_decoder = {
.close = decode_end,
.decode = decode_frame,
.capabilities = CODEC_CAP_DR1,
.long_name = NULL_IF_CONFIG_SMALL("Deluxe Paint Animation"),
.long_name = NULL_IF_CONFIG_SMALL("Deluxe Paint Animation"),
};
4 changes: 2 additions & 2 deletions libavcodec/apedec.c
Original file line number Diff line number Diff line change
Expand Up @@ -993,7 +993,7 @@ AVCodec ff_ape_decoder = {
.close = ape_decode_close,
.decode = ape_decode_frame,
.capabilities = CODEC_CAP_SUBFRAMES | CODEC_CAP_DELAY | CODEC_CAP_DR1,
.flush = ape_flush,
.long_name = NULL_IF_CONFIG_SMALL("Monkey's Audio"),
.flush = ape_flush,
.long_name = NULL_IF_CONFIG_SMALL("Monkey's Audio"),
.priv_class = &ape_decoder_class,
};
14 changes: 6 additions & 8 deletions libavcodec/asv1.c
Original file line number Diff line number Diff line change
Expand Up @@ -626,7 +626,7 @@ AVCodec ff_asv1_decoder = {
.close = decode_end,
.decode = decode_frame,
.capabilities = CODEC_CAP_DR1,
.long_name= NULL_IF_CONFIG_SMALL("ASUS V1"),
.long_name = NULL_IF_CONFIG_SMALL("ASUS V1"),
};

AVCodec ff_asv2_decoder = {
Expand All @@ -638,7 +638,7 @@ AVCodec ff_asv2_decoder = {
.close = decode_end,
.decode = decode_frame,
.capabilities = CODEC_CAP_DR1,
.long_name= NULL_IF_CONFIG_SMALL("ASUS V2"),
.long_name = NULL_IF_CONFIG_SMALL("ASUS V2"),
};

#if CONFIG_ASV1_ENCODER
Expand All @@ -649,9 +649,8 @@ AVCodec ff_asv1_encoder = {
.priv_data_size = sizeof(ASV1Context),
.init = encode_init,
.encode2 = encode_frame,
//encode_end,
.pix_fmts= (const enum PixelFormat[]){PIX_FMT_YUV420P, PIX_FMT_NONE},
.long_name= NULL_IF_CONFIG_SMALL("ASUS V1"),
.pix_fmts = (const enum PixelFormat[]){ PIX_FMT_YUV420P, PIX_FMT_NONE },
.long_name = NULL_IF_CONFIG_SMALL("ASUS V1"),
};
#endif

Expand All @@ -663,8 +662,7 @@ AVCodec ff_asv2_encoder = {
.priv_data_size = sizeof(ASV1Context),
.init = encode_init,
.encode2 = encode_frame,
//encode_end,
.pix_fmts= (const enum PixelFormat[]){PIX_FMT_YUV420P, PIX_FMT_NONE},
.long_name= NULL_IF_CONFIG_SMALL("ASUS V2"),
.pix_fmts = (const enum PixelFormat[]){ PIX_FMT_YUV420P, PIX_FMT_NONE },
.long_name = NULL_IF_CONFIG_SMALL("ASUS V2"),
};
#endif
16 changes: 8 additions & 8 deletions libavcodec/atrac1.c
Original file line number Diff line number Diff line change
Expand Up @@ -401,13 +401,13 @@ static av_cold int atrac1_decode_init(AVCodecContext *avctx)


AVCodec ff_atrac1_decoder = {
.name = "atrac1",
.type = AVMEDIA_TYPE_AUDIO,
.id = CODEC_ID_ATRAC1,
.name = "atrac1",
.type = AVMEDIA_TYPE_AUDIO,
.id = CODEC_ID_ATRAC1,
.priv_data_size = sizeof(AT1Ctx),
.init = atrac1_decode_init,
.close = atrac1_decode_end,
.decode = atrac1_decode_frame,
.capabilities = CODEC_CAP_DR1,
.long_name = NULL_IF_CONFIG_SMALL("Atrac 1 (Adaptive TRansform Acoustic Coding)"),
.init = atrac1_decode_init,
.close = atrac1_decode_end,
.decode = atrac1_decode_frame,
.capabilities = CODEC_CAP_DR1,
.long_name = NULL_IF_CONFIG_SMALL("Atrac 1 (Adaptive TRansform Acoustic Coding)"),
};
16 changes: 8 additions & 8 deletions libavcodec/atrac3.c
Original file line number Diff line number Diff line change
Expand Up @@ -1066,13 +1066,13 @@ static av_cold int atrac3_decode_init(AVCodecContext *avctx)

AVCodec ff_atrac3_decoder =
{
.name = "atrac3",
.type = AVMEDIA_TYPE_AUDIO,
.id = CODEC_ID_ATRAC3,
.name = "atrac3",
.type = AVMEDIA_TYPE_AUDIO,
.id = CODEC_ID_ATRAC3,
.priv_data_size = sizeof(ATRAC3Context),
.init = atrac3_decode_init,
.close = atrac3_decode_close,
.decode = atrac3_decode_frame,
.capabilities = CODEC_CAP_SUBFRAMES | CODEC_CAP_DR1,
.long_name = NULL_IF_CONFIG_SMALL("Atrac 3 (Adaptive TRansform Acoustic Coding 3)"),
.init = atrac3_decode_init,
.close = atrac3_decode_close,
.decode = atrac3_decode_frame,
.capabilities = CODEC_CAP_SUBFRAMES | CODEC_CAP_DR1,
.long_name = NULL_IF_CONFIG_SMALL("Atrac 3 (Adaptive TRansform Acoustic Coding 3)"),
};
2 changes: 1 addition & 1 deletion libavcodec/aura.c
Original file line number Diff line number Diff line change
Expand Up @@ -131,5 +131,5 @@ AVCodec ff_aura2_decoder = {
.close = aura_decode_end,
.decode = aura_decode_frame,
.capabilities = CODEC_CAP_DR1,
.long_name = NULL_IF_CONFIG_SMALL("Auravision Aura 2"),
.long_name = NULL_IF_CONFIG_SMALL("Auravision Aura 2"),
};
2 changes: 1 addition & 1 deletion libavcodec/avs.c
Original file line number Diff line number Diff line change
Expand Up @@ -179,5 +179,5 @@ AVCodec ff_avs_decoder = {
.decode = avs_decode_frame,
.close = avs_decode_end,
.capabilities = CODEC_CAP_DR1,
.long_name = NULL_IF_CONFIG_SMALL("AVS (Audio Video Standard) video"),
.long_name = NULL_IF_CONFIG_SMALL("AVS (Audio Video Standard) video"),
};
16 changes: 8 additions & 8 deletions libavcodec/bethsoftvideo.c
Original file line number Diff line number Diff line change
Expand Up @@ -151,13 +151,13 @@ static av_cold int bethsoftvid_decode_end(AVCodecContext *avctx)
}

AVCodec ff_bethsoftvid_decoder = {
.name = "bethsoftvid",
.type = AVMEDIA_TYPE_VIDEO,
.id = CODEC_ID_BETHSOFTVID,
.name = "bethsoftvid",
.type = AVMEDIA_TYPE_VIDEO,
.id = CODEC_ID_BETHSOFTVID,
.priv_data_size = sizeof(BethsoftvidContext),
.init = bethsoftvid_decode_init,
.close = bethsoftvid_decode_end,
.decode = bethsoftvid_decode_frame,
.capabilities = CODEC_CAP_DR1,
.long_name = NULL_IF_CONFIG_SMALL("Bethesda VID video"),
.init = bethsoftvid_decode_init,
.close = bethsoftvid_decode_end,
.decode = bethsoftvid_decode_frame,
.capabilities = CODEC_CAP_DR1,
.long_name = NULL_IF_CONFIG_SMALL("Bethesda VID video"),
};
16 changes: 8 additions & 8 deletions libavcodec/bfi.c
Original file line number Diff line number Diff line change
Expand Up @@ -184,13 +184,13 @@ static av_cold int bfi_decode_close(AVCodecContext * avctx)
}

AVCodec ff_bfi_decoder = {
.name = "bfi",
.type = AVMEDIA_TYPE_VIDEO,
.id = CODEC_ID_BFI,
.name = "bfi",
.type = AVMEDIA_TYPE_VIDEO,
.id = CODEC_ID_BFI,
.priv_data_size = sizeof(BFIContext),
.init = bfi_decode_init,
.close = bfi_decode_close,
.decode = bfi_decode_frame,
.capabilities = CODEC_CAP_DR1,
.long_name = NULL_IF_CONFIG_SMALL("Brute Force & Ignorance"),
.init = bfi_decode_init,
.close = bfi_decode_close,
.decode = bfi_decode_frame,
.capabilities = CODEC_CAP_DR1,
.long_name = NULL_IF_CONFIG_SMALL("Brute Force & Ignorance"),
};
2 changes: 1 addition & 1 deletion libavcodec/bink.c
Original file line number Diff line number Diff line change
Expand Up @@ -1335,5 +1335,5 @@ AVCodec ff_bink_decoder = {
.init = decode_init,
.close = decode_end,
.decode = decode_frame,
.long_name = NULL_IF_CONFIG_SMALL("Bink video"),
.long_name = NULL_IF_CONFIG_SMALL("Bink video"),
};
4 changes: 2 additions & 2 deletions libavcodec/binkaudio.c
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@ AVCodec ff_binkaudio_rdft_decoder = {
.close = decode_end,
.decode = decode_frame,
.capabilities = CODEC_CAP_DELAY | CODEC_CAP_DR1,
.long_name = NULL_IF_CONFIG_SMALL("Bink Audio (RDFT)")
.long_name = NULL_IF_CONFIG_SMALL("Bink Audio (RDFT)")
};

AVCodec ff_binkaudio_dct_decoder = {
Expand All @@ -379,5 +379,5 @@ AVCodec ff_binkaudio_dct_decoder = {
.close = decode_end,
.decode = decode_frame,
.capabilities = CODEC_CAP_DELAY | CODEC_CAP_DR1,
.long_name = NULL_IF_CONFIG_SMALL("Bink Audio (DCT)")
.long_name = NULL_IF_CONFIG_SMALL("Bink Audio (DCT)")
};
2 changes: 1 addition & 1 deletion libavcodec/bmp.c
Original file line number Diff line number Diff line change
Expand Up @@ -368,5 +368,5 @@ AVCodec ff_bmp_decoder = {
.close = bmp_decode_end,
.decode = bmp_decode_frame,
.capabilities = CODEC_CAP_DR1,
.long_name = NULL_IF_CONFIG_SMALL("BMP image"),
.long_name = NULL_IF_CONFIG_SMALL("BMP image"),
};
7 changes: 4 additions & 3 deletions libavcodec/bmpenc.c
Original file line number Diff line number Diff line change
Expand Up @@ -166,11 +166,12 @@ AVCodec ff_bmp_encoder = {
.priv_data_size = sizeof(BMPContext),
.init = bmp_encode_init,
.encode2 = bmp_encode_frame,
.pix_fmts = (const enum PixelFormat[]){
.pix_fmts = (const enum PixelFormat[]){
PIX_FMT_BGR24,
PIX_FMT_RGB555, PIX_FMT_RGB444, PIX_FMT_RGB565,
PIX_FMT_RGB8, PIX_FMT_BGR8, PIX_FMT_RGB4_BYTE, PIX_FMT_BGR4_BYTE, PIX_FMT_GRAY8, PIX_FMT_PAL8,
PIX_FMT_MONOBLACK,
PIX_FMT_NONE},
.long_name = NULL_IF_CONFIG_SMALL("BMP image"),
PIX_FMT_NONE
},
.long_name = NULL_IF_CONFIG_SMALL("BMP image"),
};
2 changes: 1 addition & 1 deletion libavcodec/c93.c
Original file line number Diff line number Diff line change
Expand Up @@ -253,5 +253,5 @@ AVCodec ff_c93_decoder = {
.close = decode_end,
.decode = decode_frame,
.capabilities = CODEC_CAP_DR1,
.long_name = NULL_IF_CONFIG_SMALL("Interplay C93"),
.long_name = NULL_IF_CONFIG_SMALL("Interplay C93"),
};
Loading

0 comments on commit 00c3b67

Please sign in to comment.