Steve Lhomme
09d4f04e49
directx_va: make va_pic_context public via va_surface.h
Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
9 years ago
Steve Lhomme
b655a1d725
directx_va: don't pass the AVCodecContext and es_format_t to directx_va_Open
Only to directx_va_Setup (and va_pool_Setup)
Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
9 years ago
Steve Lhomme
14ca39de8d
directx_va: remove unused parameter
Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
9 years ago
Steve Lhomme
f7d5f497bb
dxva: split the directx related parts from the pool/va parts
Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
9 years ago
Steve Lhomme
dd3b5b8ee6
directx_va: do the d3ddec release in pf_destroy_video_service()
And make the release strongly typed
Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
9 years ago
Steve Lhomme
5e19718054
directx_va: release the d3ddev in pf_destroy_device()
And make the release strongly typed
Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
9 years ago
Steve Lhomme
cab3a9749a
directx_va: pass the surface count to pf_create_decoder_surfaces
So it doesn't have to rely on the internal count in directx_sys_t
Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
9 years ago
Steve Lhomme
1b894f8795
directx_va: make surface_count unsigned
This is what libavcodec uses anyway.
Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
9 years ago
Steve Lhomme
bcaca1091f
directx_va: destroy the decoder at the same time as its surfaces
The interface release is also strongly typed
Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
9 years ago
Steve Lhomme
7a917e04ae
directx_va: no need to allocate dummy pictures anymore
We don't use their local picture_sys_t anymore
Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
9 years ago
Steve Lhomme
a5978cbc50
directx_va: stronger typing of va_surface in picture_sys_t
Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
9 years ago
Steve Lhomme
839722ce96
directx_va: let the surface deal with releasing its memory
Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
9 years ago
Steve Lhomme
d1a36cdde1
directx_va: remove the unused lock
Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
9 years ago
Steve Lhomme
1479c1b232
directx_va: rework the picture picking algorithm
Just rely on an available atomic value to find a usable picture or wait for
the vout to release some pictures.
Similar to the algorithm found in avcodec/VDPAU.
Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
9 years ago
Steve Lhomme
48dd1615ce
directx_va: replace the internal reference counter by an atomic value
Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
9 years ago
Steve Lhomme
51af7cf65a
directx_va: pass the decoder surface via the returned vlc_va_surface_t
Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
9 years ago
Steve Lhomme
1ff9f28781
directx_va: make each vlc_va_surface_t more independent
Can be free'd independently
Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
9 years ago
Steve Lhomme
b63626c445
directx_va: cleaning
Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
9 years ago
Steve Lhomme
32ee9e75da
directx_va: merge local functions only called once
Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
9 years ago
Steve Lhomme
a031cf8a17
directx_va: no need to store temporarily the number of threads
Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
9 years ago
Steve Lhomme
038bea37bf
directx_va: allow not setting device manager callbacks
It's not supported in Direct3D11
Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
9 years ago
Steve Lhomme
4d2a522cc5
direct3d: fix some logs
Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
9 years ago
Steve Lhomme
b6fae848b4
directx_va: type the common variables for D3D11VA and DXVA2
This will avoid a lot of casts.
Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
9 years ago
Steve Lhomme
570c797ebf
directx_va: add a way to lock/unlock a surface
The surface may not be used by the decoder but still being used for display/filter.
Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
9 years ago
Steve Lhomme
79d7926ae5
directx_va: let the va deal with the vlc_va_surface_t storage
To move away from the picture context
Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
9 years ago
Hugo Beauzée-Luyssen
4a746666d0
codec: dxva: Pretend we're always building on desktop
So that we can have the GUID declared
9 years ago
Steve Lhomme
2532e46e9d
directx_va: less verbose logging of available codecs
Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
9 years ago
Steve Lhomme
ac1f5fe207
avcodec: va: respect the buffer release prototype
It has always have an extra uint8_t pointer.
--
replaces https://patches.videolan.org/patch/15166/
fix compilation
Signed-off-by: Rémi Denis-Courmont <remi@remlab.net>
10 years ago
Steve Lhomme
155dcb01e9
directx_va: reduce the number of necessary decoding buffers
Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
10 years ago
Steve Lhomme
0d26651fa7
avcodec: remove unused parameter in va->release()
Signed-off-by: Rémi Denis-Courmont <remi@remlab.net>
10 years ago
Steve Lhomme
ed702548ad
directx_va: don't start the surface order at 0
Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
10 years ago
Steve Lhomme
f691ebf3ac
directx_va: don't use the first index if it's refcounted
Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
10 years ago
Steve Lhomme
4fa99290f9
d3d11va: always enable multithreading as the vout is always in a different thread
Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
10 years ago
Steve Lhomme
35e63080bc
directx_va: always use the oldest decoding buffer
Direct3D calls are pipelined and surface copies are not guaranteed to finish
after the call so reusing a surface that was requested to be copied produces
glitches in some cases. We use the surface that has been use the longest to
avoid this issue.
Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
10 years ago
Steve Lhomme
05b132ca0a
directx_va: read the HEVC profile to select the right decoder
Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
10 years ago
Steve Lhomme
0d188ca54d
directx_va: add VP9 decoding support with FFmpeg 57.17
Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
10 years ago
Steve Lhomme
7b06771ccd
directx_va: better logging of which decoder doesn't support a profile
Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
10 years ago
Francois Cartegnie
75bde798da
packetizer: h264: fix get_profile_level
10 years ago
Steve Lhomme
5914e37963
d3d11va: handle decoding to DXGI_FORMAT_420_OPAQUE using a ID3D11VideoProcessor
The DXGI_FORMAT_420_OPAQUE cannot be displayed or handled by the CPU. But it
can be converted using a VideoProcessor. It can convert directly to the textures
created by the vout.
Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
10 years ago
Steve Lhomme
a00ba4482e
directx_va: log when VP8/VP9 hardware decoding is detected
Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
10 years ago
Steve Lhomme
e9228cad34
dxva2: include d3d9.h before dxva2api.h
this is also done in ffmpeg/libav
Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
10 years ago
Steve Lhomme
e8733b218f
directx_va: warn something is wrong with the decoder if no input is available
Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
10 years ago
Francois Cartegnie
1c5c4a1167
codec: avcodec: missing directx_va include
10 years ago
Steve Lhomme
c358dd001c
d3d11va: better logging of decoder configuration
Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
11 years ago
Rémi Denis-Courmont
978dedc520
dxva: remove useless parameter
11 years ago
Steve Lhomme
d40efc2847
directx-va: do not load the DLL if not needed
Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
11 years ago
Steve Lhomme
d64fe19916
dxva2: store the internal hardware buffer in a picture_t
Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
11 years ago
Steve Lhomme
ad0b948a9c
directx-va: directx_va_mode_t is only used in directx_va.c
Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
11 years ago
Steve Lhomme
3071e1858a
dxva2: let the decoder handle the device referencing
Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
11 years ago
Steve Lhomme
3d5a30c5c6
dxva2: return an error when no output is supported for the input format
Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
11 years ago