[Ffmpeg-devel] Maximum line length

Panagiotis Issaris takis.issaris
Thu Oct 5 18:15:29 CEST 2006


Hi,

What is the recommended maximum line length for source code in FFmpeg?

I'm asking because I wanted to reformat my own code, as it tends to get messed
up in several e-mailclients when replying. And because Diego Biurrun requested
me to :)

Running this:
for i in `find -type f -name "*.[ch]"`; do ./mll $i; done|sort -n |uniq

Gave me:
...
162                      ./libavcodec/i386/h264dsp_mmx.c
163                      ./libswscale/swscale.c
165                      ./libavcodec/amr.c
166                      ./libavcodec/vp56.c
167                      ./libavcodec/a52dec.c
167                      ./libavcodec/ac3dec.c
168                      ./libavcodec/ratecontrol.c
168                      ./libavutil/avutil.h
169                      ./libavcodec/vp6.c
170                      ./libavformat/mxf.c
170                      ./libswscale/swscale.h
171                      ./libavcodec/parser.c
174                      ./libavcodec/msmpeg4.c
175                      ./libavformat/asf.c
181                      ./libavformat/riff.c
186                      ./libavcodec/mpeg12.c
186                      ./libswscale/swscale_template.c
187                      ./libavcodec/dsputil.h
191                      ./libavcodec/h264enc.c
194                      ./libavformat/img.c
195                      ./libavcodec/snow.h
198                      ./libavcodec/utils.c
203                      ./libavformat/avidec.c
209                      ./libavcodec/vp5.c
215                      ./libavcodec/mpegvideo.c
215                      ./vhook/drawtext.c
218                      ./ffmpeg.c
218                      ./libavcodec/svq1.c
219                      ./libavcodec/vorbis.c
228                      ./libavcodec/sh4/qpel.c
234                      ./libavformat/nsvdec.c
235                      ./libavcodec/h263.c
235                      ./libavformat/utils.c
255                      ./ffserver.c
256                      ./libavcodec/jpeg_ls.c
295                      ./libavcodec/h264.c
297                      ./libavcodec/snow.c
350                      ./libavformat/nut.c


With friendly regards,
Takis
-------------- next part --------------
#!/usr/bin/env ruby
File.open(ARGV[0], "r") do |f|
    maxlen = 0
    f.each_line { |line| if line.length() > maxlen then maxlen = line.length() end }
    puts "#{maxlen}\t\t\t #{ARGV[0]}"
end




More information about the ffmpeg-devel mailing list