Compare commits

...

132 Commits

Author SHA1 Message Date
Michael Niedermayer
6ba07e9948 update for 2.2-rc2
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-03-15 03:08:20 +01:00
Michael Niedermayer
125bea15d1 avcodec/libx265: fill headers in extradata
Fixes Ticket3457

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit dded5ed9c5eb0c3d5a953e661ea21a9019e93ea4)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-03-15 02:42:11 +01:00
Michael Niedermayer
70e3cc282b avutil/timestamp: Warn about missing __STDC_FORMAT_MACROS for C++ use
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 8b02dfd37cb3bc9521fc6e1f5b5f13c80d144cd2)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-03-15 02:42:11 +01:00
Michael Niedermayer
242df26b44 mvformat/movenc: fix IMX
fixes Ticket3351

Tested-by: carl
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 72d44f15834af68e2620a7051493359d7ee5b2c3)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-03-15 02:42:11 +01:00
Michael Niedermayer
46c2dba20e doc/texi2pod: fix encoding type
docs say:
'A document having more than one "=encoding" line should be considered an error. '

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 12ce58bebdff6bfae9c56dc785e3003968f93277)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-03-15 02:42:11 +01:00
Carl Eugen Hoyos
3caa6a5a57 Revert "Allow stream-copying grayscale mov files."
This reverts commit 691dec62011fe9993809fbc793126b40cac0c584.

The commit did not fix ticket #3215, it was fixed one commit earlier.
The revert may break other use-cases but they should be fixed differently,
the offending commit introduced too many problems.

Fixes ticket #3377.
Fixes ticket #3378.
(cherry picked from commit 54bbe3e2a645b4f7b36efac2bca331d3be98592a)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-03-15 02:42:11 +01:00
Matt Oliver
bf08665e2e Fix modplug linkage on Windows.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 99b48fd448fa83252376d1ac96f17c953f07067c)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-03-15 02:42:11 +01:00
Stephen Hutchinson
c4f5f4dbd3 doc/general.texi: Adjust the notes on AviSynth
FFmpeg provides local copies of these headers in compat/avisynth/,
and there is no restriction against using 2.5.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 5336cd6374c7cbba9d6e65de1cec9404efcb665f)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-03-15 02:41:27 +01:00
Michael Niedermayer
29df24252a Merge commit '2b9ee7d5b901e0d7ba617511e4ed31d3043894d3' into release/2.2
* commit '2b9ee7d5b901e0d7ba617511e4ed31d3043894d3':
  doc: Add section about AviSynth support

Conflicts:
	doc/general.texi

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-03-15 02:40:44 +01:00
Stephen Hutchinson
2b9ee7d5b9 doc: Add section about AviSynth support
Signed-off-by: Diego Biurrun <diego@biurrun.de>
(cherry picked from commit 908836e20743d7e9462011a9f30a300a5bf247ca)
2014-03-11 20:40:47 +01:00
Michael Niedermayer
f800cacada Merge remote-tracking branch 'qatar/release/10' into release/2.2
* qatar/release/10:
  lavf: always use av_free

See: 88c8e4afeaf74ee58b67145e0331e229d8050968
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-03-11 13:21:56 +01:00
Michael Niedermayer
5227eac5b0 Merge commit '6d56bc9a6d853a33fe53ab63db580c4facaba420' into release/2.2
* commit '6d56bc9a6d853a33fe53ab63db580c4facaba420':
  lavf: simplify ff_hevc_annexb2mp4_buf

Conflicts:
	libavformat/hevc.c
	libavformat/hevc.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-03-11 13:13:42 +01:00
Michael Niedermayer
bb40f8f5e2 Merge commit '2c5e1d0933facc20c6926a788cce05d3e6cad149' into release/2.2
* commit '2c5e1d0933facc20c6926a788cce05d3e6cad149':
  configure: Use the right pkgconf file for openjpeg

Conflicts:
	configure

No change as the incorrect code wasnt in ffmpegs configure

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-03-11 13:13:13 +01:00
Michael Niedermayer
ad8bf22086 Merge commit 'b37b83214ae3a462df1e8d3cc765ddbd2bfc73aa' into release/2.2
* commit 'b37b83214ae3a462df1e8d3cc765ddbd2bfc73aa':
  hevc: Use get_se_golomb_long

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-03-11 13:12:41 +01:00
Michael Niedermayer
7f8804296d Merge commit '6d7ab09788bdafffb3f3fc4f7feb262eb8cdf0b1' into release/2.2
* commit '6d7ab09788bdafffb3f3fc4f7feb262eb8cdf0b1':
  golomb: Add a get_se_golomb_long

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-03-11 12:16:27 +01:00
Michael Niedermayer
f67e75b5dc Merge commit '227cfc1f10a940c88ad3742ec805c07b6a5e7abb' into release/2.2
* commit '227cfc1f10a940c88ad3742ec805c07b6a5e7abb':
  vf_frei0r: adjust error messages

Conflicts:
	libavfilter/vf_frei0r.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-03-11 12:16:05 +01:00
Michael Niedermayer
35e63f35b0 Merge commit '416847d19593e87ee1704c26a9a638fd6b0d977c' into release/2.2
* commit '416847d19593e87ee1704c26a9a638fd6b0d977c':
  vf_frei0r: prevent a segfault when filter parameters are not set

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-03-11 12:15:51 +01:00
Michael Niedermayer
3bfb7a2537 Merge commit 'bd4ad1a1d52b8882df016826b8bdcf7b1009cb97' into release/2.2
* commit 'bd4ad1a1d52b8882df016826b8bdcf7b1009cb97':
  vf_frei0r: fix missing end of line character

Conflicts:
	libavfilter/vf_frei0r.c

No change as the token parsing change was not merged

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-03-11 12:15:21 +01:00
Michael Niedermayer
4a1e7a6fb7 Merge commit '6230de03aad9f26d5843afb913d196622e0b5b98' into release/2.2
* commit '6230de03aad9f26d5843afb913d196622e0b5b98':
  vf_frei0r: refactor library loading from env variable

Conflicts:
	configure
	libavfilter/vf_frei0r.c

Not merged, we use av_strtok() which leads to simpler code

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-03-11 12:14:41 +01:00
Michael Niedermayer
ff1e982205 Merge commit '45acc228a6d5f1e7d6c5ce6da63b293bd5eda57d' into release/2.2
* commit '45acc228a6d5f1e7d6c5ce6da63b293bd5eda57d':
  doc: fix a couple of typos in frame.h

Conflicts:
	libavutil/frame.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-03-11 12:09:13 +01:00
Michael Niedermayer
bb116e6ba3 Merge commit 'd37fac6dbbdddb76225aa691b83ffd9a0c7dae6b' into release/2.2
* commit 'd37fac6dbbdddb76225aa691b83ffd9a0c7dae6b':
  isom: lpcm in mov default to big endian
  movdec: handle 0x7fff langcode as macintosh per the specs

No change as these have been part of the branch previously

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-03-11 12:08:21 +01:00
Michael Niedermayer
ebe356bf1c avformat/hevc: fix mix of av_malloc() with free()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 88c8e4afeaf74ee58b67145e0331e229d8050968)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-03-11 12:06:13 +01:00
Michael Niedermayer
30099413ec Merge commit 'eabefe83f40a65d0f0c2a9a0521f6d96c3932545' into release/2.2
* commit 'eabefe83f40a65d0f0c2a9a0521f6d96c3932545':
  movenc: allow muxing HEVC in MODE_MP4.

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-03-11 12:05:53 +01:00
Michael Niedermayer
186e0ff067 avformat/hevc: Make return codes consistent and more flexible
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 5d5e2bd86242506a5af4b290b72e1c52f62f7fb6)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-03-11 12:05:29 +01:00
Michael Niedermayer
2642ad9f55 Merge commit 'eaa79b79b25ac0ceaf44fe575a3ae724b87285b2' into release/2.2
* commit 'eaa79b79b25ac0ceaf44fe575a3ae724b87285b2':
  movenc: enable Annex B to MP4 conversion for HEVC tracks.

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-03-11 12:04:54 +01:00
Michael Niedermayer
95ddd2227b avformat: fix hevcs use of golomb from avformat
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit cb403b2570385cbf48a11f9f48441de5cd01171e)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-03-11 11:49:51 +01:00
Michael Niedermayer
3faebed6fa Merge commit 'c761379825ff0bf9dd191e244c4b2f7697fb2b3c' into release/2.2
* commit 'c761379825ff0bf9dd191e244c4b2f7697fb2b3c':
  movenc: write hvcC tag for HEVC.

Conflicts:
	libavformat/Makefile

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-03-11 11:48:10 +01:00
Michael Niedermayer
3aee1fa5b6 Merge commit 'ea3309eba715e83027e8ece4a226e39a4bf2a6ce' into release/2.2
* commit 'ea3309eba715e83027e8ece4a226e39a4bf2a6ce':
  movenc: use 'hev1' tag for HEVC in MODE_MOV.

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-03-11 11:47:51 +01:00
Michael Niedermayer
89a9c84ebb Merge commit '1c1e252cd1cbd5f59fe118c49f6d7207dbdfdbd4' into release/2.2
* commit '1c1e252cd1cbd5f59fe118c49f6d7207dbdfdbd4':
  movenc: Add a fallback fragmentation method for plain mp4 as well

Conflicts:
	libavformat/movenc.c

See: ef1aae6ea9aae9a523b6dcd8e670dbca823a88f8
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-03-11 11:46:55 +01:00
Michael Niedermayer
0adde39e04 Merge commit 'ca2c9d6b9bfadb64e1502594fdf745a391699890' into release/2.2
* commit 'ca2c9d6b9bfadb64e1502594fdf745a391699890':
  hevc: make pps/sps ids unsigned where necessary

Conflicts:
	libavcodec/hevc.h
	libavcodec/hevc_ps.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-03-11 11:39:46 +01:00
Michael Niedermayer
03ae616b19 Merge commit 'fa6b99d351ed483766a875054676a56fd8459774' into release/2.2
* commit 'fa6b99d351ed483766a875054676a56fd8459774':
  hevc: Do not turn 32bit timebases into negative numbers

Conflicts:
	libavcodec/hevc.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-03-11 11:39:31 +01:00
Michael Niedermayer
830c3058ff Merge commit 'd79cb6947e4a9c42ac20925dd920d3a0910d9a26' into release/2.2
* commit 'd79cb6947e4a9c42ac20925dd920d3a0910d9a26':
  hevc: use av_mallocz() for allocating tab_ipm

