Commit Graph

43047 Commits

Author SHA1 Message Date
Diego Biurrun
6ebd06a9b2 intrax8: Drop lots of pointless parentheses
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2016-03-29 13:41:09 +02:00
Vittorio Giovara
9b57995cdd intrax8: Drop MB emulation code
This is already performed in init_context_frame().
2016-03-29 13:41:09 +02:00
Vittorio Giovara
9fa888c028 intrax8: Keep a reference to the decoder blocks 2016-03-29 13:41:09 +02:00
Vittorio Giovara
c2084ffcbf intrax8: Use the generic horizband function
This is assuming that intrax8 has no support for interlacing
Carry over lowdelay value in ff_intrax8_decode_picture.
2016-03-29 13:41:09 +02:00
Vittorio Giovara
b1268e0f03 intrax8: Pass macroblock coordinates to ff_intrax8_decode_picture
These values need to be updated with the last macroblock position,
so keep them as pointers.
2016-03-29 13:41:09 +02:00
Vittorio Giovara
d0540fd021 intrax8: Pass macroblock size to ff_intrax8_common_init
Helps in decoupling this code from mpegvideo.
2016-03-29 13:41:09 +02:00
Vittorio Giovara
9f4d99138d fate: Add test for WMV2 with jframes 2016-03-29 13:41:09 +02:00
Anton Khirnov
ca2f19b9cc h264: switch to h2645_parse for NAL parsing 2016-03-28 10:16:28 +02:00
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
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