Skip to content
Snippets Groups Projects
general.texi 46.9 KiB
Newer Older
  • Learn to ignore specific revisions
  • When you submit your patch, try to send a unified diff (diff '-up'
    option). We cannot read other diffs :-)
    
    Also please do not submit a patch which contains several unrelated changes.
    Split it into separate, self-contained pieces. This does not mean splitting
    file by file. Instead, make the patch as small as possible while still
    keeping it as a logical unit that contains an individual change, even
    if it spans multiple files. This makes reviewing your patches much easier
    for us and greatly increases your chances of getting your patch applied.
    
    Run the regression tests before submitting a patch so that you can
    verify that there are no big problems.
    
    Patches should be posted as base64 encoded attachments (or any other
    encoding which ensures that the patch will not be trashed during
    transmission) to the ffmpeg-devel mailing list, see
    @url{http://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-devel}
    
    It also helps quite a bit if you tell us what the patch does (for example
    'replaces lrint by lrintf'), and why (for example '*BSD isn't C99 compliant
    and has no lrint()')
    
    Also please if you send several patches, send each patch as a separate mail,
    do not attach several unrelated patches to the same mail.
    
    
    @section New codecs or formats checklist
    
    @enumerate
    @item
        Did you use av_cold for codec initialization and close functions?
    @item
        Did you add a long_name under NULL_IF_CONFIG_SMALL to the AVCodec or
        AVInputFormat/AVOutputFormat struct?
    @item
        Did you bump the minor version number in @file{avcodec.h} or
        @file{avformat.h}?
    @item
        Did you register it in @file{allcodecs.c} or @file{allformats.c}?
    @item
        Did you add the CodecID to @file{avcodec.h}?
    @item
        If it has a fourcc, did you add it to @file{libavformat/riff.c},
        even if it is only a decoder?
    @item
        Did you add a rule to compile the appropriate files in the Makefile?
        Remember to do this even if you're just adding a format to a file that is
        already being compiled by some other rule, like a raw demuxer.
    @item
        Did you add an entry to the table of supported formats or codecs in the
        documentation?
    @item
        Did you add an entry in the Changelog?
    @item
        If it depends on a parser or a library, did you add that dependency in
        configure?
    @item
        Did you "svn add" the appropriate files before commiting?
    @end enumerate
    
    
    @section patch submission checklist
    
    @enumerate
    @item
        Do the regression tests pass with the patch applied?
    
    @item
        Does @code{make checkheaders} pass with the patch applied?
    
    @item
        Is the patch a unified diff?
    @item
        Is the patch against latest FFmpeg SVN?
    @item
        Are you subscribed to ffmpeg-dev?
        (the list is subscribers only due to spam)
    @item
        Have you checked that the changes are minimal, so that the same cannot be
        achieved with a smaller patch and/or simpler final code?
    @item
        If the change is to speed critical code, did you benchmark it?
    @item
        If you did any benchmarks, did you provide them in the mail?
    @item
        Have you checked that the patch does not introduce buffer overflows or
        other security issues?
    
        Did you test your decoder or demuxer against damaged data? If no, see
        tools/trasher and the noise bitstream filter. Your decoder or demuxer
        should not crash or end in a (near) infinite loop when fed damaged data.
    
    @item
        Is the patch created from the root of the source tree, so it can be
        applied with @code{patch -p0}?
    @item
        Does the patch not mix functional and cosmetic changes?
    @item
        Did you add tabs or trailing whitespace to the code? Both are forbidden.
    @item
        Is the patch attached to the email you send?
    @item
        Is the mime type of the patch correct? It should be text/x-diff or
        text/x-patch or at least text/plain and not application/octet-stream.
    @item
        If the patch fixes a bug, did you provide a verbose analysis of the bug?
    @item
        If the patch fixes a bug, did you provide enough information, including
        a sample, so the bug can be reproduced and the fix can be verified?
        Note please do not attach samples >100k to mails but rather provide a
    
        URL, you can upload to ftp://upload.ffmpeg.org
    
    @item
        Did you provide a verbose summary about what the patch does change?
    @item
        Did you provide a verbose explanation why it changes things like it does?
    @item
        Did you provide a verbose summary of the user visible advantages and
        disadvantages if the patch is applied?
    @item
        Did you provide an example so we can verify the new feature added by the
        patch easily?
    @item
        If you added a new file, did you insert a license header? It should be
        taken from FFmpeg, not randomly copied and pasted from somewhere else.
    @item
        You should maintain alphabetical order in alphabetically ordered lists as
        long as doing so does not break API/ABI compatibility.
    @item
        Lines with similar content should be aligned vertically when doing so
        improves readability.
    @item
        Did you provide a suggestion for a clear commit log message?
    @end enumerate
    
    @section Patch review process
    
    All patches posted to ffmpeg-devel will be reviewed, unless they contain a
    clear note that the patch is not for SVN.
    Reviews and comments will be posted as replies to the patch on the
    mailing list. The patch submitter then has to take care of every comment,
    that can be by resubmitting a changed patch or by discussion. Resubmitted
    patches will themselves be reviewed like any other patch. If at some point
    a patch passes review with no comments then it is approved, that can for
    simple and small patches happen immediately while large patches will generally
    have to be changed and reviewed many times before they are approved.
    After a patch is approved it will be committed to the repository.
    
    We will review all submitted patches, but sometimes we are quite busy so
    especially for large patches this can take several weeks.
    
    When resubmitting patches, please do not make any significant changes
    not related to the comments received during review. Such patches will
    be rejected. Instead, submit  significant changes or new features as
    separate patches.
    
    @section Regression tests
    
    Before submitting a patch (or committing to the repository), you should at least
    test that you did not break anything.
    
    The regression tests build a synthetic video stream and a synthetic
    audio stream. These are then encoded and decoded with all codecs or
    formats. The CRC (or MD5) of each generated file is recorded in a
    result file. A 'diff' is launched to compare the reference results and
    the result file.
    
    The regression tests then go on to test the FFserver code with a
    limited set of streams. It is important that this step runs correctly
    as well.
    
    Run 'make test' to test all the codecs and formats.
    
    Run 'make fulltest' to test all the codecs, formats and FFserver.
    
    [Of course, some patches may change the results of the regression tests. In
    this case, the reference results of the regression tests shall be modified
    accordingly].
    
    @bye