Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
FFmpeg
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
libremedia
Tethys
FFmpeg
Commits
a8fce24b
Commit
a8fce24b
authored
8 years ago
by
Hendrik Leppkes
Committed by
Anton Khirnov
8 years ago
Browse files
Options
Downloads
Patches
Plain Diff
avconv_dxva2: support HEVC Main10 decoding
Signed-off-by:
Anton Khirnov
<
anton@khirnov.net
>
parent
33f6690e
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
avconv_dxva2.c
+7
-2
7 additions, 2 deletions
avconv_dxva2.c
with
7 additions
and
2 deletions
avconv_dxva2.c
+
7
−
2
View file @
a8fce24b
...
@@ -56,6 +56,7 @@ DEFINE_GUID(DXVADDI_Intel_ModeH264_E, 0x604F8E68, 0x4951,0x4C54,0x88,0xFE,0xAB,0
...
@@ -56,6 +56,7 @@ DEFINE_GUID(DXVADDI_Intel_ModeH264_E, 0x604F8E68, 0x4951,0x4C54,0x88,0xFE,0xAB,0
DEFINE_GUID
(
DXVA2_ModeVC1_D
,
0x1b81beA3
,
0xa0c7
,
0x11d3
,
0xb9
,
0x84
,
0x00
,
0xc0
,
0x4f
,
0x2e
,
0x73
,
0xc5
);
DEFINE_GUID
(
DXVA2_ModeVC1_D
,
0x1b81beA3
,
0xa0c7
,
0x11d3
,
0xb9
,
0x84
,
0x00
,
0xc0
,
0x4f
,
0x2e
,
0x73
,
0xc5
);
DEFINE_GUID
(
DXVA2_ModeVC1_D2010
,
0x1b81beA4
,
0xa0c7
,
0x11d3
,
0xb9
,
0x84
,
0x00
,
0xc0
,
0x4f
,
0x2e
,
0x73
,
0xc5
);
DEFINE_GUID
(
DXVA2_ModeVC1_D2010
,
0x1b81beA4
,
0xa0c7
,
0x11d3
,
0xb9
,
0x84
,
0x00
,
0xc0
,
0x4f
,
0x2e
,
0x73
,
0xc5
);
DEFINE_GUID
(
DXVA2_ModeHEVC_VLD_Main
,
0x5b11d51b
,
0x2f4c
,
0x4452
,
0xbc
,
0xc3
,
0x09
,
0xf2
,
0xa1
,
0x16
,
0x0c
,
0xc0
);
DEFINE_GUID
(
DXVA2_ModeHEVC_VLD_Main
,
0x5b11d51b
,
0x2f4c
,
0x4452
,
0xbc
,
0xc3
,
0x09
,
0xf2
,
0xa1
,
0x16
,
0x0c
,
0xc0
);
DEFINE_GUID
(
DXVA2_ModeHEVC_VLD_Main10
,
0x107af0e0
,
0xef1a
,
0x4d19
,
0xab
,
0xa8
,
0x67
,
0xa1
,
0x63
,
0x07
,
0x3d
,
0x13
);
DEFINE_GUID
(
DXVA2_NoEncrypt
,
0x1b81beD0
,
0xa0c7
,
0x11d3
,
0xb9
,
0x84
,
0x00
,
0xc0
,
0x4f
,
0x2e
,
0x73
,
0xc5
);
DEFINE_GUID
(
DXVA2_NoEncrypt
,
0x1b81beD0
,
0xa0c7
,
0x11d3
,
0xb9
,
0x84
,
0x00
,
0xc0
,
0x4f
,
0x2e
,
0x73
,
0xc5
);
DEFINE_GUID
(
GUID_NULL
,
0x00000000
,
0x0000
,
0x0000
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
);
DEFINE_GUID
(
GUID_NULL
,
0x00000000
,
0x0000
,
0x0000
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
,
0x00
);
...
@@ -83,6 +84,7 @@ static const dxva2_mode dxva2_modes[] = {
...
@@ -83,6 +84,7 @@ static const dxva2_mode dxva2_modes[] = {
/* HEVC/H.265 */
/* HEVC/H.265 */
{
&
DXVA2_ModeHEVC_VLD_Main
,
AV_CODEC_ID_HEVC
},
{
&
DXVA2_ModeHEVC_VLD_Main
,
AV_CODEC_ID_HEVC
},
{
&
DXVA2_ModeHEVC_VLD_Main10
,
AV_CODEC_ID_HEVC
},
{
NULL
,
0
},
{
NULL
,
0
},
};
};
...
@@ -265,6 +267,8 @@ static int dxva2_create_decoder(AVCodecContext *s)
...
@@ -265,6 +267,8 @@ static int dxva2_create_decoder(AVCodecContext *s)
GUID
*
guid_list
=
NULL
;
GUID
*
guid_list
=
NULL
;
unsigned
guid_count
=
0
,
i
,
j
;
unsigned
guid_count
=
0
,
i
,
j
;
GUID
device_guid
=
GUID_NULL
;
GUID
device_guid
=
GUID_NULL
;
const
D3DFORMAT
surface_format
=
s
->
sw_pix_fmt
==
AV_PIX_FMT_YUV420P10
?
MKTAG
(
'P'
,
'0'
,
'1'
,
'0'
)
:
MKTAG
(
'N'
,
'V'
,
'1'
,
'2'
);
D3DFORMAT
target_format
=
0
;
D3DFORMAT
target_format
=
0
;
DXVA2_VideoDesc
desc
=
{
0
};
DXVA2_VideoDesc
desc
=
{
0
};
DXVA2_ConfigPictureDecode
config
;
DXVA2_ConfigPictureDecode
config
;
...
@@ -301,7 +305,7 @@ static int dxva2_create_decoder(AVCodecContext *s)
...
@@ -301,7 +305,7 @@ static int dxva2_create_decoder(AVCodecContext *s)
}
}
for
(
j
=
0
;
j
<
target_count
;
j
++
)
{
for
(
j
=
0
;
j
<
target_count
;
j
++
)
{
const
D3DFORMAT
format
=
target_list
[
j
];
const
D3DFORMAT
format
=
target_list
[
j
];
if
(
format
==
MKTAG
(
'N'
,
'V'
,
'1'
,
'2'
)
)
{
if
(
format
==
surface_format
)
{
target_format
=
format
;
target_format
=
format
;
break
;
break
;
}
}
...
@@ -359,7 +363,8 @@ static int dxva2_create_decoder(AVCodecContext *s)
...
@@ -359,7 +363,8 @@ static int dxva2_create_decoder(AVCodecContext *s)
frames_hwctx
=
frames_ctx
->
hwctx
;
frames_hwctx
=
frames_ctx
->
hwctx
;
frames_ctx
->
format
=
AV_PIX_FMT_DXVA2_VLD
;
frames_ctx
->
format
=
AV_PIX_FMT_DXVA2_VLD
;
frames_ctx
->
sw_format
=
AV_PIX_FMT_NV12
;
frames_ctx
->
sw_format
=
s
->
sw_pix_fmt
==
AV_PIX_FMT_YUV420P10
?
AV_PIX_FMT_P010
:
AV_PIX_FMT_NV12
;
frames_ctx
->
width
=
FFALIGN
(
s
->
coded_width
,
surface_alignment
);
frames_ctx
->
width
=
FFALIGN
(
s
->
coded_width
,
surface_alignment
);
frames_ctx
->
height
=
FFALIGN
(
s
->
coded_height
,
surface_alignment
);
frames_ctx
->
height
=
FFALIGN
(
s
->
coded_height
,
surface_alignment
);
frames_ctx
->
initial_pool_size
=
num_surfaces
;
frames_ctx
->
initial_pool_size
=
num_surfaces
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment