Compare commits
224 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 | ||
![]() |
b06903e6c5 | ||
![]() |
a5069caecd | ||
![]() |
b5e72345a6 | ||
![]() |
99dbda3008 | ||
![]() |
d721cb009d | ||
![]() |
55b3e408fa | ||
![]() |
9f1e01c991 | ||
![]() |
450e4b1a60 | ||
![]() |
3581ab6ce0 | ||
![]() |
f1ec792ae3 | ||
![]() |
05e64b51bb | ||
![]() |
3593f577b0 | ||
![]() |
72791e41d4 | ||
![]() |
4155968fc6 | ||
![]() |
d14ce69869 | ||
![]() |
b45a8f6d24 | ||
![]() |
ae8491ce33 | ||
![]() |
3f78fe1d56 | ||
![]() |
fb52da522c | ||
![]() |
5231a35559 | ||
![]() |
606538df6c | ||
![]() |
a19010f7a6 | ||
![]() |
39fe8033bb | ||
![]() |
964f8419dd | ||
![]() |
5c2ffa2ce7 | ||
![]() |
6be8e44c00 | ||
![]() |
565581b0a4 | ||
![]() |
dc85ca0945 | ||
![]() |
a53ca16ae9 | ||
![]() |
92e5e62156 | ||
![]() |
e1c9434424 | ||
![]() |
af3f7c88f2 | ||
![]() |
b4294e2319 | ||
![]() |
7d97936495 | ||
![]() |
f9fc08de65 | ||
![]() |
31d3b3b5d5 | ||
![]() |
706809adb2 | ||
![]() |
4e66ca5f37 | ||
![]() |
530ce76a05 | ||
![]() |
0e74b21427 | ||
![]() |
381a914024 | ||
![]() |
d0d9182d3e | ||
![]() |
320704f739 | ||
![]() |
be1d65031f | ||
![]() |
bbc4d287c9 | ||
![]() |
3bb942e6f0 | ||
![]() |
e863d3306f | ||
![]() |
433ec3afa3 | ||
![]() |
d0cb4dc471 | ||
![]() |
95b1cbc4cb | ||
![]() |
177fc2438a | ||
![]() |
46b99bb70c | ||
![]() |
03275ed219 | ||
![]() |
ae5f69a98f | ||
![]() |
dc72a59fe5 | ||
![]() |
70af4f209f | ||
![]() |
0964e189da | ||
![]() |
7883efbbb2 | ||
![]() |
af67af5938 | ||
![]() |
d3c564b784 | ||
![]() |
bb5314daba | ||
![]() |
33a3f1fe9d | ||
![]() |
ac3fc94eb0 | ||
![]() |
d838c40823 | ||
![]() |
eea82203ba | ||
![]() |
617d91b76a | ||
![]() |
f1150e0c7d | ||
![]() |
f46b57657b | ||
![]() |
662ab44c2d | ||
![]() |
cc0a684497 | ||
![]() |
7f0f6602cb | ||
![]() |
d5d5f96068 | ||
![]() |
91ac6d9902 | ||
![]() |
0a311df6d9 | ||
![]() |
48094cb23a | ||
![]() |
d3d6849d17 | ||
![]() |
ddb92c6df1 | ||
![]() |
55a97399bc | ||
![]() |
eecbd9a78f | ||
![]() |
a441a96eb2 | ||
![]() |
dff4dbdf60 | ||
![]() |
622e926e9c | ||
![]() |
8ad71e276c | ||
![]() |
cdcd99eecc | ||
![]() |
9dc14fd3f0 | ||
![]() |
ba2d20b449 | ||
![]() |
b395bac383 | ||
![]() |
3768afd5a5 | ||
![]() |
e0f0486c7f | ||
![]() |
56e987d2cd | ||
![]() |
c64bfd7c3d | ||
![]() |
0e2b69b4e6 | ||
![]() |
63040dcddd | ||
![]() |
1e78d75d6a | ||
![]() |
91fdba3d79 | ||
![]() |
68efb539e3 | ||
![]() |
ee50ec19c7 | ||
![]() |
3a68e989ec | ||
![]() |
61a72fd9c8 | ||
![]() |
c254214ea3 | ||
![]() |
59417897be | ||
![]() |
03f82b5668 | ||
![]() |
7f8059bdfe | ||
![]() |
0f9098cb18 | ||
![]() |
c4e3dd06e8 | ||
![]() |
88a145738b | ||
![]() |
1ed0a61ea8 | ||
![]() |
9f2905d299 | ||
![]() |
f6c3fe94da | ||
![]() |
727749d30f | ||
![]() |
c7c82acf96 | ||
![]() |
f8f5db3b70 | ||
![]() |
51157dab37 | ||
![]() |
982caeac3e | ||
![]() |
d108d0804a | ||
![]() |
072e7fad87 | ||
![]() |
484302d183 | ||
![]() |
734cfa8e8b |
15
Changelog
15
Changelog
@@ -3,8 +3,19 @@ releases are sorted from youngest to oldest.
|
||||
|
||||
version next:
|
||||
|
||||
version 0.11.2:
|
||||
|
||||
- Several bugs and crashes have been fixed as well as build problems
|
||||
with recent mingw64
|
||||
|
||||
|
||||
version 0.11:
|
||||
- Fixes CVE-2012-2771 ... 2805
|
||||
Fixes:CVE-2012-2772, CVE-2012-2774, CVE-2012-2775, CVE-2012-2776, CVE-2012-2777,
|
||||
CVE-2012-2779, CVE-2012-2782, CVE-2012-2783, CVE-2012-2784, CVE-2012-2785,
|
||||
CVE-2012-2786, CVE-2012-2787, CVE-2012-2788, CVE-2012-2789, CVE-2012-2790,
|
||||
CVE-2012-2791, CVE-2012-2792, CVE-2012-2793, CVE-2012-2794, CVE-2012-2795,
|
||||
CVE-2012-2796, CVE-2012-2797, CVE-2012-2798, CVE-2012-2799, CVE-2012-2800,
|
||||
CVE-2012-2801, CVE-2012-2802, CVE-2012-2803, CVE-2012-2804,
|
||||
- v408 Quicktime and Microsoft AYUV Uncompressed 4:4:4:4 encoder and decoder
|
||||
- setfield filter
|
||||
- CDXL demuxer and decoder
|
||||
@@ -33,7 +44,7 @@ version 0.11:
|
||||
- MicroDVD decoder
|
||||
- Avid Meridien (AVUI) encoder and decoder
|
||||
- accept + prefix to -pix_fmt option to disable automatic conversions.
|
||||
- audio filters support in libavfilter and avconv
|
||||
- complete audio filtering in libavfilter and ffmpeg
|
||||
- add fps filter
|
||||
- audio split filter
|
||||
- vorbis parser
|
||||
|
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 =
|
||||
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;
|
||||
|
||||
|
30
configure
vendored
30
configure
vendored
@@ -112,7 +112,7 @@ Component options:
|
||||
--disable-swscale disable libswscale build
|
||||
--disable-postproc disable libpostproc build
|
||||
--disable-avfilter disable video filter support [no]
|
||||
--disable-avresample disable libavresample build [no]
|
||||
--enable-avresample enable libavresample build [no]
|
||||
--disable-pthreads disable pthreads [auto]
|
||||
--disable-w32threads disable Win32 threads [auto]
|
||||
--disable-os2threads disable OS/2 threads [auto]
|
||||
@@ -1173,6 +1173,7 @@ HAVE_LIST="
|
||||
dlfcn_h
|
||||
dlopen
|
||||
dos_paths
|
||||
dxva_h
|
||||
ebp_available
|
||||
ebx_available
|
||||
exp2
|
||||
@@ -1217,7 +1218,6 @@ HAVE_LIST="
|
||||
memalign
|
||||
mkstemp
|
||||
mmap
|
||||
netinet_sctp_h
|
||||
PeekNamedPipe
|
||||
poll_h
|
||||
posix_memalign
|
||||
@@ -1237,6 +1237,7 @@ HAVE_LIST="
|
||||
struct_addrinfo
|
||||
struct_ipv6_mreq
|
||||
struct_rusage_ru_maxrss
|
||||
struct_sctp_event_subscribe
|
||||
struct_sockaddr_in6
|
||||
struct_sockaddr_sa_len
|
||||
struct_sockaddr_storage
|
||||
@@ -1665,7 +1666,7 @@ mmst_protocol_deps="network"
|
||||
rtmp_protocol_deps="!librtmp_protocol"
|
||||
rtmp_protocol_select="tcp_protocol"
|
||||
rtp_protocol_select="udp_protocol"
|
||||
sctp_protocol_deps="network netinet_sctp_h"
|
||||
sctp_protocol_deps="network struct_sctp_event_subscribe"
|
||||
tcp_protocol_deps="network"
|
||||
tls_protocol_deps_any="openssl gnutls"
|
||||
tls_protocol_select="tcp_protocol"
|
||||
@@ -1676,11 +1677,13 @@ aconvert_filter_deps="swresample"
|
||||
amovie_filter_deps="avcodec avformat"
|
||||
aresample_filter_deps="swresample"
|
||||
ass_filter_deps="libass"
|
||||
asyncts_filter_deps="avresample"
|
||||
blackframe_filter_deps="gpl"
|
||||
boxblur_filter_deps="gpl"
|
||||
colormatrix_filter_deps="gpl"
|
||||
cropdetect_filter_deps="gpl"
|
||||
delogo_filter_deps="gpl"
|
||||
deshake_filter_deps="avcodec"
|
||||
drawtext_filter_deps="libfreetype"
|
||||
frei0r_filter_deps="frei0r dlopen"
|
||||
frei0r_filter_extralibs='$ldl'
|
||||
@@ -1878,7 +1881,6 @@ enable avcodec
|
||||
enable avdevice
|
||||
enable avfilter
|
||||
enable avformat
|
||||
enable avresample
|
||||
enable avutil
|
||||
enable postproc
|
||||
enable stripping
|
||||
@@ -2852,6 +2854,10 @@ die_license_disabled() {
|
||||
enabled $1 || { enabled $2 && die "$2 is $1 and --enable-$1 is not specified."; }
|
||||
}
|
||||
|
||||
die_license_disabled_gpl() {
|
||||
enabled $1 || { enabled $2 && die "$2 is incompatible with the gpl and --enable-$1 is not specified."; }
|
||||
}
|
||||
|
||||
die_license_disabled gpl libcdio
|
||||
die_license_disabled gpl libutvideo
|
||||
die_license_disabled gpl libx264
|
||||
@@ -2861,7 +2867,7 @@ die_license_disabled gpl x11grab
|
||||
|
||||
die_license_disabled nonfree libaacplus
|
||||
die_license_disabled nonfree libfaac
|
||||
die_license_disabled nonfree openssl
|
||||
enabled gpl && die_license_disabled_gpl nonfree openssl
|
||||
|
||||
die_license_disabled version3 libopencore_amrnb
|
||||
die_license_disabled version3 libopencore_amrwb
|
||||
@@ -3065,7 +3071,7 @@ if enabled network; then
|
||||
check_type netinet/in.h "struct sockaddr_in6"
|
||||
check_type "sys/types.h sys/socket.h" "struct sockaddr_storage"
|
||||
check_struct "sys/types.h sys/socket.h" "struct sockaddr" sa_len
|
||||
check_header netinet/sctp.h
|
||||
check_type netinet/sctp.h "struct sctp_event_subscribe"
|
||||
# Prefer arpa/inet.h over winsock2
|
||||
if check_header arpa/inet.h ; then
|
||||
check_func closesocket
|
||||
@@ -3120,6 +3126,7 @@ check_func_headers windows.h VirtualAlloc
|
||||
check_func_headers glob.h glob
|
||||
|
||||
check_header dlfcn.h
|
||||
check_header dxva.h
|
||||
check_header dxva2api.h -D_WIN32_WINNT=0x0600
|
||||
check_header libcrystalhd/libcrystalhd_if.h
|
||||
check_header malloc.h
|
||||
@@ -3284,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
|
||||
|
||||
@@ -3445,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.
|
||||
|
@@ -35,7 +35,7 @@ GENTEXI = format codec
|
||||
GENTEXI := $(GENTEXI:%=doc/avoptions_%.texi)
|
||||
|
||||
$(GENTEXI): TAG = GENTEXI
|
||||
$(GENTEXI): doc/avoptions_%.texi: doc/print_options
|
||||
$(GENTEXI): doc/avoptions_%.texi: doc/print_options$(HOSTEXESUF)
|
||||
$(M)doc/print_options $* > $@
|
||||
|
||||
doc/%.html: TAG = HTML
|
||||
|
@@ -1,7 +1,7 @@
|
||||
Release Notes
|
||||
=============
|
||||
|
||||
* 0.10 "Freedom" January, 2012
|
||||
* 0.11 "Happiness" May, 2012
|
||||
|
||||
|
||||
General notes
|
||||
|
@@ -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
|
||||
|
@@ -340,6 +340,10 @@ prefix is ``ffmpeg2pass''. The complete file name will be
|
||||
@file{PREFIX-N.log}, where N is a number specific to the output
|
||||
stream
|
||||
|
||||
Note that this option is overwritten by a local option of the same name
|
||||
when using @code{-vcodec libx264}. That option maps to the x264 option stats
|
||||
which has a different syntax.
|
||||
|
||||
@item -vlang @var{code}
|
||||
Set the ISO 639 language code (3 letters) of the current video stream.
|
||||
|
||||
|
@@ -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
|
||||
|
9
ffmpeg.c
9
ffmpeg.c
@@ -1456,8 +1456,11 @@ static void term_init(void)
|
||||
#if HAVE_TERMIOS_H
|
||||
if(!run_as_daemon){
|
||||
struct termios tty;
|
||||
|
||||
if (tcgetattr (0, &tty) == 0) {
|
||||
int istty = 1;
|
||||
#if HAVE_ISATTY
|
||||
istty = isatty(0) && isatty(2);
|
||||
#endif
|
||||
if (istty && tcgetattr (0, &tty) == 0) {
|
||||
oldtty = tty;
|
||||
restore_tty = 1;
|
||||
atexit(term_exit);
|
||||
@@ -4700,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);
|
||||
}
|
||||
}
|
||||
|
||||
|
117
ffplay.c
117
ffplay.c
@@ -232,6 +232,7 @@ typedef struct VideoState {
|
||||
#endif
|
||||
|
||||
int refresh;
|
||||
int last_video_stream, last_audio_stream, last_subtitle_stream;
|
||||
} VideoState;
|
||||
|
||||
typedef struct AllocEventProps {
|
||||
@@ -303,13 +304,12 @@ void av_noreturn exit_program(int ret)
|
||||
exit(ret);
|
||||
}
|
||||
|
||||
static int packet_queue_put(PacketQueue *q, AVPacket *pkt)
|
||||
static int packet_queue_put_private(PacketQueue *q, AVPacket *pkt)
|
||||
{
|
||||
AVPacketList *pkt1;
|
||||
|
||||
/* duplicate the packet */
|
||||
if (pkt != &flush_pkt && av_dup_packet(pkt) < 0)
|
||||
return -1;
|
||||
if (q->abort_request)
|
||||
return -1;
|
||||
|
||||
pkt1 = av_malloc(sizeof(AVPacketList));
|
||||
if (!pkt1)
|
||||
@@ -317,11 +317,7 @@ static int packet_queue_put(PacketQueue *q, AVPacket *pkt)
|
||||
pkt1->pkt = *pkt;
|
||||
pkt1->next = NULL;
|
||||
|
||||
|
||||
SDL_LockMutex(q->mutex);
|
||||
|
||||
if (!q->last_pkt)
|
||||
|
||||
q->first_pkt = pkt1;
|
||||
else
|
||||
q->last_pkt->next = pkt1;
|
||||
@@ -330,18 +326,34 @@ static int packet_queue_put(PacketQueue *q, AVPacket *pkt)
|
||||
q->size += pkt1->pkt.size + sizeof(*pkt1);
|
||||
/* XXX: should duplicate packet data in DV case */
|
||||
SDL_CondSignal(q->cond);
|
||||
|
||||
SDL_UnlockMutex(q->mutex);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int packet_queue_put(PacketQueue *q, AVPacket *pkt)
|
||||
{
|
||||
int ret;
|
||||
|
||||
/* duplicate the packet */
|
||||
if (pkt != &flush_pkt && av_dup_packet(pkt) < 0)
|
||||
return -1;
|
||||
|
||||
SDL_LockMutex(q->mutex);
|
||||
ret = packet_queue_put_private(q, pkt);
|
||||
SDL_UnlockMutex(q->mutex);
|
||||
|
||||
if (pkt != &flush_pkt && ret < 0)
|
||||
av_free_packet(pkt);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* packet queue handling */
|
||||
static void packet_queue_init(PacketQueue *q)
|
||||
{
|
||||
memset(q, 0, sizeof(PacketQueue));
|
||||
q->mutex = SDL_CreateMutex();
|
||||
q->cond = SDL_CreateCond();
|
||||
packet_queue_put(q, &flush_pkt);
|
||||
q->abort_request = 1;
|
||||
}
|
||||
|
||||
static void packet_queue_flush(PacketQueue *q)
|
||||
@@ -361,7 +373,7 @@ static void packet_queue_flush(PacketQueue *q)
|
||||
SDL_UnlockMutex(q->mutex);
|
||||
}
|
||||
|
||||
static void packet_queue_end(PacketQueue *q)
|
||||
static void packet_queue_destroy(PacketQueue *q)
|
||||
{
|
||||
packet_queue_flush(q);
|
||||
SDL_DestroyMutex(q->mutex);
|
||||
@@ -379,6 +391,14 @@ static void packet_queue_abort(PacketQueue *q)
|
||||
SDL_UnlockMutex(q->mutex);
|
||||
}
|
||||
|
||||
static void packet_queue_start(PacketQueue *q)
|
||||
{
|
||||
SDL_LockMutex(q->mutex);
|
||||
q->abort_request = 0;
|
||||
packet_queue_put_private(q, &flush_pkt);
|
||||
SDL_UnlockMutex(q->mutex);
|
||||
}
|
||||
|
||||
/* return < 0 if aborted, 0 if no packet and > 0 if packet. */
|
||||
static int packet_queue_get(PacketQueue *q, AVPacket *pkt, int block)
|
||||
{
|
||||
@@ -877,6 +897,9 @@ static void stream_close(VideoState *is)
|
||||
is->abort_request = 1;
|
||||
SDL_WaitThread(is->read_tid, NULL);
|
||||
SDL_WaitThread(is->refresh_tid, NULL);
|
||||
packet_queue_destroy(&is->videoq);
|
||||
packet_queue_destroy(&is->audioq);
|
||||
packet_queue_destroy(&is->subtitleq);
|
||||
|
||||
/* free all pictures */
|
||||
for (i = 0; i < VIDEO_PICTURE_QUEUE_SIZE; i++) {
|
||||
@@ -1816,8 +1839,13 @@ static int video_thread(void *arg)
|
||||
int last_w = is->video_st->codec->width;
|
||||
int last_h = is->video_st->codec->height;
|
||||
|
||||
if ((ret = configure_video_filters(graph, is, vfilters)) < 0)
|
||||
if ((ret = configure_video_filters(graph, is, vfilters)) < 0) {
|
||||
SDL_Event event;
|
||||
event.type = FF_QUIT_EVENT;
|
||||
event.user.data1 = is;
|
||||
SDL_PushEvent(&event);
|
||||
goto the_end;
|
||||
}
|
||||
filt_out = is->out_video_filter;
|
||||
#endif
|
||||
|
||||
@@ -1893,6 +1921,7 @@ static int video_thread(void *arg)
|
||||
stream_toggle_pause(is);
|
||||
}
|
||||
the_end:
|
||||
avcodec_flush_buffers(is->video_st->codec);
|
||||
#if CONFIG_AVFILTER
|
||||
av_freep(&vfilters);
|
||||
avfilter_graph_free(&graph);
|
||||
@@ -2240,9 +2269,9 @@ static int stream_component_open(VideoState *is, int stream_index)
|
||||
opts = filter_codec_opts(codec_opts, codec, ic, ic->streams[stream_index]);
|
||||
|
||||
switch(avctx->codec_type){
|
||||
case AVMEDIA_TYPE_AUDIO : if(audio_codec_name ) codec= avcodec_find_decoder_by_name( audio_codec_name); break;
|
||||
case AVMEDIA_TYPE_SUBTITLE: if(subtitle_codec_name) codec= avcodec_find_decoder_by_name(subtitle_codec_name); break;
|
||||
case AVMEDIA_TYPE_VIDEO : if(video_codec_name ) codec= avcodec_find_decoder_by_name( video_codec_name); break;
|
||||
case AVMEDIA_TYPE_AUDIO : is->last_audio_stream = stream_index; if(audio_codec_name ) codec= avcodec_find_decoder_by_name( audio_codec_name); break;
|
||||
case AVMEDIA_TYPE_SUBTITLE: is->last_subtitle_stream = stream_index; if(subtitle_codec_name) codec= avcodec_find_decoder_by_name(subtitle_codec_name); break;
|
||||
case AVMEDIA_TYPE_VIDEO : is->last_video_stream = stream_index; if(video_codec_name ) codec= avcodec_find_decoder_by_name( video_codec_name); break;
|
||||
}
|
||||
if (!codec)
|
||||
return -1;
|
||||
@@ -2343,20 +2372,20 @@ static int stream_component_open(VideoState *is, int stream_index)
|
||||
is->audio_diff_threshold = 2.0 * SDL_AUDIO_BUFFER_SIZE / wanted_spec.freq;
|
||||
|
||||
memset(&is->audio_pkt, 0, sizeof(is->audio_pkt));
|
||||
packet_queue_init(&is->audioq);
|
||||
packet_queue_start(&is->audioq);
|
||||
SDL_PauseAudio(0);
|
||||
break;
|
||||
case AVMEDIA_TYPE_VIDEO:
|
||||
is->video_stream = stream_index;
|
||||
is->video_st = ic->streams[stream_index];
|
||||
|
||||
packet_queue_init(&is->videoq);
|
||||
packet_queue_start(&is->videoq);
|
||||
is->video_tid = SDL_CreateThread(video_thread, is);
|
||||
break;
|
||||
case AVMEDIA_TYPE_SUBTITLE:
|
||||
is->subtitle_stream = stream_index;
|
||||
is->subtitle_st = ic->streams[stream_index];
|
||||
packet_queue_init(&is->subtitleq);
|
||||
packet_queue_start(&is->subtitleq);
|
||||
|
||||
is->subtitle_tid = SDL_CreateThread(subtitle_thread, is);
|
||||
break;
|
||||
@@ -2381,7 +2410,7 @@ static void stream_component_close(VideoState *is, int stream_index)
|
||||
|
||||
SDL_CloseAudio();
|
||||
|
||||
packet_queue_end(&is->audioq);
|
||||
packet_queue_flush(&is->audioq);
|
||||
av_free_packet(&is->audio_pkt);
|
||||
if (is->swr_ctx)
|
||||
swr_free(&is->swr_ctx);
|
||||
@@ -2407,7 +2436,7 @@ static void stream_component_close(VideoState *is, int stream_index)
|
||||
|
||||
SDL_WaitThread(is->video_tid, NULL);
|
||||
|
||||
packet_queue_end(&is->videoq);
|
||||
packet_queue_flush(&is->videoq);
|
||||
break;
|
||||
case AVMEDIA_TYPE_SUBTITLE:
|
||||
packet_queue_abort(&is->subtitleq);
|
||||
@@ -2422,7 +2451,7 @@ static void stream_component_close(VideoState *is, int stream_index)
|
||||
|
||||
SDL_WaitThread(is->subtitle_tid, NULL);
|
||||
|
||||
packet_queue_end(&is->subtitleq);
|
||||
packet_queue_flush(&is->subtitleq);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
@@ -2469,9 +2498,9 @@ static int read_thread(void *arg)
|
||||
int orig_nb_streams;
|
||||
|
||||
memset(st_index, -1, sizeof(st_index));
|
||||
is->video_stream = -1;
|
||||
is->audio_stream = -1;
|
||||
is->subtitle_stream = -1;
|
||||
is->last_video_stream = is->video_stream = -1;
|
||||
is->last_audio_stream = is->audio_stream = -1;
|
||||
is->last_subtitle_stream = is->subtitle_stream = -1;
|
||||
|
||||
ic = avformat_alloc_context();
|
||||
ic->interrupt_callback.callback = decode_interrupt_cb;
|
||||
@@ -2625,9 +2654,9 @@ static int read_thread(void *arg)
|
||||
|
||||
/* if the queue are full, no need to read more */
|
||||
if ( is->audioq.size + is->videoq.size + is->subtitleq.size > MAX_QUEUE_SIZE
|
||||
|| ( (is->audioq .nb_packets > MIN_FRAMES || is->audio_stream < 0)
|
||||
&& (is->videoq .nb_packets > MIN_FRAMES || is->video_stream < 0)
|
||||
&& (is->subtitleq.nb_packets > MIN_FRAMES || is->subtitle_stream < 0))) {
|
||||
|| ( (is->audioq .nb_packets > MIN_FRAMES || is->audio_stream < 0 || is->audioq.abort_request)
|
||||
&& (is->videoq .nb_packets > MIN_FRAMES || is->video_stream < 0 || is->videoq.abort_request)
|
||||
&& (is->subtitleq.nb_packets > MIN_FRAMES || is->subtitle_stream < 0 || is->subtitleq.abort_request))) {
|
||||
/* wait 10 ms */
|
||||
SDL_Delay(10);
|
||||
continue;
|
||||
@@ -2732,6 +2761,10 @@ static VideoState *stream_open(const char *filename, AVInputFormat *iformat)
|
||||
is->subpq_mutex = SDL_CreateMutex();
|
||||
is->subpq_cond = SDL_CreateCond();
|
||||
|
||||
packet_queue_init(&is->videoq);
|
||||
packet_queue_init(&is->audioq);
|
||||
packet_queue_init(&is->subtitleq);
|
||||
|
||||
is->av_sync_type = av_sync_type;
|
||||
is->read_tid = SDL_CreateThread(read_thread, is);
|
||||
if (!is->read_tid) {
|
||||
@@ -2745,16 +2778,19 @@ static void stream_cycle_channel(VideoState *is, int codec_type)
|
||||
{
|
||||
AVFormatContext *ic = is->ic;
|
||||
int start_index, stream_index;
|
||||
int old_index;
|
||||
AVStream *st;
|
||||
|
||||
if (codec_type == AVMEDIA_TYPE_VIDEO)
|
||||
start_index = is->video_stream;
|
||||
else if (codec_type == AVMEDIA_TYPE_AUDIO)
|
||||
start_index = is->audio_stream;
|
||||
else
|
||||
start_index = is->subtitle_stream;
|
||||
if (start_index < (codec_type == AVMEDIA_TYPE_SUBTITLE ? -1 : 0))
|
||||
return;
|
||||
if (codec_type == AVMEDIA_TYPE_VIDEO) {
|
||||
start_index = is->last_video_stream;
|
||||
old_index = is->video_stream;
|
||||
} else if (codec_type == AVMEDIA_TYPE_AUDIO) {
|
||||
start_index = is->last_audio_stream;
|
||||
old_index = is->audio_stream;
|
||||
} else {
|
||||
start_index = is->last_subtitle_stream;
|
||||
old_index = is->subtitle_stream;
|
||||
}
|
||||
stream_index = start_index;
|
||||
for (;;) {
|
||||
if (++stream_index >= is->ic->nb_streams)
|
||||
@@ -2762,9 +2798,12 @@ static void stream_cycle_channel(VideoState *is, int codec_type)
|
||||
if (codec_type == AVMEDIA_TYPE_SUBTITLE)
|
||||
{
|
||||
stream_index = -1;
|
||||
is->last_subtitle_stream = -1;
|
||||
goto the_end;
|
||||
} else
|
||||
stream_index = 0;
|
||||
}
|
||||
if (start_index == -1)
|
||||
return;
|
||||
stream_index = 0;
|
||||
}
|
||||
if (stream_index == start_index)
|
||||
return;
|
||||
@@ -2786,7 +2825,7 @@ static void stream_cycle_channel(VideoState *is, int codec_type)
|
||||
}
|
||||
}
|
||||
the_end:
|
||||
stream_component_close(is, start_index);
|
||||
stream_component_close(is, old_index);
|
||||
stream_component_open(is, stream_index);
|
||||
}
|
||||
|
||||
|
@@ -47,7 +47,7 @@ typedef struct EightSvxContext {
|
||||
/* buffer used to store the whole audio decoded/interleaved chunk,
|
||||
* which is sent with the first packet */
|
||||
uint8_t *samples;
|
||||
size_t samples_size;
|
||||
int64_t samples_size;
|
||||
int samples_idx;
|
||||
} EightSvxContext;
|
||||
|
||||
|
@@ -188,7 +188,7 @@ OBJS-$(CONFIG_FRAPS_DECODER) += fraps.o
|
||||
OBJS-$(CONFIG_FRWU_DECODER) += frwu.o
|
||||
OBJS-$(CONFIG_G723_1_DECODER) += g723_1.o acelp_vectors.o \
|
||||
celp_filters.o celp_math.o
|
||||
OBJS-$(CONFIG_G723_1_ENCODER) += g723_1.o
|
||||
OBJS-$(CONFIG_G723_1_ENCODER) += g723_1.o acelp_vectors.o celp_math.o
|
||||
OBJS-$(CONFIG_G729_DECODER) += g729dec.o lsp.o celp_math.o acelp_filters.o acelp_pitch_delay.o acelp_vectors.o g729postfilter.o
|
||||
OBJS-$(CONFIG_GIF_DECODER) += gifdec.o lzw.o
|
||||
OBJS-$(CONFIG_GIF_ENCODER) += gif.o lzwenc.o
|
||||
@@ -347,7 +347,7 @@ OBJS-$(CONFIG_PNG_DECODER) += png.o pngdec.o pngdsp.o
|
||||
OBJS-$(CONFIG_PNG_ENCODER) += png.o pngenc.o
|
||||
OBJS-$(CONFIG_PPM_DECODER) += pnmdec.o pnm.o
|
||||
OBJS-$(CONFIG_PPM_ENCODER) += pnmenc.o pnm.o
|
||||
OBJS-$(CONFIG_PRORES_DECODER) += proresdec2.o
|
||||
OBJS-$(CONFIG_PRORES_DECODER) += proresdec2.o proresdsp.o
|
||||
OBJS-$(CONFIG_PRORES_LGPL_DECODER) += proresdec_lgpl.o proresdsp.o proresdata.o
|
||||
OBJS-$(CONFIG_PRORES_ENCODER) += proresenc_anatoliy.o
|
||||
OBJS-$(CONFIG_PRORES_ANATOLIY_ENCODER) += proresenc_anatoliy.o
|
||||
@@ -626,6 +626,7 @@ OBJS-$(CONFIG_MATROSKA_DEMUXER) += mpeg4audio.o mpegaudiodata.o
|
||||
OBJS-$(CONFIG_MATROSKA_MUXER) += xiph.o mpeg4audio.o \
|
||||
flacdec.o flacdata.o flac.o \
|
||||
mpegaudiodata.o vorbis_data.o
|
||||
OBJS-$(CONFIG_MP2_MUXER) += mpegaudiodata.o mpegaudiodecheader.o
|
||||
OBJS-$(CONFIG_MP3_MUXER) += mpegaudiodata.o mpegaudiodecheader.o
|
||||
OBJS-$(CONFIG_MOV_DEMUXER) += mpeg4audio.o mpegaudiodata.o ac3tab.o timecode.o
|
||||
OBJS-$(CONFIG_MOV_MUXER) += mpeg4audio.o mpegaudiodata.o
|
||||
|
@@ -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;
|
||||
@@ -878,7 +878,7 @@ static void search_for_quantizers_faac(AVCodecContext *avctx, AACEncContext *s,
|
||||
} else {
|
||||
for (w = 0; w < 8; w++) {
|
||||
const float *coeffs = sce->coeffs + w*128;
|
||||
start = 0;
|
||||
curband = start = 0;
|
||||
for (i = 0; i < 128; i++) {
|
||||
if (i - start >= sce->ics.swb_sizes[curband]) {
|
||||
start += sce->ics.swb_sizes[curband];
|
||||
|
@@ -487,6 +487,7 @@ static ChannelElement *get_che(AACContext *ac, int type, int elem_id)
|
||||
return NULL;
|
||||
|
||||
ac->oc[1].m4ac.chan_config = 2;
|
||||
ac->oc[1].m4ac.ps = 0;
|
||||
}
|
||||
// And vice-versa
|
||||
if (!ac->tags_mapped && type == TYPE_SCE && ac->oc[1].m4ac.chan_config == 2) {
|
||||
@@ -504,6 +505,8 @@ static ChannelElement *get_che(AACContext *ac, int type, int elem_id)
|
||||
return NULL;
|
||||
|
||||
ac->oc[1].m4ac.chan_config = 1;
|
||||
if (ac->oc[1].m4ac.sbr)
|
||||
ac->oc[1].m4ac.ps = -1;
|
||||
}
|
||||
// For indexed channel configurations map the channels solely based on position.
|
||||
switch (ac->oc[1].m4ac.chan_config) {
|
||||
|
@@ -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] =
|
||||
|
@@ -66,7 +66,7 @@ static int aasc_decode_frame(AVCodecContext *avctx,
|
||||
const uint8_t *buf = avpkt->data;
|
||||
int buf_size = avpkt->size;
|
||||
AascContext *s = avctx->priv_data;
|
||||
int compr, i, stride;
|
||||
int compr, i, stride, psize;
|
||||
|
||||
s->frame.reference = 3;
|
||||
s->frame.buffer_hints = FF_BUFFER_HINTS_VALID | FF_BUFFER_HINTS_PRESERVE | FF_BUFFER_HINTS_REUSABLE;
|
||||
@@ -78,6 +78,7 @@ static int aasc_decode_frame(AVCodecContext *avctx,
|
||||
compr = AV_RL32(buf);
|
||||
buf += 4;
|
||||
buf_size -= 4;
|
||||
psize = avctx->bits_per_coded_sample / 8;
|
||||
switch (avctx->codec_tag) {
|
||||
case MKTAG('A', 'A', 'S', '4'):
|
||||
bytestream2_init(&s->gb, buf - 4, buf_size + 4);
|
||||
@@ -86,13 +87,13 @@ static int aasc_decode_frame(AVCodecContext *avctx,
|
||||
case MKTAG('A', 'A', 'S', 'C'):
|
||||
switch(compr){
|
||||
case 0:
|
||||
stride = (avctx->width * 3 + 3) & ~3;
|
||||
stride = (avctx->width * psize + psize) & ~psize;
|
||||
for(i = avctx->height - 1; i >= 0; i--){
|
||||
if(avctx->width*3 > buf_size){
|
||||
if(avctx->width * psize > buf_size){
|
||||
av_log(avctx, AV_LOG_ERROR, "Next line is beyond buffer bounds\n");
|
||||
break;
|
||||
}
|
||||
memcpy(s->frame.data[0] + i*s->frame.linesize[0], buf, avctx->width*3);
|
||||
memcpy(s->frame.data[0] + i*s->frame.linesize[0], buf, avctx->width * psize);
|
||||
buf += stride;
|
||||
buf_size -= stride;
|
||||
}
|
||||
|
@@ -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))) {
|
||||
|
@@ -48,8 +48,8 @@ static int avui_decode_frame(AVCodecContext *avctx, void *data,
|
||||
if (pic->data[0])
|
||||
avctx->release_buffer(avctx, pic);
|
||||
|
||||
if (!memcmp(&avctx->extradata[4], "APRGAPRG0001", 12) &&
|
||||
avctx->extradata_size >= 24)
|
||||
if (avctx->extradata_size >= 24 &&
|
||||
!memcmp(&avctx->extradata[4], "APRGAPRG0001", 12))
|
||||
interlaced = avctx->extradata[19] != 1;
|
||||
if (avctx->height == 486) {
|
||||
skip = 10;
|
||||
|
@@ -107,6 +107,7 @@ AVCodec ff_avui_encoder = {
|
||||
.init = avui_encode_init,
|
||||
.encode2 = avui_encode_frame,
|
||||
.close = avui_encode_close,
|
||||
.capabilities = CODEC_CAP_EXPERIMENTAL,
|
||||
.pix_fmts = (const enum PixelFormat[]){ PIX_FMT_UYVY422, PIX_FMT_NONE },
|
||||
.long_name = NULL_IF_CONFIG_SMALL("Avid Meridien Uncompressed"),
|
||||
};
|
||||
|
@@ -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;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1128,6 +1132,11 @@ static int bink_decode_plane(BinkContext *c, GetBitContext *gb, int plane_idx,
|
||||
xoff = get_value(c, BINK_SRC_X_OFF);
|
||||
yoff = get_value(c, BINK_SRC_Y_OFF);
|
||||
ref = prev + xoff + yoff * stride;
|
||||
if (ref < ref_start || ref > ref_end) {
|
||||
av_log(c->avctx, AV_LOG_ERROR, "Copy out of bounds @%d, %d\n",
|
||||
bx*8 + xoff, by*8 + yoff);
|
||||
return -1;
|
||||
}
|
||||
c->dsp.put_pixels_tab[1][0](dst, ref, stride, 8);
|
||||
memset(dctblock, 0, sizeof(*dctblock) * 64);
|
||||
dctblock[0] = get_value(c, BINK_SRC_INTER_DC);
|
||||
@@ -1267,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;
|
||||
@@ -1302,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) {
|
||||
|
@@ -91,9 +91,9 @@ static av_cold int decode_init(AVCodecContext *avctx)
|
||||
frame_len_bits = 11;
|
||||
}
|
||||
|
||||
if (avctx->channels > MAX_CHANNELS) {
|
||||
av_log(avctx, AV_LOG_ERROR, "too many channels: %d\n", avctx->channels);
|
||||
return -1;
|
||||
if (avctx->channels < 1 || avctx->channels > MAX_CHANNELS) {
|
||||
av_log(avctx, AV_LOG_ERROR, "invalid number of channels: %d\n", avctx->channels);
|
||||
return AVERROR_INVALIDDATA;
|
||||
}
|
||||
|
||||
s->version_b = avctx->extradata && avctx->extradata[3] == 'b';
|
||||
|
@@ -21,6 +21,7 @@
|
||||
|
||||
#include "avcodec.h"
|
||||
#include "bytestream.h"
|
||||
#include "libavutil/avassert.h"
|
||||
|
||||
enum BMVFlags{
|
||||
BMV_NOP = 0,
|
||||
@@ -52,7 +53,7 @@ typedef struct BMVDecContext {
|
||||
|
||||
static int decode_bmv_frame(const uint8_t *source, int src_len, uint8_t *frame, int frame_off)
|
||||
{
|
||||
int val, saved_val = 0;
|
||||
unsigned val, saved_val = 0;
|
||||
int tmplen = src_len;
|
||||
const uint8_t *src, *source_end = source + src_len;
|
||||
uint8_t *frame_end = frame + SCREEN_WIDE * SCREEN_HIGH;
|
||||
@@ -98,6 +99,8 @@ static int decode_bmv_frame(const uint8_t *source, int src_len, uint8_t *frame,
|
||||
}
|
||||
if (!(val & 0xC)) {
|
||||
for (;;) {
|
||||
if(shift>22)
|
||||
return -1;
|
||||
if (!read_two_nibbles) {
|
||||
if (src < source || src >= source_end)
|
||||
return -1;
|
||||
@@ -131,6 +134,7 @@ static int decode_bmv_frame(const uint8_t *source, int src_len, uint8_t *frame,
|
||||
}
|
||||
advance_mode = val & 1;
|
||||
len = (val >> 1) - 1;
|
||||
av_assert0(len>0);
|
||||
mode += 1 + advance_mode;
|
||||
if (mode >= 4)
|
||||
mode -= 3;
|
||||
@@ -139,7 +143,7 @@ static int decode_bmv_frame(const uint8_t *source, int src_len, uint8_t *frame,
|
||||
switch (mode) {
|
||||
case 1:
|
||||
if (forward) {
|
||||
if (dst - frame + SCREEN_WIDE < frame_off ||
|
||||
if (dst - frame + SCREEN_WIDE < -frame_off ||
|
||||
frame_end - dst < frame_off + len)
|
||||
return -1;
|
||||
for (i = 0; i < len; i++)
|
||||
@@ -147,7 +151,7 @@ static int decode_bmv_frame(const uint8_t *source, int src_len, uint8_t *frame,
|
||||
dst += len;
|
||||
} else {
|
||||
dst -= len;
|
||||
if (dst - frame + SCREEN_WIDE < frame_off ||
|
||||
if (dst - frame + SCREEN_WIDE < -frame_off ||
|
||||
frame_end - dst < frame_off + len)
|
||||
return -1;
|
||||
for (i = len - 1; i >= 0; i--)
|
||||
@@ -264,6 +268,11 @@ static av_cold int decode_init(AVCodecContext *avctx)
|
||||
c->avctx = avctx;
|
||||
avctx->pix_fmt = PIX_FMT_PAL8;
|
||||
|
||||
if (avctx->width != SCREEN_WIDE || avctx->height != SCREEN_HIGH) {
|
||||
av_log(avctx, AV_LOG_ERROR, "Invalid dimension %dx%d\n", avctx->width, avctx->height);
|
||||
return AVERROR_INVALIDDATA;
|
||||
}
|
||||
|
||||
c->pic.reference = 1;
|
||||
if (avctx->get_buffer(avctx, &c->pic) < 0) {
|
||||
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
|
||||
|
@@ -280,6 +280,10 @@ static int cdg_decode_frame(AVCodecContext *avctx,
|
||||
av_log(avctx, AV_LOG_ERROR, "buffer too small for decoder\n");
|
||||
return AVERROR(EINVAL);
|
||||
}
|
||||
if (buf_size > CDG_HEADER_SIZE + CDG_DATA_SIZE) {
|
||||
av_log(avctx, AV_LOG_ERROR, "buffer too big for decoder\n");
|
||||
return AVERROR(EINVAL);
|
||||
}
|
||||
|
||||
ret = avctx->reget_buffer(avctx, &cc->frame);
|
||||
if (ret) {
|
||||
|
@@ -25,7 +25,14 @@
|
||||
|
||||
#define _WIN32_WINNT 0x0600
|
||||
#define COBJMACROS
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include "dxva2.h"
|
||||
#if HAVE_DXVA_H
|
||||
#include <dxva.h>
|
||||
#endif
|
||||
|
||||
#include "avcodec.h"
|
||||
#include "mpegvideo.h"
|
||||
|
||||
|
@@ -48,7 +48,7 @@ typedef struct Escape124Context {
|
||||
CodeBook codebooks[3];
|
||||
} Escape124Context;
|
||||
|
||||
static int can_safely_read(GetBitContext* gb, int bits) {
|
||||
static int can_safely_read(GetBitContext* gb, uint64_t bits) {
|
||||
return get_bits_left(gb) >= bits;
|
||||
}
|
||||
|
||||
@@ -90,7 +90,7 @@ static CodeBook unpack_codebook(GetBitContext* gb, unsigned depth,
|
||||
unsigned i, j;
|
||||
CodeBook cb = { 0 };
|
||||
|
||||
if (!can_safely_read(gb, size * 34))
|
||||
if (!can_safely_read(gb, size * 34L))
|
||||
return cb;
|
||||
|
||||
if (size >= INT_MAX / sizeof(MacroBlock))
|
||||
|
@@ -47,7 +47,7 @@ typedef struct EXRContext {
|
||||
AVFrame picture;
|
||||
int compr;
|
||||
int bits_per_color_id;
|
||||
int8_t channel_offsets[3]; // 0 = red, 1 = green and 2 = blue
|
||||
int8_t channel_offsets[4]; // 0 = red, 1 = green, 2 = blue and 3 = alpha
|
||||
} EXRContext;
|
||||
|
||||
/**
|
||||
@@ -170,6 +170,7 @@ static int decode_frame(AVCodecContext *avctx,
|
||||
s->channel_offsets[0] = -1;
|
||||
s->channel_offsets[1] = -1;
|
||||
s->channel_offsets[2] = -1;
|
||||
s->channel_offsets[3] = -1;
|
||||
s->bits_per_color_id = -1;
|
||||
|
||||
if (buf_end - buf < 10) {
|
||||
@@ -209,6 +210,8 @@ static int decode_frame(AVCodecContext *avctx,
|
||||
channel_index = 1;
|
||||
if (!strcmp(buf, "B"))
|
||||
channel_index = 2;
|
||||
if (!strcmp(buf, "A"))
|
||||
channel_index = 3;
|
||||
|
||||
while (bytestream_get_byte(&buf) && buf < channel_list_end)
|
||||
continue; /* skip */
|
||||
@@ -302,9 +305,9 @@ static int decode_frame(AVCodecContext *avctx,
|
||||
if (!variable_buffer_data_size)
|
||||
return -1;
|
||||
|
||||
switch (*buf) {
|
||||
s->compr = *buf;
|
||||
switch (s->compr) {
|
||||
case EXR_RAW:
|
||||
s->compr = *buf;
|
||||
break;
|
||||
case EXR_RLE:
|
||||
case EXR_ZIP1:
|
||||
@@ -312,7 +315,7 @@ static int decode_frame(AVCodecContext *avctx,
|
||||
case EXR_PIZ:
|
||||
case EXR_B44:
|
||||
default:
|
||||
av_log(avctx, AV_LOG_ERROR, "This type of compression is not supported\n");
|
||||
av_log(avctx, AV_LOG_ERROR, "Compression type %d is not supported\n", s->compr);
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -354,7 +357,10 @@ static int decode_frame(AVCodecContext *avctx,
|
||||
switch (s->bits_per_color_id) {
|
||||
case 2: // 32-bit
|
||||
case 1: // 16-bit
|
||||
avctx->pix_fmt = PIX_FMT_RGB48;
|
||||
if (s->channel_offsets[3] >= 0)
|
||||
avctx->pix_fmt = PIX_FMT_RGBA64;
|
||||
else
|
||||
avctx->pix_fmt = PIX_FMT_RGB48;
|
||||
break;
|
||||
// 8-bit
|
||||
case 0:
|
||||
@@ -390,7 +396,7 @@ static int decode_frame(AVCodecContext *avctx,
|
||||
|
||||
// Zero out the start if ymin is not 0
|
||||
for (y = 0; y < ymin; y++) {
|
||||
memset(ptr, 0, avctx->width * 6);
|
||||
memset(ptr, 0, avctx->width * 2 * av_pix_fmt_descriptors[avctx->pix_fmt].nb_components);
|
||||
ptr += stride;
|
||||
}
|
||||
|
||||
@@ -405,21 +411,27 @@ static int decode_frame(AVCodecContext *avctx,
|
||||
if (line_offset > avpkt->size - xdelta * current_channel_offset) {
|
||||
// Line offset is probably wrong and not inside the buffer
|
||||
av_log(avctx, AV_LOG_WARNING, "Line offset for line %d is out of reach setting it to black\n", y);
|
||||
memset(ptr_x, 0, avctx->width * 6);
|
||||
memset(ptr_x, 0, avctx->width * 2 * av_pix_fmt_descriptors[avctx->pix_fmt].nb_components);
|
||||
} else {
|
||||
const uint8_t *red_channel_buffer = avpkt->data + line_offset + xdelta * s->channel_offsets[0];
|
||||
const uint8_t *green_channel_buffer = avpkt->data + line_offset + xdelta * s->channel_offsets[1];
|
||||
const uint8_t *blue_channel_buffer = avpkt->data + line_offset + xdelta * s->channel_offsets[2];
|
||||
const uint8_t *alpha_channel_buffer = 0;
|
||||
|
||||
if (s->channel_offsets[3] >= 0)
|
||||
alpha_channel_buffer = avpkt->data + line_offset + xdelta * s->channel_offsets[3];
|
||||
|
||||
// Zero out the start if xmin is not 0
|
||||
memset(ptr_x, 0, xmin * 6);
|
||||
ptr_x += xmin * 3;
|
||||
memset(ptr_x, 0, xmin * 2 * av_pix_fmt_descriptors[avctx->pix_fmt].nb_components);
|
||||
ptr_x += xmin * av_pix_fmt_descriptors[avctx->pix_fmt].nb_components;
|
||||
if (s->bits_per_color_id == 2) {
|
||||
// 32-bit
|
||||
for (x = 0; x < xdelta; x++) {
|
||||
*ptr_x++ = exr_flt2uint(bytestream_get_le32(&red_channel_buffer));
|
||||
*ptr_x++ = exr_flt2uint(bytestream_get_le32(&green_channel_buffer));
|
||||
*ptr_x++ = exr_flt2uint(bytestream_get_le32(&blue_channel_buffer));
|
||||
if (alpha_channel_buffer)
|
||||
*ptr_x++ = exr_flt2uint(bytestream_get_le32(&alpha_channel_buffer));
|
||||
}
|
||||
} else {
|
||||
// 16-bit
|
||||
@@ -427,12 +439,14 @@ static int decode_frame(AVCodecContext *avctx,
|
||||
*ptr_x++ = exr_halflt2uint(bytestream_get_le16(&red_channel_buffer));
|
||||
*ptr_x++ = exr_halflt2uint(bytestream_get_le16(&green_channel_buffer));
|
||||
*ptr_x++ = exr_halflt2uint(bytestream_get_le16(&blue_channel_buffer));
|
||||
if (alpha_channel_buffer)
|
||||
*ptr_x++ = exr_halflt2uint(bytestream_get_le16(&alpha_channel_buffer));
|
||||
}
|
||||
}
|
||||
|
||||
// Zero out the end if xmax+1 is not w
|
||||
memset(ptr_x, 0, (avctx->width - (xmax + 1)) * 6);
|
||||
ptr_x += (avctx->width - (xmax + 1)) * 3;
|
||||
memset(ptr_x, 0, (avctx->width - (xmax + 1)) * 2 * av_pix_fmt_descriptors[avctx->pix_fmt].nb_components);
|
||||
ptr_x += (avctx->width - (xmax + 1)) * av_pix_fmt_descriptors[avctx->pix_fmt].nb_components;
|
||||
|
||||
}
|
||||
// Move to next line
|
||||
@@ -442,7 +456,7 @@ static int decode_frame(AVCodecContext *avctx,
|
||||
|
||||
// Zero out the end if ymax+1 is not h
|
||||
for (y = ymax + 1; y < avctx->height; y++) {
|
||||
memset(ptr, 0, avctx->width * 6);
|
||||
memset(ptr, 0, avctx->width * 2 * av_pix_fmt_descriptors[avctx->pix_fmt].nb_components);
|
||||
ptr += stride;
|
||||
}
|
||||
|
||||
|
@@ -228,7 +228,7 @@ static int decode_group3_2d_line(AVCodecContext *avctx, GetBitContext *gb,
|
||||
mode = !mode;
|
||||
}
|
||||
//sync line pointers
|
||||
while(run_off <= offs){
|
||||
while(offs < width && run_off <= offs){
|
||||
run_off += *ref++;
|
||||
run_off += *ref++;
|
||||
}
|
||||
|
@@ -1651,9 +1651,9 @@ static int read_quant_table(RangeCoder *c, int16_t *quant_table, int scale){
|
||||
memset(state, 128, sizeof(state));
|
||||
|
||||
for(v=0; i<128 ; v++){
|
||||
int len= get_symbol(c, state, 0) + 1;
|
||||
unsigned len= get_symbol(c, state, 0) + 1;
|
||||
|
||||
if(len + i > 128) return -1;
|
||||
if(len > 128 - i) return -1;
|
||||
|
||||
while(len--){
|
||||
quant_table[i] = scale*v;
|
||||
@@ -1697,8 +1697,10 @@ static int read_extra_header(FFV1Context *f){
|
||||
ff_build_rac_states(c, 0.05*(1LL<<32), 256-8);
|
||||
|
||||
f->version= get_symbol(c, state, 0);
|
||||
if(f->version > 2)
|
||||
if(f->version > 2) {
|
||||
c->bytestream_end -= 4;
|
||||
f->minor_version= get_symbol(c, state, 0);
|
||||
}
|
||||
f->ac= f->avctx->coder_type= get_symbol(c, state, 0);
|
||||
if(f->ac>1){
|
||||
for(i=1; i<256; i++){
|
||||
@@ -1767,7 +1769,12 @@ static int read_header(FFV1Context *f){
|
||||
memset(state, 128, sizeof(state));
|
||||
|
||||
if(f->version < 2){
|
||||
f->version= get_symbol(c, state, 0);
|
||||
unsigned v= get_symbol(c, state, 0);
|
||||
if(v >= 2){
|
||||
av_log(f->avctx, AV_LOG_ERROR, "invalid version %d in ver01 header\n", v);
|
||||
return AVERROR_INVALIDDATA;
|
||||
}
|
||||
f->version = v;
|
||||
f->ac= f->avctx->coder_type= get_symbol(c, state, 0);
|
||||
if(f->ac>1){
|
||||
for(i=1; i<256; i++){
|
||||
@@ -1984,7 +1991,8 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPac
|
||||
}
|
||||
|
||||
if(avctx->debug&FF_DEBUG_PICT_INFO)
|
||||
av_log(avctx, AV_LOG_ERROR, "keyframe:%d coder:%d\n", p->key_frame, f->ac);
|
||||
av_log(avctx, AV_LOG_DEBUG, "ver:%d keyframe:%d coder:%d ec:%d slices:%d\n",
|
||||
f->version, p->key_frame, f->ac, f->ec, f->slice_count);
|
||||
|
||||
buf_p= buf + buf_size;
|
||||
for(i=f->slice_count-1; i>=0; i--){
|
||||
|
@@ -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);
|
||||
|
@@ -161,17 +161,17 @@ static int decode_frame(AVCodecContext *avctx,
|
||||
unsigned needed_size = avctx->width*avctx->height*3;
|
||||
if (version == 0) needed_size /= 2;
|
||||
needed_size += header_size;
|
||||
if (buf_size != needed_size && buf_size != header_size) {
|
||||
av_log(avctx, AV_LOG_ERROR,
|
||||
"Invalid frame length %d (should be %d)\n",
|
||||
buf_size, needed_size);
|
||||
return -1;
|
||||
}
|
||||
/* bit 31 means same as previous pic */
|
||||
if (header & (1U<<31)) {
|
||||
*data_size = 0;
|
||||
return buf_size;
|
||||
}
|
||||
if (buf_size != needed_size) {
|
||||
av_log(avctx, AV_LOG_ERROR,
|
||||
"Invalid frame length %d (should be %d)\n",
|
||||
buf_size, needed_size);
|
||||
return -1;
|
||||
}
|
||||
} else {
|
||||
/* skip frame */
|
||||
if (buf_size == 8) {
|
||||
|
@@ -145,6 +145,11 @@ static av_cold int gif_encode_init(AVCodecContext *avctx)
|
||||
{
|
||||
GIFContext *s = avctx->priv_data;
|
||||
|
||||
if (avctx->width > 65535 || avctx->height > 65535) {
|
||||
av_log(avctx, AV_LOG_ERROR, "GIF does not support resolutions above 65535x65535\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
avctx->coded_frame = &s->picture;
|
||||
s->lzw = av_mallocz(ff_lzw_encode_state_size);
|
||||
if (!s->lzw)
|
||||
|
@@ -1615,7 +1615,7 @@ static void decode_postinit(H264Context *h, int setup_finished)
|
||||
|| (h->last_pocs[MAX_DELAYED_PIC_COUNT-2] > INT_MIN && h->last_pocs[MAX_DELAYED_PIC_COUNT-1] - h->last_pocs[MAX_DELAYED_PIC_COUNT-2] > 2))
|
||||
out_of_order = FFMAX(out_of_order, 1);
|
||||
if(s->avctx->has_b_frames < out_of_order && !h->sps.bitstream_restriction_flag){
|
||||
av_log(s->avctx, AV_LOG_WARNING, "Increasing reorder buffer to %d\n", out_of_order);
|
||||
av_log(s->avctx, AV_LOG_VERBOSE, "Increasing reorder buffer to %d\n", out_of_order);
|
||||
s->avctx->has_b_frames = out_of_order;
|
||||
s->low_delay = 0;
|
||||
}
|
||||
@@ -2719,19 +2719,19 @@ static void init_scan_tables(H264Context *h)
|
||||
#undef T
|
||||
}
|
||||
if (h->sps.transform_bypass) { // FIXME same ugly
|
||||
h->zigzag_scan_q0 = zigzag_scan;
|
||||
h->zigzag_scan8x8_q0 = ff_zigzag_direct;
|
||||
h->zigzag_scan8x8_cavlc_q0 = zigzag_scan8x8_cavlc;
|
||||
h->field_scan_q0 = field_scan;
|
||||
h->field_scan8x8_q0 = field_scan8x8;
|
||||
h->field_scan8x8_cavlc_q0 = field_scan8x8_cavlc;
|
||||
memcpy(h->zigzag_scan_q0 , zigzag_scan , sizeof(h->zigzag_scan_q0 ));
|
||||
memcpy(h->zigzag_scan8x8_q0 , ff_zigzag_direct , sizeof(h->zigzag_scan8x8_q0 ));
|
||||
memcpy(h->zigzag_scan8x8_cavlc_q0 , zigzag_scan8x8_cavlc , sizeof(h->zigzag_scan8x8_cavlc_q0));
|
||||
memcpy(h->field_scan_q0 , field_scan , sizeof(h->field_scan_q0 ));
|
||||
memcpy(h->field_scan8x8_q0 , field_scan8x8 , sizeof(h->field_scan8x8_q0 ));
|
||||
memcpy(h->field_scan8x8_cavlc_q0 , field_scan8x8_cavlc , sizeof(h->field_scan8x8_cavlc_q0 ));
|
||||
} else {
|
||||
h->zigzag_scan_q0 = h->zigzag_scan;
|
||||
h->zigzag_scan8x8_q0 = h->zigzag_scan8x8;
|
||||
h->zigzag_scan8x8_cavlc_q0 = h->zigzag_scan8x8_cavlc;
|
||||
h->field_scan_q0 = h->field_scan;
|
||||
h->field_scan8x8_q0 = h->field_scan8x8;
|
||||
h->field_scan8x8_cavlc_q0 = h->field_scan8x8_cavlc;
|
||||
memcpy(h->zigzag_scan_q0 , h->zigzag_scan , sizeof(h->zigzag_scan_q0 ));
|
||||
memcpy(h->zigzag_scan8x8_q0 , h->zigzag_scan8x8 , sizeof(h->zigzag_scan8x8_q0 ));
|
||||
memcpy(h->zigzag_scan8x8_cavlc_q0 , h->zigzag_scan8x8_cavlc , sizeof(h->zigzag_scan8x8_cavlc_q0));
|
||||
memcpy(h->field_scan_q0 , h->field_scan , sizeof(h->field_scan_q0 ));
|
||||
memcpy(h->field_scan8x8_q0 , h->field_scan8x8 , sizeof(h->field_scan8x8_q0 ));
|
||||
memcpy(h->field_scan8x8_cavlc_q0 , h->field_scan8x8_cavlc , sizeof(h->field_scan8x8_cavlc_q0 ));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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++;
|
||||
@@ -4032,7 +4073,9 @@ static int decode_slice(struct AVCodecContext *avctx, void *arg)
|
||||
loop_filter(h, lf_x_start, s->mb_x + 1);
|
||||
return 0;
|
||||
}
|
||||
if (ret < 0 || h->cabac.bytestream > h->cabac.bytestream_end + 2) {
|
||||
if (h->cabac.bytestream > h->cabac.bytestream_end + 2 )
|
||||
av_log(h->s.avctx, AV_LOG_DEBUG, "bytestream overread %td\n", h->cabac.bytestream_end - h->cabac.bytestream);
|
||||
if (ret < 0 || h->cabac.bytestream > h->cabac.bytestream_end + 4) {
|
||||
av_log(h->s.avctx, AV_LOG_ERROR,
|
||||
"error while decoding MB %d %d, bytestream (%td)\n",
|
||||
s->mb_x, s->mb_y,
|
||||
@@ -4399,6 +4442,9 @@ again:
|
||||
init_get_bits(&hx->inter_gb, ptr, bit_length);
|
||||
hx->inter_gb_ptr = &hx->inter_gb;
|
||||
|
||||
av_log(h->s.avctx, AV_LOG_ERROR, "Partitioned H.264 support is incomplete\n");
|
||||
return AVERROR_PATCHWELCOME;
|
||||
|
||||
if (hx->redundant_pic_count == 0 &&
|
||||
hx->intra_gb_ptr &&
|
||||
hx->s.data_partitioning &&
|
||||
@@ -4427,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
|
||||
|
||||
/**
|
||||
@@ -421,12 +423,12 @@ typedef struct H264Context {
|
||||
uint8_t field_scan[16];
|
||||
uint8_t field_scan8x8[64];
|
||||
uint8_t field_scan8x8_cavlc[64];
|
||||
const uint8_t *zigzag_scan_q0;
|
||||
const uint8_t *zigzag_scan8x8_q0;
|
||||
const uint8_t *zigzag_scan8x8_cavlc_q0;
|
||||
const uint8_t *field_scan_q0;
|
||||
const uint8_t *field_scan8x8_q0;
|
||||
const uint8_t *field_scan8x8_cavlc_q0;
|
||||
uint8_t zigzag_scan_q0[16];
|
||||
uint8_t zigzag_scan8x8_q0[64];
|
||||
uint8_t zigzag_scan8x8_cavlc_q0[64];
|
||||
uint8_t field_scan_q0[16];
|
||||
uint8_t field_scan8x8_q0[64];
|
||||
uint8_t field_scan8x8_cavlc_q0[64];
|
||||
|
||||
int x264_build;
|
||||
|
||||
|
@@ -513,7 +513,7 @@ static int decode_residual(H264Context *h, GetBitContext *gb, DCTELEM *block, in
|
||||
else
|
||||
level_code= prefix + get_bits(gb, 4); //part
|
||||
}else{
|
||||
level_code= 30 + get_bits(gb, prefix-3); //part
|
||||
level_code= 30;
|
||||
if(prefix>=16){
|
||||
if(prefix > 25+3){
|
||||
av_log(h->s.avctx, AV_LOG_ERROR, "Invalid level prefix\n");
|
||||
@@ -521,6 +521,7 @@ static int decode_residual(H264Context *h, GetBitContext *gb, DCTELEM *block, in
|
||||
}
|
||||
level_code += (1<<(prefix-3))-4096;
|
||||
}
|
||||
level_code += get_bits(gb, prefix-3); //part
|
||||
}
|
||||
|
||||
if(trailing_ones < 3) level_code += 2;
|
||||
@@ -708,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
|
||||
|
@@ -52,14 +52,14 @@ static const uint8_t golomb_to_inter_cbp[48] = {
|
||||
17, 18, 20, 24, 19, 21, 26, 28, 23, 27, 29, 30, 22, 25, 38, 41
|
||||
};
|
||||
|
||||
static const uint8_t zigzag_scan[16] = {
|
||||
static const uint8_t zigzag_scan[16+1] = {
|
||||
0 + 0 * 4, 1 + 0 * 4, 0 + 1 * 4, 0 + 2 * 4,
|
||||
1 + 1 * 4, 2 + 0 * 4, 3 + 0 * 4, 2 + 1 * 4,
|
||||
1 + 2 * 4, 0 + 3 * 4, 1 + 3 * 4, 2 + 2 * 4,
|
||||
3 + 1 * 4, 3 + 2 * 4, 2 + 3 * 4, 3 + 3 * 4,
|
||||
};
|
||||
|
||||
static const uint8_t field_scan[16] = {
|
||||
static const uint8_t field_scan[16+1] = {
|
||||
0 + 0 * 4, 0 + 1 * 4, 1 + 0 * 4, 0 + 2 * 4,
|
||||
0 + 3 * 4, 1 + 1 * 4, 1 + 2 * 4, 1 + 3 * 4,
|
||||
2 + 0 * 4, 2 + 1 * 4, 2 + 2 * 4, 2 + 3 * 4,
|
||||
@@ -93,7 +93,7 @@ static const uint8_t chroma422_dc_scan[8] = {
|
||||
};
|
||||
|
||||
// zigzag_scan8x8_cavlc[i] = zigzag_scan8x8[(i/4) + 16*(i%4)]
|
||||
static const uint8_t zigzag_scan8x8_cavlc[64] = {
|
||||
static const uint8_t zigzag_scan8x8_cavlc[64+1] = {
|
||||
0 + 0 * 8, 1 + 1 * 8, 1 + 2 * 8, 2 + 2 * 8,
|
||||
4 + 1 * 8, 0 + 5 * 8, 3 + 3 * 8, 7 + 0 * 8,
|
||||
3 + 4 * 8, 1 + 7 * 8, 5 + 3 * 8, 6 + 3 * 8,
|
||||
@@ -112,7 +112,7 @@ static const uint8_t zigzag_scan8x8_cavlc[64] = {
|
||||
5 + 5 * 8, 6 + 5 * 8, 6 + 6 * 8, 7 + 7 * 8,
|
||||
};
|
||||
|
||||
static const uint8_t field_scan8x8[64] = {
|
||||
static const uint8_t field_scan8x8[64+1] = {
|
||||
0 + 0 * 8, 0 + 1 * 8, 0 + 2 * 8, 1 + 0 * 8,
|
||||
1 + 1 * 8, 0 + 3 * 8, 0 + 4 * 8, 1 + 2 * 8,
|
||||
2 + 0 * 8, 1 + 3 * 8, 0 + 5 * 8, 0 + 6 * 8,
|
||||
@@ -131,7 +131,7 @@ static const uint8_t field_scan8x8[64] = {
|
||||
7 + 4 * 8, 7 + 5 * 8, 7 + 6 * 8, 7 + 7 * 8,
|
||||
};
|
||||
|
||||
static const uint8_t field_scan8x8_cavlc[64] = {
|
||||
static const uint8_t field_scan8x8_cavlc[64+1] = {
|
||||
0 + 0 * 8, 1 + 1 * 8, 2 + 0 * 8, 0 + 7 * 8,
|
||||
2 + 2 * 8, 2 + 3 * 8, 2 + 4 * 8, 3 + 3 * 8,
|
||||
3 + 4 * 8, 4 + 3 * 8, 4 + 4 * 8, 5 + 3 * 8,
|
||||
|
@@ -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);
|
||||
|
@@ -191,7 +191,13 @@ static int extract_header(AVCodecContext *const avctx,
|
||||
const uint8_t *buf;
|
||||
unsigned buf_size;
|
||||
IffContext *s = avctx->priv_data;
|
||||
int palette_size = avctx->extradata_size - AV_RB16(avctx->extradata);
|
||||
int palette_size;
|
||||
|
||||
if (avctx->extradata_size < 2) {
|
||||
av_log(avctx, AV_LOG_ERROR, "not enough extradata\n");
|
||||
return AVERROR_INVALIDDATA;
|
||||
}
|
||||
palette_size = avctx->extradata_size - AV_RB16(avctx->extradata);
|
||||
|
||||
if (avpkt) {
|
||||
int image_size;
|
||||
@@ -207,8 +213,6 @@ static int extract_header(AVCodecContext *const avctx,
|
||||
return AVERROR_INVALIDDATA;
|
||||
}
|
||||
} else {
|
||||
if (avctx->extradata_size < 2)
|
||||
return AVERROR_INVALIDDATA;
|
||||
buf = avctx->extradata;
|
||||
buf_size = bytestream_get_be16(&buf);
|
||||
if (buf_size <= 1 || palette_size < 0) {
|
||||
@@ -312,7 +316,12 @@ static av_cold int decode_init(AVCodecContext *avctx)
|
||||
int err;
|
||||
|
||||
if (avctx->bits_per_coded_sample <= 8) {
|
||||
int palette_size = avctx->extradata_size - AV_RB16(avctx->extradata);
|
||||
int palette_size;
|
||||
|
||||
if (avctx->extradata_size >= 2)
|
||||
palette_size = avctx->extradata_size - AV_RB16(avctx->extradata);
|
||||
else
|
||||
palette_size = 0;
|
||||
avctx->pix_fmt = (avctx->bits_per_coded_sample < 8) ||
|
||||
(avctx->extradata_size >= 2 && palette_size) ? PIX_FMT_PAL8 : PIX_FMT_GRAY8;
|
||||
} else if (avctx->bits_per_coded_sample <= 32) {
|
||||
|
@@ -199,6 +199,10 @@ static int decode_gop_header(IVI45DecContext *ctx, AVCodecContext *avctx)
|
||||
}
|
||||
|
||||
if (band->blk_size == 8) {
|
||||
if(quant_mat >= 5){
|
||||
av_log(avctx, AV_LOG_ERROR, "quant_mat %d too large!\n", quant_mat);
|
||||
return -1;
|
||||
}
|
||||
band->intra_base = &ivi5_base_quant_8x8_intra[quant_mat][0];
|
||||
band->inter_base = &ivi5_base_quant_8x8_inter[quant_mat][0];
|
||||
band->intra_scale = &ivi5_scale_quant_8x8_intra[quant_mat][0];
|
||||
|
@@ -77,7 +77,7 @@ int ff_intel_h263_decode_picture_header(MpegEncContext *s)
|
||||
}
|
||||
if(get_bits(&s->gb, 2))
|
||||
av_log(s->avctx, AV_LOG_ERROR, "Bad value for reserved field\n");
|
||||
s->loop_filter = get_bits1(&s->gb);
|
||||
s->loop_filter = get_bits1(&s->gb) * !s->avctx->lowres;
|
||||
if(get_bits1(&s->gb))
|
||||
av_log(s->avctx, AV_LOG_ERROR, "Bad value for reserved field\n");
|
||||
if(get_bits1(&s->gb))
|
||||
|
@@ -963,6 +963,8 @@ int ff_h263_decode_picture_header(MpegEncContext *s)
|
||||
s->h263_aic = get_bits1(&s->gb); /* Advanced Intra Coding (AIC) */
|
||||
s->loop_filter= get_bits1(&s->gb);
|
||||
s->unrestricted_mv = s->umvplus || s->obmc || s->loop_filter;
|
||||
if(s->avctx->lowres)
|
||||
s->loop_filter = 0;
|
||||
|
||||
s->h263_slice_structured= get_bits1(&s->gb);
|
||||
if (get_bits1(&s->gb) != 0) {
|
||||
|
@@ -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));
|
||||
|
||||
|
@@ -143,6 +143,10 @@ static int decode_frame(AVCodecContext *avctx,
|
||||
buf += 5;
|
||||
|
||||
if (video_size) {
|
||||
if(video_size < 0) {
|
||||
av_log(avctx, AV_LOG_ERROR, "video size %d invalid\n", video_size);
|
||||
return AVERROR_INVALIDDATA;
|
||||
}
|
||||
if (avctx->reget_buffer(avctx, &s->frame) < 0) {
|
||||
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
|
||||
return -1;
|
||||
|
@@ -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;
|
||||
}
|
||||
|
@@ -304,7 +304,8 @@ AVCodec ff_libmp3lame_encoder = {
|
||||
AV_SAMPLE_FMT_NONE },
|
||||
.supported_samplerates = libmp3lame_sample_rates,
|
||||
.channel_layouts = (const uint64_t[]) { AV_CH_LAYOUT_MONO,
|
||||
AV_CH_LAYOUT_STEREO },
|
||||
AV_CH_LAYOUT_STEREO,
|
||||
0},
|
||||
.long_name = NULL_IF_CONFIG_SMALL("libmp3lame MP3 (MPEG audio layer 3)"),
|
||||
.priv_class = &libmp3lame_class,
|
||||
.defaults = libmp3lame_defaults,
|
||||
|
@@ -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);
|
||||
}
|
||||
|
@@ -231,7 +231,7 @@ static av_cold int mace_decode_init(AVCodecContext * avctx)
|
||||
{
|
||||
MACEContext *ctx = avctx->priv_data;
|
||||
|
||||
if (avctx->channels > 2)
|
||||
if (avctx->channels > 2 || avctx->channels <= 0)
|
||||
return -1;
|
||||
avctx->sample_fmt = AV_SAMPLE_FMT_S16;
|
||||
|
||||
|
@@ -55,6 +55,11 @@ static av_cold int mp_decode_init(AVCodecContext *avctx)
|
||||
int w4 = (avctx->width + 3) & ~3;
|
||||
int h4 = (avctx->height + 3) & ~3;
|
||||
|
||||
if(avctx->extradata_size < 2){
|
||||
av_log(avctx, AV_LOG_ERROR, "extradata too small\n");
|
||||
return AVERROR_INVALIDDATA;
|
||||
}
|
||||
|
||||
motionpixels_tableinit();
|
||||
mp->avctx = avctx;
|
||||
ff_dsputil_init(&mp->dsp, avctx);
|
||||
|
@@ -228,7 +228,7 @@ static int mpc7_decode_frame(AVCodecContext * avctx, void *data,
|
||||
buf_size -= 4;
|
||||
|
||||
/* get output buffer */
|
||||
c->frame.nb_samples = last_frame ? c->lastframelen : MPC_FRAME_SIZE;
|
||||
c->frame.nb_samples = MPC_FRAME_SIZE;
|
||||
if ((ret = avctx->get_buffer(avctx, &c->frame)) < 0) {
|
||||
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
|
||||
return ret;
|
||||
@@ -298,6 +298,8 @@ static int mpc7_decode_frame(AVCodecContext * avctx, void *data,
|
||||
idx_to_quant(c, &gb, bands[i].res[ch], c->Q[ch] + off);
|
||||
|
||||
ff_mpc_dequantize_and_synth(c, mb, c->frame.data[0], 2);
|
||||
if(last_frame)
|
||||
c->frame.nb_samples = c->lastframelen;
|
||||
|
||||
bits_used = get_bits_count(&gb);
|
||||
bits_avail = buf_size * 8;
|
||||
|
@@ -140,7 +140,8 @@ static av_cold int mpc8_decode_init(AVCodecContext * avctx)
|
||||
c->frames = 1 << (get_bits(&gb, 3) * 2);
|
||||
|
||||
avctx->sample_fmt = AV_SAMPLE_FMT_S16;
|
||||
avctx->channel_layout = (avctx->channels==2) ? AV_CH_LAYOUT_STEREO : AV_CH_LAYOUT_MONO;
|
||||
avctx->channel_layout = (channels==2) ? AV_CH_LAYOUT_STEREO : AV_CH_LAYOUT_MONO;
|
||||
avctx->channels = channels;
|
||||
|
||||
if(vlc_initialized) return 0;
|
||||
av_log(avctx, AV_LOG_DEBUG, "Initing VLC\n");
|
||||
@@ -274,7 +275,7 @@ static int mpc8_decode_frame(AVCodecContext * avctx, void *data,
|
||||
maxband = c->last_max_band + get_vlc2(gb, band_vlc.table, MPC8_BANDS_BITS, 2);
|
||||
if(maxband > 32) maxband -= 33;
|
||||
}
|
||||
if(maxband >= BANDS) {
|
||||
if(maxband > c->maxbands + 1) {
|
||||
av_log(avctx, AV_LOG_ERROR, "maxband %d too large\n",maxband);
|
||||
return AVERROR_INVALIDDATA;
|
||||
}
|
||||
@@ -411,7 +412,8 @@ static int mpc8_decode_frame(AVCodecContext * avctx, void *data,
|
||||
}
|
||||
}
|
||||
|
||||
ff_mpc_dequantize_and_synth(c, maxband, c->frame.data[0], avctx->channels);
|
||||
ff_mpc_dequantize_and_synth(c, maxband - 1, c->frame.data[0],
|
||||
avctx->channels);
|
||||
|
||||
c->cur_frame++;
|
||||
|
||||
|
@@ -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,
|
||||
};
|
||||
|
@@ -2050,6 +2050,10 @@ static int decode_vop_header(MpegEncContext *s, GetBitContext *gb){
|
||||
if(s->pict_type == AV_PICTURE_TYPE_B)
|
||||
skip_bits_long(gb, s->cplx_estimation_trash_b);
|
||||
|
||||
if(get_bits_left(gb) < 3) {
|
||||
av_log(s->avctx, AV_LOG_ERROR, "Header truncated\n");
|
||||
return -1;
|
||||
}
|
||||
s->intra_dc_threshold= ff_mpeg4_dc_threshold[ get_bits(gb, 3) ];
|
||||
if(!s->progressive_sequence){
|
||||
s->top_field_first= get_bits1(gb);
|
||||
|
@@ -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
|
||||
@@ -53,6 +54,7 @@ static int mpegaudio_parse(AVCodecParserContext *s1,
|
||||
int inc= FFMIN(buf_size - i, s->frame_size);
|
||||
i += inc;
|
||||
s->frame_size -= inc;
|
||||
state = 0;
|
||||
|
||||
if(!s->frame_size){
|
||||
next= i;
|
||||
@@ -72,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;
|
||||
|
@@ -1436,7 +1436,7 @@ static void draw_line(uint8_t *buf, int sx, int sy, int ex, int ey,
|
||||
y = (x * f) >> 16;
|
||||
fr = (x * f) & 0xFFFF;
|
||||
buf[y * stride + x] += (color * (0x10000 - fr)) >> 16;
|
||||
buf[(y + 1) * stride + x] += (color * fr ) >> 16;
|
||||
if(fr) buf[(y + 1) * stride + x] += (color * fr ) >> 16;
|
||||
}
|
||||
} else {
|
||||
if (sy > ey) {
|
||||
@@ -1453,7 +1453,7 @@ static void draw_line(uint8_t *buf, int sx, int sy, int ex, int ey,
|
||||
x = (y*f) >> 16;
|
||||
fr = (y*f) & 0xFFFF;
|
||||
buf[y * stride + x] += (color * (0x10000 - fr)) >> 16;
|
||||
buf[y * stride + x + 1] += (color * fr ) >> 16;
|
||||
if(fr) buf[y * stride + x + 1] += (color * fr ) >> 16;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -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) {
|
||||
|
@@ -45,6 +45,8 @@ static int png_parse(AVCodecParserContext *s, AVCodecContext *avctx,
|
||||
int next = END_NOT_FOUND;
|
||||
int i = 0;
|
||||
|
||||
s->pict_type = AV_PICTURE_TYPE_NONE;
|
||||
|
||||
*poutbuf_size = 0;
|
||||
if (buf_size == 0)
|
||||
return 0;
|
||||
|
@@ -29,7 +29,7 @@
|
||||
|
||||
#define CLIP_AND_BIAS(x) (av_clip((x) + BIAS, CLIP_MIN, CLIP_MAX))
|
||||
|
||||
#if CONFIG_PRORES_DECODER
|
||||
#if CONFIG_PRORES_DECODER | CONFIG_PRORES_LGPL_DECODER
|
||||
/**
|
||||
* Add bias value, clamp and output pixels of a slice
|
||||
*/
|
||||
@@ -53,7 +53,7 @@ static void prores_idct_put_c(uint16_t *out, int linesize, DCTELEM *block, const
|
||||
}
|
||||
#endif
|
||||
|
||||
#if CONFIG_PRORES_ENCODER
|
||||
#if CONFIG_PRORES_KOSTYA_ENCODER
|
||||
static void prores_fdct_c(const uint16_t *src, int linesize, DCTELEM *block)
|
||||
{
|
||||
int x, y;
|
||||
@@ -70,7 +70,7 @@ static void prores_fdct_c(const uint16_t *src, int linesize, DCTELEM *block)
|
||||
|
||||
void ff_proresdsp_init(ProresDSPContext *dsp, AVCodecContext *avctx)
|
||||
{
|
||||
#if CONFIG_PRORES_DECODER
|
||||
#if CONFIG_PRORES_DECODER | CONFIG_PRORES_LGPL_DECODER
|
||||
dsp->idct_put = prores_idct_put_c;
|
||||
dsp->idct_permutation_type = FF_NO_IDCT_PERM;
|
||||
|
||||
@@ -79,7 +79,7 @@ void ff_proresdsp_init(ProresDSPContext *dsp, AVCodecContext *avctx)
|
||||
ff_init_scantable_permutation(dsp->idct_permutation,
|
||||
dsp->idct_permutation_type);
|
||||
#endif
|
||||
#if CONFIG_PRORES_ENCODER
|
||||
#if CONFIG_PRORES_KOSTYA_ENCODER
|
||||
dsp->fdct = prores_fdct_c;
|
||||
dsp->dct_permutation_type = FF_NO_IDCT_PERM;
|
||||
ff_init_scantable_permutation(dsp->dct_permutation,
|
||||
|
@@ -79,6 +79,7 @@ typedef struct ThreadContext {
|
||||
pthread_cond_t current_job_cond;
|
||||
pthread_mutex_t current_job_lock;
|
||||
int current_job;
|
||||
unsigned int current_execute;
|
||||
int done;
|
||||
} ThreadContext;
|
||||
|
||||
@@ -203,6 +204,7 @@ static void* attribute_align_arg worker(void *v)
|
||||
AVCodecContext *avctx = v;
|
||||
ThreadContext *c = avctx->thread_opaque;
|
||||
int our_job = c->job_count;
|
||||
int last_execute = 0;
|
||||
int thread_count = avctx->thread_count;
|
||||
int self_id;
|
||||
|
||||
@@ -213,7 +215,9 @@ static void* attribute_align_arg worker(void *v)
|
||||
if (c->current_job == thread_count + c->job_count)
|
||||
pthread_cond_signal(&c->last_job_cond);
|
||||
|
||||
pthread_cond_wait(&c->current_job_cond, &c->current_job_lock);
|
||||
while (last_execute == c->current_execute && !c->done)
|
||||
pthread_cond_wait(&c->current_job_cond, &c->current_job_lock);
|
||||
last_execute = c->current_execute;
|
||||
our_job = self_id;
|
||||
|
||||
if (c->done) {
|
||||
@@ -233,7 +237,8 @@ static void* attribute_align_arg worker(void *v)
|
||||
|
||||
static av_always_inline void avcodec_thread_park_workers(ThreadContext *c, int thread_count)
|
||||
{
|
||||
pthread_cond_wait(&c->last_job_cond, &c->current_job_lock);
|
||||
while (c->current_job != thread_count + c->job_count)
|
||||
pthread_cond_wait(&c->last_job_cond, &c->current_job_lock);
|
||||
pthread_mutex_unlock(&c->current_job_lock);
|
||||
}
|
||||
|
||||
@@ -282,6 +287,7 @@ static int avcodec_thread_execute(AVCodecContext *avctx, action_func* func, void
|
||||
c->rets = &dummy_ret;
|
||||
c->rets_count = 1;
|
||||
}
|
||||
c->current_execute++;
|
||||
pthread_cond_broadcast(&c->current_job_cond);
|
||||
|
||||
avcodec_thread_park_workers(c, avctx->thread_count);
|
||||
|
@@ -1363,7 +1363,8 @@ static void qdm2_fft_decode_tones (QDM2Context *q, int duration, GetBitContext *
|
||||
if (q->superblocktype_2_3) {
|
||||
while ((n = qdm2_get_vlc(gb, &vlc_tab_fft_tone_offset[local_int_8], 1, 2)) < 2) {
|
||||
if (get_bits_left(gb)<0) {
|
||||
av_log(0, AV_LOG_ERROR, "overread in qdm2_fft_decode_tones()\n");
|
||||
if(local_int_4 < q->group_size)
|
||||
av_log(0, AV_LOG_ERROR, "overread in qdm2_fft_decode_tones()\n");
|
||||
return;
|
||||
}
|
||||
offset = 1;
|
||||
|
@@ -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++;
|
||||
|
@@ -41,7 +41,8 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size,
|
||||
int h, w;
|
||||
AVFrame *pic = avctx->coded_frame;
|
||||
const uint32_t *src = (const uint32_t *)avpkt->data;
|
||||
int aligned_width = FFALIGN(avctx->width, 64);
|
||||
int aligned_width = FFALIGN(avctx->width,
|
||||
avctx->codec_id == CODEC_ID_R10K ? 1 : 64);
|
||||
uint8_t *dst_line;
|
||||
|
||||
if (pic->data[0])
|
||||
|
@@ -38,7 +38,8 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt,
|
||||
const AVFrame *pic, int *got_packet)
|
||||
{
|
||||
int i, j, ret;
|
||||
int aligned_width = FFALIGN(avctx->width, 64);
|
||||
int aligned_width = FFALIGN(avctx->width,
|
||||
avctx->codec_id == CODEC_ID_R10K ? 1 : 64);
|
||||
int pad = (aligned_width - avctx->width) * 4;
|
||||
uint8_t *src_line;
|
||||
uint8_t *dst;
|
||||
|
@@ -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 */
|
||||
|
@@ -349,7 +349,7 @@ static int rv20_decode_picture_header(RVDecContext *rv)
|
||||
}
|
||||
|
||||
if(RV_GET_MINOR_VER(rv->sub_id) >= 2)
|
||||
s->loop_filter = get_bits1(&s->gb);
|
||||
s->loop_filter = get_bits1(&s->gb) && !s->avctx->lowres;
|
||||
|
||||
if(RV_GET_MINOR_VER(rv->sub_id) <= 1)
|
||||
seq = get_bits(&s->gb, 8) << 7;
|
||||
|
@@ -36,6 +36,11 @@ static av_cold int encode_init(AVCodecContext *avctx)
|
||||
{
|
||||
SgiContext *s = avctx->priv_data;
|
||||
|
||||
if (avctx->width > 65535 || avctx->height > 65535) {
|
||||
av_log(avctx, AV_LOG_ERROR, "SGI does not support resolutions above 65535x65535\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
avcodec_get_frame_defaults(&s->picture);
|
||||
avctx->coded_frame = &s->picture;
|
||||
|
||||
|
@@ -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
|
||||
|
@@ -72,7 +72,7 @@ static int sp5x_decode_frame(AVCodecContext *avctx,
|
||||
for (i = 2; i < buf_size-2 && j < buf_size+1024-2; i++)
|
||||
recoded[j++] = buf[i];
|
||||
else
|
||||
for (i = 14; i < buf_size && j < buf_size+1024-2; i++)
|
||||
for (i = 14; i < buf_size && j < buf_size+1024-3; i++)
|
||||
{
|
||||
recoded[j++] = buf[i];
|
||||
if (buf[i] == 0xff)
|
||||
|
@@ -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");
|
||||
|
@@ -512,6 +512,10 @@ hres,vres,i,i%vres (0 < i < 4)
|
||||
}
|
||||
|
||||
#define APPLY_C_PREDICTOR() \
|
||||
if(index > 1023){\
|
||||
av_log(s->avctx, AV_LOG_ERROR, " index %d went out of bounds\n", index); \
|
||||
return; \
|
||||
}\
|
||||
predictor_pair = s->c_predictor_table[index]; \
|
||||
horiz_pred += (predictor_pair >> 1); \
|
||||
if (predictor_pair & 1) { \
|
||||
@@ -529,6 +533,10 @@ hres,vres,i,i%vres (0 < i < 4)
|
||||
index++;
|
||||
|
||||
#define APPLY_C_PREDICTOR_24() \
|
||||
if(index > 1023){\
|
||||
av_log(s->avctx, AV_LOG_ERROR, " index %d went out of bounds\n", index); \
|
||||
return; \
|
||||
}\
|
||||
predictor_pair = s->c_predictor_table[index]; \
|
||||
horiz_pred += (predictor_pair >> 1); \
|
||||
if (predictor_pair & 1) { \
|
||||
@@ -547,6 +555,10 @@ hres,vres,i,i%vres (0 < i < 4)
|
||||
|
||||
|
||||
#define APPLY_Y_PREDICTOR() \
|
||||
if(index > 1023){\
|
||||
av_log(s->avctx, AV_LOG_ERROR, " index %d went out of bounds\n", index); \
|
||||
return; \
|
||||
}\
|
||||
predictor_pair = s->y_predictor_table[index]; \
|
||||
horiz_pred += (predictor_pair >> 1); \
|
||||
if (predictor_pair & 1) { \
|
||||
@@ -564,6 +576,10 @@ hres,vres,i,i%vres (0 < i < 4)
|
||||
index++;
|
||||
|
||||
#define APPLY_Y_PREDICTOR_24() \
|
||||
if(index > 1023){\
|
||||
av_log(s->avctx, AV_LOG_ERROR, " index %d went out of bounds\n", index); \
|
||||
return; \
|
||||
}\
|
||||
predictor_pair = s->y_predictor_table[index]; \
|
||||
horiz_pred += (predictor_pair >> 1); \
|
||||
if (predictor_pair & 1) { \
|
||||
|
@@ -789,7 +789,7 @@ int attribute_align_arg avcodec_open2(AVCodecContext *avctx, AVCodec *codec, AVD
|
||||
|
||||
if (codec->capabilities & CODEC_CAP_EXPERIMENTAL)
|
||||
if (avctx->strict_std_compliance > FF_COMPLIANCE_EXPERIMENTAL) {
|
||||
av_log(avctx, AV_LOG_ERROR, "Codec is experimental but experimental codecs are not enabled, see -strict -2\n");
|
||||
av_log(avctx, AV_LOG_ERROR, "Codec is experimental but experimental codecs are not enabled, try -strict -2\n");
|
||||
ret = -1;
|
||||
goto free_and_end;
|
||||
}
|
||||
@@ -2194,8 +2194,12 @@ int av_get_audio_frame_duration(AVCodecContext *avctx, int frame_bytes)
|
||||
/* calc from frame_bytes, channels, and bits_per_coded_sample */
|
||||
switch (avctx->codec_id) {
|
||||
case CODEC_ID_PCM_DVD:
|
||||
if(bps<4)
|
||||
return 0;
|
||||
return 2 * (frame_bytes / ((bps * 2 / 8) * ch));
|
||||
case CODEC_ID_PCM_BLURAY:
|
||||
if(bps<4)
|
||||
return 0;
|
||||
return frame_bytes / ((FFALIGN(ch, 2) * bps) / 8);
|
||||
case CODEC_ID_S302M:
|
||||
return 2 * (frame_bytes / ((bps + 4) / 4)) / ch;
|
||||
|
@@ -85,8 +85,6 @@ static int encode_init(AVCodecContext * avctx){
|
||||
(avctx->sample_rate * 8);
|
||||
s->block_align = FFMIN(s->block_align, MAX_CODED_SUPERFRAME_SIZE);
|
||||
avctx->block_align = s->block_align;
|
||||
avctx->bit_rate = avctx->block_align * 8LL * avctx->sample_rate /
|
||||
s->frame_len;
|
||||
//av_log(NULL, AV_LOG_ERROR, "%d %d %d %d\n", s->block_align, avctx->bit_rate, s->frame_len, avctx->sample_rate);
|
||||
avctx->frame_size = avctx->delay = s->frame_len;
|
||||
|
||||
|
@@ -70,6 +70,11 @@ static int decode_frame(AVCodecContext *avctx,
|
||||
int prev_y = 0, prev_u = 0, prev_v = 0;
|
||||
uint8_t *rbuf;
|
||||
|
||||
if(buf_size<=8) {
|
||||
av_log(avctx, AV_LOG_ERROR, "buf_size %d is too small\n", buf_size);
|
||||
return AVERROR_INVALIDDATA;
|
||||
}
|
||||
|
||||
rbuf = av_malloc(buf_size + FF_INPUT_BUFFER_PADDING_SIZE);
|
||||
if(!rbuf){
|
||||
av_log(avctx, AV_LOG_ERROR, "Cannot allocate temporary buffer\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"
|
||||
|
@@ -517,6 +517,10 @@ static int xan_decode_frame(AVCodecContext *avctx,
|
||||
int i;
|
||||
tag = bytestream_get_le32(&buf);
|
||||
size = bytestream_get_be32(&buf);
|
||||
if(size < 0) {
|
||||
av_log(avctx, AV_LOG_ERROR, "Invalid tag size %d\n", size);
|
||||
return AVERROR_INVALIDDATA;
|
||||
}
|
||||
size = FFMIN(size, buf_end - buf);
|
||||
switch (tag) {
|
||||
case PALT_TAG:
|
||||
|
@@ -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;
|
||||
}
|
||||
|
@@ -89,6 +89,11 @@ static av_cold int yop_decode_init(AVCodecContext *avctx)
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (!avctx->extradata) {
|
||||
av_log(avctx, AV_LOG_ERROR, "extradata missing\n");
|
||||
return AVERROR_INVALIDDATA;
|
||||
}
|
||||
|
||||
avctx->pix_fmt = PIX_FMT_PAL8;
|
||||
|
||||
avcodec_get_frame_defaults(&s->frame);
|
||||
@@ -199,6 +204,11 @@ static int yop_decode_frame(AVCodecContext *avctx, void *data, int *data_size,
|
||||
if (s->frame.data[0])
|
||||
avctx->release_buffer(avctx, &s->frame);
|
||||
|
||||
if (avpkt->size < 4 + 3*s->num_pal_colors) {
|
||||
av_log(avctx, AV_LOG_ERROR, "packet of size %d too small\n", avpkt->size);
|
||||
return AVERROR_INVALIDDATA;
|
||||
}
|
||||
|
||||
ret = avctx->get_buffer(avctx, &s->frame);
|
||||
if (ret < 0) {
|
||||
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
|
||||
@@ -214,6 +224,10 @@ static int yop_decode_frame(AVCodecContext *avctx, void *data, int *data_size,
|
||||
s->low_nibble = NULL;
|
||||
|
||||
is_odd_frame = avpkt->data[0];
|
||||
if(is_odd_frame>1){
|
||||
av_log(avctx, AV_LOG_ERROR, "frame is too odd %d\n", is_odd_frame);
|
||||
return AVERROR_INVALIDDATA;
|
||||
}
|
||||
firstcolor = s->first_color[is_odd_frame];
|
||||
palette = (uint32_t *)s->frame.data[1];
|
||||
|
||||
|
@@ -37,6 +37,7 @@ typedef struct {
|
||||
double ratio;
|
||||
struct SwrContext *swr;
|
||||
int64_t next_pts;
|
||||
int req_fullfilled;
|
||||
} AResampleContext;
|
||||
|
||||
static av_cold int init(AVFilterContext *ctx, const char *args, void *opaque)
|
||||
@@ -173,31 +174,12 @@ static void filter_samples(AVFilterLink *inlink, AVFilterBufferRef *insamplesref
|
||||
AVFilterLink *const outlink = inlink->dst->outputs[0];
|
||||
AVFilterBufferRef *outsamplesref = ff_get_audio_buffer(outlink, AV_PERM_WRITE, n_out);
|
||||
|
||||
n_out = swr_convert(aresample->swr, outsamplesref->extended_data, n_out,
|
||||
(void *)insamplesref->extended_data, n_in);
|
||||
if (n_out <= 0) {
|
||||
avfilter_unref_buffer(outsamplesref);
|
||||
avfilter_unref_buffer(insamplesref);
|
||||
return;
|
||||
}
|
||||
|
||||
avfilter_copy_buffer_ref_props(outsamplesref, insamplesref);
|
||||
outsamplesref->format = outlink->format;
|
||||
outsamplesref->audio->channel_layout = outlink->channel_layout;
|
||||
outsamplesref->audio->sample_rate = outlink->sample_rate;
|
||||
|
||||
outsamplesref->audio->sample_rate = outlink->sample_rate;
|
||||
outsamplesref->audio->nb_samples = n_out;
|
||||
|
||||
#if 0
|
||||
if(insamplesref->pts != AV_NOPTS_VALUE) {
|
||||
aresample->next_pts =
|
||||
outsamplesref->pts = av_rescale_q(insamplesref->pts, inlink->time_base, outlink->time_base)
|
||||
- swr_get_delay(aresample->swr, outlink->time_base.den);
|
||||
av_assert0(outlink->time_base.num == 1);
|
||||
} else{
|
||||
outsamplesref->pts = AV_NOPTS_VALUE; //aresample->next_pts;
|
||||
}
|
||||
if(aresample->next_pts != AV_NOPTS_VALUE)
|
||||
aresample->next_pts += av_rescale_q(n_out, (AVRational){1 ,outlink->sample_rate}, outlink->time_base);
|
||||
#else
|
||||
if(insamplesref->pts != AV_NOPTS_VALUE) {
|
||||
int64_t inpts = av_rescale(insamplesref->pts, inlink->time_base.num * (int64_t)outlink->sample_rate * inlink->sample_rate, inlink->time_base.den);
|
||||
int64_t outpts= swr_next_pts(aresample->swr, inpts);
|
||||
@@ -206,8 +188,20 @@ static void filter_samples(AVFilterLink *inlink, AVFilterBufferRef *insamplesref
|
||||
} else {
|
||||
outsamplesref->pts = AV_NOPTS_VALUE;
|
||||
}
|
||||
#endif
|
||||
|
||||
n_out = swr_convert(aresample->swr, outsamplesref->extended_data, n_out,
|
||||
(void *)insamplesref->extended_data, n_in);
|
||||
if (n_out <= 0) {
|
||||
avfilter_unref_buffer(outsamplesref);
|
||||
avfilter_unref_buffer(insamplesref);
|
||||
return;
|
||||
}
|
||||
|
||||
outsamplesref->audio->sample_rate = outlink->sample_rate;
|
||||
outsamplesref->audio->nb_samples = n_out;
|
||||
|
||||
ff_filter_samples(outlink, outsamplesref);
|
||||
aresample->req_fullfilled= 1;
|
||||
avfilter_unref_buffer(insamplesref);
|
||||
}
|
||||
|
||||
@@ -216,7 +210,12 @@ static int request_frame(AVFilterLink *outlink)
|
||||
AVFilterContext *ctx = outlink->src;
|
||||
AResampleContext *aresample = ctx->priv;
|
||||
AVFilterLink *const inlink = outlink->src->inputs[0];
|
||||
int ret = avfilter_request_frame(ctx->inputs[0]);
|
||||
int ret;
|
||||
|
||||
aresample->req_fullfilled = 0;
|
||||
do{
|
||||
ret = avfilter_request_frame(ctx->inputs[0]);
|
||||
}while(!aresample->req_fullfilled && ret>=0);
|
||||
|
||||
if (ret == AVERROR_EOF) {
|
||||
AVFilterBufferRef *outsamplesref;
|
||||
|
@@ -204,7 +204,7 @@ void ff_filter_samples(AVFilterLink *link, AVFilterBufferRef *samplesref)
|
||||
link->cur_buf->audio->sample_rate = samplesref->audio->sample_rate;
|
||||
|
||||
/* Copy actual data into new samples buffer */
|
||||
for (i = 0; samplesref->data[i] && i < 8; i++)
|
||||
for (i = 0; i < 8 && samplesref->data[i]; i++)
|
||||
memcpy(link->cur_buf->data[i], samplesref->data[i], samplesref->linesize[0]);
|
||||
for (i = 0; i < planes; i++)
|
||||
memcpy(link->cur_buf->extended_data[i], samplesref->extended_data[i], samplesref->linesize[0]);
|
||||
|
@@ -59,10 +59,13 @@ int avfilter_fill_frame_from_audio_buffer_ref(AVFrame *frame,
|
||||
return AVERROR(EINVAL);
|
||||
|
||||
memcpy(frame->data, samplesref->data, sizeof(frame->data));
|
||||
frame->pkt_pos = samplesref->pos;
|
||||
frame->format = samplesref->format;
|
||||
frame->nb_samples = samplesref->audio->nb_samples;
|
||||
frame->pts = samplesref->pts;
|
||||
memcpy(frame->linesize, samplesref->linesize, sizeof(frame->linesize));
|
||||
av_frame_set_pkt_pos(frame, samplesref->pos);
|
||||
frame->format = samplesref->format;
|
||||
frame->nb_samples = samplesref->audio->nb_samples;
|
||||
frame->pts = samplesref->pts;
|
||||
frame->sample_rate = samplesref->audio->sample_rate;
|
||||
frame->channel_layout = samplesref->audio->channel_layout;
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -75,7 +78,7 @@ int avfilter_fill_frame_from_video_buffer_ref(AVFrame *frame,
|
||||
|
||||
memcpy(frame->data, picref->data, sizeof(frame->data));
|
||||
memcpy(frame->linesize, picref->linesize, sizeof(frame->linesize));
|
||||
frame->pkt_pos = picref->pos;
|
||||
av_frame_set_pkt_pos(frame, picref->pos);
|
||||
frame->interlaced_frame = picref->video->interlaced;
|
||||
frame->top_field_first = picref->video->top_field_first;
|
||||
frame->key_frame = picref->video->key_frame;
|
||||
|
@@ -166,7 +166,7 @@ void avfilter_unref_bufferp(AVFilterBufferRef **ref)
|
||||
int avfilter_copy_frame_props(AVFilterBufferRef *dst, const AVFrame *src)
|
||||
{
|
||||
dst->pts = src->pts;
|
||||
dst->pos = src->pkt_pos;
|
||||
dst->pos = av_frame_get_pkt_pos(src);
|
||||
dst->format = src->format;
|
||||
|
||||
switch (dst->type) {
|
||||
|
@@ -200,6 +200,11 @@ static int fourxm_read_header(AVFormatContext *s)
|
||||
ret = AVERROR_INVALIDDATA;
|
||||
goto fail;
|
||||
}
|
||||
if(!fourxm->tracks[current_track].adpcm && fourxm->tracks[current_track].bits<8){
|
||||
av_log(s, AV_LOG_ERROR, "bits unspecified for non ADPCM\n");
|
||||
ret = AVERROR_INVALIDDATA;
|
||||
goto fail;
|
||||
}
|
||||
i += 8 + size;
|
||||
|
||||
/* allocate a new AVStream */
|
||||
|
@@ -163,7 +163,7 @@ OBJS-$(CONFIG_MOV_DEMUXER) += mov.o isom.o mov_chan.o
|
||||
OBJS-$(CONFIG_MOV_MUXER) += movenc.o isom.o avc.o \
|
||||
movenchint.o rtpenc_chain.o \
|
||||
mov_chan.o
|
||||
OBJS-$(CONFIG_MP2_MUXER) += mp3enc.o rawenc.o
|
||||
OBJS-$(CONFIG_MP2_MUXER) += mp3enc.o rawenc.o id3v2enc.o
|
||||
OBJS-$(CONFIG_MP3_DEMUXER) += mp3dec.o
|
||||
OBJS-$(CONFIG_MP3_MUXER) += mp3enc.o rawenc.o id3v2enc.o
|
||||
OBJS-$(CONFIG_MPC_DEMUXER) += mpc.o apetag.o
|
||||
|
@@ -37,6 +37,8 @@ static int ac3_eac3_probe(AVProbeData *p, enum CodecID expected_codec_id)
|
||||
end = buf + p->buf_size;
|
||||
|
||||
for(; buf < end; buf++) {
|
||||
if(buf > p->buf && (buf[0] != 0x0B || buf[1] != 0x77) )
|
||||
continue;
|
||||
buf2 = buf;
|
||||
|
||||
for(frames = 0; buf2 < end; frames++) {
|
||||
|
@@ -278,6 +278,9 @@ static int ape_read_header(AVFormatContext * s)
|
||||
return AVERROR(ENOMEM);
|
||||
for (i = 0; i < ape->seektablelength / sizeof(uint32_t); i++)
|
||||
ape->seektable[i] = avio_rl32(pb);
|
||||
}else{
|
||||
av_log(s, AV_LOG_ERROR, "Missing seektable\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
ape->frames[0].pos = ape->firstframe;
|
||||
|
@@ -578,6 +578,7 @@ static int avi_read_header(AVFormatContext *s)
|
||||
avio_skip(pb, size);
|
||||
} else {
|
||||
uint64_t cur_pos = avio_tell(pb);
|
||||
unsigned esize;
|
||||
if (cur_pos < list_end)
|
||||
size = FFMIN(size, list_end - cur_pos);
|
||||
st = s->streams[stream_index];
|
||||
@@ -591,7 +592,7 @@ static int avi_read_header(AVFormatContext *s)
|
||||
avio_skip(pb, size);
|
||||
break;
|
||||
}
|
||||
tag1 = ff_get_bmp_header(pb, st);
|
||||
tag1 = ff_get_bmp_header(pb, st, &esize);
|
||||
|
||||
if (tag1 == MKTAG('D', 'X', 'S', 'B') || tag1 == MKTAG('D','X','S','A')) {
|
||||
st->codec->codec_type = AVMEDIA_TYPE_SUBTITLE;
|
||||
@@ -601,7 +602,8 @@ static int avi_read_header(AVFormatContext *s)
|
||||
}
|
||||
|
||||
if(size > 10*4 && size<(1<<30) && size < avi->fsize){
|
||||
st->codec->extradata_size= size - 10*4;
|
||||
if(esize == size-1 && (esize&1)) st->codec->extradata_size= esize - 10*4;
|
||||
else st->codec->extradata_size= size - 10*4;
|
||||
st->codec->extradata= av_malloc(st->codec->extradata_size + FF_INPUT_BUFFER_PADDING_SIZE);
|
||||
if (!st->codec->extradata) {
|
||||
st->codec->extradata_size= 0;
|
||||
@@ -694,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);
|
||||
@@ -987,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) {
|
||||
@@ -1260,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))
|
||||
|
@@ -255,9 +255,12 @@ static int avi_write_header(AVFormatContext *s)
|
||||
|
||||
ff_parse_specific_params(stream, &au_byterate, &au_ssize, &au_scale);
|
||||
|
||||
avpriv_set_pts_info(s->streams[i], 64, au_scale, au_byterate);
|
||||
if(stream->codec_id == CODEC_ID_XSUB)
|
||||
au_scale = au_byterate = 0;
|
||||
|
||||
avio_wl32(pb, au_scale); /* scale */
|
||||
avio_wl32(pb, au_byterate); /* rate */
|
||||
avpriv_set_pts_info(s->streams[i], 64, au_scale, au_byterate);
|
||||
|
||||
avio_wl32(pb, 0); /* start */
|
||||
avist->frames_hdr_strm = avio_tell(pb); /* remember this offset to fill later */
|
||||
@@ -521,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){
|
||||
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){
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user