See: 26568c04a8270ad792f3b86223914095b178b3a8
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-03-11 11:29:06 +01:00
Michael Niedermayer
b12c5cbbb2 Merge commit '5aa4b29bbefc06fc2bbcb52af7a14393a1bcf504' into release/2.2
* commit '5aa4b29bbefc06fc2bbcb52af7a14393a1bcf504':
  hevc: Use get_bits_long() in decode_vui()

See: e15a57b67a2600e2fa6db8e6c8485add305671d1
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-03-11 11:28:23 +01:00
Michael Niedermayer
82c96b5ad8 Merge commit 'e4cbd0d6e5a7b3b850d72f4f4ef0124b27dbdcbd' into release/2.2
* commit 'e4cbd0d6e5a7b3b850d72f4f4ef0124b27dbdcbd':
  changelog: Cleanups and prepare for v10_beta2

Conflicts:
	Changelog

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-03-11 11:23:30 +01:00
Michael Niedermayer
3e4b957847 Merge commit '0ede7b534483c5c90f404a8f11f776d2f2da4e7e' into release/2.2
* commit '0ede7b534483c5c90f404a8f11f776d2f2da4e7e':
  float_dsp: fix errors in documentation

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-03-11 11:22:10 +01:00
Michael Niedermayer
cbabbe8220 Merge commit '5b933be089ab2657eb754ebf5b804ae43badf13d' into release/2.2
* commit '5b933be089ab2657eb754ebf5b804ae43badf13d':
  arm: vp3: remove incorrect const in ff_vp3_idct_dc_add_neon declaration

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-03-11 11:21:54 +01:00
Michael Niedermayer
80122a3af3 Merge commit 'f2693e98b449592ec0ed4979220814bf54e60a16' into release/2.2
* commit 'f2693e98b449592ec0ed4979220814bf54e60a16':
  build: Use pkg-config for openjpeg

Conflicts:
	configure

Not merged / merge just for metadata at request of carl

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-03-11 11:21:18 +01:00
Michael Niedermayer
a475755b3a Merge commit 'c3861e14ceace7ee69820091871173b4abcae311' into release/2.2
* commit 'c3861e14ceace7ee69820091871173b4abcae311':
  movenc: allow override of "writing application" tag

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-03-11 11:04:13 +01:00
Michael Niedermayer
66030e8133 Merge commit 'daa5a988e2ec8275ad8b724ea68f78306c271ae7' into release/2.2
* commit 'daa5a988e2ec8275ad8b724ea68f78306c271ae7':
  matroskaenc: allow override of "writing application" tag

Conflicts:
	libavformat/matroskaenc.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-03-11 11:03:30 +01:00
Michael Niedermayer
46f8d838b3 Merge commit 'db67b7c31b6fdd3747e2b5328945ad2091533698' into release/2.2
* commit 'db67b7c31b6fdd3747e2b5328945ad2091533698':
  rv10: Forward error from rv10_decode_packet

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-03-11 11:03:17 +01:00
Michael Niedermayer
bc3648d4b4 Merge commit 'a643a47d41f4924b66fce339e4b82aaee20825be' into release/2.2
* commit 'a643a47d41f4924b66fce339e4b82aaee20825be':
  fic: Properly handle skip frames

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-03-11 11:03:01 +01:00
Michael Niedermayer
27e6b4a3ff Merge commit '23af29e8825ac112877b9ac0572ef11e5f0539f2' into release/2.2
* commit '23af29e8825ac112877b9ac0572ef11e5f0539f2':
  arm: hpeldsp: fix put_pixels8_y2_{,no_rnd_}armv6

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-03-11 11:02:36 +01:00
Michael Niedermayer
b82860caa7 Merge commit '72a58c0772450993d375c6cf4b187a068f5bc765' into release/2.2
* commit '72a58c0772450993d375c6cf4b187a068f5bc765':
  Update default FATE URL for release/10

Conflicts:
	tests/Makefile

Merge for metadata only as we dont duplicate the fate samples per release branch.
Theres no need for that currently

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-03-11 10:49:37 +01:00
Michael Niedermayer
3d05625136 Merge commit 'd5254230068e196a2496618c0d89cdfbc41f7478' into release/2.2
* commit 'd5254230068e196a2496618c0d89cdfbc41f7478':
  Revert "Add libx265 encoder"

Conflicts:
	Changelog
	LICENSE
	configure
	doc/general.texi
	libavcodec/allcodecs.c
	libavcodec/libx265.c

Not merged, release branches should only contain bugfixes
a feature removial like this has to be discussed on ffmpeg-devel first

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-03-11 10:46:52 +01:00
Michael Niedermayer
ddd3301bad Merge commit '4b476e6aa4b830f919cf3c67ba2caa039ff285b9' into release/2.2
* commit '4b476e6aa4b830f919cf3c67ba2caa039ff285b9':
  configure: enable PIC on s390(x)

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-03-11 10:32:26 +01:00
Michael Niedermayer
123981930f Merge commit 'a1ab3300c83a16c2d5f5d29c51393668b9d92667' into release/2.2
* commit 'a1ab3300c83a16c2d5f5d29c51393668b9d92667':
  arm: hpeldsp: prevent overreads in armv6 asm

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-03-11 10:31:47 +01:00
Lukasz Marek
3171e2360a Revert "lavu/buffer: add release function"
This reverts commit 3144440004941aa22ffea9933f5e5dfe826df654.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit bba7b6fc41057d4aec6b1f0e12240db56fe6e9b6)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-03-11 09:06:51 +01:00
Michael Niedermayer
3533a850e7 lavf: always use av_free
Signed-off-by: Tim Walker <tdskywalker@gmail.com>
(cherry picked from commit 77e9123fe5d64b0960158de6e1713d3c6c7878a7)
2014-03-10 19:53:51 -04:00
Tim Walker
6d56bc9a6d lavf: simplify ff_hevc_annexb2mp4_buf
Use ff_hevc_annexb2mp4 instead of duplicating
its functionality, and update the documentation
to match the new behavior.

(cherry picked from commit 34bbc81de8a49fbddb92b76dc733f40890480b2b)
2014-03-10 19:53:44 -04:00
Luca Barbato
2c5e1d0933 configure: Use the right pkgconf file for openjpeg
The current release of version 1 uses libopenjpeg1.

(cherry picked from commit 4a8562394b685e83ae4a38a93eef43625755a231)
2014-03-10 19:53:27 -04:00
Luca Barbato
b37b83214a hevc: Use get_se_golomb_long
Do not use inline functions that refer to tables present in other
libraries.

(cherry picked from commit ee17be3fdd37f63f4b77676820e387858908b0f4)
2014-03-10 19:53:26 -04:00
Luca Barbato
6d7ab09788 golomb: Add a get_se_golomb_long
Useful in libavformat mostly.

(cherry picked from commit 5eacbb53289570834f9a1acb15fd406ea224eef6)
2014-03-10 19:53:04 -04:00
Vittorio Giovara
227cfc1f10 vf_frei0r: adjust error messages
(cherry picked from commit 8accddeb5806cd98e3803b4ddf2a2ef576d0e4d9)
2014-03-09 17:54:01 -04:00
Vittorio Giovara
416847d195 vf_frei0r: prevent a segfault when filter parameters are not set
(cherry picked from commit 4e0be9c86f2003dd3ba2eb8fad01e8d0e538075e)
2014-03-09 17:53:47 -04:00
Vittorio Giovara
bd4ad1a1d5 vf_frei0r: fix missing end of line character
Error introduced in 61b323ce7c7cdc101eadfd7de2203922b8a39e8d.

(cherry picked from commit 4c41a7a1798dd6c60e40f79be12faa98a9347151)
2014-03-09 17:53:33 -04:00
Vittorio Giovara
6230de03aa vf_frei0r: refactor library loading from env variable
strtok_r is not needed any more, so remove it from configure.

(cherry picked from commit 61b323ce7c7cdc101eadfd7de2203922b8a39e8d)
2014-03-09 17:53:24 -04:00
Janne Grunau
45acc228a6 doc: fix a couple of typos in frame.h
(cherry picked from commit a18ef7a76c735bcf78ed4825e33ad7f9f6f77a54)
2014-03-09 17:53:09 -04:00
Mark Himsley
d37fac6dbb isom: lpcm in mov default to big endian
It is my understanding that "Unless otherwise stated, all data in a
QuickTime movie is stored in big-endian byte ordering" [1] in MOV files.

I have a couple of thousand files, which technically are invalid because
their sound sample description element 4CC is 'lpcm' but its version is
0 - and "Version 0 supports only uncompressed audio in raw ('raw ') or
twos-complement ('twos') format" [2]

Because isom.c only contains a mapping for 4CC 'lpcm' to
AV_CODEC_ID_PCM_S16LE, these files have their audio decoded as LE when
it is actually BE.

This commit adds AV_CODEC_ID_PCM_S16BE as the first match for 4CC 'lpcm'.

[1]
https://developer.apple.com/library/mac/documentation/quicktime/QTFF/qtff.pdf
page 21
[2]
https://developer.apple.com/library/mac/documentation/quicktime/QTFF/qtff.pdf
page 178

Reviewed-by: Yusuke Nakamura <muken.the.vfrmaniac@gmail.com>
(cherry picked from commit 360022bd3b894cc01ea112b275fa4c8f53881808)
2014-03-09 17:50:54 -04:00
Baptiste Coudurier
7940306a47 movdec: handle 0x7fff langcode as macintosh per the specs
The correct point that seperates ISO and MAC language codes is 0x400
according to the current QT spec. Old QT specs did not list where this
seperation is but apparently only defined the meaning of the first 137.

(cherry picked from commit 9e71cc81f3655cacf0f91860fba3043f13b64059)
2014-03-09 17:50:41 -04:00
Tim Walker
eabefe83f4 movenc: allow muxing HEVC in MODE_MP4.
(cherry picked from commit 4f3db5d3418a24f3b90422e98ad75388052c4284)
2014-03-09 16:58:28 -04:00
Tim Walker
eaa79b79b2 movenc: enable Annex B to MP4 conversion for HEVC tracks.
(cherry picked from commit b6c61fb83e876d404ac3b0b3657ebfcafdcd1926)
2014-03-09 16:58:26 -04:00
Tim Walker
c761379825 movenc: write hvcC tag for HEVC.
(cherry picked from commit 20b40a597cdd4969cf1147d7c7efee2b6232524b)
2014-03-09 16:58:21 -04:00
Tim Walker
ea3309eba7 movenc: use 'hev1' tag for HEVC in MODE_MOV.
'hvc1' requires that parameter set NAL units be
present only in the samples entry, but not in the
samples themselves, requiring that additional
parameter sets, if present, be filtered out of the
samples and placed in new, additional sample entries
if they override or otherwise conflict with the
parameter sets present in the first sample entry.
We do not have any way of doing this at present, so
the files we produce can only comply with the
restrictions set for the 'hev1' sample entry name in
ISO/IEC 14496-15.

