Commit Graph

48729 Commits

Author SHA1 Message Date
Michael Niedermayer
2eec98125e swr: mark noise data for noise shaping as const
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-10 18:07:32 +01:00
Michael Niedermayer
558aa6cab7 swr: add seperate in/out pointers to the noise shaping code
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-10 18:06:19 +01:00
Michael Niedermayer
fca51256d4 swr: rename dither_pos to noise_pos
THis more closely matches what the field represents

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-10 18:01:26 +01:00
Michael Niedermayer
36055aa876 idcin: fix memleak
Found-by: valgrind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-10 17:26:03 +01:00
Michael Niedermayer
91da6b97c7 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  rtpdec_vp8: Don't trim too much data from broken frames
  rtpdec_vp8: Simplify code by using an existing helper function

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-10 13:07:25 +01:00
Carl Eugen Hoyos
b563afe6fa Do not allow arbitrary packet size in aac decoder.
Fixes a crash with a file containing a 400MB packet reported in bug 420.
2013-01-10 13:03:15 +01:00
Michael Niedermayer
ac6e074fb7 Merge commit 'ed79093222ceb42f0c3a39095a69af0b32be5450'
* commit 'ed79093222ceb42f0c3a39095a69af0b32be5450':
  rtpdec: Add a terminating null byte at the end of the SDES/CNAME
  yuv4mpeg: do not use deprecated functions
  oggdec: fix faulty cleanup prototype
  idcin: return 0 from idcin_read_packet() on success.

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-10 12:57:08 +01:00
Michael Niedermayer
56ca871fb3 Merge commit '5d0450461ff729be5f531d333d29754155e406c5'
* commit '5d0450461ff729be5f531d333d29754155e406c5':
  idcin: better error handling
  idcin: check for integer overflow when calling av_get_packet()

Conflicts:
	libavformat/idcin.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-10 12:52:02 +01:00
Michael Niedermayer
a0dbe2a58c Merge commit '7040e479a1530b2eda4b89a182d5eb50a77bd907'
* commit '7040e479a1530b2eda4b89a182d5eb50a77bd907':
  idcin: allow seeking back to the first packet
  idcin: set AV_PKT_FLAG_KEY for video packets with a palette

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-10 12:45:46 +01:00
Michael Niedermayer
6e44662b05 Merge commit 'ccc0ffb1ba3fc1adb05a9f56dfc26131e61db3fb'
* commit 'ccc0ffb1ba3fc1adb05a9f56dfc26131e61db3fb':
  idcin: set start_time and packet duration instead of manually tracking pts.
  idcin: set channel_layout

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-10 12:40:41 +01:00
Michael Niedermayer
8d691f8777 Merge commit '12c2530b1d87fa94f81ea97df575b77c825e6f4f'
* commit '12c2530b1d87fa94f81ea97df575b77c825e6f4f':
  idcin: fix check for presence of an audio stream
  idcin: validate header parameters

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-10 12:33:50 +01:00
Michael Niedermayer
65b8527993 Merge commit 'f7bf72a4a1146a7583577c9bdc066767e1ba3c6a'
* commit 'f7bf72a4a1146a7583577c9bdc066767e1ba3c6a':
  idcinvideo: correctly set AVFrame defaults
  yadif: Port inline assembly to yasm
  au: remove unnecessary casts
  au: return AVERROR codes instead of -1

Conflicts:
	libavcodec/idcinvideo.c
	libavfilter/x86/yadif_template.c
	libavformat/au.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-10 12:27:16 +01:00
Michael Niedermayer
8c7de73e20 Merge commit 'fd9147f11456a7e39a998d7270684922a2a46e6d'
* commit 'fd9147f11456a7e39a998d7270684922a2a46e6d':
  au: cosmetics: pretty-print and remove pointless comments

Conflicts:
	libavformat/au.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-10 12:19:22 +01:00
Michael Niedermayer
dc5767ff0a Merge commit 'c88d245c9866e48cb8a238b7564964c1fcf3315f'
* commit 'c88d245c9866e48cb8a238b7564964c1fcf3315f':
  au: use ff_raw_write_packet()
  au: set stream start time and packet durations

Conflicts:
	libavformat/au.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-10 12:05:54 +01:00
Michael Niedermayer
452f632903 Merge commit 'af68a2baae6761044cbed95575e8bcfebf55c6f1'
* commit 'af68a2baae6761044cbed95575e8bcfebf55c6f1':
  au: use %u when printing id and channels since they are unsigned
  au: validate sample rate

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-10 11:21:03 +01:00
Michael Niedermayer
be894d6cae Merge commit 'c837b38dd33a11c3810e988a60193a858eb4f58c'
* commit 'c837b38dd33a11c3810e988a60193a858eb4f58c':
  au: move skipping of unused data to before parameter validation
  au: do not arbitrarily limit channel count

Conflicts:
	libavformat/au.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-10 11:12:08 +01:00
André Pankratz
0287eea914 lavfi/yadif: fix shorthand/option mismatch
Fix trac ticket #2128.

Signed-off-by: Stefano Sabatini <stefasab@gmail.com>
2013-01-10 11:01:14 +01:00
Michael Niedermayer
4cd89022e7 Merge commit '2613de88051818abafccb98646394341887acb3a'
We dont use au_read_packet() anymore and block_align is already set.
Thus nothing had to be merged from these.

* commit '2613de88051818abafccb98646394341887acb3a':
  au: do not set pkt->size directly
  au: set block_align and use it in au_read_packet()

Conflicts:
	libavformat/au.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-10 10:56:30 +01:00
Michael Niedermayer
70a65ecabf Merge commit '9a7b56883d1333cdfcdf0fa7584a333841b86114'
* commit '9a7b56883d1333cdfcdf0fa7584a333841b86114':
  au: set bit rate
  au: validate bits-per-sample separately from codec tag
  rtpdec_vp8: Mark broken packets with AV_PKT_FLAG_CORRUPT

Conflicts:
	libavformat/au.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-10 10:18:35 +01:00
Carl Eugen Hoyos
f023003ce6 Fix compilation with --disable-everything. 2013-01-10 10:04:46 +01:00
Martin Storsjö
76c40fbef0 rtpdec_vp8: Don't trim too much data from broken frames
Previously, for broken frames, we only returned the first partition
of the frame (we would append all the received packets to the packet
buffer, then set pkt->size to the size of the first partition, since
the rest of the frame could have lost data inbetween) - now instead
return the full buffered data we have, but don't append anything more
to the buffer after the lost packet discontinuity. Decoding the
truncated packet should hopefully get better quality than trimming out
everything after the first partition.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-01-10 09:43:01 +02:00
Martin Storsjö
3b366c3aa0 rtpdec_vp8: Simplify code by using an existing helper function
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-01-10 09:41:44 +02:00
Martin Storsjö
ed79093222 rtpdec: Add a terminating null byte at the end of the SDES/CNAME
This is required by RFC 3550 (section 6.5):

   The list of items in each chunk MUST be terminated by one or more
   null octets, the first of which is interpreted as an item type of
   zero to denote the end of the list.

This was implicitly added as padding before, unless the host name
length matched up so no padding was added.

This makes wireshark parse the packets properly if other RTCP items
are appended to the same packet.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-01-10 09:40:49 +02:00
Michael Niedermayer
6471f63da2 wmalosslessdec: make arrays indexed by ch large enough for maximum number of channels
Fixes out of array accesses

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-10 04:57:50 +01:00
Michael Niedermayer
7cb46b5191 targa: use checked bytestream read
Fix out of array read

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-10 04:57:50 +01:00
Michael Niedermayer
2b12d1ffd8 qdm2: fix out of stack array read.
The read value is not used when its outside the array.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-10 04:57:50 +01:00
Michael Niedermayer
2672b2c1d2 swr: scale data down in noise shaping to avoid cliping
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-10 01:44:15 +01:00
Michael Niedermayer
0b60fc94aa swr: reorder the operations in the noise shaping code
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-10 00:27:04 +01:00
Michael Niedermayer
ead3a2a37e swr: add noise_scale field to seperate it from the noise shaping scales
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-10 00:25:09 +01:00
Michael Niedermayer
6908ded20e swr: fix the noise sample type for noise shaping
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-09 23:28:09 +01:00
Michael Niedermayer
3ef06f3415 swr: split swri_dither_init() out
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-09 23:28:08 +01:00
Michael Niedermayer
dc60ecdbeb doc: add noise shaping dithers
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-09 23:28:08 +01:00
Carl Eugen Hoyos
c20ce9ad69 Add -movflags rtphint documentation. 2013-01-09 23:13:40 +01:00
Luca Barbato
a800fd5fc7 yuv4mpeg: do not use deprecated functions
Use the libavutil replacement.
2013-01-09 21:07:49 +01:00
Luca Barbato
fba8e5b608 oggdec: fix faulty cleanup prototype 2013-01-09 21:07:48 +01:00
Justin Ruggles
5d0450461f idcin: better error handling
Add some additional checks for EOF and print error messages on an incomplete
header or packet.

FATE reference updated for id-cin-video due to the demuxer no longer
returning a partial video packet at EOF.
2013-01-09 14:49:07 -05:00
Justin Ruggles
06deaf8ad3 idcin: return 0 from idcin_read_packet() on success.
This matches the AVInputFormat.read_packet() API.
2013-01-09 14:49:07 -05:00
Justin Ruggles
7040e479a1 idcin: allow seeking back to the first packet
Also, do not allow seek-by-byte, as there is no way to find the next packet
boundary.
2013-01-09 14:49:06 -05:00
Justin Ruggles
ccc0ffb1ba idcin: set start_time and packet duration instead of manually tracking pts.
Also, use 1 / sample_rate for audio stream time_base.
2013-01-09 14:49:06 -05:00
Justin Ruggles
12c2530b1d idcin: fix check for presence of an audio stream 2013-01-09 14:49:06 -05:00
Justin Ruggles
f7bf72a4a1 idcinvideo: correctly set AVFrame defaults 2013-01-09 14:49:06 -05:00
Justin Ruggles
33f58c3616 idcin: check for integer overflow when calling av_get_packet()
chunk_size is unsigned 32-bit, but av_get_packet() takes a signed int as the
packet size.
2013-01-09 14:49:06 -05:00
Justin Ruggles
49543373f3 idcin: set AV_PKT_FLAG_KEY for video packets with a palette 2013-01-09 14:49:06 -05:00
Justin Ruggles
4b840930da idcin: set channel_layout 2013-01-09 14:49:06 -05:00
Justin Ruggles
b0c96e0613 idcin: validate header parameters
Avoids using unsupported parameters and signed integer overflows.
2013-01-09 14:49:06 -05:00
Michael Niedermayer
8514d5bcf7 swr: remove unused variable
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-09 18:41:40 +01:00
Michael Niedermayer
3ab1970612 swr: move dither related fields to their own context
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-09 18:41:12 +01:00
Daniel Kang
899157b308 yadif: Port inline assembly to yasm
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-01-09 18:41:02 +01:00
Michael Niedermayer
ba1314c2ef swr: update copyright years of a few files iam working on
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-09 18:30:01 +01:00
Michael Niedermayer
82742294b7 swr: Implement Noise shaping dither
The following variants are implemented:
lipshitz noise shaping dither
shibata noise shaping dither
low shibata noise shaping dither
high shibata noise shaping dither
f-weighted noise shaping dither
modified-e-weighted noise shaping dither
improved-e-weighted noise shaping dither

Data tables taken from SOX

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-01-09 18:25:06 +01:00