Commit ea29f965 authored by Yusuke Nakamura's avatar Yusuke Nakamura Committed by Anton Khirnov

mov: Support HEVC demuxing

Signed-off-by: 's avatarAnton Khirnov <anton@khirnov.net>
parent 58466462
...@@ -42,7 +42,7 @@ version 10: ...@@ -42,7 +42,7 @@ version 10:
- F4V muxer - F4V muxer
- HNM version 4 demuxer and video decoder - HNM version 4 demuxer and video decoder
- HEVC decoder - HEVC decoder
- raw HEVC demuxer - raw HEVC, HEVC in MOV/MP4 demuxing
version 9: version 9:
......
...@@ -136,6 +136,9 @@ const AVCodecTag ff_codec_movvideo_tags[] = { ...@@ -136,6 +136,9 @@ const AVCodecTag ff_codec_movvideo_tags[] = {
{ AV_CODEC_ID_RAWVIDEO, MKTAG('W', 'R', 'A', 'W') }, { AV_CODEC_ID_RAWVIDEO, MKTAG('W', 'R', 'A', 'W') },
{ AV_CODEC_ID_HEVC, MKTAG('h', 'v', 'c', '1') }, /* HEVC/H.265 which indicates parameter sets shall not be in ES */
{ AV_CODEC_ID_HEVC, MKTAG('h', 'e', 'v', '1') }, /* HEVC/H.265 which indicates parameter sets may be in ES */
{ AV_CODEC_ID_H264, MKTAG('a', 'v', 'c', '1') }, /* AVC-1/H.264 */ { AV_CODEC_ID_H264, MKTAG('a', 'v', 'c', '1') }, /* AVC-1/H.264 */
{ AV_CODEC_ID_H264, MKTAG('a', 'i', '5', 'p') }, /* AVC-Intra 50M 720p24/30/60 */ { AV_CODEC_ID_H264, MKTAG('a', 'i', '5', 'p') }, /* AVC-Intra 50M 720p24/30/60 */
{ AV_CODEC_ID_H264, MKTAG('a', 'i', '5', 'q') }, /* AVC-Intra 50M 720p25/50 */ { AV_CODEC_ID_H264, MKTAG('a', 'i', '5', 'q') }, /* AVC-Intra 50M 720p25/50 */
......
...@@ -1396,6 +1396,8 @@ static int mov_skip_multiple_stsd(MOVContext *c, AVIOContext *pb, ...@@ -1396,6 +1396,8 @@ static int mov_skip_multiple_stsd(MOVContext *c, AVIOContext *pb,
if (codec_tag && if (codec_tag &&
(codec_tag == AV_RL32("avc1") || (codec_tag == AV_RL32("avc1") ||
codec_tag == AV_RL32("hvc1") ||
codec_tag == AV_RL32("hev1") ||
(codec_tag != format && (codec_tag != format &&
(c->fc->video_codec_id ? video_codec_id != c->fc->video_codec_id (c->fc->video_codec_id ? video_codec_id != c->fc->video_codec_id
: codec_tag != MKTAG('j','p','e','g'))))) { : codec_tag != MKTAG('j','p','e','g'))))) {
...@@ -1471,7 +1473,7 @@ int ff_mov_read_stsd_entries(MOVContext *c, AVIOContext *pb, int entries) ...@@ -1471,7 +1473,7 @@ int ff_mov_read_stsd_entries(MOVContext *c, AVIOContext *pb, int entries)
if (ret < 0) if (ret < 0)
return ret; return ret;
} }
/* this will read extra atoms at the end (wave, alac, damr, avcC, SMI ...) */ /* this will read extra atoms at the end (wave, alac, damr, avcC, hvcC, SMI ...) */
a.size = size - (avio_tell(pb) - start_pos); a.size = size - (avio_tell(pb) - start_pos);
if (a.size > 8) { if (a.size > 8) {
if ((ret = mov_read_default(c, pb, a)) < 0) if ((ret = mov_read_default(c, pb, a)) < 0)
...@@ -2604,6 +2606,7 @@ static const MOVParseTableEntry mov_default_parse_table[] = { ...@@ -2604,6 +2606,7 @@ static const MOVParseTableEntry mov_default_parse_table[] = {
{ MKTAG('c','h','a','n'), mov_read_chan }, /* channel layout */ { MKTAG('c','h','a','n'), mov_read_chan }, /* channel layout */
{ MKTAG('d','v','c','1'), mov_read_dvc1 }, { MKTAG('d','v','c','1'), mov_read_dvc1 },
{ MKTAG('s','b','g','p'), mov_read_sbgp }, { MKTAG('s','b','g','p'), mov_read_sbgp },
{ MKTAG('h','v','c','C'), mov_read_glbl },
{ 0, NULL } { 0, NULL }
}; };
......
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
#define LIBAVFORMAT_VERSION_MAJOR 55 #define LIBAVFORMAT_VERSION_MAJOR 55
#define LIBAVFORMAT_VERSION_MINOR 9 #define LIBAVFORMAT_VERSION_MINOR 9
#define LIBAVFORMAT_VERSION_MICRO 0 #define LIBAVFORMAT_VERSION_MICRO 1
#define LIBAVFORMAT_VERSION_INT AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR, \ #define LIBAVFORMAT_VERSION_INT AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR, \
LIBAVFORMAT_VERSION_MINOR, \ 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