(cherry picked from commit 1d9014f0b008485eac4c19d5f5e11ede59237167)
2014-03-09 16:58:15 -04:00
Martin Storsjö
1c1e252cd1 movenc: Add a fallback fragmentation method for plain mp4 as well
Previously the default fragmentation method was only enabled
if writing an ISM file.

Signed-off-by: Martin Storsjö <martin@martin.st>
(cherry picked from commit 1e142d5b4842dcb39fcb0e92e4aacbc9977bfa66)
2014-03-09 16:57:53 -04:00
Vittorio Giovara
ca2c9d6b9b hevc: make pps/sps ids unsigned where necessary
Fixes integer overflow and out of array accesses.
Found-by: Mateusz j00ru Jurczyk and Gynvael Coldwind

(cherry picked from commit 4d33873c2990b8d6096f60fef384f0efc4482b55)
2014-03-09 14:55:38 -04:00
Michael Niedermayer
fa6b99d351 hevc: Do not turn 32bit timebases into negative numbers
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
(cherry picked from commit ed06e5d92b4c67b49068d538461fbbe0a53a8c5e)
2014-03-09 14:55:36 -04:00
Michael Niedermayer
d79cb6947e hevc: use av_mallocz() for allocating tab_ipm
Fixes use of uninitialized memory and out of stack array read.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind

(cherry picked from commit 6cc94e971933cd38c452172bb048bf760e65cc3e)
2014-03-09 14:55:35 -04:00
Michael Niedermayer
5aa4b29bbe hevc: Use get_bits_long() in decode_vui()
Fix assertion failure.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind

(cherry picked from commit 920c01adce6c273fc043513ff237a6266e612152)
2014-03-09 14:55:34 -04:00
Reinhard Tartler
e4cbd0d6e5 changelog: Cleanups and prepare for v10_beta2 2014-03-08 20:50:36 -05:00
Janne Grunau
0ede7b5344 float_dsp: fix errors in documentation
(cherry picked from commit 74cc901905741ca3d9e8364f42239341f4f173c4)
2014-03-08 19:36:20 -05:00
Janne Grunau
5b933be089 arm: vp3: remove incorrect const in ff_vp3_idct_dc_add_neon declaration
Was missed in aeaf268e52fc11c1f64914a319e0edddf1346d6a when integrating
clear_blocks into the idct.

(cherry picked from commit 4506a854a4d846692ba71daeeff661dc214c8fa2)
2014-03-08 19:36:02 -05:00
Pierre Lejeune
f2693e98b4 build: Use pkg-config for openjpeg
Bug-Id: 387
CC: libav-stable@libav.org
(cherry picked from commit 0e0cefb22216a4b6684a30a50cb5973400dc59f2)
2014-03-08 19:34:44 -05:00
John Stebbins
c3861e14ce movenc: allow override of "writing application" tag
Signed-off-by: Tim Walker <tdskywalker@gmail.com>

CC: libav-stable@libav.org
(cherry picked from commit 565e0c6d866ce08d4b06427456d3d1f4fd856e9c)
2014-03-08 19:34:42 -05:00
John Stebbins
daa5a988e2 matroskaenc: allow override of "writing application" tag
Signed-off-by: Tim Walker <tdskywalker@gmail.com>

CC: libav-stable@libav.org
(cherry picked from commit 0092c1dd8dac2d9e185b58503b447a0d3fb5230d)
2014-03-08 19:34:39 -05:00
Keiji Costantini
db67b7c31b rv10: Forward error from rv10_decode_packet
Signed-off-by: Diego Biurrun <diego@biurrun.de>
(cherry picked from commit b4d372e091f6b30758db2a43a5a9fe2510ec2b13)
2014-03-08 19:34:29 -05:00
Derek Buitenhuis
a643a47d41 fic: Properly handle skip frames
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
(cherry picked from commit f87a6e500bcdaede22a123b81a2a46779cf7b71a)
2014-03-08 19:33:41 -05:00
Janne Grunau
23af29e882 arm: hpeldsp: fix put_pixels8_y2_{,no_rnd_}armv6
The overread avoidance fix in cbddee1cca0ebd01e8c5aa694d31228eb4de4b41
broke the computation for the last row since it prevented the safe
reading from the height+1-th row.
2014-03-08 21:48:21 +01:00
Nicolas George
7d995cd1b8 lavfi/af_atempo: clear references before returning error.
Once the frame has been given to ff_filter_frame(), it can
no longer be used, even on error.

Fix trac ticket #3430.
(cherry picked from commit bc6901c94944e4a81be49a6b11183cd0c55d2738)
2014-03-08 15:17:14 +01:00
Reinhard Tartler
72a58c0772 Update default FATE URL for release/10 2014-03-07 08:32:55 -05:00
Reinhard Tartler
d525423006 Revert "Add libx265 encoder"
cf. the discussion following
https://lists.libav.org/pipermail/libav-devel/2014-March/056894.html

This reverts commit 50ea93158d4c480f64069e8bd1da388486dcf4ba.

Conflicts:
	doc/general.texi
	libavcodec/version.h
2014-03-07 08:32:55 -05:00
Reinhard Tartler
4b476e6aa4 configure: enable PIC on s390(x)
The s390 architecture requires shared libraries to be built in PIC mode.
Otherwise applications will get wrong relocations at run-time, leading
to confusing segmentation faults.

CC: libav-stable@libav.org
(cherry picked from commit 5ddc9f5052316608799b932c604f9e7561f8ce24)
2014-03-07 08:32:55 -05:00
Michael Niedermayer
124c78fd44 avformat/oggparsevorbis: dont use invalid granules
Fixes Ticket3437

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 12b97dd375736c332989c50ea68af9d834b2621f)
2014-03-06 09:31:49 +01:00
Janne Grunau
a1ab3300c8 arm: hpeldsp: prevent overreads in armv6 asm
Based on a patch by Russel King <rmk+libav@arm.linux.org.uk>

Bug-Id: 646
CC: libav-stable@libav.org
2014-03-05 16:21:52 +01:00
Michael Niedermayer
1af235f6b3 Merge remote-tracking branch 'qatar/release/10' into release/2.2
* qatar/release/10:
  ituh263: reject b-frame with pp_time = 0
  af_compand: replace strtok_r() with av_get_token()
  latm: Always reconfigure if no extradata was set previously
  af_compand: add a dependency on strtok_r
  lavfi: add compand audio filter

Conflicts:
	Changelog
	doc/filters.texi
	libavfilter/Makefile
	libavfilter/af_compand.c
	libavfilter/allfilters.c
	libavfilter/version.h

All changes are already in our 2.2 branch, this is just for metadata

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-03-03 23:39:42 +01:00
Michael Niedermayer
82031e41f8 Merge commit '596d3e20ae69a278d562eea08f5e8c0ae5a5bfc4' into release/2.2
* commit '596d3e20ae69a278d562eea08f5e8c0ae5a5bfc4':
  parser: cosmetics: Drop some unnecessary parentheses
  parser: K&R formatting cosmetics
  parser: Remove commented-out cruft
  doc: name correct header
  af_volume: preserve frame properties

Conflicts:
	doc/APIchanges
	libavcodec/parser.c
	libavfilter/af_volume.c

All changes are already in our 2.2 branch, this is just for metadata

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-03-03 23:30:47 +01:00
Michael Niedermayer
222e7549a7 Merge commit '7933039ade01b39638ec3d9e638b6ae06ee84984' into release/2.2
* commit '7933039ade01b39638ec3d9e638b6ae06ee84984':
  af_resample: preserve frame properties
  avconv: Do not divide by zero
  dca: replace some memcpy by AV_COPY128
  h264: avoid undefined behavior in chroma motion compensation
  x86: dsputil: Use correct file name as multiple inclusion guard

Conflicts:
	ffmpeg.c

All changes are already in our 2.2 branch, this is just for metadata

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-03-03 23:16:15 +01:00
Michael Niedermayer
eb2244ece9 Merge commit '4015829accc2382393d42d62654eb96d896d1326' into release/2.2
* commit '4015829accc2382393d42d62654eb96d896d1326':
  bit_depth_template: Use file name as multiple inclusion guard
  svq3: Adjust #endif comment
  hevc: Mention the missing SPS in the error message
  doc: Name the MOV muxer as it should be called
  doc: Sort the muxer documentation

Conflicts:
	doc/muxers.texi

All changes are already in our 2.2 branch, this is just for metadata

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-03-03 23:03:44 +01:00
Michael Niedermayer
b967c10029 Merge commit '39dc4a6bb34baf833ce1e5eabad7d0dbf933237d' into release/2.2
* commit '39dc4a6bb34baf833ce1e5eabad7d0dbf933237d':
  x86: dca: Add missing multiple inclusion guards
  gitignore: Add all examples below doc/examples
  arm: Mark the stack as non-executable
  doxygen: Replace @parblock syntax with manual linebreaks
  doxygen: Add a number of missing function parameter descriptions

Conflicts:
	.gitignore
	libavformat/avformat.h

All changes are already in our 2.2 branch, this is just for metadata

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-03-03 22:53:25 +01:00
Michael Niedermayer
7ff4cd2acc Merge commit 'a6a2d8eb8f125a2edb512a7a47df33dbd70d6b35' into release/2.2
* commit 'a6a2d8eb8f125a2edb512a7a47df33dbd70d6b35':
  qt-faststart: Add a note about the -movflags +faststart feature
  qt-faststart: Avoid unintentionally sign extending BE_32
  qt-faststart: Check offset_count before reading from the moov_atom buffer
  qt-faststart: Check the ftello() return codes
  qt-faststart: Fix the signedness of variables keeping the ftello return values
  qt-faststart: Check fseeko() return codes
  qt-faststart: Simplify code by using a MIN() macro
  qt-faststart: Increase the copy buffer size to 64 KB

Conflicts:
	tools/qt-faststart.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-03-03 22:42:25 +01:00
