Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
6d1fc909
Commit
6d1fc909
authored
May 03, 2023
by
Giovanni Mascellani
Committed by
Alexandre Julliard
May 08, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mfplat/buffer: Use the appropriate image copy function for NV11.
parent
399cec1b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
7 deletions
+19
-7
buffer.c
dlls/mfplat/buffer.c
+17
-7
mfplat.c
dlls/mfplat/tests/mfplat.c
+2
-0
No files found.
dlls/mfplat/buffer.c
View file @
6d1fc909
...
...
@@ -1336,13 +1336,23 @@ static HRESULT create_1d_buffer(DWORD max_length, DWORD alignment, IMFMediaBuffe
static
p_copy_image_func
get_2d_buffer_copy_func
(
DWORD
fourcc
)
{
if
(
fourcc
==
MAKEFOURCC
(
'N'
,
'V'
,
'1'
,
'2'
))
return
copy_image_nv12
;
if
(
fourcc
==
MAKEFOURCC
(
'I'
,
'M'
,
'C'
,
'1'
)
||
fourcc
==
MAKEFOURCC
(
'I'
,
'M'
,
'C'
,
'3'
))
return
copy_image_imc1
;
if
(
fourcc
==
MAKEFOURCC
(
'I'
,
'M'
,
'C'
,
'2'
)
||
fourcc
==
MAKEFOURCC
(
'I'
,
'M'
,
'C'
,
'4'
))
return
copy_image_imc2
;
return
NULL
;
switch
(
fourcc
)
{
case
MAKEFOURCC
(
'I'
,
'M'
,
'C'
,
'1'
):
case
MAKEFOURCC
(
'I'
,
'M'
,
'C'
,
'3'
):
return
copy_image_imc1
;
case
MAKEFOURCC
(
'I'
,
'M'
,
'C'
,
'2'
):
case
MAKEFOURCC
(
'I'
,
'M'
,
'C'
,
'4'
):
case
MAKEFOURCC
(
'N'
,
'V'
,
'1'
,
'1'
):
return
copy_image_imc2
;
case
MAKEFOURCC
(
'N'
,
'V'
,
'1'
,
'2'
):
return
copy_image_nv12
;
default:
return
NULL
;
}
}
static
HRESULT
create_2d_buffer
(
DWORD
width
,
DWORD
height
,
DWORD
fourcc
,
BOOL
bottom_up
,
IMFMediaBuffer
**
buffer
)
...
...
dlls/mfplat/tests/mfplat.c
View file @
6d1fc909
...
...
@@ -6171,6 +6171,7 @@ static void test_MFCreate2DMediaBuffer(void)
case
MAKEFOURCC
(
'I'
,
'M'
,
'C'
,
'2'
):
case
MAKEFOURCC
(
'I'
,
'M'
,
'C'
,
'4'
):
case
MAKEFOURCC
(
'N'
,
'V'
,
'1'
,
'1'
):
ok
(
stride
*
3
/
2
*
ptr
->
height
<=
length2
,
"Insufficient buffer space: expected at least %lu bytes, got only %lu
\n
"
,
stride
*
3
/
2
*
ptr
->
height
,
length2
);
for
(
j
=
0
;
j
<
ptr
->
height
;
j
++
)
...
...
@@ -6221,6 +6222,7 @@ static void test_MFCreate2DMediaBuffer(void)
case
MAKEFOURCC
(
'I'
,
'M'
,
'C'
,
'2'
):
case
MAKEFOURCC
(
'I'
,
'M'
,
'C'
,
'4'
):
case
MAKEFOURCC
(
'N'
,
'V'
,
'1'
,
'1'
):
for
(
j
=
0
;
j
<
ptr
->
height
;
j
++
)
for
(
k
=
0
;
k
<
stride
/
2
;
k
++
)
ok
(
data
[
j
*
(
pitch
/
2
)
+
k
]
==
(((
j
+
ptr
->
height
)
%
16
)
<<
4
)
+
(
k
%
16
),
...
...
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