Commit Graph

43009 Commits

Author SHA1 Message Date
Ico Doornekamp edf54887e2 rtpdec_jpeg: fix low contrast image on low quality setting
The problem is that the argument 'q' is of the type uint8_t.
According to the JPEG standard, if 1 <= q <= 50, the scale factor
'S' should be 5000 / Q. Because the create_default_qtables() reuses
the variable 'q' to store the result of this calculation, for small
values of q < 19, q wil subsequently overflow and give wrong results
in the calculated quantization tables.

Instead, use a new variable 'S' (same name as in RFC2435) with the
proper range to store the result of the division.

Signed-off-by: Martin Storsjö <martin@martin.st>
2016-03-26 00:15:24 +02:00
Vittorio Giovara 159323897f intrax8: Add a local BlockDSPContext and initialize it
Helps in decoupling this code from mpegvideo.
2016-03-25 15:55:49 -04:00
Vittorio Giovara 1eaae7abb8 intrax8: Reference the current AVCodecContext
It will be needed to initialize BlockDSP in the next commit.
2016-03-25 15:55:02 -04:00
Vittorio Giovara 8072345e9f intrax8: Keep a reference to the GetBitContext reader
Helps in decoupling this code from mpegvideo.
2016-03-25 15:54:29 -04:00
Vittorio Giovara 65f14128c4 intrax8: Use a constant buffer instead of a ScratchpadContext
The size of the block is fixed (8x8 plus padding).
2016-03-25 15:54:06 -04:00
Vittorio Giovara eaeba6f241 intrax8: Pass the output frame to the decoding function
Helps in decoupling this code from mpegvideo.
2016-03-25 15:53:02 -04:00
Vittorio Giovara 577393321c intrax8: Carry over the loopfilter value in ff_intrax8_decode_picture
Helps in decoupling this code from mpegvideo.
2016-03-25 15:52:44 -04:00
Vittorio Giovara 68127e1bf8 intrax8: Keep a reference to the context idctdsp
Use it instead of the embedded mpegvideo one. Update init function
signature to load it directly from the callers.
2016-03-25 15:52:24 -04:00
Vittorio Giovara 65127450ad intrax8: Make x8_init_block_index not use mpegvideo fields 2016-03-25 15:52:10 -04:00
Vittorio Giovara 922b7e6d86 intrax8: Use local destination buffers
These buffers are just a way to store frame pointers and be able to
modify them without touching the original ones.

The two dependent decoders (WMV2 and VC1) do not need special care for
these fields: the former does not seem to use the dest buffers, while
the latter reinits them every time to the current frame data buffers.

So only keep a local copy rather than the one from mpegvideo.
2016-03-25 15:51:50 -04:00
Diego Biurrun a7da517f6a h264data: Move all data tables from a header to a .c file 2016-03-25 15:56:14 +01:00
Diego Biurrun f4d581cda3 lavc: Deduplicate zigzag_scan table 2016-03-25 15:23:56 +01:00
Diego Biurrun 02cd8bb9cb h264: Clean up #includes 2016-03-25 15:23:55 +01:00
Anton Khirnov 704a397697 rtmpdh: add an stdio.h include
The test uses printf.
2016-03-25 14:53:37 +01:00
Anton Khirnov e3dfef8e3c qsvdec_h2645: switch to the new BSF API 2016-03-25 14:53:37 +01:00
Anton Khirnov a638e9184d vf_fade: make sure the slice end is always in the frame
CC: libav-stable@libav.org
2016-03-25 14:53:31 +01:00
Diego Biurrun 3b08d9d932 testprogs: K&R formatting cosmetics 2016-03-24 21:45:07 +01:00
Diego Biurrun 439929859a testprogs: Clean up #includes 2016-03-24 19:17:23 +01:00
Diego Biurrun 3dfbf32b95 build: Drop redundant removal of compiled object files
This is already taken care of by CLEANSUFFIXES.
2016-03-24 19:17:23 +01:00
Diego Biurrun b298b36fc0 fate: Only run SRTP test if SRTP code is enabled 2016-03-24 19:17:23 +01:00
Martin Storsjö 3ee2ec5ec1 unix: Use rw_timeout for setting the connect timeout
Signed-off-by: Martin Storsjö <martin@martin.st>
2016-03-24 10:34:29 +02:00
Martin Storsjö 136c3438bb tcp: Use rw_timeout for setting the connect/listen timeouts
Apply the default value for timeout in code instead of via the
avoption, to allow distinguishing the default value from the user
not setting anything at all.

Signed-off-by: Martin Storsjö <martin@martin.st>
2016-03-24 10:34:24 +02:00
Martin Storsjö fab8156b2f avio: Copy URLContext generic options into child URLContexts
Since all URLContexts have the same AVOptions, such AVOptions
will be applied on the outermost context only and removed from the
dict, while they probably make sense on all contexts.

This makes sure that rw_timeout gets propagated to the innermost
URLContext (to make sure it gets passed to the tcp protocol, when
opening a http connection for instance).

Alternatively, such matching options would be kept in the dict
and only removed after the ffurl_connect call.

Signed-off-by: Martin Storsjö <martin@martin.st>
2016-03-24 10:34:19 +02:00
Michael Niedermayer 564b4591bb opt: Add av_opt_copy()
This includes documentation and other modifications by
Lukasz Marek and Martin Storsjö.