Michael Niedermayer
c4149c4d54 Merge commit '1d1df82093fdacb2cbc443c70c80f8f801002d28' into release/2.2
* commit '1d1df82093fdacb2cbc443c70c80f8f801002d28':
  pthread_frame: flush all threads on flush, not just the first one

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-03-03 22:30:54 +01:00
Michael Niedermayer
8ad2f45964 Merge commit 'de187e3e9ec4803575deb1c293ccad84d2a88da8' into release/2.2
* commit 'de187e3e9ec4803575deb1c293ccad84d2a88da8':
  h264: Fix a typo from the previous commit
  h264: Lower bound check for slice offsets
  hevc: Always consider VLC NALU type mismatch fatal
  Prepare for 10_beta2 Release
  build: The MPEG-4 video parser depends on h263dsp

Conflicts:
	RELEASE
	configure

All changes are already in our 2.2 branch, this is just for metadata

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2014-03-03 22:22:15 +01:00
Keiji Costantini
5df52b0131 ituh263: reject b-frame with pp_time = 0
Avoid a division by 0 in ff_mpeg4_set_one_direct_mv.

Sample-Id: 00000168-google
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
(cherry picked from commit 9514440337875e0c63b409abcd616b68c518283f)
2014-03-02 11:42:38 -05:00
Diego Biurrun
596d3e20ae parser: cosmetics: Drop some unnecessary parentheses
(cherry picked from commit 4ec336484d638b6b009636f465352c61a5a57061)
2014-03-02 11:42:38 -05:00
Anton Khirnov
00d5ff6431 af_compand: replace strtok_r() with av_get_token()
(cherry picked from commit bc6461c2861b7d482a037d3b3e2b44ad48805fa0)
2014-03-02 11:42:38 -05:00
Luca Barbato
437179e9c8 parser: K&R formatting cosmetics
Signed-off-by: Diego Biurrun <diego@biurrun.de>
(cherry picked from commit a1c699659d56b76c0bf399307f642c6fd6d28281)
2014-03-02 11:42:38 -05:00
Hendrik Leppkes
031d3b66c2 latm: Always reconfigure if no extradata was set previously
AAC LOAS can have new audio config objects in the stream itself.

Make sure the decoder reconfigures itself when the first one arrives
midstream.

Bug-Id: 644
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
(cherry picked from commit 3aca10bf762a94d7de555cedf1ff0e4f6792bf41)
2014-03-02 11:42:38 -05:00
Diego Biurrun
b76871d870 parser: Remove commented-out cruft
(cherry picked from commit ed61f3ca8a0664a697782253b354055136c5d303)
2014-03-02 11:42:38 -05:00
Anton Khirnov
15ae305007 af_compand: add a dependency on strtok_r
(cherry picked from commit 291e49d4e7db4b982621d7a25e258f898cfc3217)
2014-03-02 11:42:38 -05:00
Vittorio Giovara
3c72204ae0 doc: name correct header
(cherry picked from commit 48d1ed9c83ee0c388e8c2898e81ffb4add509ab9)
2014-03-02 11:42:38 -05:00
Andrew Kelley
ba21499648 lavfi: add compand audio filter
Signed-off-by: Anton Khirnov <anton@khirnov.net>
(cherry picked from commit 738f83582a3aaabb81309eacd4ab9c3d2acb4071)

Conflicts:
	libavfilter/version.h
2014-03-02 11:42:38 -05:00
Anton Khirnov
7933039ade af_resample: preserve frame properties
(cherry picked from commit dcc7e4bf1d0913123bfafbc58bf47bd41dd5848d)
2014-03-02 11:42:37 -05:00
Diego Biurrun
4015829acc bit_depth_template: Use file name as multiple inclusion guard
(cherry picked from commit ba42c852477e87f6e47a5587e8f7829c46c52032)
2014-03-02 11:42:37 -05:00
Diego Biurrun
39dc4a6bb3 x86: dca: Add missing multiple inclusion guards
(cherry picked from commit b23bc95920e2f10b9621857e829c45b064f356c0)
2014-03-02 11:42:37 -05:00
Lou Logan
a6a2d8eb8f qt-faststart: Add a note about the -movflags +faststart feature
Signed-off-by: Martin Storsjö <martin@martin.st>
(cherry picked from commit 700687ebe07ac8b7a5cf5fd2c4892ea07a827080)
2014-03-02 11:42:37 -05:00
Anton Khirnov
58556826a8 af_volume: preserve frame properties
(cherry picked from commit 39c2880eeae6930b1036ce1f479afc1e1152c13f)
2014-03-02 11:42:37 -05:00
Luca Barbato
bc2c9a479a avconv: Do not divide by zero
(cherry picked from commit 5c79d2e12d13959fc6aed92d102c25194a06de05)
2014-03-02 11:42:37 -05:00
Diego Biurrun
9cc22be032 svq3: Adjust #endif comment
(cherry picked from commit 61e7c7f27b0a2652bf5cd282b97762ee99d025ef)
2014-03-02 11:42:37 -05:00
Diego Biurrun
33e1bca651 gitignore: Add all examples below doc/examples
(cherry picked from commit 294a51e18ab7df4d658249361a03f0d716a4e9f0)
2014-03-02 11:42:37 -05:00
Martin Storsjö
9841617b7f qt-faststart: Avoid unintentionally sign extending BE_32
Without this cast, the BE_32() expression is sign extended when
assigned to an uint64_t, since the uint8_t|uint8_t expression
is promoted to an int.

Also avoid undefined behaviour when left shifting an uint8_t
by 24 by casting it to an uint32_t explicitly before shifting.

Based on a patch by Michael Niedermayer.

Signed-off-by: Martin Storsjö <martin@martin.st>
(cherry picked from commit ea7f79f93796d68559a495be824b6bbd94dfe5f6)
2014-03-02 11:42:37 -05:00
Christophe Gisquet
2897481f64 dca: replace some memcpy by AV_COPY128
Signed-off-by: Janne Grunau <janne-libav@jannau.net>
(cherry picked from commit ef010f08ae53479c54e2f16be5a7e1a809a9e268)
2014-03-02 11:42:37 -05:00
Luca Barbato
646c564de5 hevc: Mention the missing SPS in the error message
(cherry picked from commit 175e5063320f585118a5461f15dbacf2ce17e97d)
2014-03-02 11:42:37 -05:00
Martin Storsjö
cd6281abef arm: Mark the stack as non-executable
If linking in an object file without this attribute set, the
linker will assume that an executable stack might be needed.

Signed-off-by: Martin Storsjö <martin@martin.st>
(cherry picked from commit 543156d7518f5e5d731123da066d86278f9fa492)
2014-03-02 11:42:37 -05:00
Janne Grunau
697be8173b h264: avoid undefined behavior in chroma motion compensation
Makes fate-h264 pass under valgrind --undef-value-errors=yes with
-cpuflags none. {avg,put}_h264_chroma_mc8_8 approximately 5% faster,
{avg,put}_h264_chroma_mc4_8 2% faster both on x86 and arm.

(cherry picked from commit 982b596ea6640bfe218a31f6c3fc542d9fe61c31)
2014-03-02 11:42:37 -05:00
Luca Barbato
1853d8bb7a doc: Name the MOV muxer as it should be called
The section name is the muxer, not the format.

(cherry picked from commit 93632a70f9ac2cb2ebf0e69d21fdfaae68ff02fd)
2014-03-02 11:42:37 -05:00
Diego Biurrun
1779cd7695 doxygen: Replace @parblock syntax with manual linebreaks
@parblock is only supported in very recent Doxygen versions.

(cherry picked from commit 2f2b2efd31f6af997812a70de22b6d717fb41d4e)
2014-03-02 11:42:37 -05:00
Diego Biurrun
bb4820727f x86: dsputil: Use correct file name as multiple inclusion guard
(cherry picked from commit 017a06a9ee86b047079166c2694c9c655ff03356)
2014-03-02 11:42:37 -05:00
Luca Barbato
affc7687d3 doc: Sort the muxer documentation
Keep the sections alphabetically sorted.

(cherry picked from commit a7b3216cbdc7796a9d14cd22a863fae3556098ba)
2014-03-02 11:42:37 -05:00
Diego Biurrun
3569470693 doxygen: Add a number of missing function parameter descriptions
(cherry picked from commit 4d7ab5cfebef91820af2933ef2f622ea598e6b53)
2014-03-02 11:42:37 -05:00
Anton Khirnov
1d1df82093 pthread_frame: flush all threads on flush, not just the first one
avcodec_flush_buffers() must release all internally held references
according to its documentation, for which all the threads need to be
flushed.

CC:libav-stable@libav.org
Bug-Id: vlc/9665
(cherry picked from commit d1f9563d502037239185c11578cc614bdf0c5870)
2014-03-02 11:42:36 -05:00
Luca Barbato
de187e3e9e h264: Fix a typo from the previous commit
f777504f640260337974848c7d5d7a3f064bbb45 changed a - in +

CC: libav-stable@libav.org
(cherry picked from commit d922c5a5fbaf0b6c73bd8c81ae059bc6e406961c)
2014-03-02 11:42:36 -05:00
Michael Niedermayer
7754d48381 qt-faststart: Check offset_count before reading from the moov_atom buffer
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
(cherry picked from commit bb95334c34d0d9abccea370ae25c4765d7764ab8)
2014-03-02 11:42:36 -05:00
Vittorio Giovara
63169474b3 h264: Lower bound check for slice offsets
And use the value from the specification.

Sample-Id: 00000451-google
Found-by: Mateusz j00ru Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
(cherry picked from commit f777504f640260337974848c7d5d7a3f064bbb45)
2014-03-02 11:42:36 -05:00
Michael Niedermayer
b3f106cb1f qt-faststart: Check the ftello() return codes
This silences a warning in the coverity static analyzer.

Signed-off-by: Martin Storsjö <martin@martin.st>
(cherry picked from commit 63848854256a024a19435e87d6bc76fffa65e81e)
2014-03-02 11:42:36 -05:00
Luca Barbato
9b6ccf0f24 hevc: Always consider VLC NALU type mismatch fatal
Sample-Id: 00001667-google
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
(cherry picked from commit 521726ff577ca80b399d1abb687e3e1fd4840e4a)
2014-03-02 11:42:36 -05:00
Michael Niedermayer
298d66c8de qt-faststart: Fix the signedness of variables keeping the ftello return values
These variables are assigned the return values of ftello, which
returns an off_t, which is a signed type. On errors, ftello returns
-1, thus make sure this error return value can be stored properly.

