Changes between Initial Version and Version 1 of LibavMerge


Ignore:
Timestamp:
Aug 2, 2016, 7:22:03 PM (3 years ago)
Author:
Timothy_Gu
Comment:

Copy from Clément Bœsch's email http://lists.ffmpeg.org/pipermail/ffmpeg-devel/2016-June/195732.html

Legend:

Unmodified
Added
Removed
Modified
  • LibavMerge

    v1 v1  
     1== Context ==
     2
     3The FFmpeg project merges all the changes from the Libav project (https://libav.org) since the origin of the fork (around 2011).
     4
     5With the exceptions of some commits due to technical/political disagreements or issues, the changes are merged on a more or less regular schedule (daily for years thanks to Michael, but more sparse nowadays).
     6
     7== Reason ==
     8
     9The majority of the active developers believe the project needs to keep this policy for various reasons.
     10
     11The most important one is that we don't want our users to have to choose between two distributors of libraries of the exact same name in order to have a different set of features and bugfixes. By taking the responsibility of unifying the two codebases, we allow users to benefit from the changes from the two teams.
     12
     13Today, FFmpeg has a much larger user database (we are distributed by every major distribution), so we consider this mission a priority.
     14
     15A different approach to the merge could have been to pick the changes we are interested in and drop most of the cosmetics and other less important changes. Unfortunately, this makes the following picks much harder, especially since the Libav project is involved in various deep API changes. As a result, we decide to virtually take everything done there.
     16
     17Any Libav developer is of course welcome anytime to contribute directly to the FFmpeg tree. Of course, we fully understand and are forced to accept that very few Libav developers are interested in doing so, but we still want to recognize their work. This leads us to create merge commits for every single one from Libav. The original commit appears totally unchanged with full authorship in our history (and the conflict are solved in the merge one). That way, not a single thing from Libav will be lost in the future in case some reunification happens, or that project disappears one way or another.
     18
     19== Downsides ==
     20
     21Of course, there are many downsides to this approach.
     22
     23- It causes a non negligible merge commits pollution. We make sure there are not several level of merges entangled (we do a 1:1 merge/commit), but it's still a non-linear history.
     24- Many duplicated work. For instance, we added libavresample in our tree to keep compatibility with Libav when our libswresample was already covering the exact same purpose. The same thing happened for various elements such as the ProRes support (but differences in features, bugs, licenses, ...). There are many work to do to unify them, and any help is very much welcome.
     25- So much manpower from both FFmpeg and Libav is lost because of this mess. We know it, and we don't know how to fix it. It takes incredible time to do these merges, so we have even less time to work on things we personally care about. The bad vibes also do not help with keeping our developers motivated.
     26- There is a growing technical risk factor with the merges due to the codebase differing more and more.
     27
     28== Merge Guidelines ==
     29
     30The following gives developer guidelines on how to proceed when merging Libav commits.
     31
     32Before starting, you can reduce the risk of errors on merge conflicts by using
     33a different merge conflict style:
     34
     35{{{
     36git config --global merge.conflictstyle diff3
     37}}}
     38
     39Here is a script to help merging the next commit in the queue:
     40
     41{{{#!sh
     42#!/bin/sh
     43
     44if [ "$1" != "merge" -a "$1" != "noop" ]; then
     45    printf "Usage: $0 <merge|noop [REF_HASH]>\n"
     46    exit 0
     47fi
     48
     49[ "$1" = "noop" ] && merge_opts="-s ours"
     50
     51nextrev=$(git rev-list libav/master --not master --no-merges | tail -n1)
     52if [ -z "$nextrev" ]; then
     53    printf "Nothing to merge..\n"
     54    exit 0
     55fi
     56printf "Merging $(git log -n 1 --oneline $nextrev)\n"
     57git merge --no-commit $merge_opts --no-ff --log $nextrev
     58
     59if [ "$1" = "noop" -a -n "$2" ]; then
     60    printf "\nThis commit is a noop, see $2\n" >> .git/MERGE_MSG
     61fi
     62
     63printf "\nMerged-by: $(git config --get user.name) <$(git config --get user.email)>\n" >> .git/MERGE_MSG
     64}}}
     65
     66The script assumes a remote named libav.
     67
     68It has two modes: merge, and noop. The noop mode creates a merge with no change to the HEAD. You can pass a hash as extra argument to reference a justification (it is common that we already have the change done in FFmpeg).
     69
     70== TODO/FIXME/UNMERGED ==
     71
     72- HEVC DSP and x86 MC SIMD improvements from Libav (see http://comments.gmane.org/gmane.comp.video.ffmpeg.devel/204917)