Mailing List Archive

rebased MythTV changes to FFmpeg
Rebased and split into more intelligible commits.
https://github.com/ulmus-scott/FFmpeg/commits/rebase/4.4m2
(They all should compile since the fixes were merged into the commits
making the changes, but I didn't have time to test all of them.)

On 11/17/21 12:50 PM, Piotr Oniszczuk wrote:
> Sorting current hunks in to commits we can do i.e.:
> 1.generate patch per each current commit
git log --after=2021-11-01 --reverse -p rebase/4.4m2 > out.patch
iconv -c out.patch -o out1.patch

This generates a single file with all of the changes.  NB: iconv breaks
my commit fixing non-UTF-8 characters, but makes the file UTF-8 valid.

To skip that commit, and the README.sync ones: git log -n 31 --reverse
-p rebase/4.4m2

> 2.sort & move relevant hunks from p.1 patches into new functional patches (getting 1st functional patch and scan all relevant hunks and put them into patch; compile; test; repeat)
> 3.apply functional patch on upstream ffmpeg4.4 tree
> 4.check: after each functional commit we should 100% the same codebase between current 4.4 downstream & 4.4 upstream with functional patches
> 5.commit p.4 in git if OK
>
> maybe this sounds crazy - but afaik git not allows to selectively move parts of commits between commit1 and commit2 (as commits are atomic).
>
> or i'm wrong here?
git remote add upstream https://github.com/FFmpeg/FFmpeg.git
git rebase -i upstream/release/4.4
Mark a commit for editing, then it can be split into multiple commits.
git reset HEAD^
then git add -p ...
Through several iterations with commit reordering, you can rewrite the
history however you want.

dropped changes:
DVB Subtitles: Fix display of subs with no display segment. ·
MythTV/mythtv@d27bedf
https://github.com/MythTV/mythtv/commit/d27bedf5571bdb80c164ce5d11a8af55f0275b92

Fixed 6 months later in FFmpeg (a decade ago):
Fix dvb subtitle decoding when display segment is missing. ·
FFmpeg/FFmpeg@7df9937
https://github.com/FFmpeg/FFmpeg/commit/7df9937fcc6a91ce4763dfa1ea6fc331f7e77295


FFmpeg does appear to support ATSC subtitles, for example see
libavcodec/atsc_a53.(h|c).
git log -E --grep="[Aa]53"
I have made no further investigation into this at this time.

libavcodec/mpegvideo.h class renaming is probably no longer needed.
Re: rebased MythTV changes to FFmpeg [ In reply to ]
On 11/18/21 2:21 AM, Scott Theisen wrote:
> Rebased and split into more intelligible commits.
> https://github.com/ulmus-scott/FFmpeg/commits/rebase/4.4m2
> (They all should compile since the fixes were merged into the commits
> making the changes, but I didn't have time to test all of them.)
>
> On 11/17/21 12:50 PM, Piotr Oniszczuk wrote:
>> Sorting current hunks in to commits we can do i.e.:
>> 1.generate patch per each current commit
> git log --after=2021-11-01 --reverse -p rebase/4.4m2 > out.patch
> iconv -c out.patch -o out1.patch
>
> This generates a single file with all of the changes.  NB: iconv
> breaks my commit fixing non-UTF-8 characters, but makes the file UTF-8
> valid.
>
> To skip that commit, and the README.sync ones: git log -n 31 --reverse
> -p rebase/4.4m2
>
>> 2.sort & move relevant hunks from p.1 patches into new functional patches (getting 1st functional patch and scan all relevant hunks and put them into patch; compile; test; repeat)
>> 3.apply functional patch on upstream ffmpeg4.4 tree
>> 4.check: after each functional commit we should 100% the same codebase between current 4.4 downstream & 4.4 upstream with functional patches
>> 5.commit p.4 in git if OK
>>
>> maybe this sounds crazy - but afaik git not allows to selectively move parts of commits between commit1 and commit2 (as commits are atomic).
>>
>> or i'm wrong here?
> git remote add upstream https://github.com/FFmpeg/FFmpeg.git
> git rebase -i upstream/release/4.4
> Mark a commit for editing, then it can be split into multiple commits.
> git reset HEAD^
> then git add -p ...
> Through several iterations with commit reordering, you can rewrite the
> history however you want.
>
> dropped changes:
> DVB Subtitles: Fix display of subs with no display segment. ·
> MythTV/mythtv@d27bedf
> https://github.com/MythTV/mythtv/commit/d27bedf5571bdb80c164ce5d11a8af55f0275b92
>
> Fixed 6 months later in FFmpeg (a decade ago):
> Fix dvb subtitle decoding when display segment is missing. ·
> FFmpeg/FFmpeg@7df9937
> https://github.com/FFmpeg/FFmpeg/commit/7df9937fcc6a91ce4763dfa1ea6fc331f7e77295
>
>
> FFmpeg does appear to support ATSC subtitles, for example see
> libavcodec/atsc_a53.(h|c).
> git log -E --grep="[Aa]53"
> I have made no further investigation into this at this time.
>
> libavcodec/mpegvideo.h class renaming is probably no longer needed.
>
I don't understand everything that was done here. I see that 4.4m and
4.4m2 are flat, which is a help. There are still differences between
your result and mine

git diff --stat  ulmus-scott/rebase/4.4m2 origin/release/4.4
 libavcodec/avcodec.h    | 10 +---------
 libavcodec/codec_desc.c |  6 ++++++
 libavcodec/dvbsubdec.c  | 13 ++++++++++++-
 libavcodec/libdav1d.c   |  6 +-----
 libavformat/mpeg.c      | 62
+++++++++++++++++++++++++++++++-------------------------------
 libavformat/utils.c     |  3 ++-
 6 files changed, 53 insertions(+), 47 deletions(-)

git diff --stat  ulmus-scott/rebase/4.4m origin/release/4.4
 libavcodec/codec_desc.c |  6 ++++++
 libavcodec/dvbsubdec.c  |  2 +-
 libavcodec/libdav1d.c   |  6 +-----
 libavformat/mpeg.c      | 62
+++++++++++++++++++++++++++++++-------------------------------
 libavformat/utils.c     |  3 ++-
 5 files changed, 41 insertions(+), 38 deletions(-)

Is this going to help find the problem with playback? I don't know the
best route out of the rabbit hole.

Peter
Re: rebased MythTV changes to FFmpeg [ In reply to ]
On 11/18/21 11:34 AM, Peter Bennett wrote:
>
> I don't understand everything that was done here. I see that 4.4m and
> 4.4m2 are flat, which is a help. There are still differences between
> your result and mine
>
The differences are intentional:
git rebase mythtv/release/4.4 onto ffmpeg/release/4.4 -> rebase/4.4m

git diff --color-moved --color-moved-ws=ignore-space-change
origin/release/4.4 rebase/4.4m
 libavcodec/codec_desc.c |  6 ------ removed duplicated DVD_nav entry
(ffmpeg already has one, no need to add it again)
 libavcodec/dvbsubdec.c  |  2 +- line with trailing whitespace is now empty
 libavcodec/libdav1d.c   |  6 +++++- 2 commits cherry-picked into
ffmpeg/release/4.4 after the mythtv pull
 libavformat/mpeg.c      | 62
+++++++++++++++++++++++++++++++-------------------------------
fix indentation to match ffmpeg
 libavformat/utils.c |  3 +-- looks like I lost a blank line; extra
space to align comment with ffmpeg
5 files changed, 38 insertions(+), 41 deletions(-)

git checkout -b rebase/4.4m2 # on branch rebase/4.4m
git rebase -i upstream/release/4.4
Split, reorder, and combine commits to create a sensible history:
git diff rebase/4.4m rebase/4.4m2 --stat
 libavcodec/avcodec.h   | 10 +++++++++- deprecate these mythtv copies
of former ffmpeg functions in favor of the new ffmpeg functions
 libavcodec/dvbsubdec.c | 11 ----------- dropped changes, since it was
already fixed by ffmpeg
 2 files changed, 9 insertions(+), 12 deletions(-)

dropped changes:
DVB Subtitles: Fix display of subs with no display segment. ·
MythTV/mythtv@d27bedf
https://github.com/MythTV/mythtv/commit/d27bedf5571bdb80c164ce5d11a8af55f0275b92

Fixed 6 months later in FFmpeg (a decade ago):
Fix dvb subtitle decoding when display segment is missing. ·
FFmpeg/FFmpeg@7df9937
https://github.com/FFmpeg/FFmpeg/commit/7df9937fcc6a91ce4763dfa1ea6fc331f7e77295


proposed changes to drop:
MythTV: class is a reserved keyword in C++ · ulmus-scott/FFmpeg@791acd4
https://github.com/ulmus-scott/FFmpeg/commit/791acd4040b59a2e0b1807459af02b3ea7013f28

MythTV: Unnecessary??? · ulmus-scott/FFmpeg@ee3bca3
https://github.com/ulmus-scott/FFmpeg/commit/ee3bca311b7ea7bbd58c62248ee6943cbc8077c5


> Is this going to help find the problem with playback? I don't know the
> best route out of the rabbit hole.
>
Maybe, but mpegts-mythtv is still added as one monolithic commit.

Regards,
Scott
_______________________________________________
mythtv-dev mailing list
mythtv-dev@mythtv.org
http://lists.mythtv.org/mailman/listinfo/mythtv-dev
http://wiki.mythtv.org/Mailing_List_etiquette
MythTV Forums: https://forum.mythtv.org