forked from pool/libquicktime
- Update to version 1.2.4+git20180207.666c35c:
* remove generated file that got committed somehow * cleanup - remove all the .cvsignore files * remove another .cvsignore file * remove typo * add a bunch more generated files to ignore * more files added * add more files * switch to .gitignore from .cvsignore * remove m4/avcodec.m4, not needed with changes to configure.ac * don't need avcodec.m4 with changes to configure.ac - Remove merged patches: * libquicktime-1.2.4-integer_overflow.patch * libquicktime-1.2.4-multiple_vulnerabilities.patch - Remove all local patches: * libquicktime-faad2.patch * libquicktime-1.2.4-ffmpeg2.patch * libquicktime-1.2.4-ffmpeg29.patch * libquicktime-1.2.4-ffmpeg4.patch - Readd patches to be rebased from the git: * 0001-Fix-sizeof-call-in-faad2.patch * 0002-Allow-any-avcodec-to-be-detected-by-configure.patch * 0003-Fix-AVCODEC_HEADER-macro-replacement.patch * 0004-Ignore-prepared-patches-in-git-checkout.patch * 0005-ffmpeg4-conversion-fixing-the-erroring-ones-only.patch - Switch to Git snapshots as upstream moved to git, use _service - Remove redone patch: * libquicktime-ffmpeg3.patch OBS-URL: https://build.opensuse.org/package/show/multimedia:libs/libquicktime?expand=0&rev=84
This commit is contained in:
committed by
Git OBS Bridge
parent
6226cecbc8
commit
e93eddf4dc
25
0001-Fix-sizeof-call-in-faad2.patch
Normal file
25
0001-Fix-sizeof-call-in-faad2.patch
Normal file
@@ -0,0 +1,25 @@
|
||||
From 2768c84a6abc3d59189fa3fc2de38426fd148bf3 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= <tchvatal@suse.com>
|
||||
Date: Wed, 13 Jun 2018 11:11:26 +0200
|
||||
Subject: [PATCH 1/5] Fix sizeof call in faad2
|
||||
|
||||
---
|
||||
plugins/faad2/faad2.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/plugins/faad2/faad2.c b/plugins/faad2/faad2.c
|
||||
index 07cbcc8..ab3d66f 100644
|
||||
--- a/plugins/faad2/faad2.c
|
||||
+++ b/plugins/faad2/faad2.c
|
||||
@@ -155,7 +155,7 @@ static int decode_packet_faad2(quicktime_t * file, int track, lqt_audio_buffer_t
|
||||
if(!quicktime_trak_read_packet(file, atrack->track, &codec->pkt))
|
||||
return 0;
|
||||
|
||||
- memset(&codec->frame_info, 0, sizeof(&codec->frame_info));
|
||||
+ memset(&codec->frame_info, 0, sizeof(codec->frame_info));
|
||||
|
||||
codec->samples = faacDecDecode(codec->dec, &codec->frame_info,
|
||||
codec->pkt.data, codec->pkt.data_len);
|
||||
--
|
||||
2.17.1
|
||||
|
30
0002-Allow-any-avcodec-to-be-detected-by-configure.patch
Normal file
30
0002-Allow-any-avcodec-to-be-detected-by-configure.patch
Normal file
@@ -0,0 +1,30 @@
|
||||
From b56b368223216af236f818fbe0924f41b7934577 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= <tchvatal@suse.com>
|
||||
Date: Wed, 13 Jun 2018 11:13:53 +0200
|
||||
Subject: [PATCH 2/5] Allow any avcodec to be detected by configure
|
||||
|
||||
---
|
||||
configure.ac | 4 +---
|
||||
1 file changed, 1 insertion(+), 3 deletions(-)
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 85dda8f..0ee1166 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -561,12 +561,10 @@ AH_TEMPLATE([HAVE_LIBAVCODEC],
|
||||
|
||||
have_libavcodec=false
|
||||
|
||||
-dnl Require libavcodec less than 56.0.0
|
||||
-
|
||||
AC_ARG_WITH([ffmpeg], AS_HELP_STRING([--without-ffmpeg], [Build without ffmpeg library (default: test)]))
|
||||
|
||||
if test "x$with_ffmpeg" != "xno"; then
|
||||
-PKG_CHECK_MODULES(LIBAVCODEC, [libavcodec < 56.0.0], have_libavcodec="true", have_libavcodec="false")
|
||||
+PKG_CHECK_MODULES(LIBAVCODEC, [libavcodec], have_libavcodec="true", have_libavcodec="false")
|
||||
fi
|
||||
|
||||
AM_CONDITIONAL(HAVE_LIBAVCODEC, test x$have_libavcodec = xtrue)
|
||||
--
|
||||
2.17.1
|
||||
|
25
0003-Fix-AVCODEC_HEADER-macro-replacement.patch
Normal file
25
0003-Fix-AVCODEC_HEADER-macro-replacement.patch
Normal file
@@ -0,0 +1,25 @@
|
||||
From 51faccd7a1810ba3413d052cecf48834a7edd696 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= <tchvatal@suse.com>
|
||||
Date: Wed, 13 Jun 2018 11:28:02 +0200
|
||||
Subject: [PATCH 3/5] Fix AVCODEC_HEADER macro replacement
|
||||
|
||||
---
|
||||
plugins/ffmpeg/ffmpeg.h | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/plugins/ffmpeg/ffmpeg.h b/plugins/ffmpeg/ffmpeg.h
|
||||
index 346abfc..7bff3d8 100644
|
||||
--- a/plugins/ffmpeg/ffmpeg.h
|
||||
+++ b/plugins/ffmpeg/ffmpeg.h
|
||||
@@ -26,7 +26,7 @@
|
||||
#define QUICKTIME_FFMPEG_H
|
||||
|
||||
#include <quicktime/qtprivate.h>
|
||||
-#include AVCODEC_HEADER
|
||||
+#include <libavcodec/avcodec.h>
|
||||
|
||||
void quicktime_init_video_codec_ffmpeg(quicktime_codec_t * codec,
|
||||
quicktime_video_map_t *vtrack,
|
||||
--
|
||||
2.17.1
|
||||
|
24
0004-Ignore-prepared-patches-in-git-checkout.patch
Normal file
24
0004-Ignore-prepared-patches-in-git-checkout.patch
Normal file
@@ -0,0 +1,24 @@
|
||||
From a6739e3baa2c1da8446b6cc507125e3bfd191ff8 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= <tchvatal@suse.com>
|
||||
Date: Wed, 13 Jun 2018 11:28:42 +0200
|
||||
Subject: [PATCH 4/5] Ignore prepared patches in git checkout
|
||||
|
||||
---
|
||||
.gitignore | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/.gitignore b/.gitignore
|
||||
index c87cbe6..10d7cfd 100644
|
||||
--- a/.gitignore
|
||||
+++ b/.gitignore
|
||||
@@ -4,6 +4,7 @@
|
||||
*.in
|
||||
*.lo
|
||||
*.la
|
||||
+*.patch
|
||||
.deps
|
||||
.libs
|
||||
*~
|
||||
--
|
||||
2.17.1
|
||||
|
305
0005-ffmpeg4-conversion-fixing-the-erroring-ones-only.patch
Normal file
305
0005-ffmpeg4-conversion-fixing-the-erroring-ones-only.patch
Normal file
@@ -0,0 +1,305 @@
|
||||
From 545a2968caaa67b4062bf65fbb83539c3731294e Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= <tchvatal@suse.com>
|
||||
Date: Wed, 13 Jun 2018 11:21:48 +0200
|
||||
Subject: [PATCH 5/5] ffmpeg4 conversion fixing the erroring ones only
|
||||
|
||||
There are still quite few deprecated reports
|
||||
---
|
||||
plugins/ffmpeg/params.c | 72 ++++++++++++++---------------------------
|
||||
plugins/ffmpeg/params.h | 2 +-
|
||||
plugins/ffmpeg/video.c | 33 +++++++++----------
|
||||
3 files changed, 41 insertions(+), 66 deletions(-)
|
||||
|
||||
diff --git a/plugins/ffmpeg/params.c b/plugins/ffmpeg/params.c
|
||||
index a597d3e..6743390 100644
|
||||
--- a/plugins/ffmpeg/params.c
|
||||
+++ b/plugins/ffmpeg/params.c
|
||||
@@ -124,16 +124,6 @@ typedef struct
|
||||
}
|
||||
|
||||
|
||||
-enum_t me_method[] =
|
||||
- {
|
||||
- { "Zero", ME_ZERO },
|
||||
- { "Phods", ME_PHODS },
|
||||
- { "Log", ME_LOG },
|
||||
- { "X1", ME_X1 },
|
||||
- { "Epzs", ME_EPZS },
|
||||
- { "Full", ME_FULL }
|
||||
- };
|
||||
-
|
||||
enum_t prediction_method[] =
|
||||
{
|
||||
{ "Left", FF_PRED_LEFT },
|
||||
@@ -163,15 +153,6 @@ enum_t mb_decision[] =
|
||||
{ "Rate distoration", FF_MB_DECISION_RD }
|
||||
};
|
||||
|
||||
-enum_t coder_type[] =
|
||||
- {
|
||||
- { "VLC", FF_CODER_TYPE_VLC },
|
||||
- { "Arithmetic", FF_CODER_TYPE_AC },
|
||||
- { "Raw", FF_CODER_TYPE_RAW },
|
||||
- { "RLE", FF_CODER_TYPE_RLE },
|
||||
- { "Deflate", FF_CODER_TYPE_DEFLATE },
|
||||
- };
|
||||
-
|
||||
#define PARAM_ENUM(name, var, arr) \
|
||||
if(!strcasecmp(key, name)) \
|
||||
{ \
|
||||
@@ -201,7 +182,7 @@ void lqt_ffmpeg_set_parameter(AVCodecContext * ctx,
|
||||
PARAM_INT_SCALE("ff_bit_rate_audio",bit_rate,1000);
|
||||
PARAM_INT_SCALE("ff_bit_rate_video",bit_rate,1000);
|
||||
PARAM_INT_SCALE("ff_bit_rate_tolerance",bit_rate_tolerance,1000);
|
||||
- PARAM_ENUM("ff_me_method",me_method,me_method);
|
||||
+ PARAM_DICT_INT("ff_me_method","motion-est");
|
||||
PARAM_INT("ff_gop_size",gop_size);
|
||||
PARAM_FLOAT("ff_qcompress",qcompress);
|
||||
PARAM_FLOAT("ff_qblur",qblur);
|
||||
@@ -225,10 +206,9 @@ void lqt_ffmpeg_set_parameter(AVCodecContext * ctx,
|
||||
PARAM_INT("ff_rc_min_rate",rc_min_rate);
|
||||
PARAM_INT("ff_rc_max_rate",rc_max_rate);
|
||||
PARAM_INT_SCALE("ff_rc_buffer_size",rc_buffer_size,1000);
|
||||
- PARAM_FLOAT("ff_rc_buffer_aggressivity",rc_buffer_aggressivity);
|
||||
PARAM_FLOAT("ff_i_quant_factor",i_quant_factor);
|
||||
PARAM_QP2LAMBDA("ff_i_quant_offset",i_quant_offset);
|
||||
- PARAM_FLOAT("ff_rc_initial_cplx",rc_initial_cplx);
|
||||
+ PARAM_DICT_INT("ff_rc_initial_cplx","rc_init_cplx");
|
||||
PARAM_FLOAT("ff_lumi_masking",lumi_masking);
|
||||
PARAM_FLOAT("ff_temporal_cplx_masking",temporal_cplx_masking);
|
||||
PARAM_FLOAT("ff_spatial_cplx_masking",spatial_cplx_masking);
|
||||
@@ -253,8 +233,8 @@ void lqt_ffmpeg_set_parameter(AVCodecContext * ctx,
|
||||
PARAM_INT("ff_me_range",me_range);
|
||||
PARAM_ENUM("ff_mb_decision",mb_decision,mb_decision);
|
||||
PARAM_INT("ff_scenechange_threshold",scenechange_threshold);
|
||||
- PARAM_QP2LAMBDA("ff_lmin", lmin);
|
||||
- PARAM_QP2LAMBDA("ff_lmax", lmax);
|
||||
+ PARAM_DICT_INT("ff_lmin", "lmin");
|
||||
+ PARAM_DICT_INT("ff_lmax", "lmax");
|
||||
PARAM_INT("ff_noise_reduction",noise_reduction);
|
||||
PARAM_INT_SCALE("ff_rc_initial_buffer_occupancy",rc_initial_buffer_occupancy,1000);
|
||||
|
||||
@@ -267,29 +247,25 @@ void lqt_ffmpeg_set_parameter(AVCodecContext * ctx,
|
||||
#endif
|
||||
|
||||
PARAM_INT("ff_thread_count",thread_count);
|
||||
- PARAM_INT("ff_me_threshold",me_threshold);
|
||||
- PARAM_INT("ff_mb_threshold",mb_threshold);
|
||||
PARAM_INT("ff_nsse_weight",nsse_weight);
|
||||
- PARAM_FLOAT("ff_border_masking",border_masking);
|
||||
+ PARAM_DICT_INT("ff_border_masking","border_mask");
|
||||
PARAM_QP2LAMBDA("ff_mb_lmin", mb_lmin);
|
||||
PARAM_QP2LAMBDA("ff_mb_lmax", mb_lmax);
|
||||
PARAM_INT("ff_me_penalty_compensation",me_penalty_compensation);
|
||||
PARAM_INT("ff_bidir_refine",bidir_refine);
|
||||
PARAM_INT("ff_brd_scale",brd_scale);
|
||||
- PARAM_INT("ff_scenechange_factor",scenechange_factor);
|
||||
- PARAM_FLAG("ff_flag_qscale",CODEC_FLAG_QSCALE);
|
||||
- PARAM_FLAG("ff_flag_4mv",CODEC_FLAG_4MV);
|
||||
- PARAM_FLAG("ff_flag_qpel",CODEC_FLAG_QPEL);
|
||||
- PARAM_FLAG("ff_flag_gmc",CODEC_FLAG_GMC);
|
||||
- PARAM_FLAG("ff_flag_mv0",CODEC_FLAG_MV0);
|
||||
+ PARAM_FLAG("ff_flag_qscale",AV_CODEC_FLAG_QSCALE);
|
||||
+ PARAM_FLAG("ff_flag_4mv",AV_CODEC_FLAG_4MV);
|
||||
+ PARAM_FLAG("ff_flag_qpel",AV_CODEC_FLAG_QPEL);
|
||||
+ PARAM_DICT_FLAG("ff_flag_gmc","gmc");
|
||||
+ PARAM_DICT_FLAG("ff_flag_mv0","mpv_flags");
|
||||
// PARAM_FLAG("ff_flag_part",CODEC_FLAG_PART); // Unused
|
||||
- PARAM_FLAG("ff_flag_gray",CODEC_FLAG_GRAY);
|
||||
- PARAM_FLAG("ff_flag_emu_edge",CODEC_FLAG_EMU_EDGE);
|
||||
- PARAM_FLAG("ff_flag_normalize_aqp",CODEC_FLAG_NORMALIZE_AQP);
|
||||
+ PARAM_FLAG("ff_flag_gray",AV_CODEC_FLAG_GRAY);
|
||||
+ PARAM_DICT_FLAG("ff_flag_normalize_aqp","naq");
|
||||
// PARAM_FLAG("ff_flag_alt_scan",CODEC_FLAG_ALT_SCAN); // Unused
|
||||
PARAM_INT("ff_trellis",trellis);
|
||||
- PARAM_FLAG("ff_flag_bitexact",CODEC_FLAG_BITEXACT);
|
||||
- PARAM_FLAG("ff_flag_ac_pred",CODEC_FLAG_AC_PRED);
|
||||
+ PARAM_FLAG("ff_flag_bitexact",AV_CODEC_FLAG_BITEXACT);
|
||||
+ PARAM_FLAG("ff_flag_ac_pred",AV_CODEC_FLAG_AC_PRED);
|
||||
// PARAM_FLAG("ff_flag_h263p_umv",CODEC_FLAG_H263P_UMV); // Unused
|
||||
|
||||
#if LIBAVCODEC_VERSION_MAJOR >= 55
|
||||
@@ -297,9 +273,9 @@ void lqt_ffmpeg_set_parameter(AVCodecContext * ctx,
|
||||
PARAM_DICT_FLAG("ff_flag_qp_rd","qp_rd");
|
||||
PARAM_DICT_FLAG("ff_flag2_strict_gop","strict_gop");
|
||||
#else
|
||||
- PARAM_FLAG("ff_flag_cbp_rd",CODEC_FLAG_CBP_RD);
|
||||
- PARAM_FLAG("ff_flag_qp_rd",CODEC_FLAG_QP_RD);
|
||||
- PARAM_FLAG2("ff_flag2_strict_gop",CODEC_FLAG2_STRICT_GOP);
|
||||
+ PARAM_FLAG("ff_flag_cbp_rd",AV_CODEC_FLAG_CBP_RD);
|
||||
+ PARAM_FLAG("ff_flag_qp_rd",AV_CODEC_FLAG_QP_RD);
|
||||
+ PARAM_FLAG2("ff_flag2_strict_gop",AV_CODEC_FLAG2_STRICT_GOP);
|
||||
#endif
|
||||
|
||||
#if LIBAVCODEC_VERSION_MAJOR >= 54
|
||||
@@ -307,14 +283,14 @@ void lqt_ffmpeg_set_parameter(AVCodecContext * ctx,
|
||||
PARAM_DICT_FLAG("ff_flag_obmc","obmc");
|
||||
PARAM_DICT_FLAG("ff_flag_h263p_slice_struct","structured_slices");
|
||||
#else
|
||||
- PARAM_FLAG("ff_flag_h263p_aiv",CODEC_FLAG_H263P_AIV);
|
||||
- PARAM_FLAG("ff_flag_obmc",CODEC_FLAG_OBMC);
|
||||
- PARAM_FLAG("ff_flag_h263p_slice_struct",CODEC_FLAG_H263P_SLICE_STRUCT);
|
||||
+ PARAM_FLAG("ff_flag_h263p_aiv",AV_CODEC_FLAG_H263P_AIV);
|
||||
+ PARAM_FLAG("ff_flag_obmc",AV_CODEC_FLAG_OBMC);
|
||||
+ PARAM_FLAG("ff_flag_h263p_slice_struct",AV_CODEC_FLAG_H263P_SLICE_STRUCT);
|
||||
#endif
|
||||
|
||||
- PARAM_FLAG("ff_flag_loop_filter",CODEC_FLAG_LOOP_FILTER);
|
||||
- PARAM_FLAG("ff_flag_closed_gop",CODEC_FLAG_CLOSED_GOP);
|
||||
- PARAM_FLAG2("ff_flag2_fast",CODEC_FLAG2_FAST);
|
||||
- PARAM_ENUM("ff_coder_type",coder_type,coder_type);
|
||||
+ PARAM_FLAG("ff_flag_loop_filter",AV_CODEC_FLAG_LOOP_FILTER);
|
||||
+ PARAM_FLAG("ff_flag_closed_gop",AV_CODEC_FLAG_CLOSED_GOP);
|
||||
+ PARAM_FLAG2("ff_flag2_fast",AV_CODEC_FLAG2_FAST);
|
||||
+ PARAM_DICT_INT("ff_coder_type","coder");
|
||||
|
||||
}
|
||||
diff --git a/plugins/ffmpeg/params.h b/plugins/ffmpeg/params.h
|
||||
index 31388a5..78e1f3f 100644
|
||||
--- a/plugins/ffmpeg/params.h
|
||||
+++ b/plugins/ffmpeg/params.h
|
||||
@@ -149,7 +149,7 @@ the reference. Unused for constant quantizer encoding") \
|
||||
.type = LQT_PARAMETER_INT, \
|
||||
.val_default = { .val_int = 0 }, \
|
||||
.val_min = { .val_int = 0 }, \
|
||||
- .val_max = { .val_int = FF_MAX_B_FRAMES }, \
|
||||
+ .val_max = { .val_int = 16 }, \
|
||||
.help_string = TRS("Maximum number of B-frames between non B-frames") \
|
||||
}
|
||||
|
||||
diff --git a/plugins/ffmpeg/video.c b/plugins/ffmpeg/video.c
|
||||
index a2a8d56..61563aa 100644
|
||||
--- a/plugins/ffmpeg/video.c
|
||||
+++ b/plugins/ffmpeg/video.c
|
||||
@@ -833,7 +833,7 @@ static int lqt_ffmpeg_decode_video(quicktime_t *file, unsigned char **row_pointe
|
||||
if(extradata)
|
||||
{
|
||||
codec->extradata =
|
||||
- calloc(1, extradata_size + FF_INPUT_BUFFER_PADDING_SIZE);
|
||||
+ calloc(1, extradata_size + AV_INPUT_BUFFER_PADDING_SIZE);
|
||||
memcpy(codec->extradata, extradata, extradata_size);
|
||||
codec->avctx->extradata_size = extradata_size;
|
||||
codec->avctx->extradata = codec->extradata;
|
||||
@@ -1356,8 +1356,8 @@ static int init_imx_encoder(quicktime_t *file, int track)
|
||||
codec->avctx->qmin = 1;
|
||||
codec->avctx->qmax = codec->imx_bitrate == 30 ? 8 : 3;
|
||||
codec->avctx->rtp_payload_size = 1; // ??
|
||||
- codec->avctx->rc_buffer_aggressivity = 0.25;
|
||||
- codec->avctx->flags |= CODEC_FLAG_INTERLACED_DCT|CODEC_FLAG_LOW_DELAY;
|
||||
+ av_dict_set(&codec->options, "rc_buf_aggressivity", "0.25", 0);
|
||||
+ codec->avctx->flags |= AV_CODEC_FLAG_INTERLACED_DCT|AV_CODEC_FLAG_LOW_DELAY;
|
||||
|
||||
av_dict_set(&codec->options, "non_linear_quant", "1", 0);
|
||||
av_dict_set(&codec->options, "intra_vlc", "1", 0);
|
||||
@@ -1413,14 +1413,14 @@ static int init_xdcam_hd422_encoder(quicktime_t *file, int track)
|
||||
codec->avctx->intra_dc_precision = 2;
|
||||
codec->avctx->qmin = 1;
|
||||
codec->avctx->qmax = 12; // The maximum value compatible with non_linear_quant option.
|
||||
- codec->avctx->lmin = FF_QP2LAMBDA;
|
||||
+ codec->avctx->mb_lmin = FF_QP2LAMBDA;
|
||||
|
||||
// XDCAM is meant to use open GOPs. From time to time we might want to insert closed GOPs
|
||||
// like some other encoders do, but libavcodec only checks this flag once.
|
||||
- codec->avctx->flags &= ~CODEC_FLAG_CLOSED_GOP;
|
||||
+ codec->avctx->flags &= ~AV_CODEC_FLAG_CLOSED_GOP;
|
||||
|
||||
if(vtrack->interlace_mode != LQT_INTERLACE_NONE)
|
||||
- codec->avctx->flags |= CODEC_FLAG_INTERLACED_DCT|CODEC_FLAG_INTERLACED_ME;
|
||||
+ codec->avctx->flags |= AV_CODEC_FLAG_INTERLACED_DCT|AV_CODEC_FLAG_INTERLACED_ME;
|
||||
|
||||
av_dict_set(&codec->options, "non_linear_quant", "1", 0);
|
||||
av_dict_set(&codec->options, "intra_vlc", "1", 0);
|
||||
@@ -1450,7 +1450,7 @@ static int init_prores_encoder(quicktime_t *file, int track)
|
||||
int height = trak->tkhd.track_height;
|
||||
|
||||
if(vtrack->interlace_mode != LQT_INTERLACE_NONE)
|
||||
- codec->avctx->flags |= CODEC_FLAG_INTERLACED_DCT;
|
||||
+ codec->avctx->flags |= AV_CODEC_FLAG_INTERLACED_DCT;
|
||||
|
||||
// Color parameters go into ProRes bitstream.
|
||||
if (trak->mdia.minf.stbl.stsd.table->has_colr)
|
||||
@@ -1646,7 +1646,7 @@ static int lqt_ffmpeg_encode_video(quicktime_t *file,
|
||||
default:;
|
||||
}
|
||||
|
||||
- if(codec->avctx->flags & CODEC_FLAG_QSCALE)
|
||||
+ if(codec->avctx->flags & AV_CODEC_FLAG_QSCALE)
|
||||
codec->avctx->global_quality = codec->qscale;
|
||||
|
||||
codec->avctx->width = width;
|
||||
@@ -1665,7 +1665,7 @@ static int lqt_ffmpeg_encode_video(quicktime_t *file,
|
||||
{
|
||||
if(!(file->file_type & (LQT_FILE_AVI|LQT_FILE_AVI_ODML)))
|
||||
{
|
||||
- codec->avctx->flags |= CODEC_FLAG_GLOBAL_HEADER;
|
||||
+ codec->avctx->flags |= AV_CODEC_FLAG_GLOBAL_HEADER;
|
||||
codec->write_global_header = 1;
|
||||
}
|
||||
|
||||
@@ -1681,7 +1681,7 @@ static int lqt_ffmpeg_encode_video(quicktime_t *file,
|
||||
{
|
||||
lqt_log(file, LQT_LOG_INFO, LOG_DOMAIN, "Enabling interlaced encoding");
|
||||
codec->avctx->flags |=
|
||||
- (CODEC_FLAG_INTERLACED_DCT|CODEC_FLAG_INTERLACED_ME|CODEC_FLAG_ALT_SCAN);
|
||||
+ (AV_CODEC_FLAG_INTERLACED_DCT|AV_CODEC_FLAG_INTERLACED_ME|AV_CODEC_FLAG_ALT_SCAN);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
@@ -1708,7 +1708,7 @@ static int lqt_ffmpeg_encode_video(quicktime_t *file,
|
||||
{
|
||||
if(!(file->file_type & (LQT_FILE_AVI|LQT_FILE_AVI_ODML)))
|
||||
{
|
||||
- codec->avctx->flags |= CODEC_FLAG_GLOBAL_HEADER;
|
||||
+ codec->avctx->flags |= AV_CODEC_FLAG_GLOBAL_HEADER;
|
||||
codec->write_global_header = 1;
|
||||
}
|
||||
}
|
||||
@@ -1731,7 +1731,7 @@ static int lqt_ffmpeg_encode_video(quicktime_t *file,
|
||||
{
|
||||
if(vtrack->interlace_mode != LQT_INTERLACE_NONE)
|
||||
{
|
||||
- codec->avctx->flags |= CODEC_FLAG_INTERLACED_DCT;
|
||||
+ codec->avctx->flags |= AV_CODEC_FLAG_INTERLACED_DCT;
|
||||
}
|
||||
}
|
||||
else if(codec->is_imx)
|
||||
@@ -1747,7 +1747,7 @@ static int lqt_ffmpeg_encode_video(quicktime_t *file,
|
||||
if(codec->pass == 1)
|
||||
{
|
||||
codec->stats_file = fopen(codec->stats_filename, "w");
|
||||
- codec->avctx->flags |= CODEC_FLAG_PASS1;
|
||||
+ codec->avctx->flags |= AV_CODEC_FLAG_PASS1;
|
||||
}
|
||||
else if(codec->pass == codec->total_passes)
|
||||
{
|
||||
@@ -1763,7 +1763,7 @@ static int lqt_ffmpeg_encode_video(quicktime_t *file,
|
||||
fclose(codec->stats_file);
|
||||
codec->stats_file = (FILE*)0;
|
||||
|
||||
- codec->avctx->flags |= CODEC_FLAG_PASS2;
|
||||
+ codec->avctx->flags |= AV_CODEC_FLAG_PASS2;
|
||||
}
|
||||
}
|
||||
/* Open codec */
|
||||
@@ -1829,7 +1829,7 @@ static int lqt_ffmpeg_encode_video(quicktime_t *file,
|
||||
}
|
||||
|
||||
codec->frame->pts = vtrack->timestamp / codec->encoding_pts_factor;
|
||||
- if(codec->avctx->flags & CODEC_FLAG_QSCALE)
|
||||
+ if(codec->avctx->flags & AV_CODEC_FLAG_QSCALE)
|
||||
codec->frame->quality = codec->qscale;
|
||||
#if 1
|
||||
if(vtrack->interlace_mode != LQT_INTERLACE_NONE)
|
||||
@@ -1906,8 +1906,7 @@ static int lqt_ffmpeg_encode_video(quicktime_t *file,
|
||||
else if(codec->encoder->id == AV_CODEC_ID_MPEG4)
|
||||
{
|
||||
int advanced = 0;
|
||||
- if(codec->avctx->max_b_frames ||
|
||||
- (codec->avctx->flags & (CODEC_FLAG_QPEL|CODEC_FLAG_GMC)))
|
||||
+ if(codec->avctx->max_b_frames)
|
||||
advanced = 1;
|
||||
|
||||
setup_header_mpeg4(file, track, codec->avctx->extradata,
|
||||
--
|
||||
2.17.1
|
||||
|
339
COPYING
339
COPYING
@@ -1,339 +0,0 @@
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 2, June 1991
|
||||
|
||||
Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
License is intended to guarantee your freedom to share and change free
|
||||
software--to make sure the software is free for all its users. This
|
||||
General Public License applies to most of the Free Software
|
||||
Foundation's software and to any other program whose authors commit to
|
||||
using it. (Some other Free Software Foundation software is covered by
|
||||
the GNU Lesser General Public License instead.) You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
this service if you wish), that you receive source code or can get it
|
||||
if you want it, that you can change the software or use pieces of it
|
||||
in new free programs; and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid
|
||||
anyone to deny you these rights or to ask you to surrender the rights.
|
||||
These restrictions translate to certain responsibilities for you if you
|
||||
distribute copies of the software, or if you modify it.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must give the recipients all the rights that
|
||||
you have. You must make sure that they, too, receive or can get the
|
||||
source code. And you must show them these terms so they know their
|
||||
rights.
|
||||
|
||||
We protect your rights with two steps: (1) copyright the software, and
|
||||
(2) offer you this license which gives you legal permission to copy,
|
||||
distribute and/or modify the software.
|
||||
|
||||
Also, for each author's protection and ours, we want to make certain
|
||||
that everyone understands that there is no warranty for this free
|
||||
software. If the software is modified by someone else and passed on, we
|
||||
want its recipients to know that what they have is not the original, so
|
||||
that any problems introduced by others will not reflect on the original
|
||||
authors' reputations.
|
||||
|
||||
Finally, any free program is threatened constantly by software
|
||||
patents. We wish to avoid the danger that redistributors of a free
|
||||
program will individually obtain patent licenses, in effect making the
|
||||
program proprietary. To prevent this, we have made it clear that any
|
||||
patent must be licensed for everyone's free use or not licensed at all.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License applies to any program or other work which contains
|
||||
a notice placed by the copyright holder saying it may be distributed
|
||||
under the terms of this General Public License. The "Program", below,
|
||||
refers to any such program or work, and a "work based on the Program"
|
||||
means either the Program or any derivative work under copyright law:
|
||||
that is to say, a work containing the Program or a portion of it,
|
||||
either verbatim or with modifications and/or translated into another
|
||||
language. (Hereinafter, translation is included without limitation in
|
||||
the term "modification".) Each licensee is addressed as "you".
|
||||
|
||||
Activities other than copying, distribution and modification are not
|
||||
covered by this License; they are outside its scope. The act of
|
||||
running the Program is not restricted, and the output from the Program
|
||||
is covered only if its contents constitute a work based on the
|
||||
Program (independent of having been made by running the Program).
|
||||
Whether that is true depends on what the Program does.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Program's
|
||||
source code as you receive it, in any medium, provided that you
|
||||
conspicuously and appropriately publish on each copy an appropriate
|
||||
copyright notice and disclaimer of warranty; keep intact all the
|
||||
notices that refer to this License and to the absence of any warranty;
|
||||
and give any other recipients of the Program a copy of this License
|
||||
along with the Program.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy, and
|
||||
you may at your option offer warranty protection in exchange for a fee.
|
||||
|
||||
2. You may modify your copy or copies of the Program or any portion
|
||||
of it, thus forming a work based on the Program, and copy and
|
||||
distribute such modifications or work under the terms of Section 1
|
||||
above, provided that you also meet all of these conditions:
|
||||
|
||||
a) You must cause the modified files to carry prominent notices
|
||||
stating that you changed the files and the date of any change.
|
||||
|
||||
b) You must cause any work that you distribute or publish, that in
|
||||
whole or in part contains or is derived from the Program or any
|
||||
part thereof, to be licensed as a whole at no charge to all third
|
||||
parties under the terms of this License.
|
||||
|
||||
c) If the modified program normally reads commands interactively
|
||||
when run, you must cause it, when started running for such
|
||||
interactive use in the most ordinary way, to print or display an
|
||||
announcement including an appropriate copyright notice and a
|
||||
notice that there is no warranty (or else, saying that you provide
|
||||
a warranty) and that users may redistribute the program under
|
||||
these conditions, and telling the user how to view a copy of this
|
||||
License. (Exception: if the Program itself is interactive but
|
||||
does not normally print such an announcement, your work based on
|
||||
the Program is not required to print an announcement.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Program,
|
||||
and can be reasonably considered independent and separate works in
|
||||
themselves, then this License, and its terms, do not apply to those
|
||||
sections when you distribute them as separate works. But when you
|
||||
distribute the same sections as part of a whole which is a work based
|
||||
on the Program, the distribution of the whole must be on the terms of
|
||||
this License, whose permissions for other licensees extend to the
|
||||
entire whole, and thus to each and every part regardless of who wrote it.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest
|
||||
your rights to work written entirely by you; rather, the intent is to
|
||||
exercise the right to control the distribution of derivative or
|
||||
collective works based on the Program.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Program
|
||||
with the Program (or with a work based on the Program) on a volume of
|
||||
a storage or distribution medium does not bring the other work under
|
||||
the scope of this License.
|
||||
|
||||
3. You may copy and distribute the Program (or a work based on it,
|
||||
under Section 2) in object code or executable form under the terms of
|
||||
Sections 1 and 2 above provided that you also do one of the following:
|
||||
|
||||
a) Accompany it with the complete corresponding machine-readable
|
||||
source code, which must be distributed under the terms of Sections
|
||||
1 and 2 above on a medium customarily used for software interchange; or,
|
||||
|
||||
b) Accompany it with a written offer, valid for at least three
|
||||
years, to give any third party, for a charge no more than your
|
||||
cost of physically performing source distribution, a complete
|
||||
machine-readable copy of the corresponding source code, to be
|
||||
distributed under the terms of Sections 1 and 2 above on a medium
|
||||
customarily used for software interchange; or,
|
||||
|
||||
c) Accompany it with the information you received as to the offer
|
||||
to distribute corresponding source code. (This alternative is
|
||||
allowed only for noncommercial distribution and only if you
|
||||
received the program in object code or executable form with such
|
||||
an offer, in accord with Subsection b above.)
|
||||
|
||||
The source code for a work means the preferred form of the work for
|
||||
making modifications to it. For an executable work, complete source
|
||||
code means all the source code for all modules it contains, plus any
|
||||
associated interface definition files, plus the scripts used to
|
||||
control compilation and installation of the executable. However, as a
|
||||
special exception, the source code distributed need not include
|
||||
anything that is normally distributed (in either source or binary
|
||||
form) with the major components (compiler, kernel, and so on) of the
|
||||
operating system on which the executable runs, unless that component
|
||||
itself accompanies the executable.
|
||||
|
||||
If distribution of executable or object code is made by offering
|
||||
access to copy from a designated place, then offering equivalent
|
||||
access to copy the source code from the same place counts as
|
||||
distribution of the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
|
||||
4. You may not copy, modify, sublicense, or distribute the Program
|
||||
except as expressly provided under this License. Any attempt
|
||||
otherwise to copy, modify, sublicense or distribute the Program is
|
||||
void, and will automatically terminate your rights under this License.
|
||||
However, parties who have received copies, or rights, from you under
|
||||
this License will not have their licenses terminated so long as such
|
||||
parties remain in full compliance.
|
||||
|
||||
5. You are not required to accept this License, since you have not
|
||||
signed it. However, nothing else grants you permission to modify or
|
||||
distribute the Program or its derivative works. These actions are
|
||||
prohibited by law if you do not accept this License. Therefore, by
|
||||
modifying or distributing the Program (or any work based on the
|
||||
Program), you indicate your acceptance of this License to do so, and
|
||||
all its terms and conditions for copying, distributing or modifying
|
||||
the Program or works based on it.
|
||||
|
||||
6. Each time you redistribute the Program (or any work based on the
|
||||
Program), the recipient automatically receives a license from the
|
||||
original licensor to copy, distribute or modify the Program subject to
|
||||
these terms and conditions. You may not impose any further
|
||||
restrictions on the recipients' exercise of the rights granted herein.
|
||||
You are not responsible for enforcing compliance by third parties to
|
||||
this License.
|
||||
|
||||
7. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues),
|
||||
conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot
|
||||
distribute so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you
|
||||
may not distribute the Program at all. For example, if a patent
|
||||
license would not permit royalty-free redistribution of the Program by
|
||||
all those who receive copies directly or indirectly through you, then
|
||||
the only way you could satisfy both it and this License would be to
|
||||
refrain entirely from distribution of the Program.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under
|
||||
any particular circumstance, the balance of the section is intended to
|
||||
apply and the section as a whole is intended to apply in other
|
||||
circumstances.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any
|
||||
patents or other property right claims or to contest validity of any
|
||||
such claims; this section has the sole purpose of protecting the
|
||||
integrity of the free software distribution system, which is
|
||||
implemented by public license practices. Many people have made
|
||||
generous contributions to the wide range of software distributed
|
||||
through that system in reliance on consistent application of that
|
||||
system; it is up to the author/donor to decide if he or she is willing
|
||||
to distribute software through any other system and a licensee cannot
|
||||
impose that choice.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to
|
||||
be a consequence of the rest of this License.
|
||||
|
||||
8. If the distribution and/or use of the Program is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Program under this License
|
||||
may add an explicit geographical distribution limitation excluding
|
||||
those countries, so that distribution is permitted only in or among
|
||||
countries not thus excluded. In such case, this License incorporates
|
||||
the limitation as if written in the body of this License.
|
||||
|
||||
9. The Free Software Foundation may publish revised and/or new versions
|
||||
of the General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Program
|
||||
specifies a version number of this License which applies to it and "any
|
||||
later version", you have the option of following the terms and conditions
|
||||
either of that version or of any later version published by the Free
|
||||
Software Foundation. If the Program does not specify a version number of
|
||||
this License, you may choose any version ever published by the Free Software
|
||||
Foundation.
|
||||
|
||||
10. If you wish to incorporate parts of the Program into other free
|
||||
programs whose distribution conditions are different, write to the author
|
||||
to ask for permission. For software which is copyrighted by the Free
|
||||
Software Foundation, write to the Free Software Foundation; we sometimes
|
||||
make exceptions for this. Our decision will be guided by the two goals
|
||||
of preserving the free status of all derivatives of our free software and
|
||||
of promoting the sharing and reuse of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
|
||||
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
||||
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
||||
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
|
||||
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
|
||||
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
|
||||
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
|
||||
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
|
||||
REPAIR OR CORRECTION.
|
||||
|
||||
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
|
||||
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
|
||||
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
|
||||
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
|
||||
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
|
||||
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
convey the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License along
|
||||
with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program is interactive, make it output a short notice like this
|
||||
when it starts in an interactive mode:
|
||||
|
||||
Gnomovision version 69, Copyright (C) year name of author
|
||||
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, the commands you use may
|
||||
be called something other than `show w' and `show c'; they could even be
|
||||
mouse-clicks or menu items--whatever suits your program.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or your
|
||||
school, if any, to sign a "copyright disclaimer" for the program, if
|
||||
necessary. Here is a sample; alter the names:
|
||||
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
|
||||
`Gnomovision' (which makes passes at compilers) written by James Hacker.
|
||||
|
||||
<signature of Ty Coon>, 1 April 1989
|
||||
Ty Coon, President of Vice
|
||||
|
||||
This General Public License does not permit incorporating your program into
|
||||
proprietary programs. If your program is a subroutine library, you may
|
||||
consider it more useful to permit linking proprietary applications with the
|
||||
library. If this is what you want to do, use the GNU Lesser General
|
||||
Public License instead of this License.
|
16
_service
Normal file
16
_service
Normal file
@@ -0,0 +1,16 @@
|
||||
<services>
|
||||
<service name="tar_scm" mode="disabled">
|
||||
<param name="version">1.2.4</param>
|
||||
<param name="versionformat">1.2.4+git%cd.%h</param>
|
||||
<param name="url">https://git.code.sf.net/p/libquicktime/git</param>
|
||||
<param name="scm">git</param>
|
||||
<param name="exclude">.git</param>
|
||||
<param name="changesgenerate">enable</param>
|
||||
<param name="filename">libquicktime</param>
|
||||
</service>
|
||||
<service name="recompress" mode="disabled">
|
||||
<param name="compression">xz</param>
|
||||
<param name="file">*.tar</param>
|
||||
</service>
|
||||
<service name="set_version" mode="disabled"/>
|
||||
</services>
|
3
libquicktime-1.2.4+git20180207.666c35c.tar.xz
Normal file
3
libquicktime-1.2.4+git20180207.666c35c.tar.xz
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:521f97e88c9234271c66dbb4aa12f95fa35fd720b6d2851f6011d885f7b67dd0
|
||||
size 425244
|
@@ -1,22 +0,0 @@
|
||||
Index: libquicktime/src/util.c
|
||||
===================================================================
|
||||
--- libquicktime.orig/src/util.c
|
||||
+++ libquicktime/src/util.c
|
||||
@@ -376,9 +376,14 @@ int64_t quicktime_byte_position(quicktim
|
||||
|
||||
void quicktime_read_pascal(quicktime_t *file, char *data)
|
||||
{
|
||||
- char len = quicktime_read_char(file);
|
||||
- quicktime_read_data(file, (uint8_t*)data, len);
|
||||
- data[(int)len] = 0;
|
||||
+ int len = quicktime_read_char(file);
|
||||
+ if ((len > 0) && (len < 256)) {
|
||||
+ /* data[] is expected to be 256 bytes long */
|
||||
+ quicktime_read_data(file, (uint8_t*)data, len);
|
||||
+ data[len] = 0;
|
||||
+ } else {
|
||||
+ data[0] = 0;
|
||||
+ }
|
||||
}
|
||||
|
||||
void quicktime_write_pascal(quicktime_t *file, char *data)
|
@@ -1,62 +0,0 @@
|
||||
Index: libquicktime/src/atom.c
|
||||
===================================================================
|
||||
--- libquicktime.orig/src/atom.c
|
||||
+++ libquicktime/src/atom.c
|
||||
@@ -131,6 +131,9 @@ int quicktime_atom_read_header(quicktime
|
||||
atom->size = read_size64(header);
|
||||
atom->end = atom->start + atom->size;
|
||||
}
|
||||
+/* Avoid broken files */
|
||||
+ if(atom->end > file->total_length)
|
||||
+ result = 1;
|
||||
}
|
||||
|
||||
|
||||
Index: libquicktime/src/lqt_quicktime.c
|
||||
===================================================================
|
||||
--- libquicktime.orig/src/lqt_quicktime.c
|
||||
+++ libquicktime/src/lqt_quicktime.c
|
||||
@@ -993,8 +993,8 @@ int quicktime_read_info(quicktime_t *fil
|
||||
quicktime_set_position(file, start_position);
|
||||
free(temp);
|
||||
|
||||
- quicktime_read_moov(file, &file->moov, &leaf_atom);
|
||||
- got_header = 1;
|
||||
+ if(!quicktime_read_moov(file, &file->moov, &leaf_atom))
|
||||
+ got_header = 1;
|
||||
}
|
||||
else
|
||||
if(((leaf_atom.type[0] | leaf_atom.type[1] | leaf_atom.type[2] | leaf_atom.type[3]) == 0) &&
|
||||
Index: libquicktime/src/moov.c
|
||||
===================================================================
|
||||
--- libquicktime.orig/src/moov.c
|
||||
+++ libquicktime/src/moov.c
|
||||
@@ -218,7 +218,8 @@ int quicktime_read_moov(quicktime_t *fil
|
||||
if(quicktime_atom_is(&leaf_atom, "trak"))
|
||||
{
|
||||
quicktime_trak_t *trak = quicktime_add_trak(file);
|
||||
- quicktime_read_trak(file, trak, &leaf_atom);
|
||||
+ if(quicktime_read_trak(file, trak, &leaf_atom))
|
||||
+ return 1;
|
||||
}
|
||||
else
|
||||
if(quicktime_atom_is(&leaf_atom, "udta"))
|
||||
Index: libquicktime/src/trak.c
|
||||
===================================================================
|
||||
--- libquicktime.orig/src/trak.c
|
||||
+++ libquicktime/src/trak.c
|
||||
@@ -272,6 +272,14 @@ int quicktime_read_trak(quicktime_t *fil
|
||||
else quicktime_atom_skip(file, &leaf_atom);
|
||||
} while(quicktime_position(file) < trak_atom->end);
|
||||
|
||||
+ /* Do some sanity checks to prevent later crashes */
|
||||
+ if(trak->mdia.minf.is_video || trak->mdia.minf.is_video)
|
||||
+ {
|
||||
+ if(!trak->mdia.minf.stbl.stsc.table ||
|
||||
+ !trak->mdia.minf.stbl.stco.table)
|
||||
+ return 1;
|
||||
+ }
|
||||
+
|
||||
#if 1
|
||||
if(trak->mdia.minf.is_video &&
|
||||
quicktime_match_32(trak->mdia.minf.stbl.stsd.table[0].format, "drac"))
|
@@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:9441ccba87112832212bb8ec23840a9e3cc6113dd8fdb9df984ace0aeaca7c6c
|
||||
size 639860
|
@@ -1,17 +0,0 @@
|
||||
---
|
||||
plugins/faad2/faad2.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
Index: libquicktime/plugins/faad2/faad2.c
|
||||
===================================================================
|
||||
--- libquicktime.orig/plugins/faad2/faad2.c
|
||||
+++ libquicktime/plugins/faad2/faad2.c
|
||||
@@ -155,7 +155,7 @@ static int decode_packet_faad2(quicktime
|
||||
if(!quicktime_trak_read_packet(file, atrack->track, &codec->pkt))
|
||||
return 0;
|
||||
|
||||
- memset(&codec->frame_info, 0, sizeof(&codec->frame_info));
|
||||
+ memset(&codec->frame_info, 0, sizeof(codec->frame_info));
|
||||
|
||||
codec->samples = faacDecDecode(codec->dec, &codec->frame_info,
|
||||
codec->pkt.data, codec->pkt.data_len);
|
@@ -1,923 +0,0 @@
|
||||
---
|
||||
plugins/ffmpeg/audio.c | 14 ++--
|
||||
plugins/ffmpeg/lqt_ffmpeg.c | 92 +++++++++++++-------------
|
||||
plugins/ffmpeg/video.c | 154 ++++++++++++++++++++++----------------------
|
||||
3 files changed, 130 insertions(+), 130 deletions(-)
|
||||
|
||||
Index: libquicktime/plugins/ffmpeg/audio.c
|
||||
===================================================================
|
||||
--- libquicktime.orig/plugins/ffmpeg/audio.c
|
||||
+++ libquicktime/plugins/ffmpeg/audio.c
|
||||
@@ -211,10 +211,10 @@ static void init_compression_info(quickt
|
||||
quicktime_audio_map_t *track_map = &file->atracks[track];
|
||||
quicktime_ffmpeg_audio_codec_t *codec = track_map->codec->priv;
|
||||
|
||||
- if((codec->decoder->id == CODEC_ID_MP2) ||
|
||||
- (codec->decoder->id == CODEC_ID_MP3))
|
||||
+ if((codec->decoder->id == AV_CODEC_ID_MP2) ||
|
||||
+ (codec->decoder->id == AV_CODEC_ID_MP3))
|
||||
read_packet_mpa(file, NULL, track);
|
||||
- else if(codec->decoder->id == CODEC_ID_AC3)
|
||||
+ else if(codec->decoder->id == AV_CODEC_ID_AC3)
|
||||
read_packet_ac3(file, NULL, track);
|
||||
}
|
||||
|
||||
@@ -291,7 +291,7 @@ static int decode_audio_packet_ffmpeg(qu
|
||||
codec->avctx->bits_per_coded_sample = quicktime_audio_bits(file, track);
|
||||
/* Some codecs need extra stuff */
|
||||
|
||||
- if(codec->decoder->id == CODEC_ID_ALAC)
|
||||
+ if(codec->decoder->id == AV_CODEC_ID_ALAC)
|
||||
{
|
||||
header = quicktime_wave_get_user_atom(atrack->track, "alac", &header_len);
|
||||
if(header)
|
||||
@@ -300,7 +300,7 @@ static int decode_audio_packet_ffmpeg(qu
|
||||
codec->avctx->extradata_size = header_len;
|
||||
}
|
||||
}
|
||||
- if(codec->decoder->id == CODEC_ID_QDM2)
|
||||
+ if(codec->decoder->id == AV_CODEC_ID_QDM2)
|
||||
{
|
||||
header = quicktime_wave_get_user_atom(atrack->track, "QDCA", &header_len);
|
||||
if(header)
|
||||
@@ -769,9 +769,9 @@ void quicktime_init_audio_codec_ffmpeg(q
|
||||
|
||||
codec_base->set_parameter = set_parameter;
|
||||
|
||||
- if((decoder->id == CODEC_ID_MP3) || (decoder->id == CODEC_ID_MP2))
|
||||
+ if((decoder->id == AV_CODEC_ID_MP3) || (decoder->id == AV_CODEC_ID_MP2))
|
||||
codec_base->read_packet = read_packet_mpa;
|
||||
- else if(decoder->id == CODEC_ID_AC3)
|
||||
+ else if(decoder->id == AV_CODEC_ID_AC3)
|
||||
{
|
||||
codec_base->write_packet = write_packet_ac3;
|
||||
codec_base->read_packet = read_packet_ac3;
|
||||
Index: libquicktime/plugins/ffmpeg/lqt_ffmpeg.c
|
||||
===================================================================
|
||||
--- libquicktime.orig/plugins/ffmpeg/lqt_ffmpeg.c
|
||||
+++ libquicktime/plugins/ffmpeg/lqt_ffmpeg.c
|
||||
@@ -403,7 +403,7 @@ static lqt_image_size_static_t image_siz
|
||||
struct CODECIDMAP codecidmap_v[] =
|
||||
{
|
||||
{
|
||||
- .id = CODEC_ID_MPEG1VIDEO,
|
||||
+ .id = AV_CODEC_ID_MPEG1VIDEO,
|
||||
.index = -1,
|
||||
.encoder = NULL,
|
||||
.decoder = NULL,
|
||||
@@ -414,7 +414,7 @@ struct CODECIDMAP codecidmap_v[] =
|
||||
.wav_ids = { LQT_WAV_ID_NONE }
|
||||
},
|
||||
{
|
||||
- .id = CODEC_ID_MPEG4,
|
||||
+ .id = AV_CODEC_ID_MPEG4,
|
||||
.index = -1,
|
||||
.encoder = NULL,
|
||||
.decoder = NULL,
|
||||
@@ -432,7 +432,7 @@ struct CODECIDMAP codecidmap_v[] =
|
||||
.compression_id = LQT_COMPRESSION_MPEG4_ASP,
|
||||
},
|
||||
{
|
||||
- .id = CODEC_ID_MSMPEG4V1,
|
||||
+ .id = AV_CODEC_ID_MSMPEG4V1,
|
||||
.index = -1,
|
||||
.encoder = NULL,
|
||||
.decoder = NULL,
|
||||
@@ -443,7 +443,7 @@ struct CODECIDMAP codecidmap_v[] =
|
||||
.wav_ids = { LQT_WAV_ID_NONE },
|
||||
},
|
||||
{
|
||||
- .id = CODEC_ID_MSMPEG4V2,
|
||||
+ .id = AV_CODEC_ID_MSMPEG4V2,
|
||||
.index = -1,
|
||||
.encoder = NULL,
|
||||
.decoder = NULL,
|
||||
@@ -454,7 +454,7 @@ struct CODECIDMAP codecidmap_v[] =
|
||||
.wav_ids = { LQT_WAV_ID_NONE },
|
||||
},
|
||||
{
|
||||
- .id = CODEC_ID_MSMPEG4V3,
|
||||
+ .id = AV_CODEC_ID_MSMPEG4V3,
|
||||
.index = -1,
|
||||
.encoder = NULL,
|
||||
.decoder = NULL,
|
||||
@@ -470,7 +470,7 @@ struct CODECIDMAP codecidmap_v[] =
|
||||
.do_encode = 1,
|
||||
},
|
||||
{
|
||||
- .id = CODEC_ID_MSMPEG4V3,
|
||||
+ .id = AV_CODEC_ID_MSMPEG4V3,
|
||||
.index = -1,
|
||||
.encoder = NULL,
|
||||
.decoder = NULL,
|
||||
@@ -485,7 +485,7 @@ struct CODECIDMAP codecidmap_v[] =
|
||||
},
|
||||
#if 0
|
||||
{
|
||||
- .id = CODEC_ID_WMV1,
|
||||
+ .id = AV_CODEC_ID_WMV1,
|
||||
.index = -1,
|
||||
.encoder = NULL,
|
||||
.decoder = NULL,
|
||||
@@ -498,7 +498,7 @@ struct CODECIDMAP codecidmap_v[] =
|
||||
},
|
||||
#endif
|
||||
{
|
||||
- .id = CODEC_ID_H263,
|
||||
+ .id = AV_CODEC_ID_H263,
|
||||
.index = -1,
|
||||
.encoder = NULL,
|
||||
.decoder = NULL,
|
||||
@@ -510,7 +510,7 @@ struct CODECIDMAP codecidmap_v[] =
|
||||
.compatibility_flags = LQT_FILE_QT_OLD | LQT_FILE_QT | LQT_FILE_MP4 | LQT_FILE_3GP,
|
||||
},
|
||||
{
|
||||
- .id = CODEC_ID_H263,
|
||||
+ .id = AV_CODEC_ID_H263,
|
||||
.index = -1,
|
||||
.encoder = NULL,
|
||||
.decoder = NULL,
|
||||
@@ -525,7 +525,7 @@ struct CODECIDMAP codecidmap_v[] =
|
||||
.do_encode = 1,
|
||||
},
|
||||
{
|
||||
- .id = CODEC_ID_H264,
|
||||
+ .id = AV_CODEC_ID_H264,
|
||||
.index = -1,
|
||||
.encoder = NULL,
|
||||
.decoder = NULL,
|
||||
@@ -536,7 +536,7 @@ struct CODECIDMAP codecidmap_v[] =
|
||||
.wav_ids = { LQT_WAV_ID_NONE },
|
||||
},
|
||||
{
|
||||
- .id = CODEC_ID_H263P,
|
||||
+ .id = AV_CODEC_ID_H263P,
|
||||
.index = -1,
|
||||
.encoder = NULL,
|
||||
.decoder = NULL,
|
||||
@@ -550,7 +550,7 @@ struct CODECIDMAP codecidmap_v[] =
|
||||
.do_encode = 1,
|
||||
},
|
||||
{
|
||||
- .id = CODEC_ID_H263I,
|
||||
+ .id = AV_CODEC_ID_H263I,
|
||||
.index = -1,
|
||||
.encoder = NULL,
|
||||
.decoder = NULL,
|
||||
@@ -561,7 +561,7 @@ struct CODECIDMAP codecidmap_v[] =
|
||||
.wav_ids = { LQT_WAV_ID_NONE },
|
||||
},
|
||||
{
|
||||
- .id = CODEC_ID_SVQ1,
|
||||
+ .id = AV_CODEC_ID_SVQ1,
|
||||
.index = -1,
|
||||
.encoder = NULL,
|
||||
.decoder = NULL,
|
||||
@@ -572,7 +572,7 @@ struct CODECIDMAP codecidmap_v[] =
|
||||
.wav_ids = { LQT_WAV_ID_NONE },
|
||||
},
|
||||
{
|
||||
- .id = CODEC_ID_SVQ3,
|
||||
+ .id = AV_CODEC_ID_SVQ3,
|
||||
.index = -1,
|
||||
.encoder = NULL,
|
||||
.decoder = NULL,
|
||||
@@ -583,7 +583,7 @@ struct CODECIDMAP codecidmap_v[] =
|
||||
.wav_ids = { LQT_WAV_ID_NONE },
|
||||
},
|
||||
{
|
||||
- .id = CODEC_ID_MJPEG,
|
||||
+ .id = AV_CODEC_ID_MJPEG,
|
||||
.index = -1,
|
||||
.encoder = NULL,
|
||||
.decoder = NULL,
|
||||
@@ -597,7 +597,7 @@ struct CODECIDMAP codecidmap_v[] =
|
||||
.do_encode = 1,
|
||||
},
|
||||
{
|
||||
- .id = CODEC_ID_MJPEGB,
|
||||
+ .id = AV_CODEC_ID_MJPEGB,
|
||||
.index = -1,
|
||||
.encoder = NULL,
|
||||
.decoder = NULL,
|
||||
@@ -611,7 +611,7 @@ struct CODECIDMAP codecidmap_v[] =
|
||||
},
|
||||
#if LIBAVCODEC_BUILD >= 3346688
|
||||
{
|
||||
- .id = CODEC_ID_TARGA,
|
||||
+ .id = AV_CODEC_ID_TARGA,
|
||||
.index = -1,
|
||||
.encoder = NULL,
|
||||
.decoder = NULL,
|
||||
@@ -623,7 +623,7 @@ struct CODECIDMAP codecidmap_v[] =
|
||||
#endif
|
||||
#if LIBAVCODEC_BUILD >= 3347456
|
||||
{
|
||||
- .id = CODEC_ID_TIFF,
|
||||
+ .id = AV_CODEC_ID_TIFF,
|
||||
.index = -1,
|
||||
.encoder = NULL,
|
||||
.decoder = NULL,
|
||||
@@ -634,7 +634,7 @@ struct CODECIDMAP codecidmap_v[] =
|
||||
},
|
||||
#endif
|
||||
{
|
||||
- .id = CODEC_ID_8BPS,
|
||||
+ .id = AV_CODEC_ID_8BPS,
|
||||
.index = -1,
|
||||
.encoder = NULL,
|
||||
.decoder = NULL,
|
||||
@@ -644,7 +644,7 @@ struct CODECIDMAP codecidmap_v[] =
|
||||
.wav_ids = { LQT_WAV_ID_NONE },
|
||||
},
|
||||
{
|
||||
- .id = CODEC_ID_INDEO3,
|
||||
+ .id = AV_CODEC_ID_INDEO3,
|
||||
.index = -1,
|
||||
.encoder = NULL,
|
||||
.decoder = NULL,
|
||||
@@ -655,7 +655,7 @@ struct CODECIDMAP codecidmap_v[] =
|
||||
.wav_ids = { LQT_WAV_ID_NONE },
|
||||
},
|
||||
{
|
||||
- .id = CODEC_ID_RPZA,
|
||||
+ .id = AV_CODEC_ID_RPZA,
|
||||
.index = -1,
|
||||
.encoder = NULL,
|
||||
.decoder = NULL,
|
||||
@@ -665,7 +665,7 @@ struct CODECIDMAP codecidmap_v[] =
|
||||
.wav_ids = { LQT_WAV_ID_NONE },
|
||||
},
|
||||
{
|
||||
- .id = CODEC_ID_SMC,
|
||||
+ .id = AV_CODEC_ID_SMC,
|
||||
.index = -1,
|
||||
.encoder = NULL,
|
||||
.decoder = NULL,
|
||||
@@ -675,7 +675,7 @@ struct CODECIDMAP codecidmap_v[] =
|
||||
.wav_ids = { LQT_WAV_ID_NONE },
|
||||
},
|
||||
{
|
||||
- .id = CODEC_ID_CINEPAK,
|
||||
+ .id = AV_CODEC_ID_CINEPAK,
|
||||
.index = -1,
|
||||
.encoder = NULL,
|
||||
.decoder = NULL,
|
||||
@@ -686,7 +686,7 @@ struct CODECIDMAP codecidmap_v[] =
|
||||
.wav_ids = { LQT_WAV_ID_NONE },
|
||||
},
|
||||
{
|
||||
- .id = CODEC_ID_CYUV,
|
||||
+ .id = AV_CODEC_ID_CYUV,
|
||||
.index = -1,
|
||||
.encoder = NULL,
|
||||
.decoder = NULL,
|
||||
@@ -697,7 +697,7 @@ struct CODECIDMAP codecidmap_v[] =
|
||||
.wav_ids = { LQT_WAV_ID_NONE },
|
||||
},
|
||||
{
|
||||
- .id = CODEC_ID_QTRLE,
|
||||
+ .id = AV_CODEC_ID_QTRLE,
|
||||
.index = -1,
|
||||
.encoder = NULL,
|
||||
.decoder = NULL,
|
||||
@@ -711,7 +711,7 @@ struct CODECIDMAP codecidmap_v[] =
|
||||
.encoding_colormodels = (int[]){ BC_RGB888, BC_RGBA8888, LQT_COLORMODEL_NONE },
|
||||
},
|
||||
{
|
||||
- .id = CODEC_ID_MSRLE,
|
||||
+ .id = AV_CODEC_ID_MSRLE,
|
||||
.index = -1,
|
||||
.encoder = NULL,
|
||||
.decoder = NULL,
|
||||
@@ -722,7 +722,7 @@ struct CODECIDMAP codecidmap_v[] =
|
||||
.wav_ids = { LQT_WAV_ID_NONE },
|
||||
},
|
||||
{
|
||||
- .id = CODEC_ID_DVVIDEO,
|
||||
+ .id = AV_CODEC_ID_DVVIDEO,
|
||||
.index = -1,
|
||||
.encoder = NULL,
|
||||
.decoder = NULL,
|
||||
@@ -738,7 +738,7 @@ struct CODECIDMAP codecidmap_v[] =
|
||||
.image_sizes = image_sizes_dv,
|
||||
},
|
||||
{
|
||||
- .id = CODEC_ID_DVVIDEO,
|
||||
+ .id = AV_CODEC_ID_DVVIDEO,
|
||||
.index = -1,
|
||||
.encoder = NULL,
|
||||
.decoder = NULL,
|
||||
@@ -754,7 +754,7 @@ struct CODECIDMAP codecidmap_v[] =
|
||||
.image_sizes = image_sizes_dv,
|
||||
},
|
||||
{
|
||||
- .id = CODEC_ID_DVVIDEO,
|
||||
+ .id = AV_CODEC_ID_DVVIDEO,
|
||||
.index = -1,
|
||||
.encoder = NULL,
|
||||
.decoder = NULL,
|
||||
@@ -770,7 +770,7 @@ struct CODECIDMAP codecidmap_v[] =
|
||||
},
|
||||
/* DVCPRO HD (decoding only for now) */
|
||||
{
|
||||
- .id = CODEC_ID_DVVIDEO,
|
||||
+ .id = AV_CODEC_ID_DVVIDEO,
|
||||
.index = -1,
|
||||
.encoder = NULL,
|
||||
.decoder = NULL,
|
||||
@@ -791,7 +791,7 @@ struct CODECIDMAP codecidmap_v[] =
|
||||
// .do_encode = 1
|
||||
},
|
||||
{
|
||||
- .id = CODEC_ID_FFVHUFF,
|
||||
+ .id = AV_CODEC_ID_FFVHUFF,
|
||||
.index = -1,
|
||||
.encoder = NULL,
|
||||
.decoder = NULL,
|
||||
@@ -804,7 +804,7 @@ struct CODECIDMAP codecidmap_v[] =
|
||||
.do_encode = 1
|
||||
},
|
||||
{
|
||||
- .id = CODEC_ID_FFV1,
|
||||
+ .id = AV_CODEC_ID_FFV1,
|
||||
.index = -1,
|
||||
.encoder = NULL,
|
||||
.decoder = NULL,
|
||||
@@ -820,7 +820,7 @@ struct CODECIDMAP codecidmap_v[] =
|
||||
},
|
||||
#if LIBAVCODEC_BUILD >= 3352576
|
||||
{
|
||||
- .id = CODEC_ID_DNXHD,
|
||||
+ .id = AV_CODEC_ID_DNXHD,
|
||||
.index = -1,
|
||||
.encoder = NULL,
|
||||
.decoder = NULL,
|
||||
@@ -837,7 +837,7 @@ struct CODECIDMAP codecidmap_v[] =
|
||||
},
|
||||
#endif
|
||||
{
|
||||
- .id = CODEC_ID_MPEG2VIDEO,
|
||||
+ .id = AV_CODEC_ID_MPEG2VIDEO,
|
||||
.index = -1,
|
||||
.encoder = NULL,
|
||||
.decoder = NULL,
|
||||
@@ -853,7 +853,7 @@ struct CODECIDMAP codecidmap_v[] =
|
||||
.compression_id = LQT_COMPRESSION_D10
|
||||
},
|
||||
{
|
||||
- .id = CODEC_ID_MPEG2VIDEO,
|
||||
+ .id = AV_CODEC_ID_MPEG2VIDEO,
|
||||
.index = -1,
|
||||
.encoder = NULL,
|
||||
.decoder = NULL,
|
||||
@@ -867,7 +867,7 @@ struct CODECIDMAP codecidmap_v[] =
|
||||
.compatibility_flags = LQT_FILE_QT
|
||||
},
|
||||
{
|
||||
- .id = CODEC_ID_MPEG2VIDEO,
|
||||
+ .id = AV_CODEC_ID_MPEG2VIDEO,
|
||||
.index = -1,
|
||||
.encoder = NULL,
|
||||
.decoder = NULL,
|
||||
@@ -879,7 +879,7 @@ struct CODECIDMAP codecidmap_v[] =
|
||||
.compatibility_flags = LQT_FILE_QT
|
||||
},
|
||||
{
|
||||
- .id = CODEC_ID_MPEG2VIDEO,
|
||||
+ .id = AV_CODEC_ID_MPEG2VIDEO,
|
||||
.index = -1,
|
||||
.encoder = NULL,
|
||||
.decoder = NULL,
|
||||
@@ -896,7 +896,7 @@ struct CODECIDMAP codecidmap_v[] =
|
||||
.encoding_colormodels = (int[]){ BC_YUV422P, LQT_COLORMODEL_NONE }
|
||||
},
|
||||
{
|
||||
- .id = CODEC_ID_PRORES,
|
||||
+ .id = AV_CODEC_ID_PRORES,
|
||||
.index = -1,
|
||||
.encoder = NULL,
|
||||
.decoder = NULL,
|
||||
@@ -917,7 +917,7 @@ struct CODECIDMAP codecidmap_v[] =
|
||||
struct CODECIDMAP codecidmap_a[] =
|
||||
{
|
||||
{
|
||||
- .id = CODEC_ID_MP3,
|
||||
+ .id = AV_CODEC_ID_MP3,
|
||||
.index = -1,
|
||||
.encoder = NULL,
|
||||
.decoder = NULL,
|
||||
@@ -929,7 +929,7 @@ struct CODECIDMAP codecidmap_a[] =
|
||||
.wav_ids = { 0x50, 0x55, LQT_WAV_ID_NONE },
|
||||
},
|
||||
{
|
||||
- .id = CODEC_ID_MP2,
|
||||
+ .id = AV_CODEC_ID_MP2,
|
||||
.index = -1,
|
||||
.encoder = NULL,
|
||||
.decoder = NULL,
|
||||
@@ -944,7 +944,7 @@ struct CODECIDMAP codecidmap_a[] =
|
||||
.compression_id = LQT_COMPRESSION_MP2,
|
||||
},
|
||||
{
|
||||
- .id = CODEC_ID_AC3,
|
||||
+ .id = AV_CODEC_ID_AC3,
|
||||
.index = -1,
|
||||
.encoder = NULL,
|
||||
.decoder = NULL,
|
||||
@@ -959,7 +959,7 @@ struct CODECIDMAP codecidmap_a[] =
|
||||
.compression_id = LQT_COMPRESSION_AC3,
|
||||
},
|
||||
{
|
||||
- .id = CODEC_ID_QDM2,
|
||||
+ .id = AV_CODEC_ID_QDM2,
|
||||
.index = -1,
|
||||
.encoder = NULL,
|
||||
.decoder = NULL,
|
||||
@@ -974,7 +974,7 @@ struct CODECIDMAP codecidmap_a[] =
|
||||
#if 1
|
||||
/* Doesn't work as long as audio chunks are not split into VBR "Samples" */
|
||||
{
|
||||
- .id = CODEC_ID_ALAC,
|
||||
+ .id = AV_CODEC_ID_ALAC,
|
||||
.index = -1,
|
||||
.encoder = NULL,
|
||||
.decoder = NULL,
|
||||
@@ -987,7 +987,7 @@ struct CODECIDMAP codecidmap_a[] =
|
||||
#if 1
|
||||
/* Sounds ugly */
|
||||
{
|
||||
- .id = CODEC_ID_ADPCM_MS,
|
||||
+ .id = AV_CODEC_ID_ADPCM_MS,
|
||||
.index = -1,
|
||||
.encoder = NULL,
|
||||
.decoder = NULL,
|
||||
@@ -1000,7 +1000,7 @@ struct CODECIDMAP codecidmap_a[] =
|
||||
#if 1
|
||||
/* Sounds ugly */
|
||||
{
|
||||
- .id = CODEC_ID_ADPCM_IMA_WAV,
|
||||
+ .id = AV_CODEC_ID_ADPCM_IMA_WAV,
|
||||
.index = -1,
|
||||
.encoder = NULL,
|
||||
.decoder = NULL,
|
||||
@@ -1035,7 +1035,7 @@ static void ffmpeg_map_init(void)
|
||||
if(codecidmap_v[i].do_encode)
|
||||
{
|
||||
// FFMpeg has 2 different ProRes encoders, so try the better one first.
|
||||
- if(codecidmap_v[i].id == CODEC_ID_PRORES)
|
||||
+ if(codecidmap_v[i].id == AV_CODEC_ID_PRORES)
|
||||
{
|
||||
// In newer versions it's called prores_ks. It used to be called prores_kostya
|
||||
codecidmap_v[i].encoder = avcodec_find_encoder_by_name("prores_ks");
|
||||
Index: libquicktime/plugins/ffmpeg/video.c
|
||||
===================================================================
|
||||
--- libquicktime.orig/plugins/ffmpeg/video.c
|
||||
+++ libquicktime/plugins/ffmpeg/video.c
|
||||
@@ -37,9 +37,9 @@
|
||||
#endif
|
||||
|
||||
#ifdef PIX_FMT_YUV422P10
|
||||
-#define PIX_FMT_YUV422P10_OR_DUMMY PIX_FMT_YUV422P10
|
||||
+#define AV_PIX_FMT_YUV422P10_OR_DUMMY PIX_FMT_YUV422P10
|
||||
#else
|
||||
-#define PIX_FMT_YUV422P10_OR_DUMMY -1234
|
||||
+#define AV_PIX_FMT_YUV422P10_OR_DUMMY -1234
|
||||
#endif
|
||||
|
||||
static const struct
|
||||
@@ -102,7 +102,7 @@ typedef struct
|
||||
|
||||
/* In some cases FFMpeg would report something like PIX_FMT_YUV422P, while
|
||||
we would like to treat it as PIX_FMT_YUVJ422P. It's only used for decoding */
|
||||
- enum PixelFormat reinterpret_pix_fmt;
|
||||
+ enum AVPixelFormat reinterpret_pix_fmt;
|
||||
|
||||
int is_imx;
|
||||
int is_xdcam_hd422;
|
||||
@@ -146,42 +146,42 @@ typedef struct
|
||||
|
||||
static const struct
|
||||
{
|
||||
- enum PixelFormat ffmpeg_id;
|
||||
+ enum AVPixelFormat ffmpeg_id;
|
||||
int lqt_id;
|
||||
int exact;
|
||||
}
|
||||
colormodels[] =
|
||||
{
|
||||
- { PIX_FMT_YUV420P, BC_YUV420P, 1 }, ///< Planar YUV 4:2:0 (1 Cr & Cb sample per 2x2 Y samples)
|
||||
+ { AV_PIX_FMT_YUV420P, BC_YUV420P, 1 }, ///< Planar YUV 4:2:0 (1 Cr & Cb sample per 2x2 Y samples)
|
||||
#if LIBAVUTIL_VERSION_INT < (50<<16)
|
||||
- { PIX_FMT_YUV422, BC_YUV422, 1 },
|
||||
+ { AV_PIX_FMT_YUV422, BC_YUV422, 1 },
|
||||
#else
|
||||
- { PIX_FMT_YUYV422, BC_YUV422, 1 },
|
||||
+ { AV_PIX_FMT_YUYV422, BC_YUV422, 1 },
|
||||
#endif
|
||||
- { PIX_FMT_RGB24, BC_RGB888, 1 }, ///< Packed pixel, 3 bytes per pixel, RGBRGB...
|
||||
- { PIX_FMT_BGR24, BC_BGR888, 1 }, ///< Packed pixel, 3 bytes per pixel, BGRBGR...
|
||||
- { PIX_FMT_YUV422P, BC_YUV422P, 1 }, ///< Planar YUV 4:2:2 (1 Cr & Cb sample per 2x1 Y samples)
|
||||
- { PIX_FMT_YUV444P, BC_YUV444P, 1 }, ///< Planar YUV 4:4:4 (1 Cr & Cb sample per 1x1 Y samples)
|
||||
- { PIX_FMT_YUV411P, BC_YUV411P, 1 }, ///< Planar YUV 4:1:1 (1 Cr & Cb sample per 4x1 Y samples)
|
||||
- { PIX_FMT_YUV422P16, BC_YUV422P16, 1 }, ///< Planar 16 bit YUV 4:2:2 (1 Cr & Cb sample per 2x1 Y samples)
|
||||
-#ifdef PIX_FMT_YUV422P10
|
||||
- { PIX_FMT_YUV422P10, BC_YUV422P10, 1 }, ///< 10 bit samples in uint16_t containers, planar 4:2:2
|
||||
+ { AV_PIX_FMT_RGB24, BC_RGB888, 1 }, ///< Packed pixel, 3 bytes per pixel, RGBRGB...
|
||||
+ { AV_PIX_FMT_BGR24, BC_BGR888, 1 }, ///< Packed pixel, 3 bytes per pixel, BGRBGR...
|
||||
+ { AV_PIX_FMT_YUV422P, BC_YUV422P, 1 }, ///< Planar YUV 4:2:2 (1 Cr & Cb sample per 2x1 Y samples)
|
||||
+ { AV_PIX_FMT_YUV444P, BC_YUV444P, 1 }, ///< Planar YUV 4:4:4 (1 Cr & Cb sample per 1x1 Y samples)
|
||||
+ { AV_PIX_FMT_YUV411P, BC_YUV411P, 1 }, ///< Planar YUV 4:1:1 (1 Cr & Cb sample per 4x1 Y samples)
|
||||
+ { AV_PIX_FMT_YUV422P16, BC_YUV422P16, 1 }, ///< Planar 16 bit YUV 4:2:2 (1 Cr & Cb sample per 2x1 Y samples)
|
||||
+#ifdef AV_PIX_FMT_YUV422P10
|
||||
+ { AV_PIX_FMT_YUV422P10, BC_YUV422P10, 1 }, ///< 10 bit samples in uint16_t containers, planar 4:2:2
|
||||
#endif
|
||||
- { PIX_FMT_RGB565, BC_RGB565, 1 }, ///< always stored in cpu endianness
|
||||
- { PIX_FMT_YUVJ420P, BC_YUVJ420P, 1 }, ///< Planar YUV 4:2:0 full scale (jpeg)
|
||||
- { PIX_FMT_YUVJ422P, BC_YUVJ422P, 1 }, ///< Planar YUV 4:2:2 full scale (jpeg)
|
||||
- { PIX_FMT_YUVJ444P, BC_YUVJ444P, 1 }, ///< Planar YUV 4:4:4 full scale (jpeg)
|
||||
+ { AV_PIX_FMT_RGB565, BC_RGB565, 1 }, ///< always stored in cpu endianness
|
||||
+ { AV_PIX_FMT_YUVJ420P, BC_YUVJ420P, 1 }, ///< Planar YUV 4:2:0 full scale (jpeg)
|
||||
+ { AV_PIX_FMT_YUVJ422P, BC_YUVJ422P, 1 }, ///< Planar YUV 4:2:2 full scale (jpeg)
|
||||
+ { AV_PIX_FMT_YUVJ444P, BC_YUVJ444P, 1 }, ///< Planar YUV 4:4:4 full scale (jpeg)
|
||||
#if LIBAVUTIL_VERSION_INT < (50<<16)
|
||||
- { PIX_FMT_RGBA32, BC_RGBA8888, 0 }, ///< Packed pixel, 4 bytes per pixel, BGRABGRA...
|
||||
+ { AV_PIX_FMT_RGBA32, BC_RGBA8888, 0 }, ///< Packed pixel, 4 bytes per pixel, BGRABGRA...
|
||||
#else
|
||||
- { PIX_FMT_RGB32, BC_RGBA8888, 0 }, ///< Packed pixel, 4 bytes per pixel, BGRABGRA...
|
||||
+ { AV_PIX_FMT_RGB32, BC_RGBA8888, 0 }, ///< Packed pixel, 4 bytes per pixel, BGRABGRA...
|
||||
#endif
|
||||
- { PIX_FMT_RGB555, BC_RGB888, 0 }, ///< always stored in cpu endianness, most significant bit to 1
|
||||
- { PIX_FMT_GRAY8, BC_RGB888, 0 },
|
||||
- { PIX_FMT_MONOWHITE, BC_RGB888, 0 }, ///< 0 is white
|
||||
- { PIX_FMT_MONOBLACK, BC_RGB888, 0 }, ///< 0 is black
|
||||
- { PIX_FMT_PAL8, BC_RGB888, 0 }, ///< 8 bit with RGBA palette
|
||||
- { PIX_FMT_YUV410P, BC_YUV420P, 0 }, ///< Planar YUV 4:1:0 (1 Cr & Cb sample per 4x4 Y samples)
|
||||
+ { AV_PIX_FMT_RGB555, BC_RGB888, 0 }, ///< always stored in cpu endianness, most significant bit to 1
|
||||
+ { AV_PIX_FMT_GRAY8, BC_RGB888, 0 },
|
||||
+ { AV_PIX_FMT_MONOWHITE, BC_RGB888, 0 }, ///< 0 is white
|
||||
+ { AV_PIX_FMT_MONOBLACK, BC_RGB888, 0 }, ///< 0 is black
|
||||
+ { AV_PIX_FMT_PAL8, BC_RGB888, 0 }, ///< 8 bit with RGBA palette
|
||||
+ { AV_PIX_FMT_YUV410P, BC_YUV420P, 0 }, ///< Planar YUV 4:1:0 (1 Cr & Cb sample per 4x4 Y samples)
|
||||
};
|
||||
|
||||
static const struct
|
||||
@@ -333,7 +333,7 @@ static void maybe_add_sdtp_entry(quickti
|
||||
quicktime_video_map_t *vtrack = &file->vtracks[track];
|
||||
quicktime_ffmpeg_video_codec_t *codec = vtrack->codec->priv;
|
||||
|
||||
- if (codec->encoder->id == CODEC_ID_MPEG2VIDEO && codec->avctx->gop_size > 1)
|
||||
+ if (codec->encoder->id == AV_CODEC_ID_MPEG2VIDEO && codec->avctx->gop_size > 1)
|
||||
{
|
||||
uint8_t flags = generate_sdtp_flags_mpeg2(sample, codec->avctx);
|
||||
quicktime_insert_sdtp_entry(file, sample, track, flags);
|
||||
@@ -392,16 +392,16 @@ static int lqt_tenbit_dnxhd_supported(AV
|
||||
if (!codec->pix_fmts)
|
||||
return 0;
|
||||
|
||||
- for (i = 0; codec->pix_fmts[i] != PIX_FMT_NONE; ++i)
|
||||
+ for (i = 0; codec->pix_fmts[i] != AV_PIX_FMT_NONE; ++i)
|
||||
{
|
||||
- if (codec->pix_fmts[i] == PIX_FMT_YUV422P10_OR_DUMMY)
|
||||
+ if (codec->pix_fmts[i] == AV_PIX_FMT_YUV422P10_OR_DUMMY)
|
||||
return 1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
-static enum PixelFormat lqt_ffmpeg_get_ffmpeg_colormodel(int id)
|
||||
+static enum AVPixelFormat lqt_ffmpeg_get_ffmpeg_colormodel(int id)
|
||||
{
|
||||
int i;
|
||||
|
||||
@@ -410,10 +410,10 @@ static enum PixelFormat lqt_ffmpeg_get_f
|
||||
if(colormodels[i].lqt_id == id)
|
||||
return colormodels[i].ffmpeg_id;
|
||||
}
|
||||
- return PIX_FMT_NB;
|
||||
+ return AV_PIX_FMT_NB;
|
||||
}
|
||||
|
||||
-static int lqt_ffmpeg_get_lqt_colormodel(enum PixelFormat id, int * exact)
|
||||
+static int lqt_ffmpeg_get_lqt_colormodel(enum AVPixelFormat id, int * exact)
|
||||
{
|
||||
int i;
|
||||
|
||||
@@ -454,23 +454,23 @@ static void lqt_ffmpeg_setup_decoding_co
|
||||
if (lqt_ffmpeg_get_avid_yuv_range(vtrack->track) == AVID_FULL_YUV_RANGE)
|
||||
{
|
||||
vtrack->stream_cmodel = BC_YUVJ422P;
|
||||
- codec->reinterpret_pix_fmt = PIX_FMT_YUVJ422P;
|
||||
+ codec->reinterpret_pix_fmt = AV_PIX_FMT_YUVJ422P;
|
||||
*exact = 1;
|
||||
return;
|
||||
}
|
||||
}
|
||||
- else if(codec->decoder->id == CODEC_ID_DNXHD)
|
||||
+ else if(codec->decoder->id == AV_CODEC_ID_DNXHD)
|
||||
{
|
||||
/* FFMpeg supports PIX_FMT_YUV422P and PIX_FMT_YUV422P10 for DNxHD, which
|
||||
we sometimes interpret as PIX_FMT_YUVJ422P and PIX_FMT_YUVJ422P10. */
|
||||
- if (codec->avctx->pix_fmt == PIX_FMT_YUV422P || codec->avctx->pix_fmt == PIX_FMT_YUV422P10_OR_DUMMY)
|
||||
+ if (codec->avctx->pix_fmt == AV_PIX_FMT_YUV422P || codec->avctx->pix_fmt == AV_PIX_FMT_YUV422P10_OR_DUMMY)
|
||||
{
|
||||
- int p10 = (codec->avctx->pix_fmt == PIX_FMT_YUV422P10_OR_DUMMY);
|
||||
+ int p10 = (codec->avctx->pix_fmt == AV_PIX_FMT_YUV422P10_OR_DUMMY);
|
||||
*exact = 1;
|
||||
if (lqt_ffmpeg_get_avid_yuv_range(vtrack->track) == AVID_FULL_YUV_RANGE)
|
||||
{
|
||||
vtrack->stream_cmodel = p10 ? BC_YUVJ422P10 : BC_YUVJ422P;
|
||||
- codec->reinterpret_pix_fmt = p10 ? PIX_FMT_YUV422P10_OR_DUMMY : PIX_FMT_YUVJ422P;
|
||||
+ codec->reinterpret_pix_fmt = p10 ? AV_PIX_FMT_YUV422P10_OR_DUMMY : AV_PIX_FMT_YUVJ422P;
|
||||
// Note: reinterpret_pix_fmt should really be PIX_FMT_YUVJ422P10, except
|
||||
// there is no such colormodel in FFMpeg. Fortunately, it's not a problem
|
||||
// in this case, as reinterpret_pix_fmt is only used when *exact == 0.
|
||||
@@ -478,7 +478,7 @@ static void lqt_ffmpeg_setup_decoding_co
|
||||
else
|
||||
{
|
||||
vtrack->stream_cmodel = p10 ? BC_YUV422P10 : BC_YUV422P;
|
||||
- codec->reinterpret_pix_fmt = p10 ? PIX_FMT_YUV422P10_OR_DUMMY : PIX_FMT_YUV422P;
|
||||
+ codec->reinterpret_pix_fmt = p10 ? AV_PIX_FMT_YUV422P10_OR_DUMMY : AV_PIX_FMT_YUV422P;
|
||||
}
|
||||
return;
|
||||
}
|
||||
@@ -497,16 +497,16 @@ static void lqt_ffmpeg_setup_encoding_co
|
||||
quicktime_ffmpeg_video_codec_t *codec = vtrack->codec->priv;
|
||||
codec->avctx->pix_fmt = lqt_ffmpeg_get_ffmpeg_colormodel(vtrack->stream_cmodel);
|
||||
|
||||
- if (codec->encoder->id == CODEC_ID_DNXHD)
|
||||
+ if (codec->encoder->id == AV_CODEC_ID_DNXHD)
|
||||
{
|
||||
/* FFMpeg's DNxHD encoder only supports PIX_FMT_YUV422P and PIX_FMT_YUV422P10
|
||||
and doesn't know anything about PIX_FMT_YUVJ422P and PIX_FMT_YUVJ422P10
|
||||
(in fact, the latter doesn't even exist) */
|
||||
- codec->avctx->pix_fmt = PIX_FMT_YUV422P;
|
||||
+ codec->avctx->pix_fmt = AV_PIX_FMT_YUV422P;
|
||||
if (vtrack->stream_cmodel == BC_YUV422P10 || vtrack->stream_cmodel == BC_YUVJ422P10)
|
||||
{
|
||||
if (lqt_tenbit_dnxhd_supported(codec->encoder))
|
||||
- codec->avctx->pix_fmt = PIX_FMT_YUV422P10_OR_DUMMY;
|
||||
+ codec->avctx->pix_fmt = AV_PIX_FMT_YUV422P10_OR_DUMMY;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -589,7 +589,7 @@ static void convert_rgba_to_argb(uint8_t
|
||||
*/
|
||||
|
||||
static void convert_image_decode(quicktime_ffmpeg_video_codec_t *codec,
|
||||
- AVFrame * in_frame, enum PixelFormat in_format,
|
||||
+ AVFrame * in_frame, enum AVPixelFormat in_format,
|
||||
unsigned char ** out_frame, int out_format,
|
||||
int width, int height, int row_span, int row_span_uv)
|
||||
{
|
||||
@@ -606,9 +606,9 @@ static void convert_image_decode(quickti
|
||||
* RGBA format like in ffmpeg??
|
||||
*/
|
||||
#if LIBAVUTIL_VERSION_INT < (50<<16)
|
||||
- if((in_format == PIX_FMT_RGBA32) && (out_format == BC_RGBA8888))
|
||||
+ if((in_format == AV_PIX_FMT_RGBA32) && (out_format == BC_RGBA8888))
|
||||
#else
|
||||
- if((in_format == PIX_FMT_RGB32) && (out_format == BC_RGBA8888))
|
||||
+ if((in_format == AV_PIX_FMT_RGB32) && (out_format == BC_RGBA8888))
|
||||
#endif
|
||||
{
|
||||
convert_image_decode_rgba(in_frame, out_frame, width, height, codec->y_offset);
|
||||
@@ -782,13 +782,13 @@ static int lqt_ffmpeg_decode_video(quick
|
||||
codec->avctx->bits_per_coded_sample = quicktime_video_depth(file, track);
|
||||
/* Set extradata: It's done differently for each codec */
|
||||
|
||||
- if(codec->decoder->id == CODEC_ID_SVQ3)
|
||||
+ if(codec->decoder->id == AV_CODEC_ID_SVQ3)
|
||||
{
|
||||
extradata = trak->mdia.minf.stbl.stsd.table[0].table_raw + 4;
|
||||
extradata_size = trak->mdia.minf.stbl.stsd.table[0].table_raw_size - 4;
|
||||
|
||||
}
|
||||
- else if(codec->decoder->id == CODEC_ID_H264)
|
||||
+ else if(codec->decoder->id == AV_CODEC_ID_H264)
|
||||
{
|
||||
user_atom = quicktime_stsd_get_user_atom(trak, "avcC", &user_atom_len);
|
||||
|
||||
@@ -807,7 +807,7 @@ static int lqt_ffmpeg_decode_video(quick
|
||||
}
|
||||
|
||||
}
|
||||
- else if(codec->decoder->id == CODEC_ID_MPEG4)
|
||||
+ else if(codec->decoder->id == AV_CODEC_ID_MPEG4)
|
||||
{
|
||||
if(trak->mdia.minf.stbl.stsd.table[0].has_esds)
|
||||
{
|
||||
@@ -936,10 +936,10 @@ static int lqt_ffmpeg_decode_video(quick
|
||||
#ifdef HAVE_LIBSWSCALE
|
||||
|
||||
#if LIBAVUTIL_VERSION_INT < (50<<16)
|
||||
- if(!((codec->avctx->pix_fmt == PIX_FMT_RGBA32) &&
|
||||
+ if(!((codec->avctx->pix_fmt == AV_PIX_FMT_RGBA32) &&
|
||||
(vtrack->stream_cmodel == BC_RGBA8888)))
|
||||
#else
|
||||
- if(!((codec->avctx->pix_fmt == PIX_FMT_RGB32) &&
|
||||
+ if(!((codec->avctx->pix_fmt == AV_PIX_FMT_RGB32) &&
|
||||
(vtrack->stream_cmodel == BC_RGBA8888)))
|
||||
#endif
|
||||
{
|
||||
@@ -954,15 +954,15 @@ static int lqt_ffmpeg_decode_video(quick
|
||||
}
|
||||
#endif
|
||||
}
|
||||
- if(codec->decoder->id == CODEC_ID_DVVIDEO)
|
||||
+ if(codec->decoder->id == AV_CODEC_ID_DVVIDEO)
|
||||
{
|
||||
if(vtrack->stream_cmodel == BC_YUV420P)
|
||||
vtrack->chroma_placement = LQT_CHROMA_PLACEMENT_DVPAL;
|
||||
vtrack->interlace_mode = LQT_INTERLACE_BOTTOM_FIRST;
|
||||
vtrack->ci.id = LQT_COMPRESSION_DV;
|
||||
}
|
||||
- else if((codec->decoder->id == CODEC_ID_MPEG4) ||
|
||||
- (codec->decoder->id == CODEC_ID_H264))
|
||||
+ else if((codec->decoder->id == AV_CODEC_ID_MPEG4) ||
|
||||
+ (codec->decoder->id == AV_CODEC_ID_H264))
|
||||
{
|
||||
if(vtrack->stream_cmodel == BC_YUV420P)
|
||||
vtrack->chroma_placement = LQT_CHROMA_PLACEMENT_MPEG2;
|
||||
@@ -1409,7 +1409,7 @@ static int init_xdcam_hd422_encoder(quic
|
||||
int frame_duration = lqt_frame_duration(file, track, NULL);
|
||||
const char* fourcc;
|
||||
|
||||
- codec->avctx->pix_fmt = PIX_FMT_YUV422P;
|
||||
+ codec->avctx->pix_fmt = AV_PIX_FMT_YUV422P;
|
||||
codec->avctx->gop_size = time_scale > 25 * frame_duration ? 15 : 12;
|
||||
codec->avctx->max_b_frames = 2;
|
||||
codec->avctx->intra_dc_precision = 2;
|
||||
@@ -1606,13 +1606,13 @@ static int lqt_ffmpeg_encode_video(quick
|
||||
{
|
||||
if(vtrack->stream_cmodel == BC_YUV420P)
|
||||
{
|
||||
- if(codec->encoder->id == CODEC_ID_MPEG4)
|
||||
+ if(codec->encoder->id == AV_CODEC_ID_MPEG4)
|
||||
{
|
||||
vtrack->chroma_placement = LQT_CHROMA_PLACEMENT_MPEG2;
|
||||
/* enable interlaced encoding */
|
||||
vtrack->interlace_mode = LQT_INTERLACE_NONE;
|
||||
}
|
||||
- else if(codec->encoder->id == CODEC_ID_DVVIDEO)
|
||||
+ else if(codec->encoder->id == AV_CODEC_ID_DVVIDEO)
|
||||
{
|
||||
vtrack->chroma_placement = LQT_CHROMA_PLACEMENT_DVPAL;
|
||||
}
|
||||
@@ -1637,9 +1637,9 @@ static int lqt_ffmpeg_encode_video(quick
|
||||
switch(codec->encoder->id)
|
||||
{
|
||||
// Variable duration frames won't work for these.
|
||||
- case CODEC_ID_MPEG2VIDEO:
|
||||
- case CODEC_ID_DVVIDEO:
|
||||
- case CODEC_ID_DNXHD:
|
||||
+ case AV_CODEC_ID_MPEG2VIDEO:
|
||||
+ case AV_CODEC_ID_DVVIDEO:
|
||||
+ case AV_CODEC_ID_DNXHD:
|
||||
codec->encoding_pts_factor = lqt_frame_duration(file, track, NULL);
|
||||
codec->avctx->time_base.num = codec->encoding_pts_factor;
|
||||
// time_base may be reduced by a common factor by libavcodec,
|
||||
@@ -1663,7 +1663,7 @@ static int lqt_ffmpeg_encode_video(quick
|
||||
codec->avctx->sample_aspect_ratio.num = pixel_width;
|
||||
codec->avctx->sample_aspect_ratio.den = pixel_height;
|
||||
/* Use global headers for mp4v */
|
||||
- if(codec->encoder->id == CODEC_ID_MPEG4)
|
||||
+ if(codec->encoder->id == AV_CODEC_ID_MPEG4)
|
||||
{
|
||||
if(!(file->file_type & (LQT_FILE_AVI|LQT_FILE_AVI_ODML)))
|
||||
{
|
||||
@@ -1687,12 +1687,12 @@ static int lqt_ffmpeg_encode_video(quick
|
||||
}
|
||||
#endif
|
||||
}
|
||||
- else if((codec->encoder->id == CODEC_ID_MSMPEG4V3) && (trak->strl) &&
|
||||
+ else if((codec->encoder->id == AV_CODEC_ID_MSMPEG4V3) && (trak->strl) &&
|
||||
!strncmp(trak->strl->strf.bh.biCompression, "DIV3", 4))
|
||||
{
|
||||
strncpy(trak->strl->strh.fccHandler, "div3", 4);
|
||||
}
|
||||
- else if((codec->encoder->id == CODEC_ID_H263) &&
|
||||
+ else if((codec->encoder->id == AV_CODEC_ID_H263) &&
|
||||
(file->file_type & (LQT_FILE_MP4|LQT_FILE_3GP)))
|
||||
{
|
||||
uint8_t d263_data[] =
|
||||
@@ -1706,7 +1706,7 @@ static int lqt_ffmpeg_encode_video(quick
|
||||
strncpy(trak->mdia.minf.stbl.stsd.table[0].format,
|
||||
"s263", 4);
|
||||
}
|
||||
- else if(codec->encoder->id == CODEC_ID_FFVHUFF)
|
||||
+ else if(codec->encoder->id == AV_CODEC_ID_FFVHUFF)
|
||||
{
|
||||
if(!(file->file_type & (LQT_FILE_AVI|LQT_FILE_AVI_ODML)))
|
||||
{
|
||||
@@ -1714,22 +1714,22 @@ static int lqt_ffmpeg_encode_video(quick
|
||||
codec->write_global_header = 1;
|
||||
}
|
||||
}
|
||||
- else if(codec->encoder->id == CODEC_ID_QTRLE)
|
||||
+ else if(codec->encoder->id == AV_CODEC_ID_QTRLE)
|
||||
{
|
||||
if(vtrack->stream_cmodel == BC_RGBA8888)
|
||||
{
|
||||
/* Libquicktime doesn't natively support a color model equivalent
|
||||
to PIX_FMT_ARGB, which is required for QTRLE with alpha channel.
|
||||
So, we use BC_RGBA8888 and do ad hoc conversion below. */
|
||||
- codec->avctx->pix_fmt = PIX_FMT_ARGB;
|
||||
+ codec->avctx->pix_fmt = AV_PIX_FMT_ARGB;
|
||||
vtrack->track->mdia.minf.stbl.stsd.table[0].depth = 32;
|
||||
}
|
||||
}
|
||||
- else if(codec->encoder->id == CODEC_ID_DVVIDEO)
|
||||
+ else if(codec->encoder->id == AV_CODEC_ID_DVVIDEO)
|
||||
{
|
||||
set_dv_fourcc(width, height, vtrack->stream_cmodel, trak);
|
||||
}
|
||||
- else if(codec->encoder->id == CODEC_ID_DNXHD)
|
||||
+ else if(codec->encoder->id == AV_CODEC_ID_DNXHD)
|
||||
{
|
||||
if(vtrack->interlace_mode != LQT_INTERLACE_NONE)
|
||||
{
|
||||
@@ -1740,7 +1740,7 @@ static int lqt_ffmpeg_encode_video(quick
|
||||
init_imx_encoder(file, track);
|
||||
else if(codec->is_xdcam_hd422)
|
||||
init_xdcam_hd422_encoder(file, track);
|
||||
- else if(codec->encoder->id == CODEC_ID_PRORES)
|
||||
+ else if(codec->encoder->id == AV_CODEC_ID_PRORES)
|
||||
init_prores_encoder(file, track);
|
||||
|
||||
/* Initialize 2-pass */
|
||||
@@ -1782,7 +1782,7 @@ static int lqt_ffmpeg_encode_video(quick
|
||||
}
|
||||
// codec->lqt_colormodel = ffmepg_2_lqt(codec->com.ffcodec_enc);
|
||||
|
||||
- if(codec->y_offset != 0 || codec->avctx->pix_fmt == PIX_FMT_ARGB)
|
||||
+ if(codec->y_offset != 0 || codec->avctx->pix_fmt == AV_PIX_FMT_ARGB)
|
||||
{
|
||||
if(!codec->tmp_rows)
|
||||
{
|
||||
@@ -1807,7 +1807,7 @@ static int lqt_ffmpeg_encode_video(quick
|
||||
vtrack->stream_cmodel,
|
||||
0, 0, 0, codec->y_offset);
|
||||
}
|
||||
- else if(codec->avctx->pix_fmt == PIX_FMT_ARGB)
|
||||
+ else if(codec->avctx->pix_fmt == AV_PIX_FMT_ARGB)
|
||||
{
|
||||
convert_rgba_to_argb(row_pointers[0], vtrack->stream_row_span,
|
||||
codec->tmp_rows[0], codec->tmp_row_span,
|
||||
@@ -1861,12 +1861,12 @@ static int lqt_ffmpeg_encode_video(quick
|
||||
if(kf && codec->is_xdcam_hd422 && vtrack->cur_chunk)
|
||||
kf = LQT_PARTIAL_KEY_FRAME; // For XDCAM, only the first key frame is full key frame.
|
||||
|
||||
- if(!was_initialized && codec->encoder->id == CODEC_ID_DNXHD)
|
||||
+ if(!was_initialized && codec->encoder->id == AV_CODEC_ID_DNXHD)
|
||||
setup_avid_atoms(file, vtrack, codec->lqt_pkt.data, bytes_encoded);
|
||||
|
||||
if(bytes_encoded)
|
||||
{
|
||||
- if (pts == AV_NOPTS_VALUE || (codec->encoder->id == CODEC_ID_DNXHD && pts == 0))
|
||||
+ if (pts == AV_NOPTS_VALUE || (codec->encoder->id == AV_CODEC_ID_DNXHD && pts == 0))
|
||||
{
|
||||
/* Some codecs don't bother generating presentation timestamps.
|
||||
FFMpeg's DNxHD encoder doesn't even bother to set it to AV_NOPTS_VALUE. */
|
||||
@@ -1899,13 +1899,13 @@ static int lqt_ffmpeg_encode_video(quick
|
||||
|
||||
if(codec->write_global_header && !codec->global_header_written)
|
||||
{
|
||||
- if(codec->encoder->id == CODEC_ID_FFVHUFF)
|
||||
+ if(codec->encoder->id == AV_CODEC_ID_FFVHUFF)
|
||||
{
|
||||
quicktime_user_atoms_add_atom(&trak->mdia.minf.stbl.stsd.table[0].user_atoms,
|
||||
"glbl",
|
||||
codec->avctx->extradata, codec->avctx->extradata_size );
|
||||
}
|
||||
- else if(codec->encoder->id == CODEC_ID_MPEG4)
|
||||
+ else if(codec->encoder->id == AV_CODEC_ID_MPEG4)
|
||||
{
|
||||
int advanced = 0;
|
||||
if(codec->avctx->max_b_frames ||
|
||||
@@ -2235,13 +2235,13 @@ void quicktime_init_video_codec_ffmpeg(q
|
||||
codec_base->encode_video = lqt_ffmpeg_encode_video;
|
||||
codec_base->set_pass = set_pass_ffmpeg;
|
||||
|
||||
- if(encoder->id == CODEC_ID_MPEG4)
|
||||
+ if(encoder->id == AV_CODEC_ID_MPEG4)
|
||||
{
|
||||
codec_base->writes_compressed = writes_compressed_mpeg4;
|
||||
codec_base->init_compressed = init_compressed_mpeg4;
|
||||
codec_base->write_packet = write_packet_mpeg4;
|
||||
}
|
||||
- else if(encoder->id == CODEC_ID_DVVIDEO)
|
||||
+ else if(encoder->id == AV_CODEC_ID_DVVIDEO)
|
||||
{
|
||||
codec_base->init_compressed = init_compressed_dv;
|
||||
}
|
||||
@@ -2249,7 +2249,7 @@ void quicktime_init_video_codec_ffmpeg(q
|
||||
}
|
||||
if(decoder)
|
||||
{
|
||||
- if(decoder->id == CODEC_ID_H264)
|
||||
+ if(decoder->id == AV_CODEC_ID_H264)
|
||||
codec_base->read_packet = read_packet_h264;
|
||||
codec_base->decode_video = lqt_ffmpeg_decode_video;
|
||||
}
|
@@ -1,3 +1,47 @@
|
||||
-------------------------------------------------------------------
|
||||
Wed Jun 13 09:01:47 UTC 2018 - tchvatal@suse.com
|
||||
|
||||
- Update to version 1.2.4+git20180207.666c35c:
|
||||
* remove generated file that got committed somehow
|
||||
* cleanup - remove all the .cvsignore files
|
||||
* remove another .cvsignore file
|
||||
* remove typo
|
||||
* add a bunch more generated files to ignore
|
||||
* more files added
|
||||
* add more files
|
||||
* switch to .gitignore from .cvsignore
|
||||
* remove m4/avcodec.m4, not needed with changes to configure.ac
|
||||
* don't need avcodec.m4 with changes to configure.ac
|
||||
- Remove merged patches:
|
||||
* libquicktime-1.2.4-integer_overflow.patch
|
||||
* libquicktime-1.2.4-multiple_vulnerabilities.patch
|
||||
- Remove all local patches:
|
||||
* libquicktime-faad2.patch
|
||||
* libquicktime-1.2.4-ffmpeg2.patch
|
||||
* libquicktime-1.2.4-ffmpeg29.patch
|
||||
* libquicktime-1.2.4-ffmpeg4.patch
|
||||
- Readd patches to be rebased from the git:
|
||||
* 0001-Fix-sizeof-call-in-faad2.patch
|
||||
* 0002-Allow-any-avcodec-to-be-detected-by-configure.patch
|
||||
* 0003-Fix-AVCODEC_HEADER-macro-replacement.patch
|
||||
* 0004-Ignore-prepared-patches-in-git-checkout.patch
|
||||
* 0005-ffmpeg4-conversion-fixing-the-erroring-ones-only.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Jun 13 09:01:11 UTC 2018 - tchvatal@suse.com
|
||||
|
||||
- Switch to Git snapshots as upstream moved to git, use _service
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Jun 11 08:50:38 UTC 2018 - tchvatal@suse.com
|
||||
|
||||
- Remove redone patch:
|
||||
* libquicktime-ffmpeg3.patch
|
||||
- Add patch to work with ffmpeg4:
|
||||
* libquicktime-1.2.4-ffmpeg2.patch
|
||||
* libquicktime-1.2.4-ffmpeg29.patch
|
||||
* libquicktime-1.2.4-ffmpeg4.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri May 4 14:03:47 UTC 2018 - olaf@aepfle.de
|
||||
|
||||
|
@@ -16,29 +16,24 @@
|
||||
#
|
||||
|
||||
|
||||
%define sover 0
|
||||
%bcond_with faac
|
||||
%bcond_with faad
|
||||
%bcond_with x264
|
||||
|
||||
%define sover 0
|
||||
%define cvs 20150223
|
||||
Name: libquicktime
|
||||
Version: 1.2.4cvs%{cvs}
|
||||
Version: 1.2.4+git20180207.666c35c
|
||||
Release: 0
|
||||
#to_be_filled_by_service
|
||||
Summary: Library for Reading and Writing Quicktime Movie Files
|
||||
License: GPL-2.0-or-later
|
||||
Group: Development/Libraries/C and C++
|
||||
Url: http://libquicktime.sf.net
|
||||
Source0: %{name}-%{version}.tar.gz
|
||||
Source1: COPYING
|
||||
URL: http://libquicktime.sf.net
|
||||
Source0: %{name}-%{version}.tar.xz
|
||||
Source2: baselibs.conf
|
||||
Patch0: libquicktime-ffmpeg3.patch
|
||||
Patch1: libquicktime-faad2.patch
|
||||
# PATCH-FIX-UPSTREAM bsc#1022805 CVE-2016-2399 kstreitova@suse.com -- fix integer overflow in the quicktime_read_pascal function
|
||||
Patch2: libquicktime-1.2.4-integer_overflow.patch
|
||||
# PATCH-FIX-UPSTREAM kstreitova@suse.com -- fix multiple vulnerabilities (from CVE-2017-9122 to CVE-2017-9128)
|
||||
Patch3: libquicktime-1.2.4-multiple_vulnerabilities.patch
|
||||
Patch1: 0001-Fix-sizeof-call-in-faad2.patch
|
||||
Patch2: 0002-Allow-any-avcodec-to-be-detected-by-configure.patch
|
||||
Patch3: 0003-Fix-AVCODEC_HEADER-macro-replacement.patch
|
||||
#Patch4: 0004-Ignore-prepared-patches-in-git-checkout.patch
|
||||
Patch5: 0005-ffmpeg4-conversion-fixing-the-erroring-ones-only.patch
|
||||
BuildRequires: alsa-devel
|
||||
BuildRequires: autoconf
|
||||
BuildRequires: automake
|
||||
@@ -48,18 +43,17 @@ BuildRequires: libjpeg-devel
|
||||
BuildRequires: libmp3lame-devel
|
||||
BuildRequires: libtool
|
||||
BuildRequires: libvorbis-devel
|
||||
BuildRequires: pkg-config
|
||||
BuildRequires: pkgconfig
|
||||
BuildRequires: schroedinger-devel
|
||||
BuildRequires: pkgconfig(gl)
|
||||
BuildRequires: pkgconfig(libavcodec) = 57.107.100
|
||||
BuildRequires: pkgconfig(libavcodec)
|
||||
BuildRequires: pkgconfig(libpng)
|
||||
BuildRequires: pkgconfig(libswscale) = 4.8.100
|
||||
BuildRequires: pkgconfig(libswscale)
|
||||
BuildRequires: pkgconfig(x11)
|
||||
BuildRequires: pkgconfig(xaw7)
|
||||
BuildRequires: pkgconfig(xext)
|
||||
BuildRequires: pkgconfig(xt)
|
||||
BuildRequires: pkgconfig(xv)
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
%if 0%{?BUILD_ORIG}
|
||||
%if %{with faac}
|
||||
BuildRequires: libfaac-devel
|
||||
@@ -123,14 +117,8 @@ Tools for reading/writing quicktime movie files.
|
||||
%lang_package
|
||||
|
||||
%prep
|
||||
%setup -q -n %{name}
|
||||
%patch0 -p1
|
||||
%patch1 -p1
|
||||
%patch2 -p1
|
||||
%patch3 -p1
|
||||
|
||||
# Replace licence with wrong FSF address
|
||||
cp -v %{SOURCE1} .
|
||||
%setup -q
|
||||
%autopatch -p1
|
||||
|
||||
%build
|
||||
echo 'HTML_TIMESTAMP=NO' >> doc/Doxyfile.in
|
||||
@@ -144,17 +132,16 @@ echo 'HTML_TIMESTAMP=NO' >> doc/Doxyfile.in
|
||||
make %{?_smp_mflags}
|
||||
|
||||
%install
|
||||
make DESTDIR=%{buildroot} install %{?_smp_mflags}
|
||||
%make_install
|
||||
ln -s lqt "%{buildroot}%{_includedir}/quicktime"
|
||||
%find_lang %{name} %{?no_lang_C}
|
||||
find %{buildroot} -type f -name "*.la" -delete -print
|
||||
|
||||
%post -n libquicktime%{sover} -p /sbin/ldconfig
|
||||
|
||||
%postun -n libquicktime%{sover} -p /sbin/ldconfig
|
||||
|
||||
%files
|
||||
%defattr(0644,root,root,0755)
|
||||
%license COPYING
|
||||
%doc ChangeLog README TODO
|
||||
%dir %{_libdir}/libquicktime
|
||||
%{_libdir}/libquicktime/lqt_audiocodec.so
|
||||
@@ -170,7 +157,6 @@ find %{buildroot} -type f -name "*.la" -delete -print
|
||||
|
||||
%if 0%{?BUILD_ORIG}
|
||||
%files orig-addon
|
||||
%defattr(0644,root,root,0755)
|
||||
%if %{with faac}
|
||||
%{_libdir}/libquicktime/lqt_faac.so
|
||||
%endif
|
||||
@@ -183,13 +169,11 @@ find %{buildroot} -type f -name "*.la" -delete -print
|
||||
%endif
|
||||
|
||||
%files -n libquicktime%{sover}
|
||||
%defattr(0644,root,root,0755)
|
||||
%doc COPYING
|
||||
%license COPYING
|
||||
%{_libdir}/libquicktime.so.%{sover}
|
||||
%{_libdir}/libquicktime.so.%{sover}.*.*
|
||||
|
||||
%files -n libquicktime-devel
|
||||
%defattr(0644,root,root,0755)
|
||||
%doc %{_docdir}/%{name}-devel
|
||||
%{_includedir}/lqt
|
||||
%{_includedir}/quicktime
|
||||
@@ -197,7 +181,6 @@ find %{buildroot} -type f -name "*.la" -delete -print
|
||||
%{_libdir}/pkgconfig/libquicktime.pc
|
||||
|
||||
%files -n libquicktime-tools
|
||||
%defattr(-,root,root)
|
||||
%{_bindir}/lqt_transcode
|
||||
%{_bindir}/lqtplay
|
||||
%{_bindir}/lqtremux
|
||||
@@ -208,9 +191,8 @@ find %{buildroot} -type f -name "*.la" -delete -print
|
||||
%{_bindir}/qtrechunk
|
||||
%{_bindir}/qtstreamize
|
||||
%{_bindir}/qtyuv4toyuv
|
||||
%{_mandir}/man1/lqtplay.1%{ext_man}
|
||||
%{_mandir}/man1/lqtplay.1%{?ext_man}
|
||||
|
||||
%files lang -f %{name}.lang
|
||||
%defattr(-,root,root)
|
||||
|
||||
%changelog
|
||||
|
Reference in New Issue
Block a user