Signed-off-by: Martin Storsjö <martin@martin.st>
(cherry picked from commit 03c2a66fcff9707f71ffef7e61ce5e3973220d4b)
2014-03-02 11:42:36 -05:00
Reinhard Tartler
4be1b68d52 Prepare for 10_beta2 Release 2014-03-02 11:42:36 -05:00
Michael Niedermayer
92edc13d69 qt-faststart: Check fseeko() return codes
Signed-off-by: Martin Storsjö <martin@martin.st>
(cherry picked from commit 5612244351b2eb3cb4e6225861a0f55aa5d0c475)
2014-03-02 11:42:36 -05:00
Michael Niedermayer
c9f015f1c6 qt-faststart: Simplify code by using a MIN() macro
qt-faststart doesn't use the normal libav headers at all since
it's supposed to be a completely standalone tool, so we implement
the macro locally in this file.

Signed-off-by: Martin Storsjö <martin@martin.st>
(cherry picked from commit ea15a9a5d8fa6a71af3101b2af18c4dcac07987f)
2014-03-02 11:42:36 -05:00
Martin Storsjö
db6b2ca0b3 qt-faststart: Increase the copy buffer size to 64 KB
Copying data in chunks of 1 KB is a little wasteful.

64 KB should still easily fit on the stack, so there's no need
to allocate it dynamically.

Signed-off-by: Martin Storsjö <martin@martin.st>
(cherry picked from commit 3cbc7ef3d60b6af3617079f24a4f401d83353003)
2014-03-02 11:42:36 -05:00
Michael Niedermayer
3503ec8461 Changelog: remove <next>
Found-by: Timothy
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-03-01 18:26:04 +01:00
Michael Niedermayer
ecc5e42d92 Update for 2.2-rc1
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2014-03-01 04:03:08 +01:00
Diego Biurrun
f87ce262f6 build: The MPEG-4 video parser depends on h263dsp
The dependency is indirect through the h263/mpegvideo code.
CC: libav-stable@libav.org
(cherry picked from commit 192ccc5034ad4ac1b5022fc16c1162267add6a0f)
2014-02-20 12:06:39 +01:00
39 changed files with 1417 additions and 113 deletions

View File

@ -1,9 +1,6 @@
Entries are sorted chronologically from oldest to youngest within each release,
releases are sorted from youngest to oldest.
version <next>
version 2.2:
- HNM version 4 demuxer and video decoder

View File

@ -1 +1 @@
2.1.git
2.2-rc2

1
VERSION Normal file
View File

@ -0,0 +1 @@
2.2-rc2

4
configure vendored
View File

@ -3661,6 +3661,10 @@ case "$arch" in
check_64bit ppc ppc64 'sizeof(void *) > 4'
spic=$shared
;;
s390)
check_64bit s390 s390x 'sizeof(void *) > 4'
spic=$shared
;;
sparc)
check_64bit sparc sparc64 'sizeof(void *) > 4'
spic=$shared

View File

@ -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 = 2.2-rc2
# With the PROJECT_LOGO tag one can specify a logo or icon that is included
# in the documentation. The maximum height of the logo should not exceed 55

View File