Signed-off-by: Martin Storsjö <martin@martin.st>
2016-03-24 10:34:15 +02:00
Lukasz Marek 8833f1508b opt: Add const to av_opt_next
Also add const to pointers in static functions within opt.c where
possible/necessary.

Signed-off-by: Martin Storsjö <martin@martin.st>
2016-03-24 10:34:09 +02:00
Martin Storsjö 933dec0e29 file: Add an option for following a file that is being written
Using this requires setting the rw_timeout option to make it
terminate, alternatively using the interrupt callback (if used via
the API).

Signed-off-by: Martin Storsjö <martin@martin.st>
2016-03-24 10:33:59 +02:00
Andrey Utkin ccea588f83 avio: Add an option 'rw_timeout'
If set non-zero, this limits duration of the retry_transfer_wrapper()
loop, thus affecting ffurl_read*(), ffurl_write(). As soon as
one single byte is successfully received/transmitted, the timer
restarts.

This has further changes by Michael Niedermayer and Martin Storsjö.

Signed-off-by: Martin Storsjö <martin@martin.st>
2016-03-24 10:33:50 +02:00
Martin Storsjö d44f3e4059 avio: Apply avoptions on the URLContext itself as well
Currently the list of avoptions for URLContext is empty though,
but such options will be added.

Signed-off-by: Martin Storsjö <martin@martin.st>
2016-03-24 10:33:37 +02:00
Anton Khirnov 8a02a8031e lavfi: add an NVIDIA NPP-based scaling filter 2016-03-23 19:55:34 +01:00
Mark Thompson 98114d70e4 lavf: VAAPI scale filter
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2016-03-23 19:40:15 +01:00
wm4 8bc4accc37 lavf: use new decode API
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2016-03-23 19:31:36 +01:00
wm4 35846d93e0 avconv: use new encode API
The flushing case is a bit strange; not simplifying it so the change is
less noisy.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2016-03-23 19:31:35 +01:00
wm4 84aea95e31 avconv: use new decode API
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2016-03-23 19:31:35 +01:00
wm4 05f66706d1 lavc: introduce a new decoding/encoding API with decoupled input/output
Until now, the decoding API was restricted to outputting 0 or 1 frames
per input packet. It also enforces a somewhat rigid dataflow in general.

This new API seeks to relax these restrictions by decoupling input and
output. Instead of doing a single call on each decode step, which may
consume the packet and may produce output, the new API requires the user
to send input first, and then ask for output.

For now, there are no codecs supporting this API. The API can work with
codecs using the old API, and most code added here is to make them
interoperate. The reverse is not possible, although for audio it might.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2016-03-23 19:31:23 +01:00
Diego Biurrun 0d2fcdb1c5 opt-test: Merge struct declaration and initialization 2016-03-23 10:14:43 +01:00
Diego Biurrun d3044cf37f opt-test: Move some variable declarations to avoid block braces 2016-03-23 10:14:31 +01:00
Diego Biurrun a84713e70d parseutils-test: Move some variable declarations to avoid block braces 2016-03-23 09:35:41 +01:00
Diego Biurrun 52385410b7 des-test: Move a variable declaration to avoid an ifdef 2016-03-23 09:35:41 +01:00
Diego Biurrun 65a802401c build: Add component for the SRTP common code
This allows expressing the SRTP test code dependencies more clearly.
2016-03-23 09:35:41 +01:00
Diego Biurrun 30e9ef21ce timefilter-test: Only compile timefilter-test if JACK is enabled 2016-03-23 09:35:41 +01:00
Diego Biurrun 48362ceade doc: Update paths to match new examples location 2016-03-23 09:35:40 +01:00
Diego Biurrun 8dead2aaca Move const qualifier before type name 2016-03-23 09:25:30 +01:00
Vittorio Giovara d909f43b5c vc1dec: wmv2dec: Validate ff_intrax8_common_init return value 2016-03-22 17:33:32 -04:00
Vittorio Giovara 0372e73f91 intrax8: Check and propagate errors from ff_intrax8_common_init
This allows dropping an afterwards redundant assert.
2016-03-22 17:33:32 -04:00
Vittorio Giovara ad8aa8e6c6 intrax8: Move documentation from implementation to header file 2016-03-22 17:33:28 -04:00
Vittorio Giovara 2ade1cdafb intrax8: K&R formatting cosmetics 2016-03-22 17:12:20 -04:00
Diego Biurrun 6f5ff559db intrax8: Adjust printf conversion specifier for sizeof expression 2016-03-22 17:12:20 -04:00
Vittorio Giovara 42244ce07a intrax8: Move a comment to the place it corresponds 2016-03-22 16:51:09 -04:00
Vittorio Giovara 750562549c intrax8: Wrap multiline macros in do{}while(0) clauses
These macros are treated like functions, the wrapping simplifies error
checking and avoids deeply nested ifs in the following commit.
2016-03-22 16:51:09 -04:00
Vittorio Giovara 0c6a70873f intrax8: Move error resilience out of intrax8
The intrax8 decoding process does not imply any kind of error
resilience, and the only call present is more related to how mpegvideo
works rather than anything else.

Therefore have the parent decoders carry out er when actually needed.
2016-03-22 16:51:09 -04:00