]> git.sesse.net Git - ffmpeg/log
ffmpeg
8 years agompegvideo_enc: export vbv_delay in side data
Anton Khirnov [Sun, 4 Oct 2015 10:19:26 +0000 (12:19 +0200)]
mpegvideo_enc: export vbv_delay in side data

Deprecate AVCodecContext.vbv_delay

8 years agompegvideo_enc: export CPB props side data
Anton Khirnov [Sat, 3 Oct 2015 13:19:10 +0000 (15:19 +0200)]
mpegvideo_enc: export CPB props side data

8 years agolibx264: export CPB props side data
Anton Khirnov [Sat, 3 Oct 2015 13:19:10 +0000 (15:19 +0200)]
libx264: export CPB props side data

8 years agolibvpxenc: export CPB props side data
Anton Khirnov [Sat, 3 Oct 2015 13:19:10 +0000 (15:19 +0200)]
libvpxenc: export CPB props side data

8 years agolibopenh264enc: export CPB props side data
Anton Khirnov [Sat, 3 Oct 2015 13:19:10 +0000 (15:19 +0200)]
libopenh264enc: export CPB props side data

8 years agolavc: add a packet side data type for VBV-like parameters
Anton Khirnov [Wed, 22 Jul 2015 12:04:20 +0000 (14:04 +0200)]
lavc: add a packet side data type for VBV-like parameters

8 years agoavconv: pass the global codec side data to the muxer
Anton Khirnov [Sun, 4 Oct 2015 11:17:41 +0000 (13:17 +0200)]
avconv: pass the global codec side data to the muxer

8 years agolavc: add stream-global packet side data
Anton Khirnov [Wed, 22 Jul 2015 12:39:30 +0000 (14:39 +0200)]
lavc: add stream-global packet side data

This is similar to what is done for AVStream.

8 years agoavpacket: add a function for wrapping existing data as side data
Anton Khirnov [Sun, 4 Oct 2015 10:08:20 +0000 (12:08 +0200)]
avpacket: add a function for wrapping existing data as side data

8 years agoh264: derive the delay from the level when it's not present
Anton Khirnov [Tue, 20 Oct 2015 17:04:57 +0000 (19:04 +0200)]
h264: derive the delay from the level when it's not present

Fall back to maximum DPB size if the level is unknown.

This should be more spec-compliant and does not depend on the caller
setting has_b_frames before opening the decoder.

The old behaviour, when the delay is supplied by the caller setting
has_b_frames, can still be obtained by setting strict_std_compliance
below normal.

8 years agoh264: set frame_num in start_frame(), not decode_slice_header()
Anton Khirnov [Mon, 30 Nov 2015 21:52:36 +0000 (22:52 +0100)]
h264: set frame_num in start_frame(), not decode_slice_header()

That is a more appropriate place for it, since it is not allowed to
change between slices.

8 years agoh264: eliminate default_ref_list
Anton Khirnov [Mon, 30 Nov 2015 16:51:48 +0000 (17:51 +0100)]
h264: eliminate default_ref_list

According to the spec, the reference list for a slice should be
constructed by first generating an initial (what we now call "default")
reference list and then optionally applying modifications to it.

Our code has an optimization where the initial reference list is
constructed for the first inter slice and then rebuilt for other slices
if needed. This, however, adds complexity to the code, requires an extra
2.5kB array in the codec context and there is no reason to think that it
has any positive effect on performance. Therefore, simplify the code by
generating the reference list from scratch for each slice.

8 years agohevcdsp: add x86 SIMD for MC
Anton Khirnov [Fri, 24 Jul 2015 16:42:08 +0000 (18:42 +0200)]
hevcdsp: add x86 SIMD for MC

8 years agocheckasm: add HEVC MC tests
Anton Khirnov [Fri, 31 Jul 2015 10:37:14 +0000 (12:37 +0200)]
checkasm: add HEVC MC tests

8 years agohevc: change the stride of the MC buffer to be in bytes instead of elements
Anton Khirnov [Fri, 14 Aug 2015 17:40:21 +0000 (19:40 +0200)]
hevc: change the stride of the MC buffer to be in bytes instead of elements

Currently, the frame stride is passed in bytes, while the MC buffer size
is in int16_t elements, This can be confusing, so pass both strides in
bytes.

8 years agohevcdsp: split the pred functions by width
Anton Khirnov [Fri, 24 Jul 2015 16:56:54 +0000 (18:56 +0200)]
hevcdsp: split the pred functions by width

This should allow for more efficient SIMD.

8 years agohevcdsp: split the epel functions by width
Anton Khirnov [Fri, 24 Jul 2015 06:24:21 +0000 (08:24 +0200)]
hevcdsp: split the epel functions by width

This should allow for more efficient SIMD.

8 years agohevcdsp: split the qpel functions by width instead of by the subpixel fraction
Anton Khirnov [Fri, 24 Jul 2015 06:24:21 +0000 (08:24 +0200)]
hevcdsp: split the qpel functions by width instead of by the subpixel fraction

This should allow for more efficient SIMD.

Keep the C versions as they are now, to allow the compiler to inline the
interpolation coefficients.

8 years agolog: Use a do {} while (0) for dlog
Luca Barbato [Sat, 5 Dec 2015 12:45:01 +0000 (13:45 +0100)]
log: Use a do {} while (0) for dlog

Avoid the warning `-Wempty-body`.

8 years agoimgconvert: Re-enable the deprecation warnings
Luca Barbato [Sat, 5 Dec 2015 12:31:38 +0000 (13:31 +0100)]
imgconvert: Re-enable the deprecation warnings

The end-marked was typoed in

f7edcac040f73635fc1127489c9bb29ca8b43532

8 years agoavpicture: Suppress warning from deprecated code
Luca Barbato [Thu, 26 Nov 2015 15:10:54 +0000 (16:10 +0100)]
avpicture: Suppress warning from deprecated code

8 years agoaac: Provide more information on the failure message
Luca Barbato [Sat, 28 Nov 2015 11:28:21 +0000 (12:28 +0100)]
aac: Provide more information on the failure message

Bug-Id: 761

8 years agog723: Add missing header
Luca Barbato [Wed, 2 Dec 2015 23:31:30 +0000 (00:31 +0100)]
g723: Add missing header

Unbreak make check.

8 years agoconfigure: Add -framework CoreVideo when building the avfoundation indev
Martin Storsjö [Tue, 1 Dec 2015 08:14:00 +0000 (10:14 +0200)]
configure: Add -framework CoreVideo when building the avfoundation indev

This fixes builds with --disable-vda, which previously failed with
undefined references to CVImageBuffer* and CVPixelBuffer* functions.

Signed-off-by: Martin Storsjö <martin@martin.st>
8 years agoconfigure: Replace `pr` since it is not provided by busybox
Kylie McClain [Mon, 23 Nov 2015 19:06:50 +0000 (14:06 -0500)]
configure: Replace `pr` since it is not provided by busybox

While pr is a valid POSIX.1 command, its usage in configure
is a little borderline and is possible to replace it with
printf.

Bug-Id: 913

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
8 years agoavi: Spin out the logic to position to the next non-interleaved stream
Luca Barbato [Sat, 28 Nov 2015 20:06:11 +0000 (21:06 +0100)]
avi: Spin out the logic to position to the next non-interleaved stream

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
8 years agobuild: Move -Wcast-qual to the extra_warnings
Luca Barbato [Thu, 26 Nov 2015 16:15:09 +0000 (17:15 +0100)]
build: Move -Wcast-qual to the extra_warnings

It amounts to about 1/2 of the warnings generated and does not help
spotting anything useful.

8 years agoavi: Validate the stream-id for DV as well
Michael Niedermayer [Sat, 28 Nov 2015 20:06:45 +0000 (21:06 +0100)]
avi: Validate the stream-id for DV as well

Avoid false positives while syncing.

Bug-Id: ffmpeg/4086
Bug-Id: 879

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
8 years agoavi: Use the correct data type
Luca Barbato [Sat, 28 Nov 2015 13:43:17 +0000 (14:43 +0100)]
avi: Use the correct data type

avio_tell returns an int64_t.

8 years agovsrc_color: Drop unneeded variable
Vittorio Giovara [Tue, 24 Nov 2015 19:43:01 +0000 (14:43 -0500)]
vsrc_color: Drop unneeded variable

Bug-Id: CID 1339818

8 years agolavf: G.723.1 muxer
Mohamed Naufal [Thu, 12 Nov 2015 13:53:26 +0000 (14:53 +0100)]
lavf: G.723.1 muxer

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
8 years agolavc: G.723.1 encoder
Mohamed Naufal [Mon, 23 Nov 2015 22:10:54 +0000 (17:10 -0500)]
lavc: G.723.1 encoder

Additional improvements by Michael Niedermayer <michaelni@gmx.at>.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
8 years agog723_1: Move sharable functions to a separate file
Vittorio Giovara [Mon, 23 Nov 2015 22:10:53 +0000 (17:10 -0500)]
g723_1: Move sharable functions to a separate file

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
8 years agog723_1: Rename files to better reflect their purpose
Vittorio Giovara [Mon, 23 Nov 2015 22:10:52 +0000 (17:10 -0500)]
g723_1: Rename files to better reflect their purpose

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
8 years agog723_1: Handle values at the ends of the table in lsp2lpc()
Michael Niedermayer [Mon, 23 Nov 2015 22:10:51 +0000 (17:10 -0500)]
g723_1: Handle values at the ends of the table in lsp2lpc()

Fixes out of array reads.

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
8 years agomatroska: Warn when metadata references a non-existent element
Luca Barbato [Sat, 31 Oct 2015 18:45:27 +0000 (19:45 +0100)]
matroska: Warn when metadata references a non-existent element

Avoid some confusion when the information is not present.

Bug-Id: 902

8 years agodvenc: Validate the frame size before copying it
Luca Barbato [Sun, 18 Oct 2015 21:44:25 +0000 (23:44 +0200)]
dvenc: Validate the frame size before copying it

8 years agopgssubdec: fix API compability layer
Petri Hintukainen [Thu, 26 Nov 2015 08:33:42 +0000 (10:33 +0200)]
pgssubdec: fix API compability layer

Copy pointers to AVPicture after memory has been allocated.
Fixes NULL pointers in AVPicture after a17a7661906ba295d67afd80ac0770422e1b02b3.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
8 years agodoc: Amend the MSYS2 Documentation
Luca Barbato [Tue, 24 Nov 2015 01:19:42 +0000 (02:19 +0100)]
doc: Amend the MSYS2 Documentation

Explain better which environment is discouraged and mention the
shortcuts names.

8 years agoavfoundation: Simple capture
Alexandre Lision [Mon, 23 Nov 2015 22:08:50 +0000 (17:08 -0500)]
avfoundation: Simple capture

Originally based on the capture written by
Thilo Borgmann <thilo.borgmann@mail.de>.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
8 years agoconfigure: ObjC support
Luca Barbato [Mon, 23 Nov 2015 22:08:49 +0000 (17:08 -0500)]
configure: ObjC support

Assume that the default C compiler and the default ObjC compiler match
(default for OSX).

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
8 years agonut: Mark non-fatal errors as warnings
Luca Barbato [Tue, 24 Nov 2015 00:25:04 +0000 (01:25 +0100)]
nut: Mark non-fatal errors as warnings

And make one more informative.

8 years agonut: Provide more information on failure
Luca Barbato [Tue, 24 Nov 2015 00:24:47 +0000 (01:24 +0100)]
nut: Provide more information on failure

8 years agortsp: Log getaddrinfo failures
Luca Barbato [Tue, 24 Nov 2015 00:13:00 +0000 (01:13 +0100)]
rtsp: Log getaddrinfo failures

And forward the logging contexts when needed.

8 years agoudp: Provide additional information on getaddrinfo failure
Luca Barbato [Tue, 24 Nov 2015 00:11:56 +0000 (01:11 +0100)]
udp: Provide additional information on getaddrinfo failure

8 years agoudp: Use the logging context
Luca Barbato [Tue, 24 Nov 2015 00:09:33 +0000 (01:09 +0100)]
udp: Use the logging context

8 years agortsp: Do not assume getnameinfo cannot fail
Luca Barbato [Mon, 23 Nov 2015 22:57:47 +0000 (23:57 +0100)]
rtsp: Do not assume getnameinfo cannot fail

And properly report the error when it happens.

8 years agomovenc-test: Fix integer overflows
Michael Niedermayer [Mon, 23 Nov 2015 13:25:41 +0000 (14:25 +0100)]
movenc-test: Fix integer overflows

Signed-off-by: Martin Storsjö <martin@martin.st>
8 years agotexturedsp: Explicitly cast RGBA parameters to unsigned
Vittorio Giovara [Mon, 23 Nov 2015 22:02:19 +0000 (17:02 -0500)]
texturedsp: Explicitly cast RGBA parameters to unsigned

Silences warnings when using -Wshift-overflow (GCC 6+).
Found-by: James Almer <jamrial@gmail.com>
8 years agotexturedspenc: Avoid using separate variables
Vittorio Giovara [Mon, 23 Nov 2015 22:02:18 +0000 (17:02 -0500)]
texturedspenc: Avoid using separate variables

Use the result directly, removing an unneeded cast.

8 years agotextureencdsp: cosmetics: Use normal static const for tables
Vittorio Giovara [Mon, 23 Nov 2015 22:02:17 +0000 (17:02 -0500)]
textureencdsp: cosmetics: Use normal static const for tables

8 years agosgi: Correctly propagate meaningful error values
Vittorio Giovara [Mon, 23 Nov 2015 23:56:09 +0000 (18:56 -0500)]
sgi: Correctly propagate meaningful error values

8 years agofate: Rework sgi tests into a suite and add the missing ones
Vittorio Giovara [Fri, 20 Nov 2015 01:17:35 +0000 (02:17 +0100)]
fate: Rework sgi tests into a suite and add the missing ones

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
8 years agosgienc: Support encoding high bit depth images with RLE
Vittorio Giovara [Fri, 20 Nov 2015 01:17:34 +0000 (02:17 +0100)]
sgienc: Support encoding high bit depth images with RLE

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
8 years agosgienc: Use a local RLE encoding function
Vittorio Giovara [Fri, 20 Nov 2015 01:17:33 +0000 (02:17 +0100)]
sgienc: Use a local RLE encoding function

SGI RLE encoding is slighlty different than the one provided by rle
module (especially at high bit depth). The pixel count function however
does not change, so it is simply made library-public.

8 years agosgienc: Port to bytestream2
Vittorio Giovara [Fri, 20 Nov 2015 01:17:32 +0000 (02:17 +0100)]
sgienc: Port to bytestream2

8 years agosgienc: Do not end RLE lines with 0s
Vittorio Giovara [Fri, 20 Nov 2015 01:17:31 +0000 (02:17 +0100)]
sgienc: Do not end RLE lines with 0s

This is never mentioned in the specifications, and decoders work
just as fine without it. Update the fate references since the compressed
file is smaller.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
8 years agolibvpxenc: remove some unused ctrl id mappings
James Zern [Tue, 20 Oct 2015 05:44:11 +0000 (22:44 -0700)]
libvpxenc: remove some unused ctrl id mappings

VP8E_UPD_ENTROPY, VP8E_UPD_REFERENCE, VP8E_USE_REFERENCE were removed
from libvpx and the remaining values were never used here

Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: James Zern <jzern@google.com>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
8 years agodoc: Document better how to use MSYS2
Luca Barbato [Mon, 23 Nov 2015 12:05:09 +0000 (13:05 +0100)]
doc: Document better how to use MSYS2

8 years agoasfdec: handle the case when the stream index has an invalid value better
Alexandra Hájková [Thu, 19 Nov 2015 13:25:41 +0000 (14:25 +0100)]
asfdec: handle the case when the stream index has an invalid value better

The demuxer returned INVALIDDATA and failed to demux the remaining data
when an invalid stream index was read, now it just skips the asf packet
for the stream with an invalid stream index and continues demuxing.

Reported-By: Hendrik Leppkes
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
8 years agodcadec: Do not check for overreads in auxiliary data
Tim Walker [Sat, 21 Nov 2015 23:02:37 +0000 (00:02 +0100)]
dcadec: Do not check for overreads in auxiliary data

The auxiliary data length field is not reliable,
and incorrect overread errors could be returned
for valid, real-world bitstreams.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
8 years agooggparsespeex: Fix unchecked malloc
Derek Buitenhuis [Sun, 22 Nov 2015 18:12:09 +0000 (18:12 +0000)]
oggparsespeex: Fix unchecked malloc

Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
8 years agoconfigure: Clearly state that MSYS native builds are discouraged
Luca Barbato [Sat, 21 Nov 2015 17:51:11 +0000 (18:51 +0100)]
configure: Clearly state that MSYS native builds are discouraged

MSYS, as per cygwin, by default uses a custom posix abstraction
in the form of a "msys2.dll". Programs build that way are harder to
distribute and use.

MSYS2 provides alternate launcher scripts that provide a MINGW
environment nearly out of box.

8 years agolavc: Deprecate avctx.rtp_callback field
Vittorio Giovara [Thu, 19 Nov 2015 08:45:01 +0000 (09:45 +0100)]
lavc: Deprecate avctx.rtp_callback field

This function returns the encoded data of a frame, one slice at a time
directly when that slice is encoded, instead of waiting for the full
frame to be done. However this field has a debatable usefulness, since
it looks like it is just a convoluted way to get data at lowest
possible latency, or a somewhat hacky way to store h263 in RFC-2190
rtp encapsulation.

Moreover when multi-threading is enabled (which is by default) the order
of returned slices is not deterministic at all, making the use of this
function not reliable at all (or at the very least, more complicated
than it should be).

So, for the reasons stated above, and being used by only a single encoder
family (mpegvideo), this field is deemed unnecessary, overcomplicated,
and not really belonging to libavcodec. Libavformat features a complete
implementation of RFC-2190, for any other case.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
8 years agodoc/encoders: document the QSV option mappings
Anton Khirnov [Sun, 8 Nov 2015 14:24:42 +0000 (15:24 +0100)]
doc/encoders: document the QSV option mappings

8 years agoqsvenc: expose additional encoding options
Anton Khirnov [Sun, 8 Nov 2015 06:58:49 +0000 (07:58 +0100)]
qsvenc: expose additional encoding options

8 years agoqsvenc: support more RC methods
Anton Khirnov [Sun, 8 Nov 2015 05:44:17 +0000 (06:44 +0100)]
qsvenc: support more RC methods

8 years agoqsvenc: factor out common options
Anton Khirnov [Sat, 7 Nov 2015 19:50:41 +0000 (20:50 +0100)]
qsvenc: factor out common options

8 years agoqsvenc: fix setting maxrate for VBR
Anton Khirnov [Fri, 6 Nov 2015 12:29:34 +0000 (13:29 +0100)]
qsvenc: fix setting maxrate for VBR

8 years agoqsvenc: print the actual video parameters used by MSDK
Anton Khirnov [Fri, 6 Nov 2015 12:18:56 +0000 (13:18 +0100)]
qsvenc: print the actual video parameters used by MSDK

8 years agompegvideo_enc: enable rtp_mode when multiple slices are used
Anton Khirnov [Wed, 18 Nov 2015 09:37:16 +0000 (10:37 +0100)]
mpegvideo_enc: enable rtp_mode when multiple slices are used

Currently, multiple slices with just one thread produce corrupted
output.

Additionally, enable slice structured mode for h263(+)

Bug-Id: 912
CC: libav-stabl@libav.org
8 years agompevideo_enc: disallow multiple slices for h261 and flv
Anton Khirnov [Wed, 18 Nov 2015 09:32:34 +0000 (10:32 +0100)]
mpevideo_enc: disallow multiple slices for h261 and flv

They do not work and produce corrupted output.

CC: libav-stable@libav.org
8 years agomovenc: add fallback audio track tref support
John Stebbins [Thu, 5 Nov 2015 17:49:04 +0000 (09:49 -0800)]
movenc: add fallback audio track tref support

This feature allows making associations between audio tracks
that apple players recognize.  E.g. when an ac3 track has a
tref that points to an aac track, devices that don't support
ac3 will automatically fall back to the aac track.

Apple used to *guess* these associations, but new products
(AppleTV 4) no longer guess and this association can only
be made explicitly now using the "fall" tref.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
8 years agoavcodec: Define side data type for fallback track
John Stebbins [Fri, 6 Nov 2015 15:29:18 +0000 (07:29 -0800)]
avcodec: Define side data type for fallback track

This side data type is meant to be added to AVStream side data.
A fallback track indicates an alternate track to use when the
current track can not be decoded for some reason.  e.g. no
decoder available for codec.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
8 years agoavformat: expose av_stream_new_side_data helper
John Stebbins [Thu, 5 Nov 2015 17:49:02 +0000 (09:49 -0800)]
avformat: expose av_stream_new_side_data helper

Signed-off-by: Anton Khirnov <anton@khirnov.net>
8 years agolavf: document that passing valid timestamps to muxers is now mandatory
Anton Khirnov [Sun, 8 Nov 2015 18:53:54 +0000 (19:53 +0100)]
lavf: document that passing valid timestamps to muxers is now mandatory

Also, extend the documentation about setting timestamps.

8 years agodvdsubdec: Validate the RLE offsets
Luca Barbato [Wed, 11 Nov 2015 19:08:29 +0000 (20:08 +0100)]
dvdsubdec: Validate the RLE offsets

CC: libav-stable@libav.org
8 years agotravis: Enable OSX integration
Vittorio Giovara [Tue, 17 Nov 2015 12:23:08 +0000 (13:23 +0100)]
travis: Enable OSX integration

8 years agoflacenc: Clamp user-supplied min/max prediction orders
Vittorio Giovara [Mon, 16 Nov 2015 15:05:54 +0000 (16:05 +0100)]
flacenc: Clamp user-supplied min/max prediction orders

This mimics what the code does internally for default order values.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
8 years agoffv1: Explicitly name the coder type
Vittorio Giovara [Sun, 15 Nov 2015 22:26:07 +0000 (23:26 +0100)]
ffv1: Explicitly name the coder type

FFv1 uses two types of coders, golomb and range with two different
tables. This is exposed this in a rather convoluted way, for example
mentioning to set coder type 1 while initializing the variable 'ac' to 2,
because encoder does not use range coder with default table.

Appropriate internal coder type values have been added and used in any
check rather than using raw numbers.

Initialization of avctx.coder_type in ffv1dec is removed because this
field is encoder only. An unneeded validation check in the encoder
is dropped too.

Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
8 years agohqx: correct type and size check of info_offset
Andreas Cadhalpun [Sun, 15 Nov 2015 09:50:44 +0000 (10:50 +0100)]
hqx: correct type and size check of info_offset

It is used as size argument of ff_canopus_parse_info_tag, which uses it
as size argument to bytestream2_init, which only supports sizes up to
INT_MAX.
Changing it's type to unsigned simplifies the check.

Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
8 years agodds: disable palette flag for compressed images
Andreas Cadhalpun [Fri, 13 Nov 2015 20:48:27 +0000 (21:48 +0100)]
dds: disable palette flag for compressed images

Having both is not valid and can cause a NULL pointer dereference of
frame->data[1] later.

Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
8 years agosegafilm: Fix current_sample after seeking and avio_seek return type
Michael Niedermayer [Fri, 13 Nov 2015 12:32:13 +0000 (13:32 +0100)]
segafilm: Fix current_sample after seeking and avio_seek return type

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
8 years agortmpcrypt: Provide the xtea keys in little endian format for consistency
Martin Storsjö [Wed, 11 Nov 2015 20:18:35 +0000 (22:18 +0200)]
rtmpcrypt: Provide the xtea keys in little endian format for consistency

Signed-off-by: Martin Storsjö <martin@martin.st>
8 years agortmpcrypt: Do the xtea decryption in little endian mode
Martin Storsjö [Wed, 11 Nov 2015 20:11:19 +0000 (22:11 +0200)]
rtmpcrypt: Do the xtea decryption in little endian mode

The XTEA algorithm operates on 32 bit numbers, not on byte sequences.
The XTEA implementation in libavutil is written assuming big endian
numbers, while the rtmpe signature encryption assumes little endian.

This fixes rtmpe communication with rtmpe servers that use signature
type 8 (XTEA), e.g. crunchyroll.

Signed-off-by: Martin Storsjö <martin@martin.st>
8 years agoxtea: Add functions for little endian mode
Martin Storsjö [Wed, 11 Nov 2015 20:09:41 +0000 (22:09 +0200)]
xtea: Add functions for little endian mode

Signed-off-by: Martin Storsjö <martin@martin.st>
8 years agoxtea: Clarify that the current API works in big endian mode
Martin Storsjö [Wed, 11 Nov 2015 19:49:44 +0000 (21:49 +0200)]
xtea: Clarify that the current API works in big endian mode

Signed-off-by: Martin Storsjö <martin@martin.st>
8 years agodds: add missing newline to log messages
Andreas Cadhalpun [Wed, 11 Nov 2015 00:16:09 +0000 (01:16 +0100)]
dds: add missing newline to log messages

Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
8 years agodds: validate compressed source buffer size
Andreas Cadhalpun [Wed, 11 Nov 2015 00:15:55 +0000 (01:15 +0100)]
dds: validate compressed source buffer size

A too small buffer will cause segfaults somewhere below
decompress_texture_thread.

Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
8 years agodds: validate source buffer size before copying
Andreas Cadhalpun [Wed, 11 Nov 2015 00:14:57 +0000 (01:14 +0100)]
dds: validate source buffer size before copying

If it is too small av_image_copy_plane segfaults.

Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
8 years agomov: Drop dref when unable to parse
Vittorio Giovara [Mon, 9 Nov 2015 14:14:43 +0000 (15:14 +0100)]
mov: Drop dref when unable to parse

Some entries might be either empty or contain types we do not parse
(eg. 'url '). In both cases, if an 'alis' is not the first entry,
external references are not loaded, so make sure that the array starts
with an 'alis' dref.

8 years agomov: Correctly store dref paths
Vittorio Giovara [Mon, 9 Nov 2015 14:14:42 +0000 (15:14 +0100)]
mov: Correctly store dref paths

Rather than reading the alternate absolute path version from dref
type 18, make sure that 0s are considered as '/'. These values are
sometimes present in the full path, and are mistakenly interpreted as
line terminators othewise.

With the correct handling of this dref type, parsing type 18 is not
needed any more.

8 years agolavc: Add missing mem.h header to libxvid and screenpresso
Vittorio Giovara [Mon, 9 Nov 2015 12:28:13 +0000 (13:28 +0100)]
lavc: Add missing mem.h header to libxvid and screenpresso

8 years agoaiff: Support demuxing G.722 streams
Carl Eugen Hoyos [Fri, 6 Nov 2015 23:35:51 +0000 (00:35 +0100)]
aiff: Support demuxing G.722 streams

8 years agothp: set duration for audio stream too
Paul B Mahol [Thu, 5 Nov 2015 11:04:53 +0000 (12:04 +0100)]
thp: set duration for audio stream too

Signed-off-by: Paul B Mahol <onemda@gmail.com>
8 years agomovenc: Add a unit test for signaling of the track start times
Martin Storsjö [Tue, 10 Nov 2015 21:33:44 +0000 (23:33 +0200)]
movenc: Add a unit test for signaling of the track start times

Signed-off-by: Martin Storsjö <martin@martin.st>
8 years agomovenc: Allow setting start_dts/start_cts before writing actual packets
Martin Storsjö [Tue, 3 Nov 2015 20:16:21 +0000 (22:16 +0200)]
movenc: Allow setting start_dts/start_cts before writing actual packets

By writing a zero-sized packet, the caller can communicate the
start_dts/start_cts for the stream without actually writing
the first packet.

This allows doing random-access writing of fragments when the
start dts of the stream isn't zero, so that the edit list in the moov
is written based on timestamps from the nominal start time signaled
via the zero-sized packet, while the first proper packet written
corresponds to a later fragment.

To avoid potential unexpected behaviour, empty packets only set
start_dts if the frag_discont flag is set.

Signed-off-by: Martin Storsjö <martin@martin.st>
8 years agomovenc: Add a unit test for frag_discont with edit lists
Martin Storsjö [Sat, 7 Nov 2015 21:55:32 +0000 (23:55 +0200)]
movenc: Add a unit test for frag_discont with edit lists

This tests the case where the muxer correctly guesses that a stream
starts at pts=0.

Signed-off-by: Martin Storsjö <martin@martin.st>
8 years agomovenc: Assume streams starting at pts=0 for discontinuous fragments with editlists
Martin Storsjö [Mon, 5 Jan 2015 13:13:04 +0000 (15:13 +0200)]
movenc: Assume streams starting at pts=0 for discontinuous fragments with editlists

This allows producing fragments discontinously where the video
stream has b-frames (but starts at pts=0), but doesn't work for the
cases with audio with preroll.

Signed-off-by: Martin Storsjö <martin@martin.st>
8 years agomovenc: Add an API unit test for fragmenting options/calls
Martin Storsjö [Thu, 5 Nov 2015 22:12:11 +0000 (00:12 +0200)]
movenc: Add an API unit test for fragmenting options/calls

Contrary to the normal fate tests that run via avconv, this tests
nontrivial call sequences that are only doable via the API
(mainly for different corner cases when using the muxer for
segmenting).

The test muxes fake packet data (with extradata that looks
enough like proper data to make the file be viewable with e.g.
boxdumper) and checks the hash of the produced files. The test also
verifies that fragments produced via different call sequences remain
identical (to avoid e.g. updating the output hashes and suddenly
having fragments that used to be identical suddenly diverging), for
fragments written with frag_discont and/or delay_moov.

Signed-off-by: Martin Storsjö <martin@martin.st>