Diego Biurrun
5afb94c817
Mark read-only tables as static
9 years ago
Anton Khirnov
b667252a41
h2645_parse: add support for parsing h264
9 years ago
Anton Khirnov
8229eff4b7
h2645_parse: add a function for uninitializing the packet
9 years ago
Anton Khirnov
fa936a307f
hevc_parse: rename into h2645_parse
...
This code will be shared with h264.
9 years ago
Philip Langdale
8d34a2f803
vdpau: Support for VDPAU accelerated HEVC decoding
...
Signed-off-by: Rémi Denis-Courmont <remi@remlab.net>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
9 years ago
Philip Langdale
8958c5c64d
hevc: Track long and short term RPS size for VDPAU
...
Today, we track the short term RPS size for DXVA, but only if the
SliceHeader RPS is being used. Otherwise it's left uninitialized.
NVIDIA's VDPAU implementation requires that the size be accurately
tracked even if an SPS RPS is being used. In this case, it's really
counting the size of the RPS idx information, but you end up with
mangled output if the value is not accurate.
VDPAU also needs the size of the long term RPS.
Signed-off-by: Philip Langdale <philipl@overt.org>
Signed-off-by: Rémi Denis-Courmont <remi@remlab.net>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
9 years ago
Anton Khirnov
2c6811397b
lavc: add profiles to AVCodecDescriptor
...
The profiles are a property of the codec, so it makes sense to export
them through AVCodecDescriptors, not just the codec implementations.
9 years ago
Anton Khirnov
e7078e842d
hevcdsp: add x86 SIMD for MC
9 years ago
Anton Khirnov
a853388d2f
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.
9 years ago
Anton Khirnov
688417399c
hevcdsp: split the pred functions by width
...
This should allow for more efficient SIMD.
9 years ago
Anton Khirnov
818bfe7f0a
hevcdsp: split the epel functions by width
...
This should allow for more efficient SIMD.
9 years ago
Anton Khirnov
1f821750f0
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.
9 years ago
Anton Khirnov
a8956eca1f
cabac: Make CABAC states hardcoded
...
There is not much reason to generate such a small table at runtime.
Signed-off-by: Derek Buitenhuis <derekb@vimeo.com>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
9 years ago
Vittorio Giovara
b8b13acd70
hevc: Simplify logical check
...
The intended meaning is "if this block is the first block in a slice then
its left boundary is a slice boundary". Silence a logical-not-parentheses
warning from gcc.
9 years ago
Vittorio Giovara
2268db2cd0
lavu: Drop the {minus,plus}1 suffix from AVComponentDescriptor fields
...
The new fields can be accessed directly and are more intelligible.
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
9 years ago
Anton Khirnov
d8ebb6157d
hevcdsp: fix a function name
...
put_weighted_pred_avg should be put_unweighted_pred_avg, there is no
weighting there.
9 years ago
Anton Khirnov
a1926a29fb
hevc: avoid invalid shifts of negative values
9 years ago
Vittorio Giovara
def97856de
lavc: AV-prefix all codec capabilities
...
Express bitfields more simply.
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
9 years ago
Anton Khirnov
a062a55d37
hevc_parser: fix standalone build with the hevc decoder disabled
...
The parser depends on hevc_ps, which in turn needs some data tables.
Found-by: James Almer <jamrial@gmail.com>
9 years ago
Anton Khirnov
077b559433
hevc: handle a NULL sps in set_sps() properly
...
This can happen in update_thread_context(), when the previous frame was
corrupted.
9 years ago
Anton Khirnov
18156b53f9
hevc: do not pass an entire HEVCContext into export_stream_params()
...
It only needs the parameter sets.
9 years ago
Anton Khirnov
7f78155dc6
hevc: improve a comment
...
That loop does the actual full decoding, so 'parse' can be misleading.
9 years ago
Anton Khirnov
d82e1adc20
hevc: move splitting the packet into NALUs into a separate function
...
This function is independent of the decoding context, so we'll be able
to use it in the parser.
9 years ago
Anton Khirnov
ae05b48655
hevc: eliminate the second call to hls_nal_unit()
...
Also, make hls_nal_unit() work only on the provided NAL unit, without
requiring a whole decoding context.
This will allow splitting this code for reuse by the parser.
9 years ago
Anton Khirnov
d7bebe4805
hevc: skip invalid/ignored NALUs when splitting the packet
...
There is no need to wait until actually decoding the NALU. This will
allow to get rid of the second hls_nal_unit() call later.
9 years ago
Anton Khirnov
b11acd5732
hevc: remove HEVCContext usage from hevc_ps
...
Factor out the parameter sets into a separate struct and use it instead.
This will allow us to reuse this code in the parser.
9 years ago
Andreas Cadhalpun
9f4c7397a2
hevc: check slice address length
...
It is used as get_bits argument and reading 0 bits doesn't make sense.
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
9 years ago
Anton Khirnov
69ab9f53f9
hevc: split bitstream unescaping to a separate file
...
It will be useful in the QSV HEVC encoder.
9 years ago
Anton Khirnov
fd124d8357
hevc_ps: split the code for parsing the SPS and exporting it into the context
...
This will be useful in the later commits, where we want to parse an SPS
without having a whole decoding context.
9 years ago
Michael Niedermayer
674b79148f
hevc: Fix HWACCEL_MAX for D3D11
...
Signed-off-by: Martin Storsjö <martin@martin.st>
10 years ago
Steve Lhomme
d8039ef8d2
D3D11va: add a Direct3D11 video decoder similar to DXVA2
...
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
10 years ago
wm4
3efe0393e4
hevc: make avcodec_decode_video2() fail if get_format() fails
...
Personally, I need the decoder to back out if get_format() returns no
usable pixel format. This didn't work because the error code was not
propagated down the call chain. This in turn happened because the
variable declaration removed in this patch shadowed the variable, whose
value is returned at the end of the function. Consequently, failures of
decode_nal_unit() were ignored in this place.
Reviewed-by: Andreas Cadhalpun <andreas.cadhalpun@googlemail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Anton Khirnov
7693ba0a0e
hevc: export stream parameters from extradata
...
This allows the callers to have a hint of the probable stream parameters
without actually decoding anything.
10 years ago
Anton Khirnov
1ae7afd256
hevc: split out setting AVCodecContext parameters
...
Additionally always set the software pixel format, so it's available
even if ff_get_format() is not called later. This will be useful for
exporting stream parameters from init().
10 years ago
Peter Meerwald
eea769df32
hevc: Use generic av_clip function, not C implementation
...
hevc seems to be the only place where the C implementation
of the av_clip function is explicitly selected, precluding
platform-specific optimizations
Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
10 years ago
Hendrik Leppkes
7e850fa67e
Add DXVA2 HEVC HWAccel
...
Signed-off-by: Anton Khirnov <anton@khirnov.net>
10 years ago
Hendrik Leppkes
b82722df9b
hevc: reindent after previous commit
...
Signed-off-by: Anton Khirnov <anton@khirnov.net>
10 years ago
Hendrik Leppkes
e72e8c5a1d
hevc: add hwaccel hooks
...
Signed-off-by: Anton Khirnov <anton@khirnov.net>
10 years ago
Hendrik Leppkes
4b95e95dba
hevc: store the short term rps flag and size in the context
...
For future use by hardware accelerators.
Signed-off-by: Anton Khirnov <anton@khirnov.net>
10 years ago
Hendrik Leppkes
36779a8405
hevc: store the escaped/raw bitstream in HEVCNAL
...
Hardware Accelerators require access to the escaped bitstream.
Signed-off-by: Anton Khirnov <anton@khirnov.net>
10 years ago
Hendrik Leppkes
b0593a4bca
hevc: pass the full HEVCNAL struct to decode_nal_unit
...
This enables decode_nal_unit to access additional fields added in
subsequent commits.
Signed-off-by: Anton Khirnov <anton@khirnov.net>
10 years ago
Anton Khirnov
443b71928b
hevc: unref the current frame if frame_start() fails
...
Prevents DPB from filling up with damaged input.
10 years ago
Vittorio Giovara
b2bece5e9a
hevc: always clip luma_log2_weight_denom
...
Its value shall be between 0 and 7 according to the specifications.
CC: libav-stable@libav.org
Bug-Id: CID 1257502
10 years ago
Luca Barbato
cd975d5658
hevc: Spin the mv_mpv_mode calls in a stand alone function
...
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
10 years ago
Anton Khirnov
8b573ddda7
hevc: remove superfluous assignments and checks
10 years ago
Anton Khirnov
eac3ac1fe0
hevc: eliminate an unneeded intermediate variable
10 years ago
Anton Khirnov
eb335f3c5c
hevc: reduce variable scope
...
Also, collapse the array into a scalar, since only one value is needed
at a time.
10 years ago
Anton Khirnov
84c0ece5fd
hevc: further reduce code duplication in hls_prediction_unit()
10 years ago
Anton Khirnov
a7b365ae19
hevc: reduce code duplication in hls_prediction_unit()
10 years ago
Anton Khirnov
16c01fb434
hevc: remove an unused function parameter
10 years ago