@ -162,6 +162,27 @@ libzvbi is licensed under the GNU General Public License Version 2 or later
you must upgrade FFmpeg's license to GPL in order to use it.
@end float
@section AviSynth
FFmpeg can read AviSynth scripts as input. To enable support, pass
@code{--enable-avisynth} to configure. The correct headers are
included in compat/avisynth/, which allows the user to enable support
without needing to search for these headers themselves.
For Windows, supported AviSynth variants are
@url{http://avisynth.nl, AviSynth 2.5 or 2.6} for 32-bit builds and
@url{http://avs-plus.net, AviSynth+ 0.1} for 32-bit and 64-bit builds.
For Linux and OS X, the supported AviSynth variant is
@url{https://github.com/avxsynth/avxsynth, AvxSynth}.
@float NOTE
AviSynth and AvxSynth are loaded dynamically. Distributors can build FFmpeg
with @code{--enable-avisynth}, and the binaries will work regardless of the
end user having AviSynth or AvxSynth installed - they'll only need to be
installed to use AviSynth scripts (obviously).
@end float
@chapter Supported File Formats, Codecs or Features

View File

@ -327,10 +327,11 @@ die "No filename or title\n" unless defined $fn && defined $tl;
$chapters{NAME} = "$fn \- $tl\n";
$chapters{FOOTNOTES} .= "=back\n" if exists $chapters{FOOTNOTES};
# always use utf8
print "=encoding utf8\n\n";
unshift @chapters_sequence, "NAME";
for $chapter (@chapters_sequence) {
# always use utf8
print "=encoding utf8\n";
if (exists $chapters{$chapter}) {
$head = uc($chapter);
print "=head1 $head\n\n";

View File

@ -119,7 +119,7 @@ static int decode_frame(AVCodecContext *avctx, void *data,
}
}
if ((avctx->bits_per_coded_sample & 0x1f) <= 8) {
if (avctx->bits_per_coded_sample <= 8) {
const uint8_t *pal = av_packet_get_side_data(avpkt,
AV_PKT_DATA_PALETTE,
NULL);

View File

@ -144,10 +144,11 @@ function ff_put_pixels8_y2_armv6, export=1
eor r7, r5, r7
uadd8 r10, r10, r6
and r7, r7, r12
ldr_pre r6, r1, r2
ldrc_pre ne, r6, r1, r2
uadd8 r11, r11, r7
strd_post r8, r9, r0, r2
ldr r7, [r1, #4]
it ne
ldrne r7, [r1, #4]
strd_post r10, r11, r0, r2
bne 1b
@ -196,9 +197,10 @@ function ff_put_pixels8_y2_no_rnd_armv6, export=1
uhadd8 r9, r5, r7
ldr r5, [r1, #4]
uhadd8 r12, r4, r6
ldr_pre r6, r1, r2
ldrc_pre ne, r6, r1, r2
uhadd8 r14, r5, r7
ldr r7, [r1, #4]
it ne
ldrne r7, [r1, #4]
stm r0, {r8,r9}
add r0, r0, r2
stm r0, {r12,r14}

View File

@ -26,7 +26,7 @@
void ff_vp3_idct_put_neon(uint8_t *dest, int line_size, int16_t *data);
void ff_vp3_idct_add_neon(uint8_t *dest, int line_size, int16_t *data);
void ff_vp3_idct_dc_add_neon(uint8_t *dest, int line_size, const int16_t *data);
void ff_vp3_idct_dc_add_neon(uint8_t *dest, int line_size, int16_t *data);
void ff_vp3_v_loop_filter_neon(uint8_t *, int, int *);
void ff_vp3_h_loop_filter_neon(uint8_t *, int, int *);

View File

@ -166,6 +166,10 @@ static int fic_decode_frame(AVCodecContext *avctx, void *data,
if (memcmp(src, fic_header, 7))
av_log(avctx, AV_LOG_WARNING, "Invalid FIC Header.\n");
/* Is it a skip frame? */
if (src[17])
goto skip;
nslices = src[13];
if (!nslices) {
av_log(avctx, AV_LOG_ERROR, "Zero slices found.\n");
@ -246,6 +250,7 @@ static int fic_decode_frame(AVCodecContext *avctx, void *data,
NULL, nslices, sizeof(ctx->slice_data[0])) < 0)
return ret;
skip:
*got_frame = 1;
if ((ret = av_frame_ref(data, ctx->frame)) < 0)
return ret;

View File

@ -214,6 +214,18 @@ static inline int get_se_golomb(GetBitContext *gb)
}
}
static inline int get_se_golomb_long(GetBitContext *gb)
{
unsigned int buf = get_ue_golomb_long(gb);
if (buf & 1)
buf = -(buf >> 1);
else
buf = (buf >> 1);
return buf;
}
static inline int svq3_get_se_golomb(GetBitContext *gb)
{
unsigned int buf;

View File

@ -283,7 +283,7 @@ static int decode_lt_rps(HEVCContext *s, LongTermRPS *rps, GetBitContext *gb)
static int set_sps(HEVCContext *s, const HEVCSPS *sps)
{
int ret;
unsigned num = 0, den = 0;
unsigned int num = 0, den = 0;
pic_arrays_free(s);
ret = pic_arrays_init(s, sps);

View File

@ -461,7 +461,7 @@ typedef struct HEVCSPS {
} HEVCSPS;
typedef struct HEVCPPS {
unsigned sps_id; ///< seq_parameter_set_id
unsigned int sps_id; ///< seq_parameter_set_id
uint8_t sign_data_hiding_flag;

View File

@ -611,8 +611,8 @@ int ff_hevc_decode_nal_sps(HEVCContext *s)
{
const AVPixFmtDescriptor *desc;
GetBitContext *gb = &s->HEVClc->gb;
int ret = 0;
int sps_id = 0;
int ret = 0;
unsigned int sps_id = 0;
int log2_diff_max_min_transform_block_size;
int bit_depth_chroma, start, vui_present, sublayer_ordering_info;
int i;
@ -993,8 +993,8 @@ int ff_hevc_decode_nal_pps(HEVCContext *s)
int pic_area_in_ctbs, pic_area_in_min_cbs, pic_area_in_min_tbs;
int log2_diff_ctb_min_tb_size;
int i, j, x, y, ctb_addr_rs, tile_id;
int ret = 0;
int pps_id = 0;
int ret = 0;
unsigned int pps_id = 0;
AVBufferRef *pps_buf;
HEVCPPS *pps = av_mallocz(sizeof(*pps));

View File

@ -190,7 +190,7 @@ static av_cold int libx265_encode_init(AVCodecContext *avctx)
for (i = 0; i < nnal; i++)
ctx->header_size += nal[i].sizeBytes;
ctx->header = av_malloc(ctx->header_size);
ctx->header = av_malloc(ctx->header_size + FF_INPUT_BUFFER_PADDING_SIZE);
if (!ctx->header) {
av_log(avctx, AV_LOG_ERROR,
"Cannot allocate HEVC header of size %d.\n", ctx->header_size);
@ -204,6 +204,13 @@ static av_cold int libx265_encode_init(AVCodecContext *avctx)
buf += nal[i].sizeBytes;
}
if (avctx->flags & CODEC_FLAG_GLOBAL_HEADER) {
avctx->extradata_size = ctx->header_size;
avctx->extradata = ctx->header;
ctx->header_size = 0;
ctx->header = NULL;
}
return 0;
}

View File

@ -55,7 +55,7 @@ static av_cold int msrle_decode_init(AVCodecContext *avctx)
s->avctx = avctx;
switch (avctx->bits_per_coded_sample & 0x1f) {
switch (avctx->bits_per_coded_sample) {
case 1:
avctx->pix_fmt = AV_PIX_FMT_MONOWHITE;
break;

View File

@ -727,8 +727,6 @@ void ff_thread_flush(AVCodecContext *avctx)
if (fctx->prev_thread) {
if (fctx->prev_thread != &fctx->threads[0])
update_context_from_thread(fctx->threads[0].avctx, fctx->prev_thread->avctx, 0);
if (avctx->codec->flush)
avctx->codec->flush(fctx->threads[0].avctx);
}
fctx->next_decoding = fctx->next_finished = 0;
@ -741,6 +739,9 @@ void ff_thread_flush(AVCodecContext *avctx)
av_frame_unref(p->frame);
release_delayed_buffers(p);
if (avctx->codec->flush)
avctx->codec->flush(p->avctx);
}
}

View File

@ -109,7 +109,7 @@ static av_cold int raw_init_decoder(AVCodecContext *avctx)
if ( avctx->codec_tag == MKTAG('r','a','w',' ')
|| avctx->codec_tag == MKTAG('N','O','1','6'))
avctx->pix_fmt = avpriv_find_pix_fmt(pix_fmt_bps_mov,
avctx->bits_per_coded_sample & 0x1f);
avctx->bits_per_coded_sample);
else if (avctx->codec_tag == MKTAG('W', 'R', 'A', 'W'))
avctx->pix_fmt = avpriv_find_pix_fmt(pix_fmt_bps_avi,
avctx->bits_per_coded_sample);
@ -135,7 +135,7 @@ static av_cold int raw_init_decoder(AVCodecContext *avctx)
memset(context->palette->data, 0, AVPALETTE_SIZE);
}
if (((avctx->bits_per_coded_sample & 0x1f) == 4 || (avctx->bits_per_coded_sample & 0x1f) == 2) &&
if ((avctx->bits_per_coded_sample == 4 || avctx->bits_per_coded_sample == 2) &&
avctx->pix_fmt == AV_PIX_FMT_PAL8 &&
(!avctx->codec_tag || avctx->codec_tag == MKTAG('r','a','w',' '))) {
context->is_2_4_bpp = 1;
@ -209,14 +209,14 @@ static int raw_decode(AVCodecContext *avctx, void *data, int *got_frame,
int i;
uint8_t *dst = frame->buf[0]->data;
buf_size = context->frame_size - AVPALETTE_SIZE;
if ((avctx->bits_per_coded_sample & 0x1f) == 4) {
if (avctx->bits_per_coded_sample == 4) {
for (i = 0; 2 * i + 1 < buf_size && i<avpkt->size; i++) {
dst[2 * i + 0] = buf[i] >> 4;
dst[2 * i + 1] = buf[i] & 15;
}
linesize_align = 8;
} else {
av_assert0((avctx->bits_per_coded_sample & 0x1f) == 2);
av_assert0(avctx->bits_per_coded_sample == 2);
for (i = 0; 4 * i + 3 < buf_size && i<avpkt->size; i++) {
dst[4 * i + 0] = buf[i] >> 6;
dst[4 * i + 1] = buf[i] >> 4 & 3;

View File

@ -730,7 +730,10 @@ static int rv10_decode_frame(AVCodecContext *avctx,
offset + FFMAX(size, size2) > buf_size)
return AVERROR_INVALIDDATA;
if (rv10_decode_packet(avctx, buf + offset, size, size2) > 8 * size)
if ((ret = rv10_decode_packet(avctx, buf + offset, size, size2)) < 0)
return ret;
if (ret > 8 * size)
i++;
}

View File

@ -1058,11 +1058,11 @@ static int push_samples(ATempoContext *atempo,
outlink->time_base);
ret = ff_filter_frame(outlink, atempo->dst_buffer);
if (ret < 0)
return ret;
atempo->dst_buffer = NULL;
atempo->dst = NULL;
atempo->dst_end = NULL;
if (ret < 0)
return ret;
atempo->nsamples_out += n_out;
return 0;

View File

@ -81,7 +81,7 @@ static void *load_sym(AVFilterContext *ctx, const char *sym_name)
Frei0rContext *s = ctx->priv;
void *sym = dlsym(s->dl_handle, sym_name);
if (!sym)
av_log(ctx, AV_LOG_ERROR, "Could not find symbol '%s' in loaded module\n", sym_name);
av_log(ctx, AV_LOG_ERROR, "Could not find symbol '%s' in loaded module.\n", sym_name);
return sym;
}
@ -129,7 +129,7 @@ static int set_param(AVFilterContext *ctx, f0r_param_info_t info, int index, cha
return 0;
fail:
av_log(ctx, AV_LOG_ERROR, "Invalid value '%s' for parameter '%s'\n",
av_log(ctx, AV_LOG_ERROR, "Invalid value '%s' for parameter '%s'.\n",
param, info.name);
return AVERROR(EINVAL);
}
@ -202,11 +202,11 @@ static int set_params(AVFilterContext *ctx, const char *params)
default: /* F0R_PARAM_STRING */
v = s;
s->get_param_value(s->instance, v, i);
av_log(ctx, AV_LOG_DEBUG, "'%s'\n", s);
av_log(ctx, AV_LOG_DEBUG, "'%s'", s);
break;
}
#endif
av_log(ctx, AV_LOG_VERBOSE, "\n");
av_log(ctx, AV_LOG_VERBOSE, ".\n");
}
return 0;
@ -217,7 +217,7 @@ static int load_path(AVFilterContext *ctx, void **handle_ptr, const char *prefix
char *path = av_asprintf("%s%s%s", prefix, name, SLIBSUF);
if (!path)
return AVERROR(ENOMEM);
av_log(ctx, AV_LOG_DEBUG, "Looking for frei0r effect in '%s'\n", path);
av_log(ctx, AV_LOG_DEBUG, "Looking for frei0r effect in '%s'.\n", path);
*handle_ptr = dlopen(path, RTLD_NOW|RTLD_LOCAL);
av_free(path);
return 0;
@ -288,7 +288,7 @@ static av_cold int frei0r_init(AVFilterContext *ctx,
return ret;
}
if (!s->dl_handle) {
av_log(ctx, AV_LOG_ERROR, "Could not find module '%s'\n", dl_name);
av_log(ctx, AV_LOG_ERROR, "Could not find module '%s'.\n", dl_name);
return AVERROR(EINVAL);
}
@ -304,7 +304,7 @@ static av_cold int frei0r_init(AVFilterContext *ctx,
return AVERROR(EINVAL);
if (f0r_init() < 0) {
av_log(ctx, AV_LOG_ERROR, "Could not init the frei0r module\n");
av_log(ctx, AV_LOG_ERROR, "Could not init the frei0r module.\n");
return AVERROR(EINVAL);
}
@ -312,7 +312,7 @@ static av_cold int frei0r_init(AVFilterContext *ctx,
pi = &s->plugin_info;
if (pi->plugin_type != type) {
av_log(ctx, AV_LOG_ERROR,
"Invalid type '%s' for the plugin\n",
"Invalid type '%s' for this plugin\n",
pi->plugin_type == F0R_PLUGIN_TYPE_FILTER ? "filter" :
pi->plugin_type == F0R_PLUGIN_TYPE_SOURCE ? "source" :
pi->plugin_type == F0R_PLUGIN_TYPE_MIXER2 ? "mixer2" :
@ -359,7 +359,7 @@ static int config_input_props(AVFilterLink *inlink)
if (s->destruct && s->instance)
s->destruct(s->instance);
if (!(s->instance = s->construct(inlink->w, inlink->h))) {
av_log(ctx, AV_LOG_ERROR, "Impossible to load frei0r instance\n");
av_log(ctx, AV_LOG_ERROR, "Impossible to load frei0r instance.\n");
return AVERROR(EINVAL);
}
@ -476,7 +476,11 @@ static int source_config_props(AVFilterLink *outlink)
if (s->destruct && s->instance)
s->destruct(s->instance);
if (!(s->instance = s->construct(outlink->w, outlink->h))) {
av_log(ctx, AV_LOG_ERROR, "Impossible to load frei0r instance\n");
av_log(ctx, AV_LOG_ERROR, "Impossible to load frei0r instance.\n");
return AVERROR(EINVAL);
}
if (!s->params) {
av_log(ctx, AV_LOG_ERROR, "frei0r filter parameters not set.\n");
return AVERROR(EINVAL);
}

View File

@ -50,7 +50,7 @@ OBJS-$(CONFIG_RTPDEC) += rdt.o \
rtpdec_xiph.o \
srtp.o
OBJS-$(CONFIG_RTPENC_CHAIN) += rtpenc_chain.o rtp.o
OBJS-$(CONFIG_SHARED) += log2_tab.o
OBJS-$(CONFIG_SHARED) += log2_tab.o golomb_tab.o
# muxers/demuxers
OBJS-$(CONFIG_A64_MUXER) += a64.o rawenc.o
@ -217,7 +217,7 @@ OBJS-$(CONFIG_MM_DEMUXER) += mm.o
OBJS-$(CONFIG_MMF_DEMUXER) += mmf.o
OBJS-$(CONFIG_MMF_MUXER) += mmf.o rawenc.o
OBJS-$(CONFIG_MOV_DEMUXER) += mov.o isom.o mov_chan.o
OBJS-$(CONFIG_MOV_MUXER) += movenc.o isom.o avc.o \
OBJS-$(CONFIG_MOV_MUXER) += movenc.o isom.o avc.o hevc.o \
movenchint.o mov_chan.o rtp.o
OBJS-$(CONFIG_MP2_MUXER) += mp3enc.o rawenc.o id3v2enc.o
OBJS-$(CONFIG_MP3_DEMUXER) += mp3dec.o

1
libavformat/golomb_tab.c Normal file
View File

@ -0,0 +1 @@
#include "libavcodec/golomb.c"

1140
libavformat/hevc.c Normal file

File diff suppressed because it is too large Load Diff

98
libavformat/hevc.h Normal file
View File

@ -0,0 +1,98 @@
/*
* Copyright (c) 2014 Tim Walker <tdskywalker@gmail.com>
*
* This file is part of FFmpeg.
*
* FFmpeg is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* FFmpeg is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with FFmpeg; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
/**
* @file
* internal header for HEVC (de)muxer utilities
*/
#ifndef AVFORMAT_HEVC_H
#define AVFORMAT_HEVC_H
#include <stdint.h>
#include "avio.h"
/**
* Writes Annex B formatted HEVC NAL units to the provided AVIOContext.
*
* The NAL units are converted to an MP4-compatible format (start code prefixes
* are replaced by 4-byte size fields, as per ISO/IEC 14496-15).
*
* If filter_ps is non-zero, any HEVC parameter sets found in the input will be
* discarded, and *ps_count will be set to the number of discarded PS NAL units.
*
* @param pb address of the AVIOContext where the data shall be written
* @param buf_in address of the buffer holding the input data
* @param size size (in bytes) of the input buffer
* @param filter_ps whether to write parameter set NAL units to the output (0)
* or to discard them (non-zero)
* @param ps_count address of the variable where the number of discarded
* parameter set NAL units shall be written, may be NULL
* @return the amount (in bytes) of data written in case of success, a negative
* value corresponding to an AVERROR code in case of failure
*/
int ff_hevc_annexb2mp4(AVIOContext *pb, const uint8_t *buf_in,
int size, int filter_ps, int *ps_count);
/**
* Writes Annex B formatted HEVC NAL units to a data buffer.
*
* The NAL units are converted to an MP4-compatible format (start code prefixes
* are replaced by 4-byte size fields, as per ISO/IEC 14496-15).
*
* If filter_ps is non-zero, any HEVC parameter sets found in the input will be
* discarded, and *ps_count will be set to the number of discarded PS NAL units.
*
* On output, *size holds the size (in bytes) of the output data buffer.
*
* @param buf_in address of the buffer holding the input data
* @param size address of the variable holding the size (in bytes) of the input
* buffer (on input) and of the output buffer (on output)
* @param buf_out address of the variable holding the address of the output
* buffer
* @param filter_ps whether to write parameter set NAL units to the output (0)
* or to discard them (non-zero)
* @param ps_count address of the variable where the number of discarded
* parameter set NAL units shall be written, may be NULL
* @return the amount (in bytes) of data written in case of success, a negative
* value corresponding to an AVERROR code in case of failure
*/
int ff_hevc_annexb2mp4_buf(const uint8_t *buf_in, uint8_t **buf_out,
int *size, int filter_ps, int *ps_count);
/**
* Writes HEVC extradata (parameter sets, declarative SEI NAL units) to the
* provided AVIOContext.
*
* If the extradata is Annex B format, it gets converted to hvcC format before
* writing.
*
* @param pb address of the AVIOContext where the hvcC shall be written
* @param data address of the buffer holding the data needed to write the hvcC
* @param size size (in bytes) of the data buffer
* @param ps_array_completeness whether all parameter sets are in the hvcC (1)
* or there may be additional parameter sets in the bitstream (0)
* @return >=0 in case of success, a negative value corresponding to an AVERROR
* code in case of failure
*/
int ff_isom_write_hvcc(AVIOContext *pb, const uint8_t *data,
int size, int ps_array_completeness);
#endif /* AVFORMAT_HEVC_H */

View File

@ -33,6 +33,7 @@ const AVCodecTag ff_mp4_obj_type[] = {
{ AV_CODEC_ID_MOV_TEXT , 0x08 },
{ AV_CODEC_ID_MPEG4 , 0x20 },
{ AV_CODEC_ID_H264 , 0x21 },
{ AV_CODEC_ID_HEVC , 0x23 },
{ AV_CODEC_ID_AAC , 0x40 },
{ AV_CODEC_ID_MP4ALS , 0x40 }, /* 14496-3 ALS */
{ AV_CODEC_ID_MPEG2VIDEO , 0x61 }, /* MPEG2 Main */
@ -151,8 +152,8 @@ const AVCodecTag ff_codec_movvideo_tags[] = {
{ AV_CODEC_ID_RAWVIDEO, MKTAG('W', 'R', 'A', 'W') },
{ AV_CODEC_ID_HEVC, MKTAG('h', 'v', 'c', '1') }, /* HEVC/H.265 which indicates parameter sets shall not be in ES */
{ AV_CODEC_ID_HEVC, MKTAG('h', 'e', 'v', '1') }, /* HEVC/H.265 which indicates parameter sets may be in ES */
{ AV_CODEC_ID_HEVC, MKTAG('h', 'v', 'c', '1') }, /* HEVC/H.265 which indicates parameter sets shall not be in ES */
{ AV_CODEC_ID_H264, MKTAG('a', 'v', 'c', '1') }, /* AVC-1/H.264 */
{ AV_CODEC_ID_H264, MKTAG('a', 'i', '5', 'p') }, /* AVC-Intra 50M 720p24/30/60 */

View File

@ -22,6 +22,7 @@
* @todo better probing than extensions matching
*/
#define MODPLUG_STATIC
#include <libmodplug/modplug.h>
#include "libavutil/avstring.h"
#include "libavutil/eval.h"

View File

@ -942,7 +942,9 @@ static int mkv_write_tag(AVFormatContext *s, AVDictionary *m, unsigned int eleme
end_ebml_master(s->pb, targets);
while ((t = av_dict_get(m, "", t, AV_DICT_IGNORE_SUFFIX)))
if (av_strcasecmp(t->key, "title") && av_strcasecmp(t->key, "stereo_mode"))
if (av_strcasecmp(t->key, "title") &&
av_strcasecmp(t->key, "stereo_mode") &&
av_strcasecmp(t->key, "encoding_tool"))
mkv_write_simpletag(s->pb, t);
end_ebml_master(s->pb, tag);
@ -1147,7 +1149,10 @@ static int mkv_write_header(AVFormatContext *s)
segment_uid[i] = av_lfg_get(&lfg);
put_ebml_string(pb, MATROSKA_ID_MUXINGAPP , LIBAVFORMAT_IDENT);
put_ebml_string(pb, MATROSKA_ID_WRITINGAPP, LIBAVFORMAT_IDENT);
if ((tag = av_dict_get(s->metadata, "encoding_tool", NULL, 0)))
put_ebml_string(pb, MATROSKA_ID_WRITINGAPP, tag->value);
else
put_ebml_string(pb, MATROSKA_ID_WRITINGAPP, LIBAVFORMAT_IDENT);
put_ebml_binary(pb, MATROSKA_ID_SEGMENTUID, segment_uid, 16);
} else {
const char *ident = "Lavf";

View File

@ -1330,6 +1330,7 @@ static void mov_parse_stsd_video(MOVContext *c, AVIOContext *pb,
if (color_greyscale) {
int color_index, color_dec;
/* compute the greyscale palette */
st->codec->bits_per_coded_sample = color_depth;
color_count = 1 << color_depth;
color_index = 255;
color_dec = 256 / (color_count - 1);

View File

@ -39,6 +39,7 @@
#include "libavutil/mathematics.h"
#include "libavutil/opt.h"
#include "libavutil/dict.h"
#include "hevc.h"
#include "rtpenc.h"
#include "mov_chan.h"
@ -772,6 +773,16 @@ static int mov_write_avcc_tag(AVIOContext *pb, MOVTrack *track)
return update_size(pb, pos);
}
static int mov_write_hvcc_tag(AVIOContext *pb, MOVTrack *track)
{
int64_t pos = avio_tell(pb);
avio_wb32(pb, 0);
ffio_wfourcc(pb, "hvcC");
ff_isom_write_hvcc(pb, track->vos_data, track->vos_len, 0);
return update_size(pb, pos);
}
/* also used by all avid codecs (dv, imx, meridien) and their variants */
static int mov_write_avid_tag(AVIOContext *pb, MOVTrack *track)
{
@ -828,6 +839,7 @@ static int mp4_get_codec_tag(AVFormatContext *s, MOVTrack *track)
return 0;
if (track->enc->codec_id == AV_CODEC_ID_H264) tag = MKTAG('a','v','c','1');
else if (track->enc->codec_id == AV_CODEC_ID_HEVC) tag = MKTAG('h','e','v','1');
else if (track->enc->codec_id == AV_CODEC_ID_AC3) tag = MKTAG('a','c','-','3');
else if (track->enc->codec_id == AV_CODEC_ID_DIRAC) tag = MKTAG('d','r','a','c');
else if (track->enc->codec_id == AV_CODEC_ID_MOV_TEXT) tag = MKTAG('t','x','3','g');
@ -906,11 +918,14 @@ static AVRational find_fps(AVFormatContext *s, AVStream *st)
static int mov_get_mpeg2_xdcam_codec_tag(AVFormatContext *s, MOVTrack *track)
{
int tag = MKTAG('m', '2', 'v', '1'); //fallback tag
int tag = track->enc->codec_tag;
int interlaced = track->enc->field_order > AV_FIELD_PROGRESSIVE;
AVStream *st = track->st;
int rate = av_q2d(find_fps(s, st));
if (!tag)
tag = MKTAG('m', '2', 'v', '1'); //fallback tag
if (track->enc->pix_fmt == AV_PIX_FMT_YUV420P) {
if (track->enc->width == 1280 && track->enc->height == 720) {
if (!interlaced) {
@ -1226,6 +1241,8 @@ static int mov_write_video_tag(AVIOContext *pb, MOVTrack *track)
avio_wb32(pb, 0);
} else if (track->enc->codec_id == AV_CODEC_ID_DNXHD)
mov_write_avid_tag(pb, track);
else if (track->enc->codec_id == AV_CODEC_ID_HEVC)
mov_write_hvcc_tag(pb, track);
else if (track->enc->codec_id == AV_CODEC_ID_H264) {
mov_write_avcc_tag(pb, track);
if (track->mode == MODE_IPOD)
@ -2208,7 +2225,8 @@ static int mov_write_ilst_tag(AVIOContext *pb, MOVMuxContext *mov,
mov_write_string_metadata(s, pb, "\251wrt", "composer" , 1);
mov_write_string_metadata(s, pb, "\251alb", "album" , 1);
mov_write_string_metadata(s, pb, "\251day", "date" , 1);
mov_write_string_tag(pb, "\251too", LIBAVFORMAT_IDENT, 0, 1);
if (!mov_write_string_metadata(s, pb, "\251too", "encoding_tool", 1))
mov_write_string_tag(pb, "\251too", LIBAVFORMAT_IDENT, 0, 1);
mov_write_string_metadata(s, pb, "\251cmt", "comment" , 1);
mov_write_string_metadata(s, pb, "\251gen", "genre" , 1);
mov_write_string_metadata(s, pb, "\251cpy", "copyright", 1);
@ -3337,6 +3355,15 @@ int ff_mov_write_packet(AVFormatContext *s, AVPacket *pkt)
} else {
size = ff_avc_parse_nal_units(pb, pkt->data, pkt->size);
}
} else if (enc->codec_id == AV_CODEC_ID_HEVC && trk->vos_len > 6 &&
(AV_RB24(trk->vos_data) == 1 || AV_RB32(trk->vos_data) == 1)) {
/* extradata is Annex B, assume the bitstream is too and convert it */
if (trk->hint_track >= 0 && trk->hint_track < mov->nb_streams) {
ff_hevc_annexb2mp4_buf(pkt->data, &reformatted_data, &size, 0, NULL);
avio_write(pb, reformatted_data, size);
} else {
size = ff_hevc_annexb2mp4(pb, pkt->data, pkt->size, 0, NULL);
}
} else {
avio_write(pb, pkt->data, size);
}

View File

@ -384,7 +384,7 @@ static int vorbis_packet(AVFormatContext *s, int idx)
* here we parse the duration of each packet in the first page and compare
* the total duration to the page granule to find the encoder delay and
* set the first timestamp */
if ((!os->lastpts || os->lastpts == AV_NOPTS_VALUE) && !(os->flags & OGG_FLAG_EOS)) {
if ((!os->lastpts || os->lastpts == AV_NOPTS_VALUE) && !(os->flags & OGG_FLAG_EOS) && (int64_t)os->granule>=0) {
int seg, d;
uint8_t *last_pkt = os->buf + os->pstart;
uint8_t *next_pkt = last_pkt;

View File

@ -216,6 +216,13 @@ T ldr \rt, [\rn]
T add \rn, \rn, \rm
.endm
.macro ldrc_pre cc, rt, rn, rm:vararg
A ldr\cc \rt, [\rn, \rm]!
T itt \cc
T add\cc \rn, \rn, \rm
T ldr\cc \rt, [\rn]
.endm
.macro ldrd_reg rt, rt2, rn, rm
A ldrd \rt, \rt2, [\rn, \rm]
T add \rt, \rn, \rm

View File

@ -117,35 +117,6 @@ void av_buffer_unref(AVBufferRef **buf)
}
}
int av_buffer_release(AVBufferRef **buf, uint8_t **data)
{
AVBuffer *b;
int ret = 0;
if (data)
*data = NULL;
if (!buf || !*buf)
return 0;
b = (*buf)->buffer;
av_freep(buf);
if (data && avpriv_atomic_int_get(&b->refcount) > 1) {
*data = av_memdup(b->data, b->size);
if (!*data)
ret = AVERROR(ENOMEM);
}
if (!avpriv_atomic_int_add_and_fetch(&b->refcount, -1)) {
if (data && !*data) {
ret = 0;
*data = b->data;
} else
b->free(b->opaque, b->data);
av_freep(&b);
}
return ret;
}
int av_buffer_is_writable(const AVBufferRef *buf)
{
if (buf->buffer->flags & AV_BUFFER_FLAG_READONLY)

View File

@ -154,18 +154,6 @@ AVBufferRef *av_buffer_ref(AVBufferRef *buf);
*/
void av_buffer_unref(AVBufferRef **buf);
/**
* Free a given reference and pass underlaying data to user provided pointer.
* If there is more than one reference then data is copied.
*
* @param buf the reference to be released. The pointer is set to NULL on return.
* @param data pointer to be passed with underlaying data.
* @return 0 on success, a negative AVERROR on failure.
*
* @note on error buffer is properly released and *data is set to NULL.
*/
int av_buffer_release(AVBufferRef **buf, uint8_t **data);
/**
* @return 1 if the caller may write to the data referred to by buf (which is
* true if and only if buf is the only reference to the underlying AVBuffer).

View File

@ -113,7 +113,7 @@ typedef struct AVFloatDSPContext {
* constraints: 32-byte aligned
* @param src1 second input vector
* constraints: 32-byte aligned
* @param src1 third input vector
* @param src2 third input vector
* constraints: 32-byte aligned
* @param len number of elements in the input
* constraints: multiple of 16
@ -132,8 +132,6 @@ typedef struct AVFloatDSPContext {
* constraints: 32-byte aligned
* @param src1 second input vector
* constraints: 32-byte aligned
* @param src1 third input vector
* constraints: 32-byte aligned
* @param len number of elements in the input
* constraints: multiple of 16
*/

View File

@ -596,7 +596,7 @@ AVFrame *av_frame_alloc(void);
void av_frame_free(AVFrame **frame);
/**
* Setup a new reference to the data described by a given frame.
* Set up a new reference to the data described by the source frame.
*
* Copy frame properties from src to dst and create a new reference for each
* AVBufferRef from src.

View File

@ -26,6 +26,10 @@
#include "common.h"
#if defined(__cplusplus) && !defined(__STDC_FORMAT_MACROS) && !defined(PRId64)
#error missing -D__STDC_FORMAT_MACROS / #define __STDC_FORMAT_MACROS
#endif
#define AV_TS_MAX_STRING_SIZE 32
/**

View File

@ -37,14 +37,14 @@
#define ftello(x) _ftelli64(x)
#endif
#define FFMIN(a,b) ((a) > (b) ? (b) : (a))
#define MIN(a,b) ((a) > (b) ? (b) : (a))
#define BE_16(x) ((((uint8_t*)(x))[0] << 8) | ((uint8_t*)(x))[1])
#define BE_32(x) ((((uint8_t*)(x))[0] << 24) | \
(((uint8_t*)(x))[1] << 16) | \
(((uint8_t*)(x))[2] << 8) | \
((uint8_t*)(x))[3])
#define BE_32(x) (((uint32_t)(((uint8_t*)(x))[0]) << 24) | \
(((uint8_t*)(x))[1] << 16) | \
(((uint8_t*)(x))[2] << 8) | \
((uint8_t*)(x))[3])
#define BE_64(x) (((uint64_t)(((uint8_t*)(x))[0]) << 56) | \
((uint64_t)(((uint8_t*)(x))[1]) << 48) | \
@ -89,7 +89,7 @@ int main(int argc, char *argv[])
uint32_t atom_type = 0;
uint64_t atom_size = 0;
uint64_t atom_offset = 0;
uint64_t last_offset;
int64_t last_offset;
unsigned char *moov_atom = NULL;
unsigned char *ftyp_atom = NULL;
uint64_t moov_atom_size;
@ -124,7 +124,7 @@ int main(int argc, char *argv[])
if (fread(atom_bytes, ATOM_PREAMBLE_SIZE, 1, infile) != 1) {
break;
}
atom_size = (uint32_t) BE_32(&atom_bytes[0]);
atom_size = BE_32(&atom_bytes[0]);
atom_type = BE_32(&atom_bytes[4]);
/* keep ftyp atom */
@ -137,9 +137,9 @@ int main(int argc, char *argv[])
atom_size);
goto error_out;
}
if ( fseeko(infile, -ATOM_PREAMBLE_SIZE, SEEK_CUR)
|| fread(ftyp_atom, atom_size, 1, infile) != 1
|| (start_offset = ftello(infile))<0) {
if (fseeko(infile, -ATOM_PREAMBLE_SIZE, SEEK_CUR) ||
fread(ftyp_atom, atom_size, 1, infile) != 1 ||
(start_offset = ftello(infile)) < 0) {
perror(argv[1]);
goto error_out;
}
@ -155,7 +155,7 @@ int main(int argc, char *argv[])
} else {
ret = fseeko(infile, atom_size - ATOM_PREAMBLE_SIZE, SEEK_CUR);
}
if(ret) {
if (ret) {
perror(argv[1]);
goto error_out;
}
@ -203,6 +203,10 @@ int main(int argc, char *argv[])
goto error_out;
}
last_offset = ftello(infile);
if (last_offset < 0) {
perror(argv[1]);
goto error_out;
}
moov_atom_size = atom_size;
moov_atom = malloc(moov_atom_size);
if (!moov_atom) {
@ -230,18 +234,18 @@ int main(int argc, char *argv[])
atom_type = BE_32(&moov_atom[i]);
if (atom_type == STCO_ATOM) {
printf(" patching stco atom...\n");
atom_size = (uint32_t)BE_32(&moov_atom[i - 4]);
atom_size = BE_32(&moov_atom[i - 4]);
if (i + atom_size - 4 > moov_atom_size) {
printf(" bad atom size\n");
goto error_out;
}
offset_count = BE_32(&moov_atom[i + 8]);
if (i + 12LL + offset_count * 4LL > moov_atom_size) {
printf(" bad atom size\n");
if (i + 12 + offset_count * UINT64_C(4) > moov_atom_size) {
printf(" bad atom size/element count\n");
goto error_out;
}
for (j = 0; j < offset_count; j++) {
current_offset = (uint32_t)BE_32(&moov_atom[i + 12 + j * 4]);
current_offset = BE_32(&moov_atom[i + 12 + j * 4]);
current_offset += moov_atom_size;
moov_atom[i + 12 + j * 4 + 0] = (current_offset >> 24) & 0xFF;
moov_atom[i + 12 + j * 4 + 1] = (current_offset >> 16) & 0xFF;
@ -251,14 +255,14 @@ int main(int argc, char *argv[])
i += atom_size - 4;
} else if (atom_type == CO64_ATOM) {
printf(" patching co64 atom...\n");
atom_size = (uint32_t)BE_32(&moov_atom[i - 4]);
atom_size = BE_32(&moov_atom[i - 4]);
if (i + atom_size - 4 > moov_atom_size) {
printf(" bad atom size\n");
goto error_out;
}
offset_count = BE_32(&moov_atom[i + 8]);
if (i + 12LL + offset_count * 8LL > moov_atom_size) {
printf(" bad atom size\n");
if (i + 12 + offset_count * UINT64_C(8) > moov_atom_size) {
printf(" bad atom size/element count\n");
goto error_out;
}
for (j = 0; j < offset_count; j++) {
@ -316,7 +320,7 @@ int main(int argc, char *argv[])
}
/* copy the remainder of the infile, from offset 0 -> last_offset - 1 */
bytes_to_copy = FFMIN(COPY_BUFFER_SIZE, last_offset);
bytes_to_copy = MIN(COPY_BUFFER_SIZE, last_offset);
copy_buffer = malloc(bytes_to_copy);
if (!copy_buffer) {
printf("could not allocate %d bytes for copy_buffer\n", bytes_to_copy);
@ -324,7 +328,7 @@ int main(int argc, char *argv[])
}
printf(" copying rest of file...\n");
while (last_offset) {
bytes_to_copy = FFMIN(bytes_to_copy, last_offset);
bytes_to_copy = MIN(bytes_to_copy, last_offset);
if (fread(copy_buffer, bytes_to_copy, 1, infile) != 1) {
perror(argv[1]);