Re: [FFmpeg-devel] [PATCH v2] avformat, avcodec: add dfcmv demuxer and decoder

2019-12-03 Thread Michael Niedermayer
On Tue, Dec 03, 2019 at 03:27:12PM -0600, Ben Lubar wrote:
> A few example CMV files can be found in the data/initial_movies folder
> of Dwarf Fortress (http://www.bay12games.com/dwarves/).
> 
> The demuxer does not currently handle audio cues. There are warning
> messages logged for each audio file that should be played. As far as I
> know, the only two existing CMV files with audio cues in them are in the
> examples folder mentioned above.
> 
> (Reformatted to hopefully make the patch not break in GMail's weird
> forced word wrapping)
> 
> Signed-off-by: Ben Lubar 
> ---
>  Changelog|1 +
>  configure|1 +
>  doc/general.texi |2 +
>  libavcodec/Makefile  |1 +
>  libavcodec/allcodecs.c   |1 +
>  libavcodec/avcodec.h |1 +
>  libavcodec/codec_desc.c  |7 +
>  libavcodec/dfcmv.c   | 1133 ++
>  libavcodec/version.h |4 +-
>  libavformat/Makefile |1 +
>  libavformat/allformats.c |1 +
>  libavformat/dfcmv.c  |  232 
>  libavformat/version.h|2 +-
>  13 files changed, 1384 insertions(+), 3 deletions(-)
>  create mode 100644 libavcodec/dfcmv.c
>  create mode 100644 libavformat/dfcmv.c

libavcodec and libavformat changes should be in seperate patches
also
the patch seems corrupted:
Applying: avformat, avcodec: add dfcmv demuxer and decoder
error: corrupt patch at line 69
error: could not build fake ancestor
Patch failed at 0001 avformat, avcodec: add dfcmv demuxer and decoder

thx

[...]
-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

He who knows, does not speak. He who speaks, does not know. -- Lao Tsu


signature.asc
Description: PGP signature
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

[FFmpeg-devel] [PATCH v2] avformat, avcodec: add dfcmv demuxer and decoder

2019-12-03 Thread Ben Lubar
A few example CMV files can be found in the data/initial_movies folder
of Dwarf Fortress (http://www.bay12games.com/dwarves/).

The demuxer does not currently handle audio cues. There are warning
messages logged for each audio file that should be played. As far as I
know, the only two existing CMV files with audio cues in them are in the
examples folder mentioned above.

(Reformatted to hopefully make the patch not break in GMail's weird
forced word wrapping)

Signed-off-by: Ben Lubar 
---
 Changelog|1 +
 configure|1 +
 doc/general.texi |2 +
 libavcodec/Makefile  |1 +
 libavcodec/allcodecs.c   |1 +
 libavcodec/avcodec.h |1 +
 libavcodec/codec_desc.c  |7 +
 libavcodec/dfcmv.c   | 1133 ++
 libavcodec/version.h |4 +-
 libavformat/Makefile |1 +
 libavformat/allformats.c |1 +
 libavformat/dfcmv.c  |  232 
 libavformat/version.h|2 +-
 13 files changed, 1384 insertions(+), 3 deletions(-)
 create mode 100644 libavcodec/dfcmv.c
 create mode 100644 libavformat/dfcmv.c

diff --git a/Changelog b/Changelog
index f30f398a9f..eed4fa8a50 100644
--- a/Changelog
+++ b/Changelog
@@ -27,6 +27,7 @@ version :
 - axcorrelate filter
 - mvdv decoder
 - mvha decoder
+- Dwarf Fortress CMV demuxer and decoder


 version 4.2:
diff --git a/configure b/configure
index ca7137f341..622deed689 100755
--- a/configure
+++ b/configure
@@ -3258,6 +3258,7 @@ caf_demuxer_select="iso_media riffdec"
 caf_muxer_select="iso_media"
 dash_muxer_select="mp4_muxer"
 dash_demuxer_deps="libxml2"
+dfcmv_demuxer_deps="zlib"
 dirac_demuxer_select="dirac_parser"
 dts_demuxer_select="dca_parser"
 dtshd_demuxer_select="dca_parser"
diff --git a/doc/general.texi b/doc/general.texi
index a5b77e0de1..bbc90a2f58 100644
--- a/doc/general.texi
+++ b/doc/general.texi
@@ -429,6 +429,7 @@ library:
 @tab Video format used by CD+G karaoke disks
 @item Phantom Cine  @tab   @tab X
 @item Cineform HD   @tab   @tab X
+@item Dwarf Fortress Curses MoVie (.cmv files)  @tab   @tab X
 @item Commodore CDXL@tab   @tab X
 @tab Amiga CD video format
 @item Core Audio Format @tab X @tab X
@@ -843,6 +844,7 @@ following image formats are supported:
 @item Delphine Software International CIN video  @tab @tab  X
 @tab Codec used in Delphine Software International games.
 @item Discworld II BMV Video @tab @tab  X
+@item Dwarf Fortess Curses MoVie (CMV)  @tab @tab  X
 @item Canopus Lossless Codec @tab @tab  X
 @item Cinepak@tab @tab  X
 @item Cirrus Logic AccuPak   @tab  X  @tab  X
diff --git a/libavcodec/Makefile b/libavcodec/Makefile
index c1f35b40d8..24e146e90f 100644
--- a/libavcodec/Makefile
+++ b/libavcodec/Makefile
@@ -267,6 +267,7 @@ OBJS-$(CONFIG_DDS_DECODER) += dds.o
 OBJS-$(CONFIG_DIRAC_DECODER)   += diracdec.o dirac.o
diracdsp.o diractab.o \
   dirac_arith.o dirac_dwt.o dirac_vlc.o
 OBJS-$(CONFIG_DFA_DECODER) += dfa.o
+OBJS-$(CONFIG_DFCMV_DECODER)   += dfcmv.o
 OBJS-$(CONFIG_DNXHD_DECODER)   += dnxhddec.o dnxhddata.o
 OBJS-$(CONFIG_DNXHD_ENCODER)   += dnxhdenc.o dnxhddata.o
 OBJS-$(CONFIG_DOLBY_E_DECODER) += dolby_e.o kbdwin.o
diff --git a/libavcodec/allcodecs.c b/libavcodec/allcodecs.c
index c33edf23c9..8571cce906 100644
--- a/libavcodec/allcodecs.c
+++ b/libavcodec/allcodecs.c
@@ -83,6 +83,7 @@ extern AVCodec ff_cscd_decoder;
 extern AVCodec ff_cyuv_decoder;
 extern AVCodec ff_dds_decoder;
 extern AVCodec ff_dfa_decoder;
+extern AVCodec ff_dfcmv_decoder;
 extern AVCodec ff_dirac_decoder;
 extern AVCodec ff_dnxhd_encoder;
 extern AVCodec ff_dnxhd_decoder;
diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
index 735a3c2d76..bd0446fe92 100644
--- a/libavcodec/avcodec.h
+++ b/libavcodec/avcodec.h
@@ -410,6 +410,7 @@ enum AVCodecID {
 AV_CODEC_ID_SCREENPRESSO,
 AV_CODEC_ID_RSCC,
 AV_CODEC_ID_AVS2,
+AV_CODEC_ID_DFCMV,

 AV_CODEC_ID_Y41P = 0x8000,
 AV_CODEC_ID_AVRP,
diff --git a/libavcodec/codec_desc.c b/libavcodec/codec_desc.c
index 570bd2f382..4ce8416b8e 100644
--- a/libavcodec/codec_desc.c
+++ b/libavcodec/codec_desc.c
@@ -1403,6 +1403,13 @@ static const AVCodecDescriptor codec_descriptors[] = {
 .long_name = NULL_IF_CONFIG_SMALL("AVS2-P2/IEEE1857.4"),
 .props = AV_CODEC_PROP_LOSSY,
 },
+{
+.id= AV_CODEC_ID_DFCMV,
+.type  = AVMEDIA_TYPE_VIDEO,
+.name  = "dfcmv",
+.long_name = NULL_IF_CONFIG_SMALL("Dwarf Fortress Curses MoVie"),
+.props = AV_CODEC_PROP_INTRA_ONLY,
+},
 {
 .id= AV_CODEC_ID_Y41P,
 .type  = AVMEDIA_TYPE_VIDEO,
diff --git a/libavcodec/dfcmv.c b/libavcodec/dfcmv.c
new file mode 100644
index 00..9a1f4ac4d8
--- /dev/null
+++ b/libavcodec/dfcmv.c
@@ -0,0 +1,1133 @@
+#inc