Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-gpu
Commits
d5a5026d
Commit
d5a5026d
authored
Jun 26, 2010
by
Laurent Aimar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Allocated mod16 D3D surfaces.
It seems necessary for ATI(?) dxva2 support.
parent
10e9ceaf
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
8 deletions
+12
-8
modules/codec/avcodec/dxva2.c
modules/codec/avcodec/dxva2.c
+12
-8
No files found.
modules/codec/avcodec/dxva2.c
View file @
d5a5026d
...
...
@@ -227,6 +227,8 @@ typedef struct
/* */
vlc_object_t
*
log
;
int
codec_id
;
int
width
;
int
height
;
/* DLL */
HINSTANCE
hd3d9_dll
;
...
...
@@ -303,8 +305,7 @@ static int Setup(vlc_va_t *external, void **hw, vlc_fourcc_t *chroma,
{
vlc_va_dxva2_t
*
va
=
vlc_va_dxva2_Get
(
external
);
if
(
va
->
surface_width
==
width
&&
va
->
surface_height
==
height
)
if
(
va
->
width
==
width
&&
va
->
height
==
height
&&
va
->
decoder
)
goto
ok
;
/* */
...
...
@@ -375,7 +376,7 @@ static int Extract(vlc_va_t *external, picture_t *picture, AVFrame *ff)
lock
.
Pitch
/
2
,
};
CopyFromYv12
(
picture
,
plane
,
pitch
,
va
->
surface_width
,
va
->
surface_
height
,
va
->
width
,
va
->
height
,
&
va
->
surface_cache
);
}
else
{
assert
(
va
->
render
==
MAKEFOURCC
(
'N'
,
'V'
,
'1'
,
'2'
));
...
...
@@ -388,7 +389,7 @@ static int Extract(vlc_va_t *external, picture_t *picture, AVFrame *ff)
lock
.
Pitch
,
};
CopyFromNv12
(
picture
,
plane
,
pitch
,
va
->
surface_width
,
va
->
surface_
height
,
va
->
width
,
va
->
height
,
&
va
->
surface_cache
);
}
...
...
@@ -826,7 +827,12 @@ static int DxCreateVideoDecoder(vlc_va_dxva2_t *va,
msg_Dbg
(
va
->
log
,
"DxCreateVideoDecoder id %d %dx%d"
,
codec_id
,
fmt
->
i_width
,
fmt
->
i_height
);
va
->
width
=
fmt
->
i_width
;
va
->
height
=
fmt
->
i_height
;
/* Allocates all surfaces needed for the decoder */
va
->
surface_width
=
(
fmt
->
i_width
+
15
)
&
~
15
;
va
->
surface_height
=
(
fmt
->
i_height
+
15
)
&
~
15
;
switch
(
codec_id
)
{
case
CODEC_ID_H264
:
va
->
surface_count
=
16
+
1
;
...
...
@@ -837,8 +843,8 @@ static int DxCreateVideoDecoder(vlc_va_dxva2_t *va,
}
LPDIRECT3DSURFACE9
surface_list
[
VA_DXVA2_MAX_SURFACE_COUNT
];
if
(
FAILED
(
IDirectXVideoDecoderService_CreateSurface
(
va
->
vs
,
fmt
->
i
_width
,
fmt
->
i
_height
,
va
->
surface
_width
,
va
->
surface
_height
,
va
->
surface_count
-
1
,
va
->
render
,
D3DPOOL_DEFAULT
,
...
...
@@ -856,8 +862,6 @@ static int DxCreateVideoDecoder(vlc_va_dxva2_t *va,
surface
->
refcount
=
0
;
surface
->
order
=
0
;
}
va
->
surface_width
=
fmt
->
i_width
;
va
->
surface_height
=
fmt
->
i_height
;
msg_Dbg
(
va
->
log
,
"IDirectXVideoAccelerationService_CreateSurface succeed with %d surfaces (%dx%d)"
,
va
->
surface_count
,
fmt
->
i_width
,
fmt
->
i_height
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment