Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
VLC
Manage
Activity
Members
Labels
Code
Merge requests
1
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
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
Lyndon Brown
VLC
Commits
ed712a81
Commit
ed712a81
authored
3 years ago
by
Thomas Guillem
Committed by
Hugo Beauzée-Luyssen
3 years ago
Browse files
Options
Downloads
Patches
Plain Diff
avcodec: vaapi: remove unused GetVaProfile()
parent
b8d45c45
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
modules/codec/avcodec/vaapi.c
+1
-74
1 addition, 74 deletions
modules/codec/avcodec/vaapi.c
with
1 addition
and
74 deletions
modules/codec/avcodec/vaapi.c
+
1
−
74
View file @
ed712a81
...
...
@@ -57,74 +57,6 @@ struct vaapi_vctx
vlc_sem_t
pool_sem
;
};
static
int
GetVaProfile
(
const
AVCodecContext
*
ctx
,
const
es_format_t
*
fmt_in
,
VAProfile
*
va_profile
,
int
*
vlc_chroma
,
unsigned
*
pic_count
)
{
VAProfile
i_profile
;
unsigned
count
=
3
;
int
i_vlc_chroma
=
VLC_CODEC_VAAPI_420
;
switch
(
ctx
->
codec_id
)
{
case
AV_CODEC_ID_MPEG1VIDEO
:
case
AV_CODEC_ID_MPEG2VIDEO
:
i_profile
=
VAProfileMPEG2Main
;
count
=
4
;
break
;
case
AV_CODEC_ID_MPEG4
:
i_profile
=
VAProfileMPEG4AdvancedSimple
;
break
;
case
AV_CODEC_ID_WMV3
:
i_profile
=
VAProfileVC1Main
;
break
;
case
AV_CODEC_ID_VC1
:
i_profile
=
VAProfileVC1Advanced
;
break
;
case
AV_CODEC_ID_H264
:
i_profile
=
VAProfileH264High
;
count
=
18
;
break
;
case
AV_CODEC_ID_HEVC
:
if
(
fmt_in
->
i_profile
==
FF_PROFILE_HEVC_MAIN
)
i_profile
=
VAProfileHEVCMain
;
else
if
(
fmt_in
->
i_profile
==
FF_PROFILE_HEVC_MAIN_10
)
{
i_profile
=
VAProfileHEVCMain10
;
i_vlc_chroma
=
VLC_CODEC_VAAPI_420_10BPP
;
}
else
return
VLC_EGENERIC
;
count
=
18
;
break
;
case
AV_CODEC_ID_VP8
:
i_profile
=
VAProfileVP8Version0_3
;
count
=
5
;
break
;
case
AV_CODEC_ID_VP9
:
if
(
ctx
->
profile
==
FF_PROFILE_VP9_0
)
i_profile
=
VAProfileVP9Profile0
;
#if VA_CHECK_VERSION( 0, 39, 0 )
else
if
(
ctx
->
profile
==
FF_PROFILE_VP9_2
)
{
i_profile
=
VAProfileVP9Profile2
;
i_vlc_chroma
=
VLC_CODEC_VAAPI_420_10BPP
;
}
#endif
else
return
VLC_EGENERIC
;
count
=
10
;
break
;
default:
return
VLC_EGENERIC
;
}
*
va_profile
=
i_profile
;
*
pic_count
=
count
+
ctx
->
thread_count
;
*
vlc_chroma
=
i_vlc_chroma
;
return
VLC_SUCCESS
;
}
typedef
struct
{
struct
vaapi_pic_context
ctx
;
AVFrame
*
avframe
;
...
...
@@ -229,16 +161,11 @@ static int Create(vlc_va_t *va, AVCodecContext *ctx, enum AVPixelFormat hwfmt,
video_format_t
*
fmt_out
,
vlc_video_context
**
vtcx_out
)
{
VLC_UNUSED
(
desc
);
VLC_UNUSED
(
fmt_in
);
if
(
hwfmt
!=
AV_PIX_FMT_VAAPI
||
dec_device
==
NULL
||
dec_device
->
type
!=
VLC_DECODER_DEVICE_VAAPI
)
return
VLC_EGENERIC
;
VAProfile
i_profile
;
unsigned
count
;
int
i_vlc_chroma
;
if
(
GetVaProfile
(
ctx
,
fmt_in
,
&
i_profile
,
&
i_vlc_chroma
,
&
count
)
!=
VLC_SUCCESS
)
return
VLC_EGENERIC
;
VADisplay
va_dpy
=
dec_device
->
opaque
;
AVBufferRef
*
hwdev_ref
=
av_hwdevice_ctx_alloc
(
AV_HWDEVICE_TYPE_VAAPI
);
...
...
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