Commit Graph

68592 Commits

Author SHA1 Message Date
Francois Cartegnie 2fc7e0324e packetizer: flac: check streaminfo maxframesize value 2017-02-09 16:09:56 +01:00
Thomas Guillem 32fb9b35a5 transcode/video: also drain the decoder 2017-02-09 15:55:26 +01:00
Thomas Guillem 23af9317fb transcode/audio: also drain the decoder 2017-02-09 15:55:26 +01:00
Thomas Guillem 38d1871c8e mediacodec: reload if interlaced is not supported 2017-02-09 15:55:26 +01:00
Thomas Guillem 4079bb24e6 decoder: add decoder_QueueVideoWithCc
This replaces the pf_get_cc callback for video decoders. Packetizers should
still use pf_get_cc.
2017-02-09 15:55:26 +01:00
Thomas Guillem 548d2cf6b8 decoder: split DecoderGetCc 2017-02-09 15:55:26 +01:00
Thomas Guillem 61d88c2f16 decoder: ensure that only one output is queued 2017-02-09 15:55:26 +01:00
Thomas Guillem c4aabc5200 decoder: add VLCDEC_RELOAD status
This replaces the decoder_RequestReload() function. The module implementation
that returns this status should not have modified or released the input block
passed in pf_decoder parameter.
2017-02-09 15:55:26 +01:00
Thomas Guillem 21144a3a3d decoder: add VLCDEC_ECRITICAL status
This replaces the decoder_t->b_error boolean.

For now, only decoders that were setting b_error return VLCDEC_ECRITICAL, but a
lot more decoders should use this value since critical errors are often ignored.
2017-02-09 15:55:26 +01:00
Thomas Guillem a8b249bc6b decoder: refactor pf_decode_* callbacks
Use only one callback for every decoder types:

int (*pf_decode)(decoder_t *, block_t *p_block);

There is now only one way to send output frames/blocks from a decoder module:
using decoder_QueueVideo(), decoder_QueueAudio() and decoder_QueueSub()
functions.

This fixes transcoding not receiving any output when a decoder used
decoder_Queue*() function.

The pf_packetize callback is kept unchanged. A packetizer shouldn't be
asynchronous at all (and this simplify the locking for decoder core).

