aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeter Ross <pross@xvid.org>2012-11-25 15:12:56 +1100
committerPeter Ross <pross@xvid.org>2012-12-04 20:53:26 +1100
commit1696c72af4a5222e73d04f53fe55168233426a58 (patch)
tree2e1cca3e981c70172ad123ca8694d7250479cfc4
parent59fe5a339b751e221bf038d20108f6cf1ede59db (diff)
downloadffmpeg-1696c72af4a5222e73d04f53fe55168233426a58.tar.gz
iff demuxer: include DEEP TVDC lookup table in extradata buffer
Signed-off-by: Peter Ross <pross@xvid.org>
-rw-r--r--libavformat/iff.c13
-rw-r--r--libavformat/version.h2
2 files changed, 13 insertions, 2 deletions
diff --git a/libavformat/iff.c b/libavformat/iff.c
index e59d49bf72..6375ef5bdb 100644
--- a/libavformat/iff.c
+++ b/libavformat/iff.c
@@ -68,6 +68,7 @@
#define ID_DBOD MKTAG('D','B','O','D')
#define ID_DPEL MKTAG('D','P','E','L')
#define ID_DLOC MKTAG('D','L','O','C')
+#define ID_TVDC MKTAG('T','V','D','C')
#define LEFT 2
#define RIGHT 4
@@ -81,7 +82,7 @@
* set it to smallest possible size of 2 to indicate that there's
* no extradata changing in this frame.
*/
-#define IFF_EXTRA_VIDEO_SIZE 9
+#define IFF_EXTRA_VIDEO_SIZE 41
typedef enum {
COMP_NONE,
@@ -102,6 +103,7 @@ typedef struct {
unsigned flags; ///< 1 for EHB, 0 is no extra half darkening
unsigned transparency; ///< transparency color index in palette
unsigned masking; ///< masking method used
+ uint8_t tvdc[32]; ///< TVDC lookup table
} IffDemuxContext;
/* Metadata string read */
@@ -313,6 +315,14 @@ static int iff_read_header(AVFormatContext *s)
st->codec->height = avio_rb16(pb);
break;
+ case ID_TVDC:
+ if (data_size < sizeof(iff->tvdc))
+ return AVERROR_INVALIDDATA;
+ res = avio_read(pb, iff->tvdc, sizeof(iff->tvdc));
+ if (res < 0)
+ return res;
+ break;
+
case ID_ANNO:
case ID_TEXT: metadata_tag = "comment"; break;
case ID_AUTH: metadata_tag = "artist"; break;
@@ -403,6 +413,7 @@ static int iff_read_header(AVFormatContext *s)
bytestream_put_byte(&buf, iff->flags);
bytestream_put_be16(&buf, iff->transparency);
bytestream_put_byte(&buf, iff->masking);
+ bytestream_put_buffer(&buf, iff->tvdc, sizeof(iff->tvdc));
st->codec->codec_id = AV_CODEC_ID_IFF_ILBM;
break;
default:
diff --git a/libavformat/version.h b/libavformat/version.h
index d82b948b52..204527e78d 100644
--- a/libavformat/version.h
+++ b/libavformat/version.h
@@ -30,7 +30,7 @@
#include "libavutil/avutil.h"
#define LIBAVFORMAT_VERSION_MAJOR 54
-#define LIBAVFORMAT_VERSION_MINOR 42
+#define LIBAVFORMAT_VERSION_MINOR 43
#define LIBAVFORMAT_VERSION_MICRO 100
#define LIBAVFORMAT_VERSION_INT AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR, \