Anton Khirnov
a7829a2a3f
h264: reimplement 3aa661ec5
in a more explicit way
...
Instead of handling the problem inside NAL decoding code, add a higher
level wrapper function. This should be more robust against future
changes (and easier to read).
2016-03-28 10:10:18 +02:00
Anton Khirnov
add1467e5e
svq3: drop the build dependency on the h264 decoder
2016-03-28 09:58:26 +02:00
Anton Khirnov
a4d126dc59
svq3: eliminate remaining H264Context usage.
2016-03-28 09:58:14 +02:00
Anton Khirnov
7bbdae81e8
svq3: move block_offset to SVQ3Context
2016-03-28 09:58:07 +02:00
Anton Khirnov
1848a154a4
svq3: stop using H264Context.gb
2016-03-28 09:57:58 +02:00
Anton Khirnov
ea6ab02a17
svq3: move the frame num variables to the SVQ3Context
2016-03-28 09:57:45 +02:00
Anton Khirnov
21b7469322
svq3: eliminate H264Context.cur_pic usage
...
Use the SVQ3Context variable instead
2016-03-28 09:57:24 +02:00
Anton Khirnov
939b388383
svq3: eliminate remaining H264SliceContext usage
2016-03-28 09:56:57 +02:00
Anton Khirnov
5a5db90edf
svq3: move pict_type to the SVQ3Context
2016-03-28 09:56:45 +02:00
Anton Khirnov
12f13ecb2d
svq3: move mb strides/sizes to the SVQ3Context
2016-03-28 09:56:36 +02:00
Anton Khirnov
ad9d3384de
svq3: move the dequant buffer to SVQ3Context
...
Remove now unnecesary call to ff_h264_alloc_tables()
2016-03-28 09:56:09 +02:00
Anton Khirnov
549fc77273
svq3: move mb2br_xy to the SVQ3Context
2016-03-28 09:55:55 +02:00
Anton Khirnov
99dde60391
svq3: move {ref,mv}_cache to the SVQ3Context
2016-03-28 09:55:47 +02:00
Anton Khirnov
89a13998a1
svq3: rip out the svq3-relevant parts of pred_motion() out of h264
2016-03-28 09:55:24 +02:00
Anton Khirnov
8eecae77ff
svq3: move edge_emu_buffer to the SVQ3Context
2016-03-28 09:55:16 +02:00
Anton Khirnov
527bf5f7c6
svq3: move the pred mode variables to SVQ3Context
...
This will allow removing the H264Context dependency in the future.
2016-03-28 09:54:37 +02:00
Anton Khirnov
ecc31f6b08
h264: move ff_h264_check_intra[4x4]_pred_mode() to h264_parse
...
It is shared with svq3.
2016-03-28 09:53:56 +02:00
Anton Khirnov
1877712c58
svq3: move mb_{x,y,xy} to SVQ3Context
...
This will allow removing the H264Context dependency in the future.
2016-03-28 09:53:45 +02:00
Anton Khirnov
c2a4ca944d
svq3: eliminate write_back_intra_pred_mode() usage
...
This function depends on the h264 internals and is so tiny that just
copying the code out is the simplest replacement.
2016-03-28 09:51:10 +02:00
Anton Khirnov
c73fb9efb2
svq3: add all the required dsp contexts into SVQ3Context
...
Stop using the H264Context ones, to allow removing the H264Context
dependency.
2016-03-28 09:50:51 +02:00
Anton Khirnov
15b0517da9
svq3: make the dsp functions static
...
There is no need for them to be extern anymore.
2016-03-28 09:50:41 +02:00
Anton Khirnov
9b30f8dd8f
h264: remove the svq3-specific code
2016-03-28 09:50:25 +02:00
Anton Khirnov
e42ca48a8b
svq3: rip out the mb decoding code shared with h264
...
The ~100 lines of shared code is not worth the pain of svq3 messing with
h264 internals.
2016-03-28 09:49:53 +02:00
Anton Khirnov
e481458bc3
h264: factor out pred weight table parsing into a separate file
...
This will allow decoupling the parser from the decoder.
2016-03-28 09:48:31 +02:00
Anton Khirnov
90ed6c5cf7
h2645_parse: compute the actual data length, without trailing paddding
...
This is required by h264.
2016-03-28 09:47:25 +02:00
Anton Khirnov
b667252a41
h2645_parse: add support for parsing h264
2016-03-28 09:45:04 +02:00
Anton Khirnov
52ec149fbe
h2645_parse: change the AVCodecContext* parameter to void*
...
This should make it more clear that it is not supposed to be used for
anything except logging.
2016-03-28 09:43:31 +02:00
Anton Khirnov
8229eff4b7
h2645_parse: add a function for uninitializing the packet
2016-03-28 09:43:18 +02:00
Anton Khirnov
fa936a307f
hevc_parse: rename into h2645_parse
...
This code will be shared with h264.
2016-03-28 09:42:44 +02:00
Martin Storsjö
cdb1665f70
aarch64: Make transpose_4x4H do a regular transpose
...
Previously, ff_h264_idct_add_neon (originally in the arm version) used
a non-regular transpose in order to be able to use more instructions
that deal with registers as 128 bit register pairs. The aarch64
translation doesn't do it to the same extent, but brought along the
same structure since it was a straight translation.
This reshuffles ff_h264_idct_add_neon, bringing it closer to
the C implementation, making the transpose_4x4H macro do a regular
transpose, usable for other algorithms as well.
Previously, the third and fourth output from transpose_4x4H were
swapped, and prior to cc29d96d5a
, the same inputs as well. In
addition to just swapping the outputs, also renumber the intermediate
registers for better readability (making the register order match
transpose_4x8B).
This runs with the same number of cycles as before.
Signed-off-by: Martin Storsjö <martin@martin.st>
2016-03-26 21:25:56 +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
e3dfef8e3c
qsvdec_h2645: switch to the new BSF API
2016-03-25 14:53:37 +01:00
Diego Biurrun
3b08d9d932
testprogs: K&R formatting cosmetics
2016-03-24 21:45:07 +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
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
Vittorio Giovara
64250d94b7
indeo4: Consistently initialize variables
...
Avoid using multiple variables for the same purpose.
2016-03-22 16:04:01 -04:00
Vittorio Giovara
6202e2fede
indeo4: Rework stream analysis report
...
* Change log level from error to debug
* Print report after the first decoded frame, not at the end of decoding
* Drop macro guard and use a context variable instead
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2016-03-22 16:03:52 -04:00
Anton Khirnov
33d18982fa
lavc: add a new bitstream filtering API
...
Deprecate the current bitstream filtering API.
2016-03-20 08:15:01 +01:00
Andreas Cadhalpun
a2d1922bde
takdec: ensure chan2 is a valid channel index
...
If chan2 is not smaller than the number of channels, it can cause
segmentation faults due to dereferencing a NULL pointer.
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2016-03-20 01:04:12 +01:00
Mark Thompson
d264c720f7
lavu: deprecate AV_PIX_FMT_VAAPI_*, replace with AV_PIX_FMT_VAAPI
...
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2016-03-19 15:40:22 +01:00
Luca Barbato
1098f5c049
svq3: Use a separate buffer for decoding the slices
...
The AVPacket.data should be considered read-only.
2016-03-16 13:09:23 +01:00
Luca Barbato
92c1a83ee9
qsv: Fix loading multiple plugins
...
av_get_token does not strip the trailing separator.
2016-03-15 16:05:19 +01:00
Luca Barbato
39a2d3288e
mpegvideo: Refactor emulated_edge_mc calls
2016-03-05 08:26:36 -05:00
Luca Barbato
0242351390
mpegvideo: Fix undefined negative shifts in mpeg_motion_internal
...
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2016-03-05 08:26:36 -05:00
Luca Barbato
7d4a1ff344
mpegvideo: Fix undefined negative shifts in ff_init_block_index
...
Found-by: gcc5-ubsan.
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2016-03-05 08:26:36 -05:00
Katerina Barone-Adesi
1389b4c18d
idct8x8: Fix undefined negative shifts
...
The original code left-shifts negative values, which is undefined
in the C99 specification (the one used during normal Libav compilation).
This change multiplies by (1 << shift), which is functionally equivalent,
but has defined behavior.
With this change, fate-idct8x8 compiled with --fsanitize=undefined works.
Bug-Id: 686
2016-03-05 08:26:36 -05:00
Vittorio Giovara
e10b7ef2fe
vdpau: Add missing deprecation guards
2016-03-05 08:23:18 -05:00
wm4
2e2f8534eb
lavc: factor apply_param_change() AV_EF_EXPLODE handling
...
Remove the duplicated code for handling failure of apply_param_change().
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2016-03-05 09:04:03 +01:00
Luca Barbato
f8c34f4b8d
indeo2: Fix banding artefacts
...
Rename luma table to delta table and change how it is used.
CC: libav-stable@libav.org
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2016-03-01 13:50:24 +01:00
Luca Barbato
d4066a7024
indeo2data: K&R formatting cosmetics
...
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2016-03-01 13:46:00 +01:00
Diego Biurrun
1a094af638
fft: Split MDCT bits off from FFT
2016-03-01 10:18:28 +01:00
Diego Biurrun
4c297249ac
rdft: arm: Split RDFT initialization into a separate file
2016-02-26 14:34:58 +01:00
Diego Biurrun
97aec6e75e
fft: arm: Drop unnecessary #include, add missing ones
2016-02-26 14:34:58 +01:00
Diego Biurrun
73ff983e8d
fft: x86: cosmetics: Drop silly comments, add comment, whitespace
2016-02-26 14:34:58 +01:00
Luca Barbato
ce9d7da765
qsv: Move down the implementation query
...
The plugin loaded may not match the general implementation capability
wise.
2016-02-26 10:28:42 +01:00
Anton Khirnov
dbb43b8b83
avpacket: properly reset data/size in av_packet_move_ref()
...
It currently just calls av_init_packet(), which does not touch those
fields.
2016-02-26 09:15:36 +01:00
Anton Khirnov
c80344d010
mpegvideo_enc: use avcodec_free_context() instead of av_free()
2016-02-26 09:14:59 +01:00
Vittorio Giovara
e66fa35392
vc1dec: Check group allocations separatedly
...
This avoids accessing NULL pointers in case of error.
2016-02-25 15:21:42 -05:00
Vittorio Giovara
01f0e6a0c9
vc1dec: Fix leak on error for array allocations
...
The deinit function in the 'error' section will correctly free
everything.
2016-02-25 15:20:53 -05:00
Vittorio Giovara
f91d94bdfc
vc1dec: Properly call deinit function on error
2016-02-25 15:20:24 -05:00
Vittorio Giovara
35b1cd343c
vc1dec: Drop commented out cruft
2016-02-25 15:19:36 -05:00
Diego Biurrun
d6e49096c0
idct: Only build prores IDCT if ProRes decoder is enabled
2016-02-24 11:41:01 +01:00
Anton Khirnov
3c53627ac1
qsvdec: store the sync point in heap memory
...
The reasoning is the same as for the corresponding qsvenc patch.
2016-02-24 10:41:45 +01:00
Maxym Dmytrychenko
a1335149fd
qsvenc: store the sync point in heap memory
...
The QSV runtime expects the sync point address passed to
MFXVideoENCODE_EncodeFrameAsync() to be valid until
MFXVideoCORE_SyncOperation().
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2016-02-24 10:14:40 +01:00
Anton Khirnov
a8068346e4
lavc: add a variant of av_get_audio_frame_duration working with AVCodecParameters
2016-02-23 17:01:58 +01:00
Anton Khirnov
998e1b8f52
lavc: add codec parameters API
...
This API is intended to allow passing around codec parameters without
using full AVCodecContext (which also contains codec options and
encoder/decoder state).
2016-02-23 17:01:58 +01:00
Diego Biurrun
257b30af8e
x86: hevc: Fix linking with both yasm and optimizations disabled
...
Some optimized functions reference optimized symbols, so the functions
must be explicitly disabled when those symbols are unavailable.
2016-02-23 11:47:54 +01:00
Marton Balint
5e555f9300
mpeg12enc: always write closed gops for intra only outputs
...
Reviewed-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Marton Balint <cus@passwd.hu>
2016-02-22 19:08:56 -05:00
Michael Niedermayer
f435d081b0
h264: Add an AVClass pointer to H264Context
...
Sample-Id: asan_heap-uaf_3660f67_757_cov_1257014655_Hi422FR1_SONY_A.jsv
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>
2016-02-22 19:08:56 -05:00
Vittorio Giovara
0837d1dfe2
libx264: Fix noise_reduction option assignment
...
First check the context, then check internal option. Drop the ! typo.
Introduced in 60f0fde309
.
2016-02-22 19:06:48 -05:00
Diego Biurrun
d24bd96bdd
build: Disentangle VC-1 decoder and parser
2016-02-19 20:38:18 +01:00
Diego Biurrun
15a24614ae
build: Add vc1dsp component for more fine-grained dependencies
2016-02-19 20:38:18 +01:00
Diego Biurrun
f9fbd47467
msmpeg4data: Move WMV2 data tables to their own file
2016-02-19 20:38:18 +01:00
Diego Biurrun
79866803ff
msmpeg4data: K&R formatting cosmetics
2016-02-19 20:38:17 +01:00
Diego Biurrun
624e235502
build: Introduce iso_media component
2016-02-18 15:35:46 +01:00
Diego Biurrun
82454c3a82
build: Let the WTV demuxer select the MPEG-TS demuxer
...
The WTV demuxer depends on large parts of the MPEG-TS demuxer internals
anyway and fails to build without it.
2016-02-18 15:35:45 +01:00
Diego Biurrun
7403be9b1b
build: Fix dependencies for components relying on H.263 data tables
2016-02-18 15:35:45 +01:00
Diego Biurrun
e453129321
build: Add missing dependencies for eatqi decoder
2016-02-18 15:35:44 +01:00
Vittorio Giovara
71eaefa64a
build: Add missing celp_math dependency for G723_1 encoder and decoder
...
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2016-02-18 15:35:44 +01:00
Diego Biurrun
3d8025d602
profiles: Add missing #endif comment
2016-02-18 15:35:44 +01:00
Diego Biurrun
6b96d2dcda
cosmetics: Drop particularly redundant silly comments
2016-02-18 15:35:43 +01:00