The pf_decode callback returns, for now, only one value: SUCCESS. This will
allow a module to send more status.
2017-02-09 15:55:16 +01:00
Thomas Guillem f4eec050da decoder: use one update callback per category
Because the next commit will merge all DecoderDecode*() into one.
2017-02-09 15:54:48 +01:00
Thomas Guillem 728d998503 decoder: fail earlier if the category is unknown 2017-02-09 15:54:48 +01:00
Thomas Guillem f1b803200f decoder: initialise callbacks regarding of the fmt 2017-02-09 15:54:48 +01:00
Francois Cartegnie 6ab4365088 packetizer: flac: rework (fix #17932)
Fixes the framesize number of bytestream parsing
and exponential framesize memcpy sending cpu rocket
high,  4M+ memcpy vs 800 for same 10s sample on variable
frame length.
Minimizes the number of required allocs.
Previous CRC errors also dissapeared.
2017-02-09 14:28:48 +01:00
Rémi Denis-Courmont 201cd92fe9 wav: fix memory leak 2017-02-08 22:44:52 +02:00
Rémi Denis-Courmont 38587a1ccf au: fix initialization 2017-02-08 22:44:52 +02:00
Francois Cartegnie 313f4d9279 demux: flac: send discontinuity to packetizer on seek
Required for early recovering.
As frame size is checked using CRC, injecting non
contiguous data will break everything until max_framesize +
next sync code distance.
2017-02-08 21:40:48 +01:00
Francois Cartegnie 1562a3f424 packetizer: flac: notify discontinuities 2017-02-08 19:40:05 +01:00
Francois Cartegnie 5e99694de8 vlc_block_helper: allow non raw byte matching on startcodes
required for optimizations in packetizers with bitmask sequence
2017-02-08 19:24:51 +01:00
Francois Cartegnie 1af7965c2f vlc_block_helper: simplify using byte and offset accounting
also removes unused helpers
2017-02-08 19:07:00 +01:00
Felix Paul Kühne 9f01fccc4e macosx/xibs: remove user-defined key 'themeKey' which is no longer used 2017-02-08 16:27:11 +01:00
Felix Paul Kühne e9fc73d13a securetransport: update ALPN request ID 2017-02-08 15:26:56 +01:00
Thomas Guillem 49c6f6f416 lib/media_player: use default deinterlace values
Inherit "deinterlace" and "deinterlace-mode" values from libvlc (values are set
from libvlc-module.c).

Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
2017-02-08 15:12:12 +01:00
Steve Lhomme 6e97b461fe playlist: fix missing NULL test
Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
2017-02-08 15:08:08 +01:00
Steve Lhomme dabb50419a demux: mkv: add support for new spatial projection elements
Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
2017-02-08 15:08:04 +01:00
Steve Lhomme 8fa9ae9837 direct3d11: use the picture_sys_t texture rather than a local quad one
picSys already has all the fields we need.

Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
2017-02-08 14:44:26 +01:00
Steve Lhomme 866534e9c8 direct3d11: clean Pool() code
Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
2017-02-08 14:44:26 +01:00
Steve Lhomme 10a5d70c42 direct3d11: rename the texture mapping functions
And move the code to avoid declaration + definition.
Make Direct3D11UnmapPoolTexture void to be compatible with the pool unlock
prototype.

Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
2017-02-08 14:44:26 +01:00
Steve Lhomme 1b8a7861d2 direct3d11: don't allow mapping opaque decoder textures to the CPU
Since we're doing direct rendering it will never go into the CPU.

Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
2017-02-08 14:44:26 +01:00
Steve Lhomme 12493f663d direct3d11: move the quad texture allocation in a separate function
Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
2017-02-08 14:44:26 +01:00
Steve Lhomme 936523b585 direct3d11: keep a reference to the pixel shader longer
Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
2017-02-08 14:44:26 +01:00
Steve Lhomme 8c1e5e7b4a direct3d11: store the texture format that is used to display the texture
Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
2017-02-08 14:44:26 +01:00
Steve Lhomme 0064f79968 direct3d11: use a function to allocate the shader resource views
Based on the d3d_format_t matching the texture format.

Allow targetting a particular slice index in the texture slice array.

Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
2017-02-08 14:44:26 +01:00
Steve Lhomme bcb5f1fc7d direct3d11: fix compilation when HAVE_ID3D11VIDEODECODER is not set
Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
2017-02-08 14:44:17 +01:00
Steve Lhomme 5a5bbfbce2 direct3d11: remove the useless staging texture
Since we place the texture correctly we don't need an intermediate copy to crop
it.
Fixes the green display when decoding with the CPU.

Close #17982 #17978

Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
2017-02-08 14:42:17 +01:00
Steve Lhomme 8e8a74d361 direct3d11: rework the texture placement
Now we always copy the whole texture area and move the boundaries in the
viewport to match the offset/visible dimensions.

Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
2017-02-08 14:41:28 +01:00
Steve Lhomme a8c2c5d00f d3d11va: use the picture from the decoder pool directly
No need to extract into a secondary one to send to the vout and so a
CopySubresourceRegion() for every frame decoded.

Rework the mutex locking as in this new case we don't do anything in
Extract() anymore.

Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
2017-02-08 14:41:28 +01:00
Steve Lhomme 7422fec752 direct3d11: tweak the pixel shader for the Xbox
although we deliver full range RGB the Xbox assumes it's studio range RGB and
expand the values even more. So we don't apply the studio->full range already
in the pixel shaders.

Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
2017-02-08 14:41:28 +01:00
Steve Lhomme 5e5ac5f510 direct3d11: pass the whitepoint and colorspace matrices to the RGB pixel shader
Now all pixel shaders are given the same constant buffers

Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
2017-02-08 14:41:28 +01:00
Steve Lhomme 06065dbc40 direct3d11: make the pixel shader matrices non-const
So they can be tweaked

Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
2017-02-08 14:41:28 +01:00
Filip Roséen 8cc427c799 packetizer/h264: fix resource deallocation during Close
The previous loop condition suffers from an off-by-one error, meaning
that the last resource in p_sys->pp_sps and p_sys->pp_pps would never
be released if populated.

fixes #17987

Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
2017-02-08 14:37:40 +01:00
Steve Lhomme 67c96dbb5f direct3d11: define the 0.0625 magic value for the white point
That's the "studio" range shifted for full range RGB.

Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
2017-02-08 13:49:59 +01:00
Steve Lhomme 2fbf0acc95 direct3d11: decide if we're going to do direct rendering earlier
We delay the creation of the decoder pool when we know it's going to require
more than one picture. At that point we know the vout is in DR more or not,
once and for all. We can allocate things accordingly from that point.

Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
2017-02-08 13:49:59 +01:00
Steve Lhomme 5e421c3eef direct3d11: no need for an interim vout_display_info_t value
Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
2017-02-08 13:49:59 +01:00
Steve Lhomme 60fe60c579 d3d11_surface: avoid a cast between ID3D11Texture2D* and ID3D11Resource*
Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
2017-02-08 13:49:59 +01:00
Steve Lhomme c91c96a809 d3d11_fmt: avoid a cast between ID3D11Texture2D* and ID3D11Resource*
Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
2017-02-08 13:49:59 +01:00
Steve Lhomme 629889f70e direct3d11: factorize the shader compilation code
Log the error when the compilation fails

Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
2017-02-08 13:49:59 +01:00
Steve Lhomme 4261854541 direct3d11: factorize the pixel shader selection from the output format
Warn if we didn't find a suitable subpicture shader

Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
2017-02-08 13:49:59 +01:00
Steve Lhomme 010f6bd930 direct3d11: Use the pixel shader corresponding to the texture format
Not the sub resources formats.
Now we refuse to render if we the pixel shader doesn't match a known format.

Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
2017-02-08 13:49:59 +01:00
Steve Lhomme 14d41e6162 direct3d11: use a function to find the SPU blendable texture format
It outputs a full d3d_format_t const pointer which is used to allocate/set the
quad texture.

Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
2017-02-08 13:49:59 +01:00