Commit 16ddc58b authored by Michael Niedermayer's avatar Michael Niedermayer

Merge commit '70daeacd'

* commit '70daeacd':
  PAF demuxer and decoder

Conflicts:
	Changelog
	doc/general.texi
	libavcodec/avcodec.h
	libavcodec/codec_desc.c
	libavcodec/paf.c
	libavcodec/version.h
	libavformat/Makefile
	libavformat/allformats.c
	libavformat/paf.c
	libavformat/version.h

See: 7de4a165, and others
Merged-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parents 03e4c2d8 70daeacd
......@@ -288,6 +288,7 @@ enum AVCodecID {
AV_CODEC_ID_FIC,
AV_CODEC_ID_ALIAS_PIX,
AV_CODEC_ID_BRENDER_PIX_DEPRECATED,
AV_CODEC_ID_PAF_VIDEO_DEPRECATED,
AV_CODEC_ID_BRENDER_PIX= MKBETAG('B','P','I','X'),
AV_CODEC_ID_Y41P = MKBETAG('Y','4','1','P'),
......@@ -474,6 +475,7 @@ enum AVCodecID {
AV_CODEC_ID_COMFORT_NOISE,
AV_CODEC_ID_TAK_DEPRECATED,
AV_CODEC_ID_METASOUND,
AV_CODEC_ID_PAF_AUDIO_DEPRECATED,
AV_CODEC_ID_FFWAVESYNTH = MKBETAG('F','F','W','S'),
AV_CODEC_ID_SONIC = MKBETAG('S','O','N','C'),
AV_CODEC_ID_SONIC_LS = MKBETAG('S','O','N','L'),
......
......@@ -1173,13 +1173,6 @@ static const AVCodecDescriptor codec_descriptors[] = {
.long_name = NULL_IF_CONFIG_SMALL("LucasArts SMUSH video"),
.props = AV_CODEC_PROP_LOSSY,
},
{
.id = AV_CODEC_ID_PAF_VIDEO,
.type = AVMEDIA_TYPE_VIDEO,
.name = "paf_video",
.long_name = NULL_IF_CONFIG_SMALL("Amazing Studio Packed Animation File Video"),
.props = AV_CODEC_PROP_LOSSY,
},
{
.id = AV_CODEC_ID_AVRN,
.type = AVMEDIA_TYPE_VIDEO,
......@@ -1234,6 +1227,13 @@ static const AVCodecDescriptor codec_descriptors[] = {
.long_name = NULL_IF_CONFIG_SMALL("Mirillis FIC"),
.props = AV_CODEC_PROP_LOSSY,
},
{
.id = AV_CODEC_ID_PAF_VIDEO,
.type = AVMEDIA_TYPE_VIDEO,
.name = "paf_video",
.long_name = NULL_IF_CONFIG_SMALL("Amazing Studio Packed Animation File Video"),
.props = AV_CODEC_PROP_LOSSY,
},
{
.id = AV_CODEC_ID_VP7,
.type = AVMEDIA_TYPE_VIDEO,
......@@ -2411,13 +2411,6 @@ static const AVCodecDescriptor codec_descriptors[] = {
.name = "sonicls",
.long_name = NULL_IF_CONFIG_SMALL("Sonic lossless"),
},
{
.id = AV_CODEC_ID_PAF_AUDIO,
.type = AVMEDIA_TYPE_AUDIO,
.name = "paf_audio",
.long_name = NULL_IF_CONFIG_SMALL("Amazing Studio Packed Animation File Audio"),
.props = AV_CODEC_PROP_LOSSY,
},
{
.id = AV_CODEC_ID_OPUS,
.type = AVMEDIA_TYPE_AUDIO,
......@@ -2446,6 +2439,13 @@ static const AVCodecDescriptor codec_descriptors[] = {
.long_name = NULL_IF_CONFIG_SMALL("Voxware MetaSound"),
.props = AV_CODEC_PROP_LOSSY,
},
{
.id = AV_CODEC_ID_PAF_AUDIO,
.type = AVMEDIA_TYPE_AUDIO,
.name = "paf_audio",
.long_name = NULL_IF_CONFIG_SMALL("Amazing Studio Packed Animation File Audio"),
.props = AV_CODEC_PROP_LOSSY,
},
{
.id = AV_CODEC_ID_EVRC,
.type = AVMEDIA_TYPE_AUDIO,
......
This diff is collapsed.
......@@ -2678,10 +2678,12 @@ static enum AVCodecID remap_deprecated_codec_id(enum AVCodecID id)
case AV_CODEC_ID_BRENDER_PIX_DEPRECATED: return AV_CODEC_ID_BRENDER_PIX;
case AV_CODEC_ID_OPUS_DEPRECATED: return AV_CODEC_ID_OPUS;
case AV_CODEC_ID_TAK_DEPRECATED : return AV_CODEC_ID_TAK;
case AV_CODEC_ID_PAF_AUDIO_DEPRECATED : return AV_CODEC_ID_PAF_AUDIO;
case AV_CODEC_ID_PCM_S24LE_PLANAR_DEPRECATED : return AV_CODEC_ID_PCM_S24LE_PLANAR;
case AV_CODEC_ID_PCM_S32LE_PLANAR_DEPRECATED : return AV_CODEC_ID_PCM_S32LE_PLANAR;
case AV_CODEC_ID_ESCAPE130_DEPRECATED : return AV_CODEC_ID_ESCAPE130;
case AV_CODEC_ID_G2M_DEPRECATED : return AV_CODEC_ID_G2M;
case AV_CODEC_ID_PAF_VIDEO_DEPRECATED : return AV_CODEC_ID_PAF_VIDEO;
case AV_CODEC_ID_WEBP_DEPRECATED: return AV_CODEC_ID_WEBP;
case AV_CODEC_ID_HEVC_DEPRECATED: return AV_CODEC_ID_HEVC;
default : return id;
......
......@@ -30,7 +30,7 @@
#define LIBAVCODEC_VERSION_MAJOR 55
#define LIBAVCODEC_VERSION_MINOR 55
#define LIBAVCODEC_VERSION_MICRO 101
#define LIBAVCODEC_VERSION_MICRO 102
#define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \
LIBAVCODEC_VERSION_MINOR, \
......
......@@ -103,9 +103,11 @@ static int read_header(AVFormatContext *s)
vst->duration =
p->nb_frames = avio_rl32(pb);
avio_skip(pb, 4);
vst->codec->width = avio_rl32(pb);
vst->codec->height = avio_rl32(pb);
avio_skip(pb, 4);
vst->codec->codec_type = AVMEDIA_TYPE_VIDEO;
vst->codec->codec_tag = 0;
vst->codec->codec_id = AV_CODEC_ID_PAF_VIDEO;
......@@ -143,9 +145,12 @@ static int read_header(AVFormatContext *s)
p->frame_blks > INT_MAX / sizeof(uint32_t))
return AVERROR_INVALIDDATA;
p->blocks_count_table = av_mallocz(p->nb_frames * sizeof(uint32_t));
p->frames_offset_table = av_mallocz(p->nb_frames * sizeof(uint32_t));
p->blocks_offset_table = av_mallocz(p->frame_blks * sizeof(uint32_t));
p->blocks_count_table = av_mallocz(p->nb_frames *
sizeof(*p->blocks_count_table));
p->frames_offset_table = av_mallocz(p->nb_frames *
sizeof(*p->frames_offset_table));
p->blocks_offset_table = av_mallocz(p->frame_blks *
sizeof(*p->blocks_offset_table));
p->video_size = p->max_video_blks * p->buffer_size;
p->video_frame = av_mallocz(p->video_size);
......@@ -209,7 +214,8 @@ static int read_packet(AVFormatContext *s, AVPacket *pkt)
return pkt->size;
}
count = (p->current_frame == 0) ? p->preload_count : p->blocks_count_table[p->current_frame - 1];
count = (p->current_frame == 0) ? p->preload_count
: p->blocks_count_table[p->current_frame - 1];
for (i = 0; i < count; i++) {
if (p->current_frame_block >= p->frame_blks)
return AVERROR_INVALIDDATA;
......
......@@ -31,7 +31,7 @@
#define LIBAVFORMAT_VERSION_MAJOR 55
#define LIBAVFORMAT_VERSION_MINOR 35
#define LIBAVFORMAT_VERSION_MICRO 101
#define LIBAVFORMAT_VERSION_MICRO 102
#define LIBAVFORMAT_VERSION_INT AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR, \
LIBAVFORMAT_VERSION_MINOR, \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment