Compare commits
106 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
6fd54e4f2e | ||
![]() |
4f74cb9334 | ||
![]() |
3726425d51 | ||
![]() |
bdeb7b6176 | ||
![]() |
7231c30bff | ||
![]() |
6ec4cda182 | ||
![]() |
ae224c924e | ||
![]() |
d56dd43c50 | ||
![]() |
646bcc37e6 | ||
![]() |
6469c199b4 | ||
![]() |
f00e882a1f | ||
![]() |
e8cae38be6 | ||
![]() |
0ff11fd07e | ||
![]() |
08f5567a0c | ||
![]() |
608950bc72 | ||
![]() |
134022ad74 | ||
![]() |
3bba59bd80 | ||
![]() |
3adf1859ee | ||
![]() |
97a24e7638 | ||
![]() |
d559cfb5bd | ||
![]() |
66bfbabafc | ||
![]() |
d746579221 | ||
![]() |
960e591e46 | ||
![]() |
8d0c2755d3 | ||
![]() |
56ff47c9a5 | ||
![]() |
cbf7335940 | ||
![]() |
97f739ac9b | ||
![]() |
c447047117 | ||
![]() |
11bc88eebd | ||
![]() |
7d2e17fd2d | ||
![]() |
1934bb7536 | ||
![]() |
39ed544262 | ||
![]() |
f9e6fb50ce | ||
![]() |
453e2f1528 | ||
![]() |
b25c3063b2 | ||
![]() |
29b14db916 | ||
![]() |
c27f2ea471 | ||
![]() |
d94d383f13 | ||
![]() |
2a8c3a7895 | ||
![]() |
c9f34c8260 | ||
![]() |
e452e4ca5c | ||
![]() |
ec882942ce | ||
![]() |
cbbfdcf9ee | ||
![]() |
139005452d | ||
![]() |
274ec187dc | ||
![]() |
a1e4d1f933 | ||
![]() |
3d4a61fbda | ||
![]() |
d5b068d44b | ||
![]() |
7a472e0da9 | ||
![]() |
f6bca606f1 | ||
![]() |
5fd83f29f7 | ||
![]() |
ba445be96f | ||
![]() |
1b0028a3c5 | ||
![]() |
f7dbe180a0 | ||
![]() |
048cd60dc3 | ||
![]() |
d12294f447 | ||
![]() |
7dd042e657 | ||
![]() |
708101c6f5 | ||
![]() |
2a30d4309f | ||
![]() |
8538811a1f | ||
![]() |
aba32d8463 | ||
![]() |
a3ff859a46 | ||
![]() |
3e63dea5f2 | ||
![]() |
2f76f54443 | ||
![]() |
faeb2b3e69 | ||
![]() |
fff5f65540 | ||
![]() |
7cb24ecd4c | ||
![]() |
9faf323d7e | ||
![]() |
78317ad8b9 | ||
![]() |
753c6377d3 | ||
![]() |
c3a5e7be84 | ||
![]() |
ad35215750 | ||
![]() |
8e2c8aaba4 | ||
![]() |
b5469fec6a | ||
![]() |
864a7e73b9 | ||
![]() |
562aa82d2a | ||
![]() |
3fb1a6c702 | ||
![]() |
dd64626022 | ||
![]() |
a31be9dd06 | ||
![]() |
c095137d1b | ||
![]() |
b63dbe2220 | ||
![]() |
5df2dc0f94 | ||
![]() |
4b03f2c522 | ||
![]() |
a8b92c4b3c | ||
![]() |
381e3e7e44 | ||
![]() |
ec18baadfa | ||
![]() |
2f98537ea0 | ||
![]() |
ebe645f02b | ||
![]() |
470ee0c660 | ||
![]() |
3cecef5b03 | ||
![]() |
155a0bed97 | ||
![]() |
ebb3a5974f | ||
![]() |
91e016865c | ||
![]() |
16b0b75327 | ||
![]() |
d338632e9f | ||
![]() |
bf19d4c6fa | ||
![]() |
5502b073ec | ||
![]() |
8bc0127b3d | ||
![]() |
5f0e5b4048 | ||
![]() |
e9ded2e1a9 | ||
![]() |
6d16f5c3f9 | ||
![]() |
28e609a84f | ||
![]() |
c6850d3862 | ||
![]() |
69cc119d64 | ||
![]() |
54ac3d10d1 | ||
![]() |
d3835cb877 |
2
Doxyfile
2
Doxyfile
@@ -31,7 +31,7 @@ PROJECT_NAME = FFmpeg
|
||||
# This could be handy for archiving the generated documentation or
|
||||
# if some version control system is used.
|
||||
|
||||
PROJECT_NUMBER = 0.11.2
|
||||
PROJECT_NUMBER = 0.11.4
|
||||
|
||||
# With the PROJECT_LOGO tag one can specify an logo or icon that is included
|
||||
# in the documentation. The maximum height of the logo should not exceed 55
|
||||
|
@@ -400,9 +400,11 @@ x86 Michael Niedermayer
|
||||
Releases
|
||||
========
|
||||
|
||||
0.11 Michael Niedermayer
|
||||
0.10 Michael Niedermayer
|
||||
1.2 Michael Niedermayer
|
||||
1.1 Michael Niedermayer
|
||||
1.0 Michael Niedermayer
|
||||
|
||||
If you want to maintain an older release, please contact us
|
||||
|
||||
|
||||
GnuPG Fingerprints of maintainers and contributors
|
||||
|
@@ -59,7 +59,7 @@ struct SwsContext *sws_opts;
|
||||
SwrContext *swr_opts;
|
||||
AVDictionary *format_opts, *codec_opts;
|
||||
|
||||
const int this_year = 2012;
|
||||
const int this_year = 2013;
|
||||
|
||||
static FILE *report_file;
|
||||
|
||||
|
11
configure
vendored
11
configure
vendored
@@ -3291,7 +3291,14 @@ makeinfo --version > /dev/null 2>&1 && enable makeinfo || disable makeinfo
|
||||
check_header linux/fb.h
|
||||
check_header linux/videodev.h
|
||||
check_header linux/videodev2.h
|
||||
check_struct linux/videodev2.h "struct v4l2_frmivalenum" discrete
|
||||
check_cc <<EOF && enable_safe struct_v4l2_frmivalenum_discrete
|
||||
#include <linux/videodev2.h>
|
||||
int main(void) {
|
||||
struct v4l2_frmsizeenum vfse;
|
||||
vfse.discrete.width = 0;
|
||||
return 0;
|
||||
}
|
||||
EOF
|
||||
|
||||
check_header sys/videoio.h
|
||||
|
||||
@@ -3452,11 +3459,13 @@ elif enabled gcc; then
|
||||
check_cflags -fno-tree-vectorize
|
||||
check_cflags -Werror=implicit-function-declaration
|
||||
check_cflags -Werror=missing-prototypes
|
||||
check_cflags -Werror=return-type
|
||||
elif enabled llvm_gcc; then
|
||||
check_cflags -mllvm -stack-alignment=16
|
||||
elif enabled clang; then
|
||||
check_cflags -mllvm -stack-alignment=16
|
||||
check_cflags -Qunused-arguments
|
||||
check_cflags -Werror=return-type
|
||||
elif enabled armcc; then
|
||||
# 2523: use of inline assembler is deprecated
|
||||
add_cflags -W${armcc_opt},--diag_suppress=2523
|
||||
|
276
doc/APIchanges
276
doc/APIchanges
@@ -31,39 +31,39 @@ API changes, most recent first:
|
||||
2012-03-26 - a67d9cf - lavfi 2.66.100
|
||||
Add avfilter_fill_frame_from_{audio_,}buffer_ref() functions.
|
||||
|
||||
2012-05-15 - lavfi 2.17.0
|
||||
2012-05-15 - lavfi 2.74.100 / 2.17.0
|
||||
Add support for audio filters
|
||||
ac71230/a2cd9be - add video/audio buffer sink in a new installed
|
||||
61930bd / ac71230, 1cbf7fb / a2cd9be - add video/audio buffer sink in a new installed
|
||||
header buffersink.h
|
||||
720c6b7 - add av_buffersrc_write_frame(), deprecate
|
||||
1cbf7fb / 720c6b7 - add av_buffersrc_write_frame(), deprecate
|
||||
av_vsrc_buffer_add_frame()
|
||||
ab16504 - add avfilter_copy_buf_props()
|
||||
9453c9e - add extended_data to AVFilterBuffer
|
||||
1b8c927 - add avfilter_get_audio_buffer_ref_from_arrays()
|
||||
61930bd / ab16504 - add avfilter_copy_buf_props()
|
||||
61930bd / 9453c9e - add extended_data to AVFilterBuffer
|
||||
61930bd / 1b8c927 - add avfilter_get_audio_buffer_ref_from_arrays()
|
||||
|
||||
2012-05-09 - lavu 51.30.0 - samplefmt.h
|
||||
142e740 - add av_samples_copy()
|
||||
6d7f617 - add av_samples_set_silence()
|
||||
2012-05-09 - lavu 51.53.100 / 51.30.0 - samplefmt.h
|
||||
61930bd / 142e740 - add av_samples_copy()
|
||||
61930bd / 6d7f617 - add av_samples_set_silence()
|
||||
|
||||
2012-05-09 - a5117a2 - lavc 54.13.1
|
||||
2012-05-09 - 61930bd / a5117a2 - lavc 54.21.101 / 54.13.1
|
||||
For audio formats with fixed frame size, the last frame
|
||||
no longer needs to be padded with silence, libavcodec
|
||||
will handle this internally (effectively all encoders
|
||||
behave as if they had CODEC_CAP_SMALL_LAST_FRAME set).
|
||||
|
||||
2012-05-07 - 828bd08 - lavc 54.13.0 - avcodec.h
|
||||
2012-05-07 - 653d117 / 828bd08 - lavc 54.20.100 / 54.13.0 - avcodec.h
|
||||
Add sample_rate and channel_layout fields to AVFrame.
|
||||
|
||||
2012-05-01 - 4010d72 - lavr 0.0.1
|
||||
2012-05-01 - 2330eb1 / 4010d72 - lavr 0.0.1
|
||||
Change AV_MIX_COEFF_TYPE_Q6 to AV_MIX_COEFF_TYPE_Q8.
|
||||
|
||||
2012-04-25 - 3527a73 - lavu 51.29.0 - cpu.h
|
||||
2012-04-25 - e890b68 / 3527a73 - lavu 51.48.100 / 51.29.0 - cpu.h
|
||||
Add av_parse_cpu_flags()
|
||||
|
||||
2012-04-24 - c8af852 - lavr 0.0.0
|
||||
2012-04-24 - 3ead79e / c8af852 - lavr 0.0.0
|
||||
Add libavresample audio conversion library
|
||||
|
||||
2012-04-20 - 0c0d1bc - lavu 51.28.0 - audio_fifo.h
|
||||
2012-04-20 - 3194ab7 / 0c0d1bc - lavu 51.47.100 / 51.28.0 - audio_fifo.h
|
||||
Add audio FIFO functions:
|
||||
av_audio_fifo_free()
|
||||
av_audio_fifo_alloc()
|
||||
@@ -75,10 +75,10 @@ API changes, most recent first:
|
||||
av_audio_fifo_size()
|
||||
av_audio_fifo_space()
|
||||
|
||||
2012-04-14 - lavfi 2.16.0 - avfiltergraph.h
|
||||
d7bcc71 Add avfilter_graph_parse2().
|
||||
2012-04-14 - lavfi 2.70.100 / 2.16.0 - avfiltergraph.h
|
||||
7432bcf / d7bcc71 Add avfilter_graph_parse2().
|
||||
|
||||
2012-04-08 - 4d693b0 - lavu 51.27.0 - samplefmt.h
|
||||
2012-04-08 - 6bfb304 / 4d693b0 - lavu 51.46.100 / 51.27.0 - samplefmt.h
|
||||
Add av_get_packed_sample_fmt() and av_get_planar_sample_fmt()
|
||||
|
||||
2012-03-21 - b75c67d - lavu 51.43.100
|
||||
@@ -106,69 +106,69 @@ API changes, most recent first:
|
||||
2012-01-24 - 0c3577b - lavfi 2.60.100
|
||||
Add avfilter_graph_dump.
|
||||
|
||||
2012-03-05 - lavc 54.8.0
|
||||
6699d07 Add av_get_exact_bits_per_sample()
|
||||
9524cf7 Add av_get_audio_frame_duration()
|
||||
2012-03-05 - lavc 54.10.100 / 54.8.0
|
||||
f095391 / 6699d07 Add av_get_exact_bits_per_sample()
|
||||
f095391 / 9524cf7 Add av_get_audio_frame_duration()
|
||||
|
||||
2012-03-04 - 44fe77b - lavc 54.7.0 - avcodec.h
|
||||
2012-03-04 - 2af8f2c / 44fe77b - lavc 54.8.100 / 54.7.0 - avcodec.h
|
||||
Add av_codec_is_encoder/decoder().
|
||||
|
||||
2012-03-01 - 442c132 - lavc 54.3.0 - avcodec.h
|
||||
2012-03-01 - 1eb7f39 / 442c132 - lavc 54.5.100 / 54.3.0 - avcodec.h
|
||||
Add av_packet_shrink_side_data.
|
||||
|
||||
2012-02-29 - dd2a4bc - lavf 54.2.0 - avformat.h
|
||||
2012-02-29 - 79ae084 / dd2a4bc - lavf 54.2.100 / 54.2.0 - avformat.h
|
||||
Add AVStream.attached_pic and AV_DISPOSITION_ATTACHED_PIC,
|
||||
used for dealing with attached pictures/cover art.
|
||||
|
||||
2012-02-25 - c9bca80 - lavu 51.24.0 - error.h
|
||||
2012-02-25 - 305e4b3 / c9bca80 - lavu 51.41.100 / 51.24.0 - error.h
|
||||
Add AVERROR_UNKNOWN
|
||||
NOTE: this was backported to 0.8
|
||||
|
||||
2012-02-20 - e9cda85 - lavc 54.2.0
|
||||
2012-02-20 - eadd426 / e9cda85 - lavc 54.2.100 / 54.2.0
|
||||
Add duration field to AVCodecParserContext
|
||||
|
||||
2012-02-20 - 0b42a93 - lavu 51.23.1 - mathematics.h
|
||||
2012-02-20 - eadd426 / 0b42a93 - lavu 51.40.100 / 51.23.1 - mathematics.h
|
||||
Add av_rescale_q_rnd()
|
||||
|
||||
2012-02-08 - 38d5533 - lavu 51.22.1 - pixdesc.h
|
||||
2012-02-08 - f2b20b7 / 38d5533 - lavu 51.38.101 / 51.22.1 - pixdesc.h
|
||||
Add PIX_FMT_PSEUDOPAL flag.
|
||||
|
||||
2012-02-08 - 52f82a1 - lavc 54.01.0
|
||||
2012-02-08 - f2b20b7 / 52f82a1 - lavc 54.2.100 / 54.1.0
|
||||
Add avcodec_encode_video2() and deprecate avcodec_encode_video().
|
||||
|
||||
2012-02-01 - 316fc74 - lavc 54.01.0
|
||||
2012-02-01 - 4c677df / 316fc74 - lavc 54.1.0
|
||||
Add av_fast_padded_malloc() as alternative for av_realloc() when aligned
|
||||
memory is required. The buffer will always have FF_INPUT_BUFFER_PADDING_SIZE
|
||||
zero-padded bytes at the end.
|
||||
|
||||
2012-01-31 - dd6d3b0 - lavf 54.01.0
|
||||
2012-01-31 - a369a6b / dd6d3b0 - lavf 54.1.0
|
||||
Add avformat_get_riff_video_tags() and avformat_get_riff_audio_tags().
|
||||
NOTE: this was backported to 0.8
|
||||
|
||||
2012-01-31 - af08d9a - lavc 54.01.0
|
||||
2012-01-31 - a369a6b / af08d9a - lavc 54.1.0
|
||||
Add avcodec_is_open() function.
|
||||
NOTE: this was backported to 0.8
|
||||
|
||||
2012-01-30 - 8b93312 - lavu 51.22.0 - intfloat.h
|
||||
2012-01-30 - 151ecc2 / 8b93312 - lavu 51.36.100 / 51.22.0 - intfloat.h
|
||||
Add a new installed header libavutil/intfloat.h with int/float punning
|
||||
functions.
|
||||
NOTE: this was backported to 0.8
|
||||
|
||||
2012-01-25 - lavf 53.22.0
|
||||
f1caf01 Allow doing av_write_frame(ctx, NULL) for flushing possible
|
||||
2012-01-25 - lavf 53.31.100 / 53.22.0
|
||||
3c5fe5b / f1caf01 Allow doing av_write_frame(ctx, NULL) for flushing possible
|
||||
buffered data within a muxer. Added AVFMT_ALLOW_FLUSH for
|
||||
muxers supporting it (av_write_frame makes sure it is called
|
||||
only for muxers with this flag).
|
||||
|
||||
2012-01-15 - lavc 53.34.0
|
||||
2012-01-15 - lavc 53.56.105 / 53.34.0
|
||||
New audio encoding API:
|
||||
b2c75b6 Add CODEC_CAP_VARIABLE_FRAME_SIZE capability for use by audio
|
||||
67f5650 / b2c75b6 Add CODEC_CAP_VARIABLE_FRAME_SIZE capability for use by audio
|
||||
encoders.
|
||||
5ee5fa0 Add avcodec_fill_audio_frame() as a convenience function.
|
||||
b2c75b6 Add avcodec_encode_audio2() and deprecate avcodec_encode_audio().
|
||||
67f5650 / 5ee5fa0 Add avcodec_fill_audio_frame() as a convenience function.
|
||||
67f5650 / b2c75b6 Add avcodec_encode_audio2() and deprecate avcodec_encode_audio().
|
||||
Add AVCodec.encode2().
|
||||
|
||||
2012-01-12 - 3167dc9 - lavfi 2.15.0
|
||||
2012-01-12 - b18e17e / 3167dc9 - lavfi 2.59.100 / 2.15.0
|
||||
Add a new installed header -- libavfilter/version.h -- with version macros.
|
||||
|
||||
2011-12-08 - a502939 - lavfi 2.52.0
|
||||
@@ -189,37 +189,37 @@ API changes, most recent first:
|
||||
2011-10-20 - b35e9e1 - lavu 51.22.0
|
||||
Add av_strtok() to avstring.h.
|
||||
|
||||
2011-01-03 - b73ec05 - lavu 51.21.0
|
||||
2012-01-03 - ad1c8dd / b73ec05 - lavu 51.34.100 / 51.21.0
|
||||
Add av_popcount64
|
||||
|
||||
2011-12-18 - 8400b12 - lavc 53.28.1
|
||||
2011-12-18 - 7c29313 / 8400b12 - lavc 53.46.1 / 53.28.1
|
||||
Deprecate AVFrame.age. The field is unused.
|
||||
|
||||
2011-12-12 - 5266045 - lavf 53.17.0
|
||||
2011-12-12 - 8bc7fe4 / 5266045 - lavf 53.25.0 / 53.17.0
|
||||
Add avformat_close_input().
|
||||
Deprecate av_close_input_file() and av_close_input_stream().
|
||||
|
||||
2011-12-02 - 0eea212 - lavc 53.25.0
|
||||
2011-12-02 - e4de716 / 0eea212 - lavc 53.40.0 / 53.25.0
|
||||
Add nb_samples and extended_data fields to AVFrame.
|
||||
Deprecate AVCODEC_MAX_AUDIO_FRAME_SIZE.
|
||||
Deprecate avcodec_decode_audio3() in favor of avcodec_decode_audio4().
|
||||
avcodec_decode_audio4() writes output samples to an AVFrame, which allows
|
||||
audio decoders to use get_buffer().
|
||||
|
||||
2011-12-04 - 560f773 - lavc 53.24.0
|
||||
2011-12-04 - e4de716 / 560f773 - lavc 53.40.0 / 53.24.0
|
||||
Change AVFrame.data[4]/base[4]/linesize[4]/error[4] to [8] at next major bump.
|
||||
Change AVPicture.data[4]/linesize[4] to [8] at next major bump.
|
||||
Change AVCodecContext.error[4] to [8] at next major bump.
|
||||
Add AV_NUM_DATA_POINTERS to simplify the bump transition.
|
||||
|
||||
2011-11-23 - bbb46f3 - lavu 51.18.0
|
||||
2011-11-23 - 8e576d5 / bbb46f3 - lavu 51.27.0 / 51.18.0
|
||||
Add av_samples_get_buffer_size(), av_samples_fill_arrays(), and
|
||||
av_samples_alloc(), to samplefmt.h.
|
||||
|
||||
2011-11-23 - 8889cc4 - lavu 51.17.0
|
||||
2011-11-23 - 8e576d5 / 8889cc4 - lavu 51.27.0 / 51.17.0
|
||||
Add planar sample formats and av_sample_fmt_is_planar() to samplefmt.h.
|
||||
|
||||
2011-11-19 - f3a29b7 - lavc 53.21.0
|
||||
2011-11-19 - dbb38bc / f3a29b7 - lavc 53.36.0 / 53.21.0
|
||||
Move some AVCodecContext fields to a new private struct, AVCodecInternal,
|
||||
which is accessed from a new field, AVCodecContext.internal.
|
||||
- fields moved:
|
||||
@@ -227,55 +227,55 @@ API changes, most recent first:
|
||||
AVCodecContext.internal_buffer_count --> AVCodecInternal.buffer_count
|
||||
AVCodecContext.is_copy --> AVCodecInternal.is_copy
|
||||
|
||||
2011-11-16 - 6270671 - lavu 51.16.0
|
||||
2011-11-16 - 8709ba9 / 6270671 - lavu 51.26.0 / 51.16.0
|
||||
Add av_timegm()
|
||||
|
||||
2011-11-13 - lavf 53.15.0
|
||||
2011-11-13 - lavf 53.21.0 / 53.15.0
|
||||
New interrupt callback API, allowing per-AVFormatContext/AVIOContext
|
||||
interrupt callbacks.
|
||||
6aa0b98 Add AVIOInterruptCB struct and the interrupt_callback field to
|
||||
5f268ca / 6aa0b98 Add AVIOInterruptCB struct and the interrupt_callback field to
|
||||
AVFormatContext.
|
||||
1dee0ac Add avio_open2() with additional parameters. Those are
|
||||
5f268ca / 1dee0ac Add avio_open2() with additional parameters. Those are
|
||||
an interrupt callback and an options AVDictionary.
|
||||
This will allow passing AVOptions to protocols after lavf
|
||||
54.0.
|
||||
|
||||
2011-11-06 - ba04ecf - lavu 51.14.0
|
||||
2011-11-06 - 13b7781 / ba04ecf - lavu 51.24.0 / 51.14.0
|
||||
Add av_strcasecmp() and av_strncasecmp() to avstring.h.
|
||||
|
||||
2011-11-06 - 07b172f - lavu 51.13.0
|
||||
2011-11-06 - 13b7781 / 07b172f - lavu 51.24.0 / 51.13.0
|
||||
Add av_toupper()/av_tolower()
|
||||
|
||||
2011-11-05 - b6d08f4 - lavf 53.13.0
|
||||
2011-11-05 - d8cab5c / b6d08f4 - lavf 53.19.0 / 53.13.0
|
||||
Add avformat_network_init()/avformat_network_deinit()
|
||||
|
||||
2011-10-27 - 512557b - lavc 53.15.0
|
||||
2011-10-27 - 6faf0a2 / 512557b - lavc 53.24.0 / 53.15.0
|
||||
Remove avcodec_parse_frame.
|
||||
Deprecate AVCodecContext.parse_only and CODEC_CAP_PARSE_ONLY.
|
||||
|
||||
2011-10-19 - 569129a - lavf 53.10.0
|
||||
2011-10-19 - d049257 / 569129a - lavf 53.17.0 / 53.10.0
|
||||
Add avformat_new_stream(). Deprecate av_new_stream().
|
||||
|
||||
2011-10-13 - b631fba - lavf 53.9.0
|
||||
2011-10-13 - 91eb1b1 / b631fba - lavf 53.16.0 / 53.9.0
|
||||
Add AVFMT_NO_BYTE_SEEK AVInputFormat flag.
|
||||
|
||||
2011-10-12 - lavu 51.12.0
|
||||
2011-10-12 - lavu 51.21.0 / 51.12.0
|
||||
AVOptions API rewrite.
|
||||
|
||||
- 145f741 FF_OPT_TYPE* renamed to AV_OPT_TYPE_*
|
||||
- f884ef0 / 145f741 FF_OPT_TYPE* renamed to AV_OPT_TYPE_*
|
||||
- new setting/getting functions with slightly different semantics:
|
||||
dac66da av_set_string3 -> av_opt_set
|
||||
f884ef0 / dac66da av_set_string3 -> av_opt_set
|
||||
av_set_double -> av_opt_set_double
|
||||
av_set_q -> av_opt_set_q
|
||||
av_set_int -> av_opt_set_int
|
||||
|
||||
41d9d51 av_get_string -> av_opt_get
|
||||
f884ef0 / 41d9d51 av_get_string -> av_opt_get
|
||||
av_get_double -> av_opt_get_double
|
||||
av_get_q -> av_opt_get_q
|
||||
av_get_int -> av_opt_get_int
|
||||
|
||||
- 8c5dcaa trivial rename av_next_option -> av_opt_next
|
||||
- 641c7af new functions - av_opt_child_next, av_opt_child_class_next
|
||||
- f884ef0 / 8c5dcaa trivial rename av_next_option -> av_opt_next
|
||||
- f884ef0 / 641c7af new functions - av_opt_child_next, av_opt_child_class_next
|
||||
and av_opt_find2()
|
||||
|
||||
2011-09-22 - a70e787 - lavu 51.17.0
|
||||
@@ -321,31 +321,31 @@ API changes, most recent first:
|
||||
2011-08-20 - 69e2c1a - lavu 51.13.0
|
||||
Add av_get_media_type_string().
|
||||
|
||||
2011-09-03 - fb4ca26 - lavc 53.13.0
|
||||
2011-09-03 - 1889c67 / fb4ca26 - lavc 53.13.0
|
||||
lavf 53.11.0
|
||||
lsws 2.1.0
|
||||
Add {avcodec,avformat,sws}_get_class().
|
||||
|
||||
2011-08-03 - c11fb82 - lavu 51.15.0
|
||||
2011-08-03 - 1889c67 / c11fb82 - lavu 51.15.0
|
||||
Add AV_OPT_SEARCH_FAKE_OBJ flag for av_opt_find() function.
|
||||
|
||||
2011-08-14 - 323b930 - lavu 51.12.0
|
||||
Add av_fifo_peek2(), deprecate av_fifo_peek().
|
||||
|
||||
2011-08-26 - lavu 51.9.0
|
||||
- add41de..abc78a5 Do not include intfloat_readwrite.h,
|
||||
2011-08-26 - lavu 51.14.0 / 51.9.0
|
||||
- 976a8b2 / add41de..976a8b2 / abc78a5 Do not include intfloat_readwrite.h,
|
||||
mathematics.h, rational.h, pixfmt.h, or log.h from avutil.h.
|
||||
|
||||
2011-08-16 - 48f9e45 - lavf 53.8.0
|
||||
2011-08-16 - 27fbe31 / 48f9e45 - lavf 53.11.0 / 53.8.0
|
||||
Add avformat_query_codec().
|
||||
|
||||
2011-08-16 - bca06e7 - lavc 53.11.0
|
||||
2011-08-16 - 27fbe31 / bca06e7 - lavc 53.11.0
|
||||
Add avcodec_get_type().
|
||||
|
||||
2011-08-06 - 2f63440 - lavf 53.7.0
|
||||
2011-08-06 - 0cb233c / 2f63440 - lavf 53.7.0
|
||||
Add error_recognition to AVFormatContext.
|
||||
|
||||
2011-08-02 - 9d39cbf - lavc 53.9.1
|
||||
2011-08-02 - 1d186e9 / 9d39cbf - lavc 53.9.1
|
||||
Add AV_PKT_FLAG_CORRUPT AVPacket flag.
|
||||
|
||||
2011-07-16 - b57df29 - lavfi 2.27.0
|
||||
@@ -356,11 +356,11 @@ API changes, most recent first:
|
||||
avfilter_set_common_packing_formats()
|
||||
avfilter_all_packing_formats()
|
||||
|
||||
2011-07-10 - a67c061 - lavf 53.6.0
|
||||
2011-07-10 - 3602ad7 / a67c061 - lavf 53.6.0
|
||||
Add avformat_find_stream_info(), deprecate av_find_stream_info().
|
||||
NOTE: this was backported to 0.7
|
||||
|
||||
2011-07-10 - 0b950fe - lavc 53.8.0
|
||||
2011-07-10 - 3602ad7 / 0b950fe - lavc 53.8.0
|
||||
Add avcodec_open2(), deprecate avcodec_open().
|
||||
NOTE: this was backported to 0.7
|
||||
|
||||
@@ -403,35 +403,35 @@ API changes, most recent first:
|
||||
2011-06-12 - 6119b23 - lavfi 2.16.0 - avfilter_graph_parse()
|
||||
Change avfilter_graph_parse() signature.
|
||||
|
||||
2011-06-23 - 67e9ae1 - lavu 51.8.0 - attributes.h
|
||||
2011-06-23 - 686959e / 67e9ae1 - lavu 51.10.0 / 51.8.0 - attributes.h
|
||||
Add av_printf_format().
|
||||
|
||||
2011-06-16 - 05e84c9, 25de595 - lavf 53.2.0 - avformat.h
|
||||
2011-06-16 - 2905e3f / 05e84c9, 2905e3f / 25de595 - lavf 53.4.0 / 53.2.0 - avformat.h
|
||||
Add avformat_open_input and avformat_write_header().
|
||||
Deprecate av_open_input_stream, av_open_input_file,
|
||||
AVFormatParameters and av_write_header.
|
||||
|
||||
2011-06-16 - 7e83e1c, dc59ec5 - lavu 51.7.0 - opt.h
|
||||
2011-06-16 - 2905e3f / 7e83e1c, 2905e3f / dc59ec5 - lavu 51.9.0 / 51.7.0 - opt.h
|
||||
Add av_opt_set_dict() and av_opt_find().
|
||||
Deprecate av_find_opt().
|
||||
Add AV_DICT_APPEND flag.
|
||||
|
||||
2011-06-10 - cb7c11c - lavu 51.6.0 - opt.h
|
||||
2011-06-10 - 45fb647 / cb7c11c - lavu 51.6.0 - opt.h
|
||||
Add av_opt_flag_is_set().
|
||||
|
||||
2011-06-10 - c381960 - lavfi 2.15.0 - avfilter_get_audio_buffer_ref_from_arrays
|
||||
Add avfilter_get_audio_buffer_ref_from_arrays() to avfilter.h.
|
||||
|
||||
2011-06-09 - d9f80ea - lavu 51.8.0 - AVMetadata
|
||||
2011-06-09 - f9ecb84 / d9f80ea - lavu 51.8.0 - AVMetadata
|
||||
Move AVMetadata from lavf to lavu and rename it to
|
||||
AVDictionary -- new installed header dict.h.
|
||||
All av_metadata_* functions renamed to av_dict_*.
|
||||
|
||||
2011-06-07 - a6703fa - lavu 51.8.0 - av_get_bytes_per_sample()
|
||||
2011-06-07 - d552f61 / a6703fa - lavu 51.8.0 - av_get_bytes_per_sample()
|
||||
Add av_get_bytes_per_sample() in libavutil/samplefmt.h.
|
||||
Deprecate av_get_bits_per_sample_fmt().
|
||||
|
||||
2011-06-05 - b39b062 - lavu 51.8.0 - opt.h
|
||||
2011-06-05 - f956924 / b39b062 - lavu 51.8.0 - opt.h
|
||||
Add av_opt_free convenience function.
|
||||
|
||||
2011-06-06 - 95a0242 - lavfi 2.14.0 - AVFilterBufferRefAudioProps
|
||||
@@ -461,7 +461,7 @@ API changes, most recent first:
|
||||
Add av_get_pix_fmt_name() in libavutil/pixdesc.h, and deprecate
|
||||
avcodec_get_pix_fmt_name() in libavcodec/avcodec.h in its favor.
|
||||
|
||||
2011-05-25 - 30315a8 - lavf 53.3.0 - avformat.h
|
||||
2011-05-25 - 39e4206 / 30315a8 - lavf 53.3.0 - avformat.h
|
||||
Add fps_probe_size to AVFormatContext.
|
||||
|
||||
2011-05-22 - 5ecdfd0 - lavf 53.2.0 - avformat.h
|
||||
@@ -477,10 +477,10 @@ API changes, most recent first:
|
||||
2011-05-14 - 9fdf772 - lavfi 2.6.0 - avcodec.h
|
||||
Add avfilter_get_video_buffer_ref_from_frame() to libavfilter/avcodec.h.
|
||||
|
||||
2011-05-18 - 64150ff - lavc 53.7.0 - AVCodecContext.request_sample_fmt
|
||||
2011-05-18 - 75a37b5 / 64150ff - lavc 53.7.0 - AVCodecContext.request_sample_fmt
|
||||
Add request_sample_fmt field to AVCodecContext.
|
||||
|
||||
2011-05-10 - 188dea1 - lavc 53.6.0 - avcodec.h
|
||||
2011-05-10 - 59eb12f / 188dea1 - lavc 53.6.0 - avcodec.h
|
||||
Deprecate AVLPCType and the following fields in
|
||||
AVCodecContext: lpc_coeff_precision, prediction_order_method,
|
||||
min_partition_order, max_partition_order, lpc_type, lpc_passes.
|
||||
@@ -510,81 +510,81 @@ API changes, most recent first:
|
||||
Add av_dynarray_add function for adding
|
||||
an element to a dynamic array.
|
||||
|
||||
2011-04-26 - bebe72f - lavu 51.1.0 - avutil.h
|
||||
2011-04-26 - d7e5aeb / bebe72f - lavu 51.1.0 - avutil.h
|
||||
Add AVPictureType enum and av_get_picture_type_char(), deprecate
|
||||
FF_*_TYPE defines and av_get_pict_type_char() defined in
|
||||
libavcodec/avcodec.h.
|
||||
|
||||
2011-04-26 - 10d3940 - lavfi 2.3.0 - avfilter.h
|
||||
2011-04-26 - d7e5aeb / 10d3940 - lavfi 2.3.0 - avfilter.h
|
||||
Add pict_type and key_frame fields to AVFilterBufferRefVideo.
|
||||
|
||||
2011-04-26 - 7a11c82 - lavfi 2.2.0 - vsrc_buffer
|
||||
2011-04-26 - d7e5aeb / 7a11c82 - lavfi 2.2.0 - vsrc_buffer
|
||||
Add sample_aspect_ratio fields to vsrc_buffer arguments
|
||||
|
||||
2011-04-21 - 94f7451 - lavc 53.1.0 - avcodec.h
|
||||
2011-04-21 - 8772156 / 94f7451 - lavc 53.1.0 - avcodec.h
|
||||
Add CODEC_CAP_SLICE_THREADS for codecs supporting sliced threading.
|
||||
|
||||
2011-04-15 - lavc 52.120.0 - avcodec.h
|
||||
AVPacket structure got additional members for passing side information:
|
||||
4de339e introduce side information for AVPacket
|
||||
2d8591c make containers pass palette change in AVPacket
|
||||
c407984 / 4de339e introduce side information for AVPacket
|
||||
c407984 / 2d8591c make containers pass palette change in AVPacket
|
||||
|
||||
2011-04-12 - lavf 52.107.0 - avio.h
|
||||
Avio cleanup, part II - deprecate the entire URLContext API:
|
||||
175389c add avio_check as a replacement for url_exist
|
||||
ff1ec0c add avio_pause and avio_seek_time as replacements
|
||||
c55780d / 175389c add avio_check as a replacement for url_exist
|
||||
9891004 / ff1ec0c add avio_pause and avio_seek_time as replacements
|
||||
for _av_url_read_fseek/fpause
|
||||
cdc6a87 deprecate av_protocol_next(), avio_enum_protocols
|
||||
d4d0932 / cdc6a87 deprecate av_protocol_next(), avio_enum_protocols
|
||||
should be used instead.
|
||||
80c6e23 rename url_set_interrupt_cb->avio_set_interrupt_cb.
|
||||
f87b1b3 rename open flags: URL_* -> AVIO_*
|
||||
f8270bb add avio_enum_protocols.
|
||||
5593f03 deprecate URLProtocol.
|
||||
c486dad deprecate URLContext.
|
||||
026e175 deprecate the typedef for URLInterruptCB
|
||||
8e76a19 deprecate av_register_protocol2.
|
||||
b840484 deprecate URL_PROTOCOL_FLAG_NESTED_SCHEME
|
||||
1305d93 deprecate av_url_read_seek
|
||||
fa104e1 deprecate av_url_read_pause
|
||||
727c7aa deprecate url_get_filename().
|
||||
5958df3 deprecate url_max_packet_size().
|
||||
1869ea0 deprecate url_get_file_handle().
|
||||
32a97d4 deprecate url_filesize().
|
||||
e52a914 deprecate url_close().
|
||||
58a48c6 deprecate url_seek().
|
||||
925e908 deprecate url_write().
|
||||
dce3756 deprecate url_read_complete().
|
||||
bc371ac deprecate url_read().
|
||||
0589da0 deprecate url_open().
|
||||
62eaaea deprecate url_connect.
|
||||
5652bb9 deprecate url_alloc.
|
||||
333e894 deprecate url_open_protocol
|
||||
e230705 deprecate url_poll and URLPollEntry
|
||||
c88caa5 / 80c6e23 rename url_set_interrupt_cb->avio_set_interrupt_cb.
|
||||
c88caa5 / f87b1b3 rename open flags: URL_* -> AVIO_*
|
||||
d4d0932 / f8270bb add avio_enum_protocols.
|
||||
d4d0932 / 5593f03 deprecate URLProtocol.
|
||||
d4d0932 / c486dad deprecate URLContext.
|
||||
d4d0932 / 026e175 deprecate the typedef for URLInterruptCB
|
||||
c88caa5 / 8e76a19 deprecate av_register_protocol2.
|
||||
11d7841 / b840484 deprecate URL_PROTOCOL_FLAG_NESTED_SCHEME
|
||||
11d7841 / 1305d93 deprecate av_url_read_seek
|
||||
11d7841 / fa104e1 deprecate av_url_read_pause
|
||||
434f248 / 727c7aa deprecate url_get_filename().
|
||||
434f248 / 5958df3 deprecate url_max_packet_size().
|
||||
434f248 / 1869ea0 deprecate url_get_file_handle().
|
||||
434f248 / 32a97d4 deprecate url_filesize().
|
||||
434f248 / e52a914 deprecate url_close().
|
||||
434f248 / 58a48c6 deprecate url_seek().
|
||||
434f248 / 925e908 deprecate url_write().
|
||||
434f248 / dce3756 deprecate url_read_complete().
|
||||
434f248 / bc371ac deprecate url_read().
|
||||
434f248 / 0589da0 deprecate url_open().
|
||||
434f248 / 62eaaea deprecate url_connect.
|
||||
434f248 / 5652bb9 deprecate url_alloc.
|
||||
434f248 / 333e894 deprecate url_open_protocol
|
||||
434f248 / e230705 deprecate url_poll and URLPollEntry
|
||||
|
||||
2011-04-08 - lavf 52.106.0 - avformat.h
|
||||
Minor avformat.h cleanup:
|
||||
a9bf9d8 deprecate av_guess_image2_codec
|
||||
c3675df rename avf_sdp_create->av_sdp_create
|
||||
d4d0932 / a9bf9d8 deprecate av_guess_image2_codec
|
||||
d4d0932 / c3675df rename avf_sdp_create->av_sdp_create
|
||||
|
||||
2011-04-03 - lavf 52.105.0 - avio.h
|
||||
Large-scale renaming/deprecating of AVIOContext-related functions:
|
||||
724f6a0 deprecate url_fdopen
|
||||
403ee83 deprecate url_open_dyn_packet_buf
|
||||
6dc7d80 rename url_close_dyn_buf -> avio_close_dyn_buf
|
||||
b92c545 rename url_open_dyn_buf -> avio_open_dyn_buf
|
||||
8978fed introduce an AVIOContext.seekable field as a replacement for
|
||||
2cae980 / 724f6a0 deprecate url_fdopen
|
||||
2cae980 / 403ee83 deprecate url_open_dyn_packet_buf
|
||||
2cae980 / 6dc7d80 rename url_close_dyn_buf -> avio_close_dyn_buf
|
||||
2cae980 / b92c545 rename url_open_dyn_buf -> avio_open_dyn_buf
|
||||
2cae980 / 8978fed introduce an AVIOContext.seekable field as a replacement for
|
||||
AVIOContext.is_streamed and url_is_streamed()
|
||||
b64030f deprecate get_checksum()
|
||||
4c4427a deprecate init_checksum()
|
||||
4ec153b deprecate udp_set_remote_url/get_local_port
|
||||
933e90a deprecate av_url_read_fseek/fpause
|
||||
8d9769a deprecate url_fileno
|
||||
b7f2fdd rename put_flush_packet -> avio_flush
|
||||
35f1023 deprecate url_close_buf
|
||||
83fddae deprecate url_open_buf
|
||||
d9d86e0 rename url_fprintf -> avio_printf
|
||||
59f65d9 deprecate url_setbufsize
|
||||
3e68b3b deprecate url_ferror
|
||||
1caa412 / b64030f deprecate get_checksum()
|
||||
1caa412 / 4c4427a deprecate init_checksum()
|
||||
2fd41c9 / 4ec153b deprecate udp_set_remote_url/get_local_port
|
||||
4fa0e24 / 933e90a deprecate av_url_read_fseek/fpause
|
||||
4fa0e24 / 8d9769a deprecate url_fileno
|
||||
0fecf26 / b7f2fdd rename put_flush_packet -> avio_flush
|
||||
0fecf26 / 35f1023 deprecate url_close_buf
|
||||
0fecf26 / 83fddae deprecate url_open_buf
|
||||
0fecf26 / d9d86e0 rename url_fprintf -> avio_printf
|
||||
0fecf26 / 59f65d9 deprecate url_setbufsize
|
||||
6947b0c / 3e68b3b deprecate url_ferror
|
||||
e8bb2e2 deprecate url_fget_max_packet_size
|
||||
76aa876 rename url_fsize -> avio_size
|
||||
e519753 deprecate url_fgetc
|
||||
@@ -605,7 +605,7 @@ API changes, most recent first:
|
||||
b3db9ce deprecate get_partial_buffer
|
||||
8d9ac96 rename av_alloc_put_byte -> avio_alloc_context
|
||||
|
||||
2011-03-25 - 34b47d7 - lavc 52.115.0 - AVCodecContext.audio_service_type
|
||||
2011-03-25 - 27ef7b1 / 34b47d7 - lavc 52.115.0 - AVCodecContext.audio_service_type
|
||||
Add audio_service_type field to AVCodecContext.
|
||||
|
||||
2011-03-17 - e309fdc - lavu 50.40.0 - pixfmt.h
|
||||
@@ -643,11 +643,11 @@ API changes, most recent first:
|
||||
2011-02-10 - 12c14cd - lavf 52.99.0 - AVStream.disposition
|
||||
Add AV_DISPOSITION_HEARING_IMPAIRED and AV_DISPOSITION_VISUAL_IMPAIRED.
|
||||
|
||||
2011-02-09 - 5592734 - lavc 52.112.0 - avcodec_thread_init()
|
||||
2011-02-09 - c0b102c - lavc 52.112.0 - avcodec_thread_init()
|
||||
Deprecate avcodec_thread_init()/avcodec_thread_free() use; instead
|
||||
set thread_count before calling avcodec_open.
|
||||
|
||||
2011-02-09 - 778b08a - lavc 52.111.0 - threading API
|
||||
2011-02-09 - 37b00b4 - lavc 52.111.0 - threading API
|
||||
Add CODEC_CAP_FRAME_THREADS with new restrictions on get_buffer()/
|
||||
release_buffer()/draw_horiz_band() callbacks for appropriate codecs.
|
||||
Add thread_type and active_thread_type fields to AVCodecContext.
|
||||
|
@@ -60,4 +60,67 @@ This decoder generates wave patterns according to predefined sequences. Its
|
||||
use is purely internal and the format of the data it accepts is not publicly
|
||||
documented.
|
||||
|
||||
@section libcelt
|
||||
|
||||
libcelt decoder wrapper
|
||||
|
||||
libcelt allows libavcodec to decode the Xiph CELT ultra-low delay audio codec.
|
||||
Requires the presence of the libcelt headers and library during configuration.
|
||||
You need to explicitly configure the build with @code{--enable-libcelt}.
|
||||
|
||||
@section libgsm
|
||||
|
||||
libgsm decoder wrapper
|
||||
|
||||
libgsm allows libavcodec to decode the GSM full rate audio codec. Requires
|
||||
the presence of the libgsm headers and library during configuration. You need
|
||||
to explicitly configure the build with @code{--enable-libgsm}.
|
||||
|
||||
This decoder supports both the ordinary GSM and the Microsoft variant.
|
||||
|
||||
@section libilbc
|
||||
|
||||
libilbc decoder wrapper
|
||||
|
||||
libilbc allows libavcodec to decode the Internet Low Bitrate Codec (iLBC)
|
||||
audio codec. Requires the presence of the libilbc headers and library during
|
||||
configuration. You need to explicitly configure the build with
|
||||
@code{--enable-libilbc}.
|
||||
|
||||
@subsection Options
|
||||
|
||||
The following option is supported by the libilbc wrapper.
|
||||
|
||||
@table @option
|
||||
@item enhance
|
||||
|
||||
Enable the enhancement of the decoded audio when set to 1. The default
|
||||
value is 0 (disabled).
|
||||
|
||||
@end table
|
||||
|
||||
@section libopencore-amrnb
|
||||
|
||||
libopencore-amrnb decoder wrapper
|
||||
|
||||
libopencore-amrnb allows libavcodec to decode the Adaptive Multi-Rate
|
||||
Narrowband audio codec. Using it requires the presence of the
|
||||
libopencore-amrnb headers and library during configuration. You need to
|
||||
explicitly configure the build with @code{--enable-libopencore-amrnb}.
|
||||
|
||||
An FFmpeg native decoder for AMR-NB exists, so users can decode AMR-NB
|
||||
without this library.
|
||||
|
||||
@section libopencore-amrwb
|
||||
|
||||
libopencore-amrwb decoder wrapper.
|
||||
|
||||
libopencore-amrwb allows libavcodec to decode the Adaptive Multi-Rate
|
||||
Wideband audio codec. Using it requires the presence of the
|
||||
libopencore-amrwb headers and library during configuration. You need to
|
||||
explicitly configure the build with @code{--enable-libopencore-amrwb}.
|
||||
|
||||
An FFmpeg native decoder for AMR-WB exists, so users can decode AMR-WB
|
||||
without this library.
|
||||
|
||||
@c man end AUDIO DECODERS
|
||||
|
@@ -412,6 +412,131 @@ Selected by Encoder (default)
|
||||
|
||||
@end table
|
||||
|
||||
@section libmp3lame
|
||||
|
||||
LAME (Lame Ain't an MP3 Encoder) MP3 encoder wrapper
|
||||
|
||||
Requires the presence of the libmp3lame headers and library during
|
||||
configuration. You need to explicitly configure the build with
|
||||
@code{--enable-libmp3lame}.
|
||||
|
||||
@subsection Option Mapping
|
||||
|
||||
The following options are supported by the libmp3lame wrapper,
|
||||
the LAME-equivalent options follow the FFmpeg ones.
|
||||
|
||||
@multitable @columnfractions .2 .2
|
||||
@item FFmpeg @tab LAME
|
||||
@item b @tab b
|
||||
FFmpeg @code{b} option is expressed in bits/s, lame @code{bitrate}
|
||||
in kilobits/s.
|
||||
@item q @tab V
|
||||
Quality setting for VBR.
|
||||
@item compression_level @tab q
|
||||
Algorithm quality. Valid options are integers from 0-9.
|
||||
@item reservoir @tab N.A.
|
||||
Enable use of bit reservoir. LAME has this enabled by default.
|
||||
@item joint_stereo @tab -m j
|
||||
Enables the the encoder to use (on a frame by frame basis) either L/R
|
||||
stereo or mid/side stereo.
|
||||
@end multitable
|
||||
|
||||
@section libopencore-amrnb
|
||||
|
||||
OpenCORE Adaptive Multi-Rate Narrowband encoder.
|
||||
|
||||
Requires the presence of the libopencore-amrnb headers and library during
|
||||
configuration. You need to explicitly configure the build with
|
||||
@code{--enable-libopencore-amrnb --enable-version3}.
|
||||
|
||||
This is a mono-only encoder. Officially it only supports 8000Hz sample rate,
|
||||
but you can override it by setting @option{strict} to @samp{unofficial} or
|
||||
lower.
|
||||
|
||||
@subsection Options
|
||||
|
||||
@table @option
|
||||
|
||||
@item b
|
||||
Set bitrate in bits per second. Only the following bitrates are supported,
|
||||
otherwise libavcodec will round to the nearest valid bitrate.
|
||||
|
||||
@table @option
|
||||
@item 4750
|
||||
@item 5150
|
||||
@item 5900
|
||||
@item 6700
|
||||
@item 7400
|
||||
@item 7950
|
||||
@item 10200
|
||||
@item 12200
|
||||
@end table
|
||||
|
||||
@item dtx
|
||||
Allow discontinuous transmission (generate comfort noise) when set to 1. The
|
||||
default value is 0 (disabled).
|
||||
|
||||
@end table
|
||||
|
||||
@section libvo-aacenc
|
||||
|
||||
VisualOn AAC encoder
|
||||
|
||||
Requires the presence of the libvo-aacenc headers and library during
|
||||
configuration. You need to explicitly configure the build with
|
||||
@code{--enable-libvo-aacenc --enable-version3}.
|
||||
|
||||
@subsection Options
|
||||
|
||||
The VisualOn AAC encoder only support encoding AAC-LC and up to 2
|
||||
channels. It is also CBR-only. It is considered to be worse than the
|
||||
native experimental FFmpeg AAC encoder.
|
||||
|
||||
@table @option
|
||||
|
||||
@item b
|
||||
Bitrate.
|
||||
|
||||
@end table
|
||||
|
||||
@section libvo-amrwbenc
|
||||
|
||||
VisualOn Adaptive Multi-Rate Wideband encoder
|
||||
|
||||
Requires the presence of the libvo-amrwbenc headers and library during
|
||||
configuration. You need to explicitly configure the build with
|
||||
@code{--enable-libvo-amrwbenc --enable-version3}.
|
||||
|
||||
This is a mono-only encoder. Officially it only supports 16000Hz sample
|
||||
rate, but you can override it by setting @option{strict} to
|
||||
@samp{unofficial} or lower.
|
||||
|
||||
@subsection Options
|
||||
|
||||
@table @option
|
||||
|
||||
@item b
|
||||
Set bitrate in bits/s. Only the following bitrates are supported, otherwise
|
||||
libavcodec will round to the nearest valid bitrate.
|
||||
|
||||
@table @samp
|
||||
@item 6600
|
||||
@item 8850
|
||||
@item 12650
|
||||
@item 14250
|
||||
@item 15850
|
||||
@item 18250
|
||||
@item 19850
|
||||
@item 23050
|
||||
@item 23850
|
||||
@end table
|
||||
|
||||
@item dtx
|
||||
Allow discontinuous transmission (generate comfort noise) when set to 1. The
|
||||
default value is 0 (disabled).
|
||||
|
||||
@end table
|
||||
|
||||
@c man end AUDIO ENCODERS
|
||||
|
||||
@chapter Video Encoders
|
||||
@@ -585,4 +710,116 @@ ffmpeg -i foo.mpg -vcodec libx264 -x264opts keyint=123:min-keyint=20 -an out.mkv
|
||||
For more information about libx264 and the supported options see:
|
||||
@url{http://www.videolan.org/developers/x264.html}
|
||||
|
||||
@section libxvid
|
||||
|
||||
Xvid MPEG-4 Part 2 encoder wrapper.
|
||||
|
||||
This encoder requires the presence of the libxvidcore headers and library
|
||||
during configuration. You need to explicitly configure the build with
|
||||
@code{--enable-libxvid --enable-gpl}.
|
||||
|
||||
The native @code{mpeg4} encoder supports the MPEG-4 Part 2 format, so
|
||||
users can encode to this format without this library.
|
||||
|
||||
@subsection Options
|
||||
|
||||
The following options are supported by the libxvid wrapper. Some of
|
||||
the following options are listed but are not documented, and
|
||||
correspond to shared codec options. The other shared options
|
||||
which are not listed have no effect for the libxvid encoder.
|
||||
|
||||
@table @option
|
||||
@item b
|
||||
|
||||
@item g
|
||||
|
||||
@item qmin
|
||||
|
||||
@item qmax
|
||||
|
||||
@item mpeg_quant
|
||||
|
||||
@item threads
|
||||
|
||||
@item bf
|
||||
|
||||
@item b_qfactor
|
||||
|
||||
@item b_qoffset
|
||||
|
||||
@item flags
|
||||
Set specific encoding flags. Possible values:
|
||||
|
||||
@table @samp
|
||||
|
||||
@item mv4
|
||||
Use four motion vector by macroblock.
|
||||
|
||||
@item aic
|
||||
Enable high quality AC prediction.
|
||||
|
||||
@item gray
|
||||
Only encode grayscale.
|
||||
|
||||
@item gmc
|
||||
Enable the use of global motion compensation (GMC).
|
||||
|
||||
@item qpel
|
||||
Enable quarter-pixel motion compensation.
|
||||
|
||||
@item cgop
|
||||
Enable closed GOP.
|
||||
|
||||
@item global_header
|
||||
Place global headers in extradata instead of every keyframe.
|
||||
|
||||
@end table
|
||||
|
||||
@item trellis
|
||||
|
||||
@item me_method
|
||||
Set motion estimation method. Possible values in decreasing order of
|
||||
speed and increasing order of quality:
|
||||
|
||||
@table @samp
|
||||
@item zero
|
||||
Use no motion estimation (default).
|
||||
|
||||
@item phods
|
||||
@item x1
|
||||
@item log
|
||||
Enable advanced diamond zonal search for 16x16 blocks and half-pixel
|
||||
refinement for 16x16 blocks. @samp{x1} and @samp{log} are aliases for
|
||||
@samp{phods}.
|
||||
|
||||
@item epzs
|
||||
Enable all of the things described above, plus advanced diamond zonal
|
||||
search for 8x8 blocks, half-pixel refinement for 8x8 blocks, and motion
|
||||
estimation on chroma planes.
|
||||
|
||||
@item full
|
||||
Enable all of the things described above, plus extended 16x16 and 8x8
|
||||
blocks search.
|
||||
@end table
|
||||
|
||||
@item mbd
|
||||
Set macroblock decision algorithm. Possible values in the increasing
|
||||
order of quality:
|
||||
|
||||
@table @samp
|
||||
@item simple
|
||||
Use macroblock comparing function algorithm (default).
|
||||
|
||||
@item bits
|
||||
Enable rate distortion-based half pixel and quarter pixel refinement for
|
||||
16x16 blocks.
|
||||
|
||||
@item rd
|
||||
Enable all of the things described above, plus rate distortion-based
|
||||
half pixel and quarter pixel refinement for 8x8 blocks, and rate
|
||||
distortion-based search using square pattern.
|
||||
@end table
|
||||
|
||||
@end table
|
||||
|
||||
@c man end VIDEO ENCODERS
|
||||
|
@@ -24,7 +24,7 @@ a mail for every change to every issue.
|
||||
The subscription URL for the ffmpeg-trac list is:
|
||||
http(s)://ffmpeg.org/mailman/listinfo/ffmpeg-trac
|
||||
The URL of the webinterface of the tracker is:
|
||||
http(s)://ffmpeg.org/trac/ffmpeg
|
||||
http(s)://trac.ffmpeg.org
|
||||
|
||||
Type:
|
||||
-----
|
||||
|
@@ -18,6 +18,23 @@ enabled muxers.
|
||||
|
||||
A description of some of the currently available muxers follows.
|
||||
|
||||
@anchor{aiff}
|
||||
@section aiff
|
||||
|
||||
Audio Interchange File Format muxer.
|
||||
|
||||
It accepts the following options:
|
||||
|
||||
@table @option
|
||||
@item write_id3v2
|
||||
Enable ID3v2 tags writing when set to 1. Default is 0 (disabled).
|
||||
|
||||
@item id3v2_version
|
||||
Select ID3v2 version to write. Currently only version 3 and 4 (aka.
|
||||
ID3v2.3 and ID3v2.4) are supported. The default is version 4.
|
||||
|
||||
@end table
|
||||
|
||||
@anchor{crc}
|
||||
@section crc
|
||||
|
||||
|
@@ -1,4 +1,4 @@
|
||||
#! /usr/bin/perl -w
|
||||
#! /usr/bin/perl
|
||||
|
||||
# Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc.
|
||||
|
||||
@@ -23,11 +23,13 @@
|
||||
# markup to Perl POD format. It's intended to be used to extract
|
||||
# something suitable for a manpage from a Texinfo document.
|
||||
|
||||
use warnings;
|
||||
|
||||
$output = 0;
|
||||
$skipping = 0;
|
||||
%sects = ();
|
||||
@sects_sequence = ();
|
||||
$section = "";
|
||||
%chapters = ();
|
||||
@chapters_sequence = ();
|
||||
$chapter = "";
|
||||
@icstack = ();
|
||||
@endwstack = ();
|
||||
@skstack = ();
|
||||
@@ -114,18 +116,24 @@ INF: while(<$inf>) {
|
||||
die "cannot open $1: $!\n";
|
||||
};
|
||||
|
||||
# Look for blocks surrounded by @c man begin SECTION ... @c man end.
|
||||
# This really oughta be @ifman ... @end ifman and the like, but such
|
||||
# would require rev'ing all other Texinfo translators.
|
||||
/^\@c\s+man\s+begin\s+([A-Za-z ]+)/ and $sect = $1, push (@sects_sequence, $sect), $output = 1, next;
|
||||
/^\@c\s+man\s+end/ and do {
|
||||
$sects{$sect} = "" unless exists $sects{$sect};
|
||||
$sects{$sect} .= postprocess($section);
|
||||
$section = "";
|
||||
$output = 0;
|
||||
/^\@chapter\s+([A-Za-z ]+)/ and do {
|
||||
# close old chapter
|
||||
$chapters{$chapter_name} .= postprocess($chapter) if ($chapter_name);
|
||||
|
||||
# start new chapter
|
||||
$chapter_name = $1, push (@chapters_sequence, $chapter_name) unless $skipping;
|
||||
$chapters{$chapter_name} = "" unless exists $chapters{$chapter_name};
|
||||
$chapter = "";
|
||||
$output = 1;
|
||||
next;
|
||||
};
|
||||
|
||||
/^\@bye/ and do {
|
||||
# close old chapter
|
||||
$chapters{$chapter_name} .= postprocess($chapter) if ($chapter_name);
|
||||
last INF;
|
||||
};
|
||||
|
||||
# handle variables
|
||||
/^\@set\s+([a-zA-Z0-9_-]+)\s*(.*)$/ and do {
|
||||
$defs{$1} = $2;
|
||||
@@ -148,20 +156,20 @@ INF: while(<$inf>) {
|
||||
# Ignore @end foo, where foo is not an operation which may
|
||||
# cause us to skip, if we are presently skipping.
|
||||
my $ended = $1;
|
||||
next if $skipping && $ended !~ /^(?:ifset|ifclear|ignore|menu|iftex)$/;
|
||||
next if $skipping && $ended !~ /^(?:ifset|ifclear|ignore|menu|iftex|ifhtml|ifnothtml)$/;
|
||||
|
||||
die "\@end $ended without \@$ended at line $.\n" unless defined $endw;
|
||||
die "\@$endw ended by \@end $ended at line $.\n" unless $ended eq $endw;
|
||||
|
||||
$endw = pop @endwstack;
|
||||
|
||||
if ($ended =~ /^(?:ifset|ifclear|ignore|menu|iftex)$/) {
|
||||
if ($ended =~ /^(?:ifset|ifclear|ignore|menu|iftex|ifhtml|ifnothtml)$/) {
|
||||
$skipping = pop @skstack;
|
||||
next;
|
||||
} elsif ($ended =~ /^(?:example|smallexample|display)$/) {
|
||||
$shift = "";
|
||||
$_ = ""; # need a paragraph break
|
||||
} elsif ($ended =~ /^(?:itemize|enumerate|[fv]?table)$/) {
|
||||
} elsif ($ended =~ /^(?:itemize|enumerate|(?:multi|[fv])?table)$/) {
|
||||
$_ = "\n=back\n";
|
||||
$ic = pop @icstack;
|
||||
} else {
|
||||
@@ -188,11 +196,11 @@ INF: while(<$inf>) {
|
||||
next;
|
||||
};
|
||||
|
||||
/^\@(ignore|menu|iftex)\b/ and do {
|
||||
/^\@(ignore|menu|iftex|ifhtml|ifnothtml)\b/ and do {
|
||||
push @endwstack, $endw;
|
||||
push @skstack, $skipping;
|
||||
$endw = $1;
|
||||
$skipping = 1;
|
||||
$skipping = $endw !~ /ifnothtml/;
|
||||
next;
|
||||
};
|
||||
|
||||
@@ -209,7 +217,6 @@ INF: while(<$inf>) {
|
||||
s/\@TeX\{\}/TeX/g;
|
||||
s/\@pounds\{\}/\#/g;
|
||||
s/\@minus(?:\{\})?/-/g;
|
||||
s/\\,/,/g;
|
||||
|
||||
# Now the ones that have to be replaced by special escapes
|
||||
# (which will be turned back into text by unmunge())
|
||||
@@ -262,15 +269,16 @@ INF: while(<$inf>) {
|
||||
$endw = "enumerate";
|
||||
};
|
||||
|
||||
/^\@([fv]?table)\s+(\@[a-z]+)/ and do {
|
||||
/^\@((?:multi|[fv])?table)\s+(\@[a-z]+)/ and do {
|
||||
push @endwstack, $endw;
|
||||
push @icstack, $ic;
|
||||
$endw = $1;
|
||||
$ic = $2;
|
||||
$ic =~ s/\@(?:samp|strong|key|gcctabopt|option|env)/B/;
|
||||
$ic =~ s/\@(?:samp|strong|key|gcctabopt|option|env|command)/B/;
|
||||
$ic =~ s/\@(?:code|kbd)/C/;
|
||||
$ic =~ s/\@(?:dfn|var|emph|cite|i)/I/;
|
||||
$ic =~ s/\@(?:file)/F/;
|
||||
$ic =~ s/\@(?:columnfractions)//;
|
||||
$_ = "\n=over 4\n";
|
||||
};
|
||||
|
||||
@@ -281,6 +289,21 @@ INF: while(<$inf>) {
|
||||
$_ = ""; # need a paragraph break
|
||||
};
|
||||
|
||||
/^\@item\s+(.*\S)\s*$/ and $endw eq "multitable" and do {
|
||||
my $columns = $1;
|
||||
$columns =~ s/\@tab/ : /;
|
||||
|
||||
$_ = "\n=item B<". $columns .">\n";
|
||||
};
|
||||
|
||||
/^\@tab\s+(.*\S)\s*$/ and $endw eq "multitable" and do {
|
||||
my $columns = $1;
|
||||
$columns =~ s/\@tab/ : /;
|
||||
|
||||
$_ = " : ". $columns;
|
||||
$chapter =~ s/\n+\s+$//;
|
||||
};
|
||||
|
||||
/^\@itemx?\s*(.+)?$/ and do {
|
||||
if (defined $1) {
|
||||
# Entity escapes prevent munging by the <> processing below.
|
||||
@@ -292,7 +315,7 @@ INF: while(<$inf>) {
|
||||
}
|
||||
};
|
||||
|
||||
$section .= $shift.$_."\n";
|
||||
$chapter .= $shift.$_."\n";
|
||||
}
|
||||
# End of current file.
|
||||
close($inf);
|
||||
@@ -301,16 +324,15 @@ $inf = pop @instack;
|
||||
|
||||
die "No filename or title\n" unless defined $fn && defined $tl;
|
||||
|
||||
$sects{NAME} = "$fn \- $tl\n";
|
||||
$sects{FOOTNOTES} .= "=back\n" if exists $sects{FOOTNOTES};
|
||||
$chapters{NAME} = "$fn \- $tl\n";
|
||||
$chapters{FOOTNOTES} .= "=back\n" if exists $chapters{FOOTNOTES};
|
||||
|
||||
unshift @sects_sequence, "NAME";
|
||||
for $sect (@sects_sequence) {
|
||||
if(exists $sects{$sect}) {
|
||||
$head = $sect;
|
||||
$head =~ s/SEEALSO/SEE ALSO/;
|
||||
unshift @chapters_sequence, "NAME";
|
||||
for $chapter (@chapters_sequence) {
|
||||
if (exists $chapters{$chapter}) {
|
||||
$head = uc($chapter);
|
||||
print "=head1 $head\n\n";
|
||||
print scalar unmunge ($sects{$sect});
|
||||
print scalar unmunge ($chapters{$chapter});
|
||||
print "\n";
|
||||
}
|
||||
}
|
||||
@@ -355,6 +377,7 @@ sub postprocess
|
||||
s/\(?\@xref\{(?:[^\}]*)\}(?:[^.<]|(?:<[^<>]*>))*\.\)?//g;
|
||||
s/\s+\(\@pxref\{(?:[^\}]*)\}\)//g;
|
||||
s/;\s+\@pxref\{(?:[^\}]*)\}//g;
|
||||
s/\@ref\{(?:[^,\}]*,)(?:[^,\}]*,)([^,\}]*).*\}/$1/g;
|
||||
s/\@ref\{([^\}]*)\}/$1/g;
|
||||
s/\@noindent\s*//g;
|
||||
s/\@refill//g;
|
||||
@@ -364,7 +387,7 @@ sub postprocess
|
||||
# @uref can take one, two, or three arguments, with different
|
||||
# semantics each time. @url and @email are just like @uref with
|
||||
# one argument, for our purposes.
|
||||
s/\@(?:uref|url|email)\{([^\},]*)\}/<B<$1>>/g;
|
||||
s/\@(?:uref|url|email)\{([^\},]*),?[^\}]*\}/<B<$1>>/g;
|
||||
s/\@uref\{([^\},]*),([^\},]*)\}/$2 (C<$1>)/g;
|
||||
s/\@uref\{([^\},]*),([^\},]*),([^\},]*)\}/$3/g;
|
||||
|
||||
@@ -408,13 +431,13 @@ sub unmunge
|
||||
|
||||
sub add_footnote
|
||||
{
|
||||
unless (exists $sects{FOOTNOTES}) {
|
||||
$sects{FOOTNOTES} = "\n=over 4\n\n";
|
||||
unless (exists $chapters{FOOTNOTES}) {
|
||||
$chapters{FOOTNOTES} = "\n=over 4\n\n";
|
||||
}
|
||||
|
||||
$sects{FOOTNOTES} .= "=item $fnno.\n\n"; $fnno++;
|
||||
$sects{FOOTNOTES} .= $_[0];
|
||||
$sects{FOOTNOTES} .= "\n\n";
|
||||
$chapters{FOOTNOTES} .= "=item $fnno.\n\n"; $fnno++;
|
||||
$chapters{FOOTNOTES} .= $_[0];
|
||||
$chapters{FOOTNOTES} .= "\n\n";
|
||||
}
|
||||
|
||||
# stolen from Symbol.pm
|
||||
|
2
ffmpeg.c
2
ffmpeg.c
@@ -4703,9 +4703,11 @@ static OutputStream *new_video_stream(OptionsContext *o, AVFormatContext *oc, in
|
||||
if (do_pass) {
|
||||
if (do_pass & 1) {
|
||||
video_enc->flags |= CODEC_FLAG_PASS1;
|
||||
av_dict_set(&ost->opts, "flags", "+pass1", AV_DICT_APPEND);
|
||||
}
|
||||
if (do_pass & 2) {
|
||||
video_enc->flags |= CODEC_FLAG_PASS2;
|
||||
av_dict_set(&ost->opts, "flags", "+pass2", AV_DICT_APPEND);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -713,7 +713,7 @@ static void search_for_quantizers_twoloop(AVCodecContext *avctx,
|
||||
const float lambda)
|
||||
{
|
||||
int start = 0, i, w, w2, g;
|
||||
int destbits = avctx->bit_rate * 1024.0 / avctx->sample_rate / avctx->channels;
|
||||
int destbits = avctx->bit_rate * 1024.0 / avctx->sample_rate / avctx->channels * (lambda / 120.f);
|
||||
float dists[128] = { 0 }, uplims[128];
|
||||
float maxvals[128];
|
||||
int fflag, minscaler;
|
||||
|
@@ -1124,7 +1124,12 @@ static void sbr_dequant(SpectralBandReplication *sbr, int id_aac)
|
||||
for (k = 0; k < sbr->n[sbr->data[0].bs_freq_res[e]]; k++) {
|
||||
float temp1 = exp2f(sbr->data[0].env_facs[e][k] * alpha + 7.0f);
|
||||
float temp2 = exp2f((pan_offset - sbr->data[1].env_facs[e][k]) * alpha);
|
||||
float fac = temp1 / (1.0f + temp2);
|
||||
float fac;
|
||||
if (temp1 > 1E20) {
|
||||
av_log(NULL, AV_LOG_ERROR, "envelope scalefactor overflow in dequant\n");
|
||||
temp1 = 1;
|
||||
}
|
||||
fac = temp1 / (1.0f + temp2);
|
||||
sbr->data[0].env_facs[e][k] = fac;
|
||||
sbr->data[1].env_facs[e][k] = fac * temp2;
|
||||
}
|
||||
@@ -1133,7 +1138,12 @@ static void sbr_dequant(SpectralBandReplication *sbr, int id_aac)
|
||||
for (k = 0; k < sbr->n_q; k++) {
|
||||
float temp1 = exp2f(NOISE_FLOOR_OFFSET - sbr->data[0].noise_facs[e][k] + 1);
|
||||
float temp2 = exp2f(12 - sbr->data[1].noise_facs[e][k]);
|
||||
float fac = temp1 / (1.0f + temp2);
|
||||
float fac;
|
||||
if (temp1 > 1E20) {
|
||||
av_log(NULL, AV_LOG_ERROR, "envelope scalefactor overflow in dequant\n");
|
||||
temp1 = 1;
|
||||
}
|
||||
fac = temp1 / (1.0f + temp2);
|
||||
sbr->data[0].noise_facs[e][k] = fac;
|
||||
sbr->data[1].noise_facs[e][k] = fac * temp2;
|
||||
}
|
||||
@@ -1142,9 +1152,15 @@ static void sbr_dequant(SpectralBandReplication *sbr, int id_aac)
|
||||
for (ch = 0; ch < (id_aac == TYPE_CPE) + 1; ch++) {
|
||||
float alpha = sbr->data[ch].bs_amp_res ? 1.0f : 0.5f;
|
||||
for (e = 1; e <= sbr->data[ch].bs_num_env; e++)
|
||||
for (k = 0; k < sbr->n[sbr->data[ch].bs_freq_res[e]]; k++)
|
||||
for (k = 0; k < sbr->n[sbr->data[ch].bs_freq_res[e]]; k++){
|
||||
sbr->data[ch].env_facs[e][k] =
|
||||
exp2f(alpha * sbr->data[ch].env_facs[e][k] + 6.0f);
|
||||
if (sbr->data[ch].env_facs[e][k] > 1E20) {
|
||||
av_log(NULL, AV_LOG_ERROR, "envelope scalefactor overflow in dequant\n");
|
||||
sbr->data[ch].env_facs[e][k] = 1;
|
||||
}
|
||||
}
|
||||
|
||||
for (e = 1; e <= sbr->data[ch].bs_num_noise; e++)
|
||||
for (k = 0; k < sbr->n_q; k++)
|
||||
sbr->data[ch].noise_facs[e][k] =
|
||||
|
@@ -264,7 +264,7 @@ static void alac_linear_predictor(AlacEncodeContext *s, int ch)
|
||||
// generate warm-up samples
|
||||
residual[0] = samples[0];
|
||||
for (i = 1; i <= lpc.lpc_order; i++)
|
||||
residual[i] = samples[i] - samples[i-1];
|
||||
residual[i] = sign_extend(samples[i] - samples[i-1], s->write_sample_size);
|
||||
|
||||
// perform lpc on remaining samples
|
||||
for (i = lpc.lpc_order + 1; i < s->frame_size; i++) {
|
||||
|
@@ -366,7 +366,7 @@ int ff_ass_split_override_codes(const ASSCodesCallbacks *callbacks, void *priv,
|
||||
char new_line[2];
|
||||
int text_len = 0;
|
||||
|
||||
while (*buf) {
|
||||
while (buf && *buf) {
|
||||
if (text && callbacks->text &&
|
||||
(sscanf(buf, "\\%1[nN]", new_line) == 1 ||
|
||||
!strncmp(buf, "{\\", 2))) {
|
||||
|
@@ -169,7 +169,7 @@ static void init_lengths(BinkContext *c, int width, int bw)
|
||||
*
|
||||
* @param c decoder context
|
||||
*/
|
||||
static av_cold void init_bundles(BinkContext *c)
|
||||
static av_cold int init_bundles(BinkContext *c)
|
||||
{
|
||||
int bw, bh, blocks;
|
||||
int i;
|
||||
@@ -180,8 +180,12 @@ static av_cold void init_bundles(BinkContext *c)
|
||||
|
||||
for (i = 0; i < BINKB_NB_SRC; i++) {
|
||||
c->bundle[i].data = av_malloc(blocks * 64);
|
||||
if (!c->bundle[i].data)
|
||||
return AVERROR(ENOMEM);
|
||||
c->bundle[i].data_end = c->bundle[i].data + blocks * 64;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1272,7 +1276,7 @@ static av_cold int decode_init(AVCodecContext *avctx)
|
||||
BinkContext * const c = avctx->priv_data;
|
||||
static VLC_TYPE table[16 * 128][2];
|
||||
static int binkb_initialised = 0;
|
||||
int i;
|
||||
int i, ret;
|
||||
int flags;
|
||||
|
||||
c->version = avctx->codec_tag >> 24;
|
||||
@@ -1307,7 +1311,10 @@ static av_cold int decode_init(AVCodecContext *avctx)
|
||||
ff_dsputil_init(&c->dsp, avctx);
|
||||
ff_binkdsp_init(&c->bdsp);
|
||||
|
||||
init_bundles(c);
|
||||
if ((ret = init_bundles(c)) < 0) {
|
||||
free_bundles(c);
|
||||
return ret;
|
||||
}
|
||||
|
||||
if (c->version == 'b') {
|
||||
if (!binkb_initialised) {
|
||||
|
@@ -27,7 +27,7 @@ const int ff_flac_sample_rate_table[16] =
|
||||
8000, 16000, 22050, 24000, 32000, 44100, 48000, 96000,
|
||||
0, 0, 0, 0 };
|
||||
|
||||
const int16_t ff_flac_blocksize_table[16] = {
|
||||
const int32_t ff_flac_blocksize_table[16] = {
|
||||
0, 192, 576<<0, 576<<1, 576<<2, 576<<3, 0, 0,
|
||||
256<<0, 256<<1, 256<<2, 256<<3, 256<<4, 256<<5, 256<<6, 256<<7
|
||||
};
|
||||
|
@@ -26,6 +26,6 @@
|
||||
|
||||
extern const int ff_flac_sample_rate_table[16];
|
||||
|
||||
extern const int16_t ff_flac_blocksize_table[16];
|
||||
extern const int32_t ff_flac_blocksize_table[16];
|
||||
|
||||
#endif /* AVCODEC_FLACDATA_H */
|
||||
|
@@ -373,6 +373,10 @@ static int flashsv_decode_frame(AVCodecContext *avctx, void *data,
|
||||
if (has_diff) {
|
||||
s->diff_start = get_bits(&gb, 8);
|
||||
s->diff_height = get_bits(&gb, 8);
|
||||
if (s->diff_start + s->diff_height > cur_blk_height) {
|
||||
av_log(avctx, AV_LOG_ERROR, "Block parameters invalid\n");
|
||||
return AVERROR_INVALIDDATA;
|
||||
}
|
||||
av_log(avctx, AV_LOG_DEBUG,
|
||||
"%dx%d diff start %d height %d\n",
|
||||
i, j, s->diff_start, s->diff_height);
|
||||
|
@@ -2783,7 +2783,7 @@ static int field_end(H264Context *h, int in_setup)
|
||||
* past end by one (callers fault) and resync_mb_y != 0
|
||||
* causes problems for the first MB line, too.
|
||||
*/
|
||||
if (!FIELD_PICTURE)
|
||||
if (!FIELD_PICTURE && h->current_slice && !h->sps.new)
|
||||
ff_er_frame_end(s);
|
||||
|
||||
ff_MPV_frame_end(s);
|
||||
@@ -2847,6 +2847,53 @@ int ff_h264_get_profile(SPS *sps)
|
||||
return profile;
|
||||
}
|
||||
|
||||
static int h264_set_parameter_from_sps(H264Context *h)
|
||||
{
|
||||
MpegEncContext *s = &h->s;
|
||||
|
||||
if (s->flags & CODEC_FLAG_LOW_DELAY ||
|
||||
(h->sps.bitstream_restriction_flag &&
|
||||
!h->sps.num_reorder_frames)) {
|
||||
if (s->avctx->has_b_frames > 1 || h->delayed_pic[0])
|
||||
av_log(h->s.avctx, AV_LOG_WARNING, "Delayed frames seen. "
|
||||
"Reenabling low delay requires a codec flush.\n");
|
||||
else
|
||||
s->low_delay = 1;
|
||||
}
|
||||
|
||||
if (s->avctx->has_b_frames < 2)
|
||||
s->avctx->has_b_frames = !s->low_delay;
|
||||
|
||||
if (s->avctx->bits_per_raw_sample != h->sps.bit_depth_luma ||
|
||||
h->cur_chroma_format_idc != h->sps.chroma_format_idc) {
|
||||
if (s->avctx->codec &&
|
||||
s->avctx->codec->capabilities & CODEC_CAP_HWACCEL_VDPAU &&
|
||||
(h->sps.bit_depth_luma != 8 || h->sps.chroma_format_idc > 1)) {
|
||||
av_log(s->avctx, AV_LOG_ERROR,
|
||||
"VDPAU decoding does not support video colorspace.\n");
|
||||
return AVERROR_INVALIDDATA;
|
||||
}
|
||||
if (h->sps.bit_depth_luma >= 8 && h->sps.bit_depth_luma <= 10 &&
|
||||
(h->sps.bit_depth_luma != 9 || !CHROMA422)) {
|
||||
s->avctx->bits_per_raw_sample = h->sps.bit_depth_luma;
|
||||
h->cur_chroma_format_idc = h->sps.chroma_format_idc;
|
||||
h->pixel_shift = h->sps.bit_depth_luma > 8;
|
||||
|
||||
ff_h264dsp_init(&h->h264dsp, h->sps.bit_depth_luma,
|
||||
h->sps.chroma_format_idc);
|
||||
ff_h264_pred_init(&h->hpc, s->codec_id, h->sps.bit_depth_luma,
|
||||
h->sps.chroma_format_idc);
|
||||
s->dsp.dct_bits = h->sps.bit_depth_luma > 8 ? 32 : 16;
|
||||
ff_dsputil_init(&s->dsp, s->avctx);
|
||||
} else {
|
||||
av_log(s->avctx, AV_LOG_ERROR, "Unsupported bit depth: %d\n",
|
||||
h->sps.bit_depth_luma);
|
||||
return AVERROR_INVALIDDATA;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Decode a slice header.
|
||||
* This will also call ff_MPV_common_init() and frame_start() as needed.
|
||||
@@ -2863,7 +2910,7 @@ static int decode_slice_header(H264Context *h, H264Context *h0)
|
||||
MpegEncContext *const s0 = &h0->s;
|
||||
unsigned int first_mb_in_slice;
|
||||
unsigned int pps_id;
|
||||
int num_ref_idx_active_override_flag;
|
||||
int num_ref_idx_active_override_flag, ret;
|
||||
unsigned int slice_type, tmp, i, j;
|
||||
int default_ref_list_done = 0;
|
||||
int last_pic_structure, last_pic_dropable;
|
||||
@@ -2940,7 +2987,14 @@ static int decode_slice_header(H264Context *h, H264Context *h0)
|
||||
h->pps.sps_id);
|
||||
return -1;
|
||||
}
|
||||
h->sps = *h0->sps_buffers[h->pps.sps_id];
|
||||
|
||||
if (h->pps.sps_id != h->current_sps_id ||
|
||||
h0->sps_buffers[h->pps.sps_id]->new) {
|
||||
h0->sps_buffers[h->pps.sps_id]->new = 0;
|
||||
|
||||
h->current_sps_id = h->pps.sps_id;
|
||||
h->sps = *h0->sps_buffers[h->pps.sps_id];
|
||||
}
|
||||
|
||||
s->avctx->profile = ff_h264_get_profile(&h->sps);
|
||||
s->avctx->level = h->sps.level_idc;
|
||||
@@ -2989,24 +3043,8 @@ static int decode_slice_header(H264Context *h, H264Context *h0)
|
||||
s->avctx->sample_aspect_ratio = h->sps.sar;
|
||||
av_assert0(s->avctx->sample_aspect_ratio.den);
|
||||
|
||||
if (s->avctx->bits_per_raw_sample != h->sps.bit_depth_luma ||
|
||||
h->cur_chroma_format_idc != h->sps.chroma_format_idc) {
|
||||
if (h->sps.bit_depth_luma >= 8 && h->sps.bit_depth_luma <= 10 &&
|
||||
(h->sps.bit_depth_luma != 9 || !CHROMA422)) {
|
||||
s->avctx->bits_per_raw_sample = h->sps.bit_depth_luma;
|
||||
h->cur_chroma_format_idc = h->sps.chroma_format_idc;
|
||||
h->pixel_shift = h->sps.bit_depth_luma > 8;
|
||||
|
||||
ff_h264dsp_init(&h->h264dsp, h->sps.bit_depth_luma, h->sps.chroma_format_idc);
|
||||
ff_h264_pred_init(&h->hpc, s->codec_id, h->sps.bit_depth_luma, h->sps.chroma_format_idc);
|
||||
s->dsp.dct_bits = h->sps.bit_depth_luma > 8 ? 32 : 16;
|
||||
ff_dsputil_init(&s->dsp, s->avctx);
|
||||
} else {
|
||||
av_log(s->avctx, AV_LOG_ERROR, "Unsupported bit depth: %d chroma_idc: %d\n",
|
||||
h->sps.bit_depth_luma, h->sps.chroma_format_idc);
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
if ((ret = h264_set_parameter_from_sps(h)) < 0)
|
||||
return ret;
|
||||
|
||||
if (h->sps.video_signal_type_present_flag) {
|
||||
s->avctx->color_range = h->sps.full_range>0 ? AVCOL_RANGE_JPEG
|
||||
@@ -3133,7 +3171,7 @@ static int decode_slice_header(H264Context *h, H264Context *h0)
|
||||
h->mb_mbaff = 0;
|
||||
h->mb_aff_frame = 0;
|
||||
last_pic_structure = s0->picture_structure;
|
||||
last_pic_dropable = s->dropable;
|
||||
last_pic_dropable = s0->dropable;
|
||||
s->dropable = h->nal_ref_idc == 0;
|
||||
if (h->sps.frame_mbs_only_flag) {
|
||||
s->picture_structure = PICT_FRAME;
|
||||
@@ -3251,6 +3289,9 @@ static int decode_slice_header(H264Context *h, H264Context *h0)
|
||||
Picture *prev = h->short_ref_count ? h->short_ref[0] : NULL;
|
||||
av_log(h->s.avctx, AV_LOG_DEBUG, "Frame num gap %d %d\n",
|
||||
h->frame_num, h->prev_frame_num);
|
||||
if (!h->sps.gaps_in_frame_num_allowed_flag)
|
||||
for(i=0; i<FF_ARRAY_ELEMS(h->last_pocs); i++)
|
||||
h->last_pocs[i] = INT_MIN;
|
||||
if (ff_h264_frame_start(h) < 0)
|
||||
return -1;
|
||||
h->prev_frame_num++;
|
||||
@@ -4432,6 +4473,7 @@ again:
|
||||
ff_h264_decode_seq_parameter_set(h);
|
||||
}
|
||||
|
||||
|
||||
if (s->flags & CODEC_FLAG_LOW_DELAY ||
|
||||
(h->sps.bitstream_restriction_flag &&
|
||||
!h->sps.num_reorder_frames))
|
||||
|
@@ -206,6 +206,7 @@ typedef struct SPS {
|
||||
int bit_depth_chroma; ///< bit_depth_chroma_minus8 + 8
|
||||
int residual_color_transform_flag; ///< residual_colour_transform_flag
|
||||
int constraint_set_flags; ///< constraint_set[0-3]_flag
|
||||
int new; ///< flag to keep track if the decoder context needs re-init due to changed SPS
|
||||
} SPS;
|
||||
|
||||
/**
|
||||
@@ -332,6 +333,7 @@ typedef struct H264Context {
|
||||
int emu_edge_width;
|
||||
int emu_edge_height;
|
||||
|
||||
unsigned current_sps_id; ///< id of the current SPS
|
||||
SPS sps; ///< current sps
|
||||
|
||||
/**
|
||||
|
@@ -709,7 +709,7 @@ int ff_h264_decode_mb_cavlc(H264Context *h){
|
||||
down the code */
|
||||
if(h->slice_type_nos != AV_PICTURE_TYPE_I){
|
||||
if(s->mb_skip_run==-1)
|
||||
s->mb_skip_run= get_ue_golomb(&s->gb);
|
||||
s->mb_skip_run= get_ue_golomb_long(&s->gb);
|
||||
|
||||
if (s->mb_skip_run--) {
|
||||
if(FRAME_MBAFF && (s->mb_y&1) == 0){
|
||||
|
@@ -478,10 +478,13 @@ int ff_h264_decode_seq_parameter_set(H264Context *h){
|
||||
sps->bit_depth_luma
|
||||
);
|
||||
}
|
||||
sps->new = 1;
|
||||
|
||||
av_free(h->sps_buffers[sps_id]);
|
||||
h->sps_buffers[sps_id]= sps;
|
||||
h->sps = *sps;
|
||||
h->sps_buffers[sps_id] = sps;
|
||||
h->sps = *sps;
|
||||
h->current_sps_id = sps_id;
|
||||
|
||||
return 0;
|
||||
fail:
|
||||
av_free(sps);
|
||||
|
@@ -287,7 +287,10 @@ int ff_h264_decode_ref_pic_list_reordering(H264Context *h){
|
||||
for(list=0; list<h->list_count; list++){
|
||||
for(index= 0; index < h->ref_count[list]; index++){
|
||||
if (!h->ref_list[list][index].f.data[0]) {
|
||||
av_log(h->s.avctx, AV_LOG_ERROR, "Missing reference picture\n");
|
||||
int i;
|
||||
av_log(h->s.avctx, AV_LOG_ERROR, "Missing reference picture, default is %d\n", h->default_ref_list[list][0].poc);
|
||||
for (i=0; i<FF_ARRAY_ELEMS(h->last_pocs); i++)
|
||||
h->last_pocs[i] = INT_MIN;
|
||||
if (h->default_ref_list[list][0].f.data[0])
|
||||
h->ref_list[list][index]= h->default_ref_list[list][0];
|
||||
else
|
||||
|
@@ -314,12 +314,13 @@ static void generate_joint_tables(HYuvContext *s){
|
||||
for(i=y=0; y<256; y++){
|
||||
int len0 = s->len[0][y];
|
||||
int limit = VLC_BITS - len0;
|
||||
if(limit <= 0)
|
||||
if(limit <= 0 || !len0)
|
||||
continue;
|
||||
for(u=0; u<256; u++){
|
||||
int len1 = s->len[p][u];
|
||||
if(len1 > limit)
|
||||
if (len1 > limit || !len1)
|
||||
continue;
|
||||
av_assert0(i < (1 << VLC_BITS));
|
||||
len[i] = len0 + len1;
|
||||
bits[i] = (s->bits[0][y] << len1) + s->bits[p][u];
|
||||
symbols[i] = (y<<8) + u;
|
||||
@@ -341,18 +342,19 @@ static void generate_joint_tables(HYuvContext *s){
|
||||
for(i=0, g=-16; g<16; g++){
|
||||
int len0 = s->len[p0][g&255];
|
||||
int limit0 = VLC_BITS - len0;
|
||||
if(limit0 < 2)
|
||||
if (limit0 < 2 || !len0)
|
||||
continue;
|
||||
for(b=-16; b<16; b++){
|
||||
int len1 = s->len[p1][b&255];
|
||||
int limit1 = limit0 - len1;
|
||||
if(limit1 < 1)
|
||||
if (limit1 < 1 || !len1)
|
||||
continue;
|
||||
code = (s->bits[p0][g&255] << len1) + s->bits[p1][b&255];
|
||||
for(r=-16; r<16; r++){
|
||||
int len2 = s->len[2][r&255];
|
||||
if(len2 > limit1)
|
||||
if (len2 > limit1 || !len2)
|
||||
continue;
|
||||
av_assert0(i < (1 << VLC_BITS));
|
||||
len[i] = len0 + len1 + len2;
|
||||
bits[i] = (code << len2) + s->bits[2][r&255];
|
||||
if(s->decorrelate){
|
||||
@@ -376,6 +378,7 @@ static void generate_joint_tables(HYuvContext *s){
|
||||
static int read_huffman_tables(HYuvContext *s, const uint8_t *src, int length){
|
||||
GetBitContext gb;
|
||||
int i;
|
||||
int ret;
|
||||
|
||||
init_get_bits(&gb, src, length*8);
|
||||
|
||||
@@ -386,7 +389,8 @@ static int read_huffman_tables(HYuvContext *s, const uint8_t *src, int length){
|
||||
return -1;
|
||||
}
|
||||
ff_free_vlc(&s->vlc[i]);
|
||||
init_vlc(&s->vlc[i], VLC_BITS, 256, s->len[i], 1, 1, s->bits[i], 4, 4, 0);
|
||||
if ((ret = init_vlc(&s->vlc[i], VLC_BITS, 256, s->len[i], 1, 1, s->bits[i], 4, 4, 0)) < 0)
|
||||
return ret;
|
||||
}
|
||||
|
||||
generate_joint_tables(s);
|
||||
@@ -397,6 +401,7 @@ static int read_huffman_tables(HYuvContext *s, const uint8_t *src, int length){
|
||||
static int read_old_huffman_tables(HYuvContext *s){
|
||||
GetBitContext gb;
|
||||
int i;
|
||||
int ret;
|
||||
|
||||
init_get_bits(&gb, classic_shift_luma, classic_shift_luma_table_size*8);
|
||||
if(read_len_table(s->len[0], &gb)<0)
|
||||
@@ -417,7 +422,8 @@ static int read_old_huffman_tables(HYuvContext *s){
|
||||
|
||||
for(i=0; i<3; i++){
|
||||
ff_free_vlc(&s->vlc[i]);
|
||||
init_vlc(&s->vlc[i], VLC_BITS, 256, s->len[i], 1, 1, s->bits[i], 4, 4, 0);
|
||||
if ((ret = init_vlc(&s->vlc[i], VLC_BITS, 256, s->len[i], 1, 1, s->bits[i], 4, 4, 0)) < 0)
|
||||
return ret;
|
||||
}
|
||||
|
||||
generate_joint_tables(s);
|
||||
|
@@ -30,6 +30,7 @@
|
||||
#include "avcodec.h"
|
||||
#include "bytestream.h"
|
||||
#include "j2k.h"
|
||||
#include "libavutil/avassert.h"
|
||||
#include "libavutil/common.h"
|
||||
|
||||
#define JP2_SIG_TYPE 0x6A502020
|
||||
@@ -294,6 +295,10 @@ static int get_cox(J2kDecoderContext *s, J2kCodingStyle *c)
|
||||
c->log2_cblk_width = bytestream2_get_byteu(&s->g) + 2; // cblk width
|
||||
c->log2_cblk_height = bytestream2_get_byteu(&s->g) + 2; // cblk height
|
||||
|
||||
if (c->log2_cblk_width > 6 || c->log2_cblk_height > 6) {
|
||||
return AVERROR_PATCHWELCOME;
|
||||
}
|
||||
|
||||
c->cblk_style = bytestream2_get_byteu(&s->g);
|
||||
if (c->cblk_style != 0){ // cblk style
|
||||
av_log(s->avctx, AV_LOG_WARNING, "extra cblk styles %X\n", c->cblk_style);
|
||||
@@ -711,6 +716,9 @@ static int decode_cblk(J2kDecoderContext *s, J2kCodingStyle *codsty, J2kT1Contex
|
||||
int bpass_csty_symbol = J2K_CBLK_BYPASS & codsty->cblk_style;
|
||||
int vert_causal_ctx_csty_symbol = J2K_CBLK_VSC & codsty->cblk_style;
|
||||
|
||||
av_assert0(width <= J2K_MAX_CBLKW);
|
||||
av_assert0(height <= J2K_MAX_CBLKH);
|
||||
|
||||
for (y = 0; y < height+2; y++)
|
||||
memset(t1->flags[y], 0, (width+2)*sizeof(int));
|
||||
|
||||
|
@@ -106,7 +106,7 @@ static int kmvc_decode_intra_8x8(KmvcContext * ctx, int w, int h)
|
||||
val = bytestream2_get_byte(&ctx->g);
|
||||
mx = val & 0xF;
|
||||
my = val >> 4;
|
||||
if ((l0x-mx) + 320*(l0y-my) < 0 || (l0x-mx) + 320*(l0y-my) > 316*196) {
|
||||
if ((l0x-mx) + 320*(l0y-my) < 0 || (l0x-mx) + 320*(l0y-my) > 320*197 - 4) {
|
||||
av_log(ctx->avctx, AV_LOG_ERROR, "Invalid MV\n");
|
||||
return AVERROR_INVALIDDATA;
|
||||
}
|
||||
@@ -131,7 +131,7 @@ static int kmvc_decode_intra_8x8(KmvcContext * ctx, int w, int h)
|
||||
val = bytestream2_get_byte(&ctx->g);
|
||||
mx = val & 0xF;
|
||||
my = val >> 4;
|
||||
if ((l1x-mx) + 320*(l1y-my) < 0 || (l1x-mx) + 320*(l1y-my) > 318*198) {
|
||||
if ((l1x-mx) + 320*(l1y-my) < 0 || (l1x-mx) + 320*(l1y-my) > 320*199 - 2) {
|
||||
av_log(ctx->avctx, AV_LOG_ERROR, "Invalid MV\n");
|
||||
return AVERROR_INVALIDDATA;
|
||||
}
|
||||
@@ -206,7 +206,7 @@ static int kmvc_decode_inter_8x8(KmvcContext * ctx, int w, int h)
|
||||
val = bytestream2_get_byte(&ctx->g);
|
||||
mx = (val & 0xF) - 8;
|
||||
my = (val >> 4) - 8;
|
||||
if ((l0x+mx) + 320*(l0y+my) < 0 || (l0x+mx) + 320*(l0y+my) > 318*198) {
|
||||
if ((l0x+mx) + 320*(l0y+my) < 0 || (l0x+mx) + 320*(l0y+my) > 320*197 - 4) {
|
||||
av_log(ctx->avctx, AV_LOG_ERROR, "Invalid MV\n");
|
||||
return AVERROR_INVALIDDATA;
|
||||
}
|
||||
@@ -231,7 +231,7 @@ static int kmvc_decode_inter_8x8(KmvcContext * ctx, int w, int h)
|
||||
val = bytestream2_get_byte(&ctx->g);
|
||||
mx = (val & 0xF) - 8;
|
||||
my = (val >> 4) - 8;
|
||||
if ((l1x+mx) + 320*(l1y+my) < 0 || (l1x+mx) + 320*(l1y+my) > 318*198) {
|
||||
if ((l1x+mx) + 320*(l1y+my) < 0 || (l1x+mx) + 320*(l1y+my) > 320*199 - 2) {
|
||||
av_log(ctx->avctx, AV_LOG_ERROR, "Invalid MV\n");
|
||||
return AVERROR_INVALIDDATA;
|
||||
}
|
||||
|
@@ -171,7 +171,7 @@ static int X264_frame(AVCodecContext *ctx, AVPacket *pkt, const AVFrame *frame,
|
||||
frame->pict_type == AV_PICTURE_TYPE_P ? X264_TYPE_P :
|
||||
frame->pict_type == AV_PICTURE_TYPE_B ? X264_TYPE_B :
|
||||
X264_TYPE_AUTO;
|
||||
if (x4->params.b_tff != frame->top_field_first) {
|
||||
if (x4->params.b_interlaced && x4->params.b_tff != frame->top_field_first) {
|
||||
x4->params.b_tff = frame->top_field_first;
|
||||
x264_encoder_reconfig(x4->enc, &x4->params);
|
||||
}
|
||||
|
@@ -1251,7 +1251,7 @@ static int mpeg_decode_postinit(AVCodecContext *avctx)
|
||||
s1->save_width != s->width ||
|
||||
s1->save_height != s->height ||
|
||||
s1->save_aspect_info != s->aspect_ratio_info ||
|
||||
s1->save_progressive_seq != s->progressive_sequence ||
|
||||
(s1->save_progressive_seq != s->progressive_sequence && (s->height&31)) ||
|
||||
0)
|
||||
{
|
||||
|
||||
|
@@ -459,7 +459,7 @@ static av_always_inline void mpeg1_encode_mb_internal(MpegEncContext *s,
|
||||
}
|
||||
|
||||
if (cbp == 0 && !first_mb && s->mv_type == MV_TYPE_16X16 &&
|
||||
(mb_x != s->mb_width - 1 || (mb_y != s->mb_height - 1 && s->codec_id == CODEC_ID_MPEG1VIDEO)) &&
|
||||
(mb_x != s->mb_width - 1 || (mb_y != s->end_mb_y - 1 && s->codec_id == CODEC_ID_MPEG1VIDEO)) &&
|
||||
((s->pict_type == AV_PICTURE_TYPE_P && (motion_x | motion_y) == 0) ||
|
||||
(s->pict_type == AV_PICTURE_TYPE_B && s->mv_dir == s->last_mv_dir && (((s->mv_dir & MV_DIR_FORWARD) ? ((s->mv[0][0][0] - s->last_mv[0][0][0])|(s->mv[0][0][1] - s->last_mv[0][0][1])) : 0) |
|
||||
((s->mv_dir & MV_DIR_BACKWARD) ? ((s->mv[1][0][0] - s->last_mv[1][0][0])|(s->mv[1][0][1] - s->last_mv[1][0][1])) : 0)) == 0))) {
|
||||
@@ -973,7 +973,7 @@ AVCodec ff_mpeg1video_encoder = {
|
||||
.supported_framerates = avpriv_frame_rate_tab+1,
|
||||
.pix_fmts = (const enum PixelFormat[]){ PIX_FMT_YUV420P,
|
||||
PIX_FMT_NONE },
|
||||
.capabilities = CODEC_CAP_DELAY,
|
||||
.capabilities = CODEC_CAP_DELAY | CODEC_CAP_SLICE_THREADS,
|
||||
.long_name = NULL_IF_CONFIG_SMALL("MPEG-1 video"),
|
||||
.priv_class = &mpeg1_class,
|
||||
};
|
||||
|
@@ -29,6 +29,7 @@ typedef struct MpegAudioParseContext {
|
||||
int frame_size;
|
||||
uint32_t header;
|
||||
int header_count;
|
||||
int no_bitrate;
|
||||
} MpegAudioParseContext;
|
||||
|
||||
#define MPA_HEADER_SIZE 4
|
||||
@@ -73,15 +74,18 @@ static int mpegaudio_parse(AVCodecParserContext *s1,
|
||||
if((state&SAME_HEADER_MASK) != (s->header&SAME_HEADER_MASK) && s->header)
|
||||
s->header_count= -3;
|
||||
s->header= state;
|
||||
s->header_count++;
|
||||
s->frame_size = ret-4;
|
||||
|
||||
if (s->header_count > 1) {
|
||||
if (s->header_count > 0) {
|
||||
avctx->sample_rate= sr;
|
||||
avctx->channels = channels;
|
||||
s1->duration = frame_size;
|
||||
avctx->bit_rate = bit_rate;
|
||||
if (s->no_bitrate || !avctx->bit_rate) {
|
||||
s->no_bitrate = 1;
|
||||
avctx->bit_rate += (bit_rate - avctx->bit_rate) / s->header_count;
|
||||
}
|
||||
}
|
||||
s->header_count++;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@@ -211,7 +211,7 @@ static void ff_compute_band_indexes(MPADecodeContext *s, GranuleDef *g)
|
||||
else
|
||||
g->long_end = 6;
|
||||
|
||||
g->short_start = 2 + (s->sample_rate_index != 8);
|
||||
g->short_start = 3;
|
||||
} else {
|
||||
g->long_end = 0;
|
||||
g->short_start = 0;
|
||||
|
@@ -591,7 +591,7 @@ av_cold int ff_MPV_encode_init(AVCodecContext *avctx)
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (s->avctx->thread_count > 1)
|
||||
if (s->avctx->slices > 1 || s->avctx->thread_count > 1)
|
||||
s->rtp_mode = 1;
|
||||
|
||||
if (!avctx->time_base.den || !avctx->time_base.num) {
|
||||
|
@@ -67,7 +67,7 @@ static void qtrle_decode_1bpp(QtrleContext *s, int row_ptr, int lines_to_change)
|
||||
* line' at the beginning. Since we always interpret it as 'go to next line'
|
||||
* in the decoding loop (which makes code simpler/faster), the first line
|
||||
* would not be counted, so we count one more.
|
||||
* See: https://ffmpeg.org/trac/ffmpeg/ticket/226
|
||||
* See: https://trac.ffmpeg.org/ticket/226
|
||||
* In the following decoding loop, row_ptr will be the position of the
|
||||
* _next_ row. */
|
||||
lines_to_change++;
|
||||
|
@@ -83,7 +83,7 @@ static void rpza_decode_stream(RpzaContext *s)
|
||||
unsigned short *pixels = (unsigned short *)s->frame.data[0];
|
||||
|
||||
int row_ptr = 0;
|
||||
int pixel_ptr = 0;
|
||||
int pixel_ptr = -4;
|
||||
int block_ptr;
|
||||
int pixel_x, pixel_y;
|
||||
int total_blocks;
|
||||
@@ -139,6 +139,7 @@ static void rpza_decode_stream(RpzaContext *s)
|
||||
colorA = AV_RB16 (&s->buf[stream_ptr]);
|
||||
stream_ptr += 2;
|
||||
while (n_blocks--) {
|
||||
ADVANCE_BLOCK()
|
||||
block_ptr = row_ptr + pixel_ptr;
|
||||
for (pixel_y = 0; pixel_y < 4; pixel_y++) {
|
||||
for (pixel_x = 0; pixel_x < 4; pixel_x++){
|
||||
@@ -147,7 +148,6 @@ static void rpza_decode_stream(RpzaContext *s)
|
||||
}
|
||||
block_ptr += row_inc;
|
||||
}
|
||||
ADVANCE_BLOCK();
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -186,6 +186,7 @@ static void rpza_decode_stream(RpzaContext *s)
|
||||
if (s->size - stream_ptr < n_blocks * 4)
|
||||
return;
|
||||
while (n_blocks--) {
|
||||
ADVANCE_BLOCK();
|
||||
block_ptr = row_ptr + pixel_ptr;
|
||||
for (pixel_y = 0; pixel_y < 4; pixel_y++) {
|
||||
index = s->buf[stream_ptr++];
|
||||
@@ -196,7 +197,6 @@ static void rpza_decode_stream(RpzaContext *s)
|
||||
}
|
||||
block_ptr += row_inc;
|
||||
}
|
||||
ADVANCE_BLOCK();
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -204,6 +204,7 @@ static void rpza_decode_stream(RpzaContext *s)
|
||||
case 0x00:
|
||||
if (s->size - stream_ptr < 16)
|
||||
return;
|
||||
ADVANCE_BLOCK();
|
||||
block_ptr = row_ptr + pixel_ptr;
|
||||
for (pixel_y = 0; pixel_y < 4; pixel_y++) {
|
||||
for (pixel_x = 0; pixel_x < 4; pixel_x++){
|
||||
@@ -217,7 +218,6 @@ static void rpza_decode_stream(RpzaContext *s)
|
||||
}
|
||||
block_ptr += row_inc;
|
||||
}
|
||||
ADVANCE_BLOCK();
|
||||
break;
|
||||
|
||||
/* Unknown opcode */
|
||||
|
@@ -687,7 +687,7 @@ static int smka_decode_frame(AVCodecContext *avctx, void *data,
|
||||
}
|
||||
val |= h[3].values[res] << 8;
|
||||
pred[1] += sign_extend(val, 16);
|
||||
*samples++ = av_clip_int16(pred[1]);
|
||||
*samples++ = pred[1];
|
||||
} else {
|
||||
if(vlc[0].table)
|
||||
res = get_vlc2(&gb, vlc[0].table, SMKTREE_BITS, 3);
|
||||
@@ -708,7 +708,7 @@ static int smka_decode_frame(AVCodecContext *avctx, void *data,
|
||||
}
|
||||
val |= h[1].values[res] << 8;
|
||||
pred[0] += sign_extend(val, 16);
|
||||
*samples++ = av_clip_int16(pred[0]);
|
||||
*samples++ = pred[0];
|
||||
}
|
||||
}
|
||||
} else { //8-bit data
|
||||
|
@@ -501,7 +501,7 @@ static int tiff_decode_tag(TiffContext *s, const uint8_t *start,
|
||||
break;
|
||||
case TIFF_ROWSPERSTRIP:
|
||||
if (type == TIFF_LONG && value == UINT_MAX)
|
||||
value = s->avctx->height;
|
||||
value = s->height;
|
||||
if (value < 1) {
|
||||
av_log(s->avctx, AV_LOG_ERROR,
|
||||
"Incorrect value of rows per strip\n");
|
||||
|
@@ -72,7 +72,7 @@ static av_always_inline av_const int64_t MUL64(int a, int b)
|
||||
static inline av_const int mid_pred(int a, int b, int c)
|
||||
{
|
||||
int i=b;
|
||||
__asm__ volatile(
|
||||
__asm__ (
|
||||
"cmp %2, %1 \n\t"
|
||||
"cmovg %1, %0 \n\t"
|
||||
"cmovg %2, %1 \n\t"
|
||||
|
@@ -57,7 +57,7 @@ static int xbm_decode_frame(AVCodecContext *avctx, void *data,
|
||||
int number, len;
|
||||
|
||||
ptr += strcspn(ptr, "#");
|
||||
if (sscanf(ptr, "#define %256s %u", name, &number) != 2) {
|
||||
if (sscanf(ptr, "#define %255s %u", name, &number) != 2) {
|
||||
av_log(avctx, AV_LOG_ERROR, "Unexpected preprocessor directive\n");
|
||||
return AVERROR_INVALIDDATA;
|
||||
}
|
||||
|
@@ -696,7 +696,9 @@ static int avi_read_header(AVFormatContext *s)
|
||||
}
|
||||
break;
|
||||
case MKTAG('s', 't', 'r', 'd'):
|
||||
if (stream_index >= (unsigned)s->nb_streams || s->streams[stream_index]->codec->extradata_size) {
|
||||
if (stream_index >= (unsigned)s->nb_streams
|
||||
|| s->streams[stream_index]->codec->extradata_size
|
||||
|| s->streams[stream_index]->codec->codec_tag == MKTAG('H','2','6','4')) {
|
||||
avio_skip(pb, size);
|
||||
} else {
|
||||
uint64_t cur_pos = avio_tell(pb);
|
||||
@@ -989,9 +991,9 @@ start_sync:
|
||||
|| st->discard >= AVDISCARD_ALL){
|
||||
if (!exit_early) {
|
||||
ast->frame_offset += get_duration(ast, size);
|
||||
avio_skip(pb, size);
|
||||
goto start_sync;
|
||||
}
|
||||
avio_skip(pb, size);
|
||||
goto start_sync;
|
||||
}
|
||||
|
||||
if (d[2] == 'p' && d[3] == 'c' && size<=4*256+4) {
|
||||
@@ -1262,6 +1264,11 @@ static int avi_read_idx1(AVFormatContext *s, int size)
|
||||
avi->stream_index = -1;
|
||||
avio_seek(pb, idx1_pos, SEEK_SET);
|
||||
|
||||
if (s->nb_streams == 1 && s->streams[0]->codec->codec_tag == AV_RL32("MMES")){
|
||||
first_packet_pos = 0;
|
||||
data_offset = avi->movi_list;
|
||||
}
|
||||
|
||||
/* Read the entries and sort them in each stream component. */
|
||||
for(i = 0; i < nb_index_entries; i++) {
|
||||
if(url_feof(pb))
|
||||
|
@@ -524,7 +524,7 @@ static int avi_write_packet(AVFormatContext *s, AVPacket *pkt)
|
||||
int size= pkt->size;
|
||||
|
||||
// av_log(s, AV_LOG_DEBUG, "%"PRId64" %d %d\n", pkt->dts, avist->packet_count, stream_index);
|
||||
while(enc->block_align==0 && pkt->dts != AV_NOPTS_VALUE && pkt->dts > avist->packet_count && enc->codec_id != CODEC_ID_XSUB){
|
||||
while(enc->block_align==0 && pkt->dts != AV_NOPTS_VALUE && pkt->dts > avist->packet_count && enc->codec_id != CODEC_ID_XSUB && avist->packet_count){
|
||||
AVPacket empty_packet;
|
||||
|
||||
if(pkt->dts - avist->packet_count > 60000){
|
||||
|
@@ -210,7 +210,9 @@ int ffurl_alloc(URLContext **puc, const char *filename, int flags,
|
||||
"Missing call to av_register_all()?\n");
|
||||
}
|
||||
|
||||
if (filename[proto_len] != ':' && filename[proto_len] != ',' || is_dos_path(filename))
|
||||
if (filename[proto_len] != ':' &&
|
||||
(filename[proto_len] != ',' || !strchr(filename + proto_len + 1, ':')) ||
|
||||
is_dos_path(filename))
|
||||
strcpy(proto_str, "file");
|
||||
else
|
||||
av_strlcpy(proto_str, filename, FFMIN(proto_len+1, sizeof(proto_str)));
|
||||
|
@@ -448,8 +448,13 @@ static int flv_write_packet(AVFormatContext *s, AVPacket *pkt)
|
||||
}
|
||||
} else if (enc->codec_id == CODEC_ID_AAC && pkt->size > 2 &&
|
||||
(AV_RB16(pkt->data) & 0xfff0) == 0xfff0) {
|
||||
av_log(s, AV_LOG_ERROR, "malformated aac bitstream, use -absf aac_adtstoasc\n");
|
||||
return -1;
|
||||
if (!s->streams[pkt->stream_index]->nb_frames) {
|
||||
av_log(s, AV_LOG_ERROR, "Malformed AAC bitstream detected: "
|
||||
"use audio bitstream filter 'aac_adtstoasc' to fix it "
|
||||
"('-bsf:a aac_adtstoasc' option with ffmpeg)\n");
|
||||
return AVERROR_INVALIDDATA;
|
||||
}
|
||||
av_log(s, AV_LOG_WARNING, "aac bitstream error\n");
|
||||
}
|
||||
if (flv->delay == AV_NOPTS_VALUE)
|
||||
flv->delay = -pkt->dts;
|
||||
|
@@ -91,7 +91,7 @@ typedef struct IdcinDemuxContext {
|
||||
|
||||
static int idcin_probe(AVProbeData *p)
|
||||
{
|
||||
unsigned int number;
|
||||
unsigned int number, sample_rate;
|
||||
|
||||
/*
|
||||
* This is what you could call a "probabilistic" file check: id CIN
|
||||
@@ -120,18 +120,18 @@ static int idcin_probe(AVProbeData *p)
|
||||
return 0;
|
||||
|
||||
/* check the audio sample rate */
|
||||
number = AV_RL32(&p->buf[8]);
|
||||
if ((number != 0) && ((number < 8000) | (number > 48000)))
|
||||
sample_rate = AV_RL32(&p->buf[8]);
|
||||
if (sample_rate && (sample_rate < 8000 || sample_rate > 48000))
|
||||
return 0;
|
||||
|
||||
/* check the audio bytes/sample */
|
||||
number = AV_RL32(&p->buf[12]);
|
||||
if (number > 2)
|
||||
if (number > 2 || sample_rate && !number)
|
||||
return 0;
|
||||
|
||||
/* check the audio channels */
|
||||
number = AV_RL32(&p->buf[16]);
|
||||
if (number > 2)
|
||||
if (number > 2 || sample_rate && !number)
|
||||
return 0;
|
||||
|
||||
/* return half certainly since this check is a bit sketchy */
|
||||
|
@@ -347,6 +347,19 @@ static int modplug_read_seek(AVFormatContext *s, int stream_idx, int64_t ts, int
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const char modplug_extensions[] = "669,abc,amf,ams,dbm,dmf,dsm,far,it,mdl,med,mid,mod,mt2,mtm,okt,psm,ptm,s3m,stm,ult,umx,xm,itgz,itr,itz,mdgz,mdr,mdz,s3gz,s3r,s3z,xmgz,xmr,xmz";
|
||||
|
||||
static int modplug_probe(AVProbeData *p)
|
||||
{
|
||||
if (av_match_ext(p->filename, modplug_extensions)) {
|
||||
if (p->buf_size < 16384)
|
||||
return AVPROBE_SCORE_MAX/4-1;
|
||||
else
|
||||
return AVPROBE_SCORE_MAX/2;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const AVClass modplug_class = {
|
||||
.class_name = "ModPlug demuxer",
|
||||
.item_name = av_default_item_name,
|
||||
@@ -358,11 +371,11 @@ AVInputFormat ff_libmodplug_demuxer = {
|
||||
.name = "libmodplug",
|
||||
.long_name = NULL_IF_CONFIG_SMALL("ModPlug demuxer"),
|
||||
.priv_data_size = sizeof(ModPlugContext),
|
||||
.read_probe = modplug_probe,
|
||||
.read_header = modplug_read_header,
|
||||
.read_packet = modplug_read_packet,
|
||||
.read_close = modplug_read_close,
|
||||
.read_seek = modplug_read_seek,
|
||||
.extensions = "669,abc,amf,ams,dbm,dmf,dsm,far,it,mdl,med,mid,mod,mt2,mtm,okt,psm,ptm,s3m,stm,ult,umx,xm"
|
||||
",itgz,itr,itz,mdgz,mdr,mdz,s3gz,s3r,s3z,xmgz,xmr,xmz", // compressed mods
|
||||
.extensions = modplug_extensions,
|
||||
.priv_class = &modplug_class,
|
||||
};
|
||||
|
@@ -55,7 +55,6 @@ static int loas_probe(AVProbeData *p)
|
||||
if (first_frames>=3) return AVPROBE_SCORE_MAX/2+1;
|
||||
else if(max_frames>100)return AVPROBE_SCORE_MAX/2;
|
||||
else if(max_frames>=3) return AVPROBE_SCORE_MAX/4;
|
||||
else if(max_frames>=1) return 1;
|
||||
else return 0;
|
||||
}
|
||||
|
||||
|
@@ -21,6 +21,9 @@
|
||||
|
||||
#include "matroska.h"
|
||||
|
||||
/* If you add a tag here that is not in ff_codec_bmp_tags[]
|
||||
or ff_codec_wav_tags[], add it also to additional_audio_tags[]
|
||||
or additional_video_tags[] in matroskaenc.c */
|
||||
const CodecTags ff_mkv_codec_tags[]={
|
||||
{"A_AAC" , CODEC_ID_AAC},
|
||||
{"A_AC3" , CODEC_ID_AC3},
|
||||
|
@@ -1614,8 +1614,10 @@ static int matroska_read_header(AVFormatContext *s)
|
||||
avio_wl16(&b, 1);
|
||||
avio_wl16(&b, track->audio.channels);
|
||||
avio_wl16(&b, track->audio.bitdepth);
|
||||
if (track->audio.out_samplerate < 0 || track->audio.out_samplerate > INT_MAX)
|
||||
return AVERROR_INVALIDDATA;
|
||||
avio_wl32(&b, track->audio.out_samplerate);
|
||||
avio_wl32(&b, matroska->ctx->duration * track->audio.out_samplerate);
|
||||
avio_wl32(&b, av_rescale((matroska->duration * matroska->time_scale), track->audio.out_samplerate, AV_TIME_BASE * 1000));
|
||||
} else if (codec_id == CODEC_ID_RV10 || codec_id == CODEC_ID_RV20 ||
|
||||
codec_id == CODEC_ID_RV30 || codec_id == CODEC_ID_RV40) {
|
||||
extradata_offset = 26;
|
||||
@@ -2160,7 +2162,6 @@ static int matroska_parse_cluster_incremental(MatroskaDemuxContext *matroska)
|
||||
}
|
||||
}
|
||||
|
||||
if (res < 0) matroska->done = 1;
|
||||
return res;
|
||||
}
|
||||
|
||||
@@ -2250,10 +2251,11 @@ static int matroska_read_seek(AVFormatContext *s, int stream_index,
|
||||
if (tracks[i].type == MATROSKA_TRACK_TYPE_SUBTITLE
|
||||
&& !tracks[i].stream->discard != AVDISCARD_ALL) {
|
||||
index_sub = av_index_search_timestamp(tracks[i].stream, st->index_entries[index].timestamp, AVSEEK_FLAG_BACKWARD);
|
||||
if (index_sub >= 0
|
||||
&& st->index_entries[index_sub].pos < st->index_entries[index_min].pos
|
||||
&& st->index_entries[index].timestamp - st->index_entries[index_sub].timestamp < 30000000000/matroska->time_scale)
|
||||
index_min = index_sub;
|
||||
while(index_sub >= 0
|
||||
&& index_min >= 0
|
||||
&& tracks[i].stream->index_entries[index_sub].pos < st->index_entries[index_min].pos
|
||||
&& st->index_entries[index].timestamp - tracks[i].stream->index_entries[index_sub].timestamp < 30000000000/matroska->time_scale)
|
||||
index_min--;
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -783,6 +783,17 @@ static int mkv_write_tag(AVFormatContext *s, AVDictionary *m, unsigned int eleme
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int mkv_check_tag(AVDictionary *m)
|
||||
{
|
||||
AVDictionaryEntry *t = NULL;
|
||||
|
||||
while ((t = av_dict_get(m, "", t, AV_DICT_IGNORE_SUFFIX)))
|
||||
if (av_strcasecmp(t->key, "title") && av_strcasecmp(t->key, "stereo_mode"))
|
||||
return 1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int mkv_write_tags(AVFormatContext *s)
|
||||
{
|
||||
ebml_master tags = {0};
|
||||
@@ -790,7 +801,7 @@ static int mkv_write_tags(AVFormatContext *s)
|
||||
|
||||
ff_metadata_conv_ctx(s, ff_mkv_metadata_conv, NULL);
|
||||
|
||||
if (av_dict_get(s->metadata, "", NULL, AV_DICT_IGNORE_SUFFIX)) {
|
||||
if (mkv_check_tag(s->metadata)) {
|
||||
ret = mkv_write_tag(s, s->metadata, 0, 0, &tags);
|
||||
if (ret < 0) return ret;
|
||||
}
|
||||
@@ -798,7 +809,7 @@ static int mkv_write_tags(AVFormatContext *s)
|
||||
for (i = 0; i < s->nb_streams; i++) {
|
||||
AVStream *st = s->streams[i];
|
||||
|
||||
if (!av_dict_get(st->metadata, "", 0, AV_DICT_IGNORE_SUFFIX))
|
||||
if (!mkv_check_tag(st->metadata))
|
||||
continue;
|
||||
|
||||
ret = mkv_write_tag(s, st->metadata, MATROSKA_ID_TAGTARGETS_TRACKUID, i + 1, &tags);
|
||||
@@ -808,7 +819,7 @@ static int mkv_write_tags(AVFormatContext *s)
|
||||
for (i = 0; i < s->nb_chapters; i++) {
|
||||
AVChapter *ch = s->chapters[i];
|
||||
|
||||
if (!av_dict_get(ch->metadata, "", NULL, AV_DICT_IGNORE_SUFFIX))
|
||||
if (!mkv_check_tag(ch->metadata))
|
||||
continue;
|
||||
|
||||
ret = mkv_write_tag(s, ch->metadata, MATROSKA_ID_TAGTARGETS_CHAPTERUID, ch->id, &tags);
|
||||
@@ -1304,6 +1315,32 @@ static int mkv_query_codec(enum CodecID codec_id, int std_compliance)
|
||||
return 0;
|
||||
}
|
||||
|
||||
const AVCodecTag additional_audio_tags[] = {
|
||||
{ CODEC_ID_ALAC, 0XFFFFFFFF },
|
||||
{ CODEC_ID_EAC3, 0XFFFFFFFF },
|
||||
{ CODEC_ID_MLP, 0xFFFFFFFF },
|
||||
{ CODEC_ID_PCM_S16BE, 0xFFFFFFFF },
|
||||
{ CODEC_ID_PCM_S24BE, 0xFFFFFFFF },
|
||||
{ CODEC_ID_PCM_S32BE, 0xFFFFFFFF },
|
||||
{ CODEC_ID_QDM2, 0xFFFFFFFF },
|
||||
{ CODEC_ID_RA_144, 0xFFFFFFFF },
|
||||
{ CODEC_ID_RA_288, 0xFFFFFFFF },
|
||||
{ CODEC_ID_COOK, 0xFFFFFFFF },
|
||||
{ CODEC_ID_TRUEHD, 0xFFFFFFFF },
|
||||
{ CODEC_ID_TTA, 0xFFFFFFFF },
|
||||
{ CODEC_ID_WAVPACK, 0xFFFFFFFF },
|
||||
{ CODEC_ID_NONE, 0xFFFFFFFF }
|
||||
};
|
||||
|
||||
const AVCodecTag additional_video_tags[] = {
|
||||
{ CODEC_ID_PRORES, 0xFFFFFFFF },
|
||||
{ CODEC_ID_RV10, 0xFFFFFFFF },
|
||||
{ CODEC_ID_RV20, 0xFFFFFFFF },
|
||||
{ CODEC_ID_RV30, 0xFFFFFFFF },
|
||||
{ CODEC_ID_RV40, 0xFFFFFFFF },
|
||||
{ CODEC_ID_NONE, 0xFFFFFFFF }
|
||||
};
|
||||
|
||||
#if CONFIG_MATROSKA_MUXER
|
||||
AVOutputFormat ff_matroska_muxer = {
|
||||
.name = "matroska",
|
||||
@@ -1326,6 +1363,10 @@ AVOutputFormat ff_matroska_muxer = {
|
||||
.write_trailer = mkv_write_trailer,
|
||||
.flags = AVFMT_GLOBALHEADER | AVFMT_VARIABLE_FPS |
|
||||
AVFMT_TS_NONSTRICT,
|
||||
.codec_tag = (const AVCodecTag* const []){
|
||||
ff_codec_bmp_tags, ff_codec_wav_tags,
|
||||
additional_audio_tags, additional_video_tags, 0
|
||||
},
|
||||
.subtitle_codec = CODEC_ID_SSA,
|
||||
.query_codec = mkv_query_codec,
|
||||
};
|
||||
@@ -1365,5 +1406,8 @@ AVOutputFormat ff_matroska_audio_muxer = {
|
||||
.write_packet = mkv_write_packet,
|
||||
.write_trailer = mkv_write_trailer,
|
||||
.flags = AVFMT_GLOBALHEADER | AVFMT_TS_NONSTRICT,
|
||||
.codec_tag = (const AVCodecTag* const []){
|
||||
ff_codec_wav_tags, additional_audio_tags, 0
|
||||
},
|
||||
};
|
||||
#endif
|
||||
|
@@ -309,14 +309,16 @@ static int mmsh_open_internal(URLContext *h, const char *uri, int flags, int tim
|
||||
return 0;
|
||||
fail:
|
||||
av_freep(&stream_selection);
|
||||
mmsh_close(h);
|
||||
av_dlog(NULL, "Connection failed with error %d\n", err);
|
||||
return err;
|
||||
}
|
||||
|
||||
static int mmsh_open(URLContext *h, const char *uri, int flags)
|
||||
{
|
||||
return mmsh_open_internal(h, uri, flags, 0, 0);
|
||||
int ret = mmsh_open_internal(h, uri, flags, 0, 0);
|
||||
if (ret < 0)
|
||||
mmsh_close(h);
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int handle_chunk_type(MMSHContext *mmsh)
|
||||
|
@@ -849,7 +849,7 @@ static int mov_read_mvhd(MOVContext *c, AVIOContext *pb, MOVAtom atom)
|
||||
c->duration = (version == 1) ? avio_rb64(pb) : avio_rb32(pb); /* duration */
|
||||
// set the AVCodecContext duration because the duration of individual tracks
|
||||
// may be inaccurate
|
||||
if (c->time_scale > 0)
|
||||
if (c->time_scale > 0 && !c->trex_data)
|
||||
c->fc->duration = av_rescale(c->duration, AV_TIME_BASE, c->time_scale);
|
||||
avio_rb32(pb); /* preferred scale */
|
||||
|
||||
|
@@ -1078,13 +1078,17 @@ static int mov_write_video_tag(AVIOContext *pb, MOVTrack *track)
|
||||
mov_write_avcc_tag(pb, track);
|
||||
if(track->mode == MODE_IPOD)
|
||||
mov_write_uuid_tag_ipod(pb);
|
||||
} else if (track->enc->field_order != AV_FIELD_UNKNOWN)
|
||||
mov_write_fiel_tag(pb, track);
|
||||
else if (track->enc->codec_id == CODEC_ID_VC1 && track->vos_len > 0)
|
||||
} else if (track->enc->codec_id == CODEC_ID_VC1 && track->vos_len > 0)
|
||||
mov_write_dvc1_tag(pb, track);
|
||||
else if (track->vos_len > 0)
|
||||
mov_write_glbl_tag(pb, track);
|
||||
|
||||
if (track->enc->codec_id != CODEC_ID_H264 &&
|
||||
track->enc->codec_id != CODEC_ID_MPEG4 &&
|
||||
track->enc->codec_id != CODEC_ID_DNXHD)
|
||||
if (track->enc->field_order != AV_FIELD_UNKNOWN)
|
||||
mov_write_fiel_tag(pb, track);
|
||||
|
||||
if (track->enc->sample_aspect_ratio.den && track->enc->sample_aspect_ratio.num &&
|
||||
track->enc->sample_aspect_ratio.den != track->enc->sample_aspect_ratio.num) {
|
||||
mov_write_pasp_tag(pb, track);
|
||||
@@ -2930,6 +2934,14 @@ int ff_mov_write_packet(AVFormatContext *s, AVPacket *pkt)
|
||||
memcpy(trk->vos_data, enc->extradata, trk->vos_len);
|
||||
}
|
||||
|
||||
if (enc->codec_id == CODEC_ID_AAC && pkt->size > 2 &&
|
||||
(AV_RB16(pkt->data) & 0xfff0) == 0xfff0) {
|
||||
if (!s->streams[pkt->stream_index]->nb_frames) {
|
||||
av_log(s, AV_LOG_ERROR, "malformated aac bitstream, use -absf aac_adtstoasc\n");
|
||||
return -1;
|
||||
}
|
||||
av_log(s, AV_LOG_WARNING, "aac bitstream error\n");
|
||||
}
|
||||
if (enc->codec_id == CODEC_ID_H264 && trk->vos_len > 0 && *(uint8_t *)trk->vos_data != 1) {
|
||||
/* from x264 or from bytestream h264 */
|
||||
/* nal reformating needed */
|
||||
@@ -2940,10 +2952,6 @@ int ff_mov_write_packet(AVFormatContext *s, AVPacket *pkt)
|
||||
} else {
|
||||
size = ff_avc_parse_nal_units(pb, pkt->data, pkt->size);
|
||||
}
|
||||
} else if (enc->codec_id == CODEC_ID_AAC && pkt->size > 2 &&
|
||||
(AV_RB16(pkt->data) & 0xfff0) == 0xfff0) {
|
||||
av_log(s, AV_LOG_ERROR, "malformated aac bitstream, use -absf aac_adtstoasc\n");
|
||||
return -1;
|
||||
} else {
|
||||
avio_write(pb, pkt->data, size);
|
||||
}
|
||||
|
@@ -88,6 +88,7 @@ static int mp3_parse_vbr_tags(AVFormatContext *s, AVStream *st, int64_t base)
|
||||
const int64_t xing_offtbl[2][2] = {{32, 17}, {17,9}};
|
||||
MPADecodeHeader c;
|
||||
int vbrtag_size = 0;
|
||||
int is_cbr;
|
||||
|
||||
v = avio_rb32(s->pb);
|
||||
if(ff_mpa_check_header(v) < 0)
|
||||
@@ -101,7 +102,8 @@ static int mp3_parse_vbr_tags(AVFormatContext *s, AVStream *st, int64_t base)
|
||||
/* Check for Xing / Info tag */
|
||||
avio_skip(s->pb, xing_offtbl[c.lsf == 1][c.nb_channels == 1]);
|
||||
v = avio_rb32(s->pb);
|
||||
if(v == MKBETAG('X', 'i', 'n', 'g') || v == MKBETAG('I', 'n', 'f', 'o')) {
|
||||
is_cbr = v == MKBETAG('I', 'n', 'f', 'o');
|
||||
if (v == MKBETAG('X', 'i', 'n', 'g') || is_cbr) {
|
||||
v = avio_rb32(s->pb);
|
||||
if(v & 0x1)
|
||||
frames = avio_rb32(s->pb);
|
||||
@@ -132,7 +134,7 @@ static int mp3_parse_vbr_tags(AVFormatContext *s, AVStream *st, int64_t base)
|
||||
if(frames)
|
||||
st->duration = av_rescale_q(frames, (AVRational){spf, c.sample_rate},
|
||||
st->time_base);
|
||||
if(size && frames)
|
||||
if (size && frames && !is_cbr)
|
||||
st->codec->bit_rate = av_rescale(size, 8 * c.sample_rate, frames * (int64_t)spf);
|
||||
|
||||
return 0;
|
||||
|
@@ -1579,12 +1579,18 @@ static void pat_cb(MpegTSFilter *filter, const uint8_t *section, int section_len
|
||||
if (sid == 0x0000) {
|
||||
/* NIT info */
|
||||
} else {
|
||||
MpegTSFilter *fil = ts->pids[pmt_pid];
|
||||
program = av_new_program(ts->stream, sid);
|
||||
program->program_num = sid;
|
||||
program->pmt_pid = pmt_pid;
|
||||
if (ts->pids[pmt_pid])
|
||||
mpegts_close_filter(ts, ts->pids[pmt_pid]);
|
||||
mpegts_open_section_filter(ts, pmt_pid, pmt_cb, ts, 1);
|
||||
if (fil)
|
||||
if ( fil->type != MPEGTS_SECTION
|
||||
|| fil->pid != pmt_pid
|
||||
|| fil->u.section_filter.section_cb != pmt_cb)
|
||||
mpegts_close_filter(ts, ts->pids[pmt_pid]);
|
||||
|
||||
if (!ts->pids[pmt_pid])
|
||||
mpegts_open_section_filter(ts, pmt_pid, pmt_cb, ts, 1);
|
||||
add_pat_entry(ts, sid);
|
||||
add_pid_to_pmt(ts, sid, 0); //add pat pid to program
|
||||
add_pid_to_pmt(ts, sid, pmt_pid);
|
||||
|
@@ -735,8 +735,13 @@ int ff_read_riff_info(AVFormatContext *s, int64_t size)
|
||||
chunk_code = avio_rl32(pb);
|
||||
chunk_size = avio_rl32(pb);
|
||||
if (chunk_size > end || end - chunk_size < cur || chunk_size == UINT_MAX) {
|
||||
av_log(s, AV_LOG_ERROR, "too big INFO subchunk\n");
|
||||
return AVERROR_INVALIDDATA;
|
||||
avio_seek(pb, -9, SEEK_CUR);
|
||||
chunk_code = avio_rl32(pb);
|
||||
chunk_size = avio_rl32(pb);
|
||||
if (chunk_size > end || end - chunk_size < cur || chunk_size == UINT_MAX) {
|
||||
av_log(s, AV_LOG_ERROR, "too big INFO subchunk\n");
|
||||
return AVERROR_INVALIDDATA;
|
||||
}
|
||||
}
|
||||
|
||||
chunk_size += (chunk_size & 1);
|
||||
|
@@ -107,13 +107,14 @@ static int rm_read_extradata(AVIOContext *pb, AVCodecContext *avctx, unsigned si
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void rm_read_metadata(AVFormatContext *s, int wide)
|
||||
static void rm_read_metadata(AVFormatContext *s, AVIOContext *pb, int wide)
|
||||
{
|
||||
char buf[1024];
|
||||
int i;
|
||||
|
||||
for (i=0; i<FF_ARRAY_ELEMS(ff_rm_metadata); i++) {
|
||||
int len = wide ? avio_rb16(s->pb) : avio_r8(s->pb);
|
||||
get_strl(s->pb, buf, sizeof(buf), len);
|
||||
int len = wide ? avio_rb16(pb) : avio_r8(pb);
|
||||
get_strl(pb, buf, sizeof(buf), len);
|
||||
av_dict_set(&s->metadata, ff_rm_metadata[i], buf, 0);
|
||||
}
|
||||
}
|
||||
@@ -143,7 +144,7 @@ static int rm_read_audio_stream_info(AVFormatContext *s, AVIOContext *pb,
|
||||
int header_size = avio_rb16(pb);
|
||||
int64_t startpos = avio_tell(pb);
|
||||
avio_skip(pb, 14);
|
||||
rm_read_metadata(s, 0);
|
||||
rm_read_metadata(s, pb, 0);
|
||||
if ((startpos + header_size) >= avio_tell(pb) + 2) {
|
||||
// fourcc (should always be "lpcJ")
|
||||
avio_r8(pb);
|
||||
@@ -290,7 +291,7 @@ static int rm_read_audio_stream_info(AVFormatContext *s, AVIOContext *pb,
|
||||
avio_r8(pb);
|
||||
avio_r8(pb);
|
||||
avio_r8(pb);
|
||||
rm_read_metadata(s, 0);
|
||||
rm_read_metadata(s, pb, 0);
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
@@ -483,7 +484,7 @@ static int rm_read_header(AVFormatContext *s)
|
||||
flags = avio_rb16(pb); /* flags */
|
||||
break;
|
||||
case MKTAG('C', 'O', 'N', 'T'):
|
||||
rm_read_metadata(s, 1);
|
||||
rm_read_metadata(s, pb, 1);
|
||||
break;
|
||||
case MKTAG('M', 'D', 'P', 'R'):
|
||||
st = avformat_new_stream(s, NULL);
|
||||
@@ -982,6 +983,18 @@ static int64_t rm_read_dts(AVFormatContext *s, int stream_index,
|
||||
return dts;
|
||||
}
|
||||
|
||||
static int rm_read_seek(AVFormatContext *s, int stream_index,
|
||||
int64_t pts, int flags)
|
||||
{
|
||||
RMDemuxContext *rm = s->priv_data;
|
||||
|
||||
if (ff_seek_frame_binary(s, stream_index, pts, flags) < 0)
|
||||
return -1;
|
||||
rm->audio_pkt_cnt = 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
AVInputFormat ff_rm_demuxer = {
|
||||
.name = "rm",
|
||||
.long_name = NULL_IF_CONFIG_SMALL("RealMedia format"),
|
||||
@@ -991,6 +1004,7 @@ AVInputFormat ff_rm_demuxer = {
|
||||
.read_packet = rm_read_packet,
|
||||
.read_close = rm_read_close,
|
||||
.read_timestamp = rm_read_dts,
|
||||
.read_seek = rm_read_seek,
|
||||
};
|
||||
|
||||
AVInputFormat ff_rdt_demuxer = {
|
||||
|
@@ -281,11 +281,11 @@ int ff_amf_tag_size(const uint8_t *data, const uint8_t *data_end)
|
||||
data++;
|
||||
break;
|
||||
}
|
||||
if (data + size >= data_end || data + size < data)
|
||||
if (size < 0 || size >= data_end - data)
|
||||
return -1;
|
||||
data += size;
|
||||
t = ff_amf_tag_size(data, data_end);
|
||||
if (t < 0 || data + t >= data_end)
|
||||
if (t < 0 || t >= data_end - data)
|
||||
return -1;
|
||||
data += t;
|
||||
}
|
||||
@@ -314,7 +314,7 @@ int ff_amf_get_field_value(const uint8_t *data, const uint8_t *data_end,
|
||||
int size = bytestream_get_be16(&data);
|
||||
if (!size)
|
||||
break;
|
||||
if (data + size >= data_end || data + size < data)
|
||||
if (size < 0 || size >= data_end - data)
|
||||
return -1;
|
||||
data += size;
|
||||
if (size == namelen && !memcmp(data-size, name, namelen)) {
|
||||
@@ -335,7 +335,7 @@ int ff_amf_get_field_value(const uint8_t *data, const uint8_t *data_end,
|
||||
return 0;
|
||||
}
|
||||
len = ff_amf_tag_size(data, data_end);
|
||||
if (len < 0 || data + len >= data_end || data + len < data)
|
||||
if (len < 0 || len >= data_end - data)
|
||||
return -1;
|
||||
data += len;
|
||||
}
|
||||
@@ -365,7 +365,7 @@ static const char* rtmp_packet_type(int type)
|
||||
|
||||
static void ff_amf_tag_contents(void *ctx, const uint8_t *data, const uint8_t *data_end)
|
||||
{
|
||||
int size;
|
||||
unsigned int size;
|
||||
char buf[1024];
|
||||
|
||||
if (data >= data_end)
|
||||
@@ -384,7 +384,7 @@ static void ff_amf_tag_contents(void *ctx, const uint8_t *data, const uint8_t *d
|
||||
} else {
|
||||
size = bytestream_get_be32(&data);
|
||||
}
|
||||
size = FFMIN(size, 1023);
|
||||
size = FFMIN(size, sizeof(buf) - 1);
|
||||
memcpy(buf, data, size);
|
||||
buf[size] = 0;
|
||||
av_log(ctx, AV_LOG_DEBUG, " string '%s'\n", buf);
|
||||
@@ -397,22 +397,21 @@ static void ff_amf_tag_contents(void *ctx, const uint8_t *data, const uint8_t *d
|
||||
case AMF_DATA_TYPE_OBJECT:
|
||||
av_log(ctx, AV_LOG_DEBUG, " {\n");
|
||||
for (;;) {
|
||||
int size = bytestream_get_be16(&data);
|
||||
int t;
|
||||
memcpy(buf, data, size);
|
||||
buf[size] = 0;
|
||||
size = bytestream_get_be16(&data);
|
||||
av_strlcpy(buf, data, FFMIN(sizeof(buf), size + 1));
|
||||
if (!size) {
|
||||
av_log(ctx, AV_LOG_DEBUG, " }\n");
|
||||
data++;
|
||||
break;
|
||||
}
|
||||
if (data + size >= data_end || data + size < data)
|
||||
if (size >= data_end - data)
|
||||
return;
|
||||
data += size;
|
||||
av_log(ctx, AV_LOG_DEBUG, " %s: ", buf);
|
||||
ff_amf_tag_contents(ctx, data, data_end);
|
||||
t = ff_amf_tag_size(data, data_end);
|
||||
if (t < 0 || data + t >= data_end)
|
||||
if (t < 0 || t >= data_end - data)
|
||||
return;
|
||||
data += t;
|
||||
}
|
||||
|
@@ -31,14 +31,14 @@
|
||||
|
||||
static const uint8_t *avc_mp4_find_startcode(const uint8_t *start, const uint8_t *end, int nal_length_size)
|
||||
{
|
||||
int res = 0;
|
||||
unsigned int res = 0;
|
||||
|
||||
if (end - start < nal_length_size)
|
||||
return NULL;
|
||||
while (nal_length_size--)
|
||||
res = (res << 8) | *start++;
|
||||
|
||||
if (start + res > end || res < 0 || start + res < start)
|
||||
if (res > end - start)
|
||||
return NULL;
|
||||
|
||||
return start + res;
|
||||
|
@@ -269,7 +269,7 @@ static int smacker_read_packet(AVFormatContext *s, AVPacket *pkt)
|
||||
} else if(t & 0x40){ /* copy with offset */
|
||||
off = avio_r8(s->pb);
|
||||
j = (t & 0x3F) + 1;
|
||||
if (off + j > 0xff) {
|
||||
if (off + j - 1 > 0xff) {
|
||||
av_log(s, AV_LOG_ERROR,
|
||||
"Invalid palette update, offset=%d length=%d extends beyond palette size\n",
|
||||
off, j);
|
||||
|
@@ -187,6 +187,10 @@ static int swf_write_header(AVFormatContext *s)
|
||||
AVCodecContext *enc = s->streams[i]->codec;
|
||||
if (enc->codec_type == AVMEDIA_TYPE_AUDIO) {
|
||||
if (enc->codec_id == CODEC_ID_MP3) {
|
||||
if (!enc->frame_size) {
|
||||
av_log(s, AV_LOG_ERROR, "audio frame size not set\n");
|
||||
return -1;
|
||||
}
|
||||
swf->audio_enc = enc;
|
||||
swf->audio_fifo= av_fifo_alloc(AUDIO_FIFO_SIZE);
|
||||
if (!swf->audio_fifo)
|
||||
@@ -448,7 +452,7 @@ static int swf_write_audio(AVFormatContext *s,
|
||||
}
|
||||
|
||||
av_fifo_generic_write(swf->audio_fifo, buf, size, NULL);
|
||||
swf->sound_samples += av_get_audio_frame_duration(enc, size);
|
||||
swf->sound_samples += enc->frame_size;
|
||||
|
||||
/* if audio only stream make sure we add swf frames */
|
||||
if (!swf->video_enc)
|
||||
|
@@ -460,7 +460,7 @@ int av_probe_input_buffer(AVIOContext *pb, AVInputFormat **fmt,
|
||||
{
|
||||
AVProbeData pd = { filename ? filename : "", NULL, -offset };
|
||||
unsigned char *buf = NULL;
|
||||
int ret = 0, probe_size;
|
||||
int ret = 0, probe_size, buf_offset = 0;
|
||||
|
||||
if (!max_probe_size) {
|
||||
max_probe_size = PROBE_BUF_MAX;
|
||||
@@ -500,7 +500,7 @@ int av_probe_input_buffer(AVIOContext *pb, AVInputFormat **fmt,
|
||||
score = 0;
|
||||
ret = 0; /* error was end of file, nothing read */
|
||||
}
|
||||
pd.buf_size += ret;
|
||||
pd.buf_size = buf_offset += ret;
|
||||
pd.buf = &buf[offset];
|
||||
|
||||
memset(pd.buf + pd.buf_size, 0, AVPROBE_PADDING_SIZE);
|
||||
@@ -673,6 +673,21 @@ fail:
|
||||
|
||||
/*******************************************************/
|
||||
|
||||
static void force_codec_ids(AVFormatContext *s, AVStream *st)
|
||||
{
|
||||
switch(st->codec->codec_type){
|
||||
case AVMEDIA_TYPE_VIDEO:
|
||||
if(s->video_codec_id) st->codec->codec_id= s->video_codec_id;
|
||||
break;
|
||||
case AVMEDIA_TYPE_AUDIO:
|
||||
if(s->audio_codec_id) st->codec->codec_id= s->audio_codec_id;
|
||||
break;
|
||||
case AVMEDIA_TYPE_SUBTITLE:
|
||||
if(s->subtitle_codec_id)st->codec->codec_id= s->subtitle_codec_id;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
int ff_read_packet(AVFormatContext *s, AVPacket *pkt)
|
||||
{
|
||||
int ret, i;
|
||||
@@ -721,17 +736,7 @@ int ff_read_packet(AVFormatContext *s, AVPacket *pkt)
|
||||
|
||||
st= s->streams[pkt->stream_index];
|
||||
|
||||
switch(st->codec->codec_type){
|
||||
case AVMEDIA_TYPE_VIDEO:
|
||||
if(s->video_codec_id) st->codec->codec_id= s->video_codec_id;
|
||||
break;
|
||||
case AVMEDIA_TYPE_AUDIO:
|
||||
if(s->audio_codec_id) st->codec->codec_id= s->audio_codec_id;
|
||||
break;
|
||||
case AVMEDIA_TYPE_SUBTITLE:
|
||||
if(s->subtitle_codec_id)st->codec->codec_id= s->subtitle_codec_id;
|
||||
break;
|
||||
}
|
||||
force_codec_ids(s, st);
|
||||
|
||||
if(!pktl && st->request_probe <= 0)
|
||||
return ret;
|
||||
@@ -765,6 +770,7 @@ int ff_read_packet(AVFormatContext *s, AVPacket *pkt)
|
||||
}else
|
||||
av_log(s, AV_LOG_WARNING, "probed stream %d failed\n", st->index);
|
||||
}
|
||||
force_codec_ids(s, st);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -809,6 +815,13 @@ static int get_audio_frame_size(AVCodecContext *enc, int size, int mux)
|
||||
if (enc->frame_size > 1)
|
||||
return enc->frame_size;
|
||||
|
||||
//For WMA we currently have no other means to calculate duration thus we
|
||||
//do it here by assuming CBR, which is true for all known cases.
|
||||
if(!mux && enc->bit_rate>0 && size>0 && enc->sample_rate>0 && enc->block_align>1) {
|
||||
if (enc->codec_id == CODEC_ID_WMAV1 || enc->codec_id == CODEC_ID_WMAV2)
|
||||
return ((int64_t)size * 8 * enc->sample_rate) / enc->bit_rate;
|
||||
}
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -1345,6 +1358,9 @@ static int read_frame_internal(AVFormatContext *s, AVPacket *pkt)
|
||||
st->skip_to_keyframe = 0;
|
||||
if (st->skip_to_keyframe) {
|
||||
av_free_packet(&cur_pkt);
|
||||
if (got_packet) {
|
||||
*pkt = cur_pkt;
|
||||
}
|
||||
got_packet = 0;
|
||||
}
|
||||
}
|
||||
|
@@ -513,8 +513,7 @@ static int wav_read_header(AVFormatContext *s)
|
||||
}
|
||||
switch (list_type) {
|
||||
case MKTAG('I', 'N', 'F', 'O'):
|
||||
if ((ret = ff_read_riff_info(s, size - 4)) < 0)
|
||||
return ret;
|
||||
ff_read_riff_info(s, size - 4);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@@ -404,6 +404,7 @@ static void get_attachment(AVFormatContext *s, AVIOContext *pb, int length)
|
||||
char description[1024];
|
||||
unsigned int filesize;
|
||||
AVStream *st;
|
||||
int ret;
|
||||
int64_t pos = avio_tell(pb);
|
||||
|
||||
avio_get_str16le(pb, INT_MAX, mime, sizeof(mime));
|
||||
@@ -420,13 +421,14 @@ static void get_attachment(AVFormatContext *s, AVIOContext *pb, int length)
|
||||
if (!st)
|
||||
goto done;
|
||||
av_dict_set(&st->metadata, "title", description, 0);
|
||||
st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
|
||||
st->codec->codec_id = CODEC_ID_MJPEG;
|
||||
st->codec->codec_type = AVMEDIA_TYPE_ATTACHMENT;
|
||||
st->codec->extradata = av_mallocz(filesize);
|
||||
if (!st->codec->extradata)
|
||||
ret = av_get_packet(pb, &st->attached_pic, filesize);
|
||||
if (ret < 0)
|
||||
goto done;
|
||||
st->codec->extradata_size = filesize;
|
||||
avio_read(pb, st->codec->extradata, filesize);
|
||||
st->attached_pic.stream_index = st->index;
|
||||
st->attached_pic.flags |= AV_PKT_FLAG_KEY;
|
||||
st->disposition |= AV_DISPOSITION_ATTACHED_PIC;
|
||||
done:
|
||||
avio_seek(pb, pos + length, SEEK_SET);
|
||||
}
|
||||
|
@@ -196,7 +196,12 @@ cglobal %2_to_%1_%3, 3, 3, 6, dst, src, len
|
||||
add lenq, 2*mmsize/(1<<%4)
|
||||
%endif
|
||||
jl .next
|
||||
%if mmsize == 8
|
||||
emms
|
||||
RET
|
||||
%else
|
||||
REP_RET
|
||||
%endif
|
||||
%endmacro
|
||||
|
||||
%macro PACK_6CH 5-7
|
||||
|
@@ -595,6 +595,9 @@ static rgbConvFn findRgbConvFn(SwsContext *c)
|
||||
}
|
||||
}
|
||||
|
||||
if ((dstFormat == PIX_FMT_RGB32_1 || dstFormat == PIX_FMT_BGR32_1) && !isRGBA32(srcFormat) && ALT32_CORR<0)
|
||||
return NULL;
|
||||
|
||||
return conv;
|
||||
}
|
||||
|
||||
|
@@ -1,3 +1,3 @@
|
||||
67cbcc79f018afb68f7d81625bfa234c *./tests/data/lavf-fate/lavf.mp3
|
||||
97230 ./tests/data/lavf-fate/lavf.mp3
|
||||
0f7b603ab305759ea4e853326f77da60 *./tests/data/lavf-fate/lavf.mp3
|
||||
96366 ./tests/data/lavf-fate/lavf.mp3
|
||||
./tests/data/lavf-fate/lavf.mp3 CRC=0x6c9850fe
|
||||
|
@@ -1,3 +1,3 @@
|
||||
d8e8858db2fe4920d19d4267059933d6 *./tests/data/lavf/lavf.mkv
|
||||
320305 ./tests/data/lavf/lavf.mkv
|
||||
c7ebe0d582549859b2b27dcd5908444b *./tests/data/lavf/lavf.mkv
|
||||
320273 ./tests/data/lavf/lavf.mkv
|
||||
./tests/data/lavf/lavf.mkv CRC=0xd86284dd
|
||||
|
@@ -1,48 +1,48 @@
|
||||
ret: 0 st: 1 flags:1 dts:-0.011000 pts:-0.011000 pos: 555 size: 208
|
||||
ret: 0 st: 1 flags:1 dts:-0.011000 pts:-0.011000 pos: 523 size: 208
|
||||
ret: 0 st:-1 flags:0 ts:-1.000000
|
||||
ret: 0 st: 1 flags:1 dts: 0.000000 pts: 0.000000 pos: 555 size: 208
|
||||
ret: 0 st: 1 flags:1 dts: 0.000000 pts: 0.000000 pos: 523 size: 208
|
||||
ret: 0 st:-1 flags:1 ts: 1.894167
|
||||
ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 292193 size: 27834
|
||||
ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 292161 size: 27834
|
||||
ret: 0 st: 0 flags:0 ts: 0.788000
|
||||
ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 292193 size: 27834
|
||||
ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 292161 size: 27834
|
||||
ret: 0 st: 0 flags:1 ts:-0.317000
|
||||
ret: 0 st: 1 flags:1 dts: 0.000000 pts: 0.000000 pos: 555 size: 208
|
||||
ret: 0 st: 1 flags:1 dts: 0.000000 pts: 0.000000 pos: 523 size: 208
|
||||
ret:-1 st: 1 flags:0 ts: 2.577000
|
||||
ret: 0 st: 1 flags:1 ts: 1.471000
|
||||
ret: 0 st: 1 flags:1 dts: 0.982000 pts: 0.982000 pos: 320034 size: 209
|
||||
ret: 0 st: 1 flags:1 dts: 0.982000 pts: 0.982000 pos: 320002 size: 209
|
||||
ret: 0 st:-1 flags:0 ts: 0.365002
|
||||
ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 146746 size: 27925
|
||||
ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 146714 size: 27925
|
||||
ret: 0 st:-1 flags:1 ts:-0.740831
|
||||
ret: 0 st: 1 flags:1 dts: 0.000000 pts: 0.000000 pos: 555 size: 208
|
||||
ret: 0 st: 1 flags:1 dts: 0.000000 pts: 0.000000 pos: 523 size: 208
|
||||
ret:-1 st: 0 flags:0 ts: 2.153000
|
||||
ret: 0 st: 0 flags:1 ts: 1.048000
|
||||
ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 292193 size: 27834
|
||||
ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 292161 size: 27834
|
||||
ret: 0 st: 1 flags:0 ts:-0.058000
|
||||
ret: 0 st: 1 flags:1 dts: 0.015000 pts: 0.015000 pos: 555 size: 208
|
||||
ret: 0 st: 1 flags:1 dts: 0.015000 pts: 0.015000 pos: 523 size: 208
|
||||
ret: 0 st: 1 flags:1 ts: 2.836000
|
||||
ret: 0 st: 1 flags:1 dts: 0.982000 pts: 0.982000 pos: 320034 size: 209
|
||||
ret: 0 st: 1 flags:1 dts: 0.982000 pts: 0.982000 pos: 320002 size: 209
|
||||
ret:-1 st:-1 flags:0 ts: 1.730004
|
||||
ret: 0 st:-1 flags:1 ts: 0.624171
|
||||
ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 146746 size: 27925
|
||||
ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 146714 size: 27925
|
||||
ret: 0 st: 0 flags:0 ts:-0.482000
|
||||
ret: 0 st: 1 flags:1 dts: 0.000000 pts: 0.000000 pos: 555 size: 208
|
||||
ret: 0 st: 1 flags:1 dts: 0.000000 pts: 0.000000 pos: 523 size: 208
|
||||
ret: 0 st: 0 flags:1 ts: 2.413000
|
||||
ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 292193 size: 27834
|
||||
ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 292161 size: 27834
|
||||
ret:-1 st: 1 flags:0 ts: 1.307000
|
||||
ret: 0 st: 1 flags:1 ts: 0.201000
|
||||
ret: 0 st: 1 flags:1 dts: 0.015000 pts: 0.015000 pos: 555 size: 208
|
||||
ret: 0 st: 1 flags:1 dts: 0.015000 pts: 0.015000 pos: 523 size: 208
|
||||
ret: 0 st:-1 flags:0 ts:-0.904994
|
||||
ret: 0 st: 1 flags:1 dts: 0.000000 pts: 0.000000 pos: 555 size: 208
|
||||
ret: 0 st: 1 flags:1 dts: 0.000000 pts: 0.000000 pos: 523 size: 208
|
||||
ret: 0 st:-1 flags:1 ts: 1.989173
|
||||
ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 292193 size: 27834
|
||||
ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 292161 size: 27834
|
||||
ret: 0 st: 0 flags:0 ts: 0.883000
|
||||
ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 292193 size: 27834
|
||||
ret: 0 st: 0 flags:1 dts: 0.960000 pts: 0.960000 pos: 292161 size: 27834
|
||||
ret: 0 st: 0 flags:1 ts:-0.222000
|
||||
ret: 0 st: 1 flags:1 dts: 0.000000 pts: 0.000000 pos: 555 size: 208
|
||||
ret: 0 st: 1 flags:1 dts: 0.000000 pts: 0.000000 pos: 523 size: 208
|
||||
ret:-1 st: 1 flags:0 ts: 2.672000
|
||||
ret: 0 st: 1 flags:1 ts: 1.566000
|
||||
ret: 0 st: 1 flags:1 dts: 0.982000 pts: 0.982000 pos: 320034 size: 209
|
||||
ret: 0 st: 1 flags:1 dts: 0.982000 pts: 0.982000 pos: 320002 size: 209
|
||||
ret: 0 st:-1 flags:0 ts: 0.460008
|
||||
ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 146746 size: 27925
|
||||
ret: 0 st: 0 flags:1 dts: 0.480000 pts: 0.480000 pos: 146714 size: 27925
|
||||
ret: 0 st:-1 flags:1 ts:-0.645825
|
||||
ret: 0 st: 1 flags:1 dts: 0.000000 pts: 0.000000 pos: 555 size: 208
|
||||
ret: 0 st: 1 flags:1 dts: 0.000000 pts: 0.000000 pos: 523 size: 208
|
||||
|
4
tests/ref/vsynth/vsynth1-dnxhd-1080i
Normal file
4
tests/ref/vsynth/vsynth1-dnxhd-1080i
Normal file
@@ -0,0 +1,4 @@
|
||||
124c991ee3ac0caef39a58a45287a762 *tests/data/fate/vsynth1-dnxhd-1080i.mov
|
||||
3031911 tests/data/fate/vsynth1-dnxhd-1080i.mov
|
||||
a09132c6db44f415e831dcaa630a351b *tests/data/fate/vsynth1-dnxhd-1080i.out.rawvideo
|
||||
stddev: 6.29 PSNR: 32.15 MAXDIFF: 64 bytes: 7603200/ 760320
|
4
tests/ref/vsynth/vsynth1-mpeg4
Normal file
4
tests/ref/vsynth/vsynth1-mpeg4
Normal file
@@ -0,0 +1,4 @@
|
||||
a2acdf772bf7b7641079d8a03ea03ccf *tests/data/fate/vsynth1-mpeg4.mp4
|
||||
540024 tests/data/fate/vsynth1-mpeg4.mp4
|
||||
f80ec173d37f2f91add031e95579a220 *tests/data/fate/vsynth1-mpeg4.out.rawvideo
|
||||
stddev: 7.97 PSNR: 30.10 MAXDIFF: 105 bytes: 7603200/ 7603200
|
4
tests/ref/vsynth/vsynth2-dnxhd-1080i
Normal file
4
tests/ref/vsynth/vsynth2-dnxhd-1080i
Normal file
@@ -0,0 +1,4 @@
|
||||
5d7ab75ce6e547ed63a7a0eacf18f078 *tests/data/fate/vsynth2-dnxhd-1080i.mov
|
||||
3031911 tests/data/fate/vsynth2-dnxhd-1080i.mov
|
||||
744ba46da5d4c19a28562ea31061d170 *tests/data/fate/vsynth2-dnxhd-1080i.out.rawvideo
|
||||
stddev: 1.31 PSNR: 45.77 MAXDIFF: 23 bytes: 7603200/ 760320
|
4
tests/ref/vsynth/vsynth2-mpeg4
Normal file
4
tests/ref/vsynth/vsynth2-mpeg4
Normal file
@@ -0,0 +1,4 @@
|
||||
04f74c54f4db25e1d454ede9216632c1 *tests/data/fate/vsynth2-mpeg4.mp4
|
||||
119661 tests/data/fate/vsynth2-mpeg4.mp4
|
||||
9a1e085d9e488c5ead0c940c9612a37a *tests/data/fate/vsynth2-mpeg4.out.rawvideo
|
||||
stddev: 5.34 PSNR: 33.57 MAXDIFF: 83 bytes: 7603200/ 7603200
|
Reference in New Issue
Block a user