Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
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
Commits
7e8b856b
Commit
7e8b856b
authored
Mar 05, 2014
by
Rafaël Carré
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
av_vdpau_get_profile implementation for FFmpeg
parent
929692f4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
47 additions
and
0 deletions
+47
-0
modules/hw/vdpau/avcodec.c
modules/hw/vdpau/avcodec.c
+47
-0
No files found.
modules/hw/vdpau/avcodec.c
View file @
7e8b856b
...
...
@@ -170,6 +170,53 @@ static int Setup(vlc_va_t *va, void **ctxp, vlc_fourcc_t *chromap,
return
Init
(
va
,
ctxp
,
chromap
,
width
,
height
);
}
#if LIBAVCODEC_VERSION_MAJOR == 55 && LIBAVCODEC_VERSION_MINOR <= 42 && LIBAVCODEC_VERSION_MICRO >= 100
static
inline
int
av_vdpau_get_profile
(
AVCodecContext
*
avctx
,
VdpDecoderProfile
*
profile
)
{
#define PROFILE(prof) \
do { \
*profile = prof; \
return 0; \
} while (0)
switch
(
avctx
->
codec_id
)
{
case
AV_CODEC_ID_MPEG1VIDEO
:
PROFILE
(
VDP_DECODER_PROFILE_MPEG1
);
case
AV_CODEC_ID_MPEG2VIDEO
:
switch
(
avctx
->
profile
)
{
case
FF_PROFILE_MPEG2_MAIN
:
PROFILE
(
VDP_DECODER_PROFILE_MPEG2_MAIN
);
case
FF_PROFILE_MPEG2_SIMPLE
:
PROFILE
(
VDP_DECODER_PROFILE_MPEG2_SIMPLE
);
default:
return
AVERROR
(
EINVAL
);
}
case
AV_CODEC_ID_H263
:
PROFILE
(
VDP_DECODER_PROFILE_MPEG4_PART2_ASP
);
case
AV_CODEC_ID_MPEG4
:
switch
(
avctx
->
profile
)
{
case
FF_PROFILE_MPEG4_SIMPLE
:
PROFILE
(
VDP_DECODER_PROFILE_MPEG4_PART2_SP
);
case
FF_PROFILE_MPEG4_ADVANCED_SIMPLE
:
PROFILE
(
VDP_DECODER_PROFILE_MPEG4_PART2_ASP
);
default:
return
AVERROR
(
EINVAL
);
}
case
AV_CODEC_ID_H264
:
switch
(
avctx
->
profile
)
{
case
FF_PROFILE_H264_CONSTRAINED_BASELINE
:
case
FF_PROFILE_H264_BASELINE
:
PROFILE
(
VDP_DECODER_PROFILE_H264_BASELINE
);
case
FF_PROFILE_H264_MAIN
:
PROFILE
(
VDP_DECODER_PROFILE_H264_MAIN
);
case
FF_PROFILE_H264_HIGH
:
PROFILE
(
VDP_DECODER_PROFILE_H264_HIGH
);
default:
return
AVERROR
(
EINVAL
);
}
case
AV_CODEC_ID_WMV3
:
case
AV_CODEC_ID_VC1
:
switch
(
avctx
->
profile
)
{
case
FF_PROFILE_VC1_SIMPLE
:
PROFILE
(
VDP_DECODER_PROFILE_VC1_SIMPLE
);
case
FF_PROFILE_VC1_MAIN
:
PROFILE
(
VDP_DECODER_PROFILE_VC1_MAIN
);
case
FF_PROFILE_VC1_ADVANCED
:
PROFILE
(
VDP_DECODER_PROFILE_VC1_ADVANCED
);
default:
return
AVERROR
(
EINVAL
);
}
default:
return
AVERROR
(
EINVAL
);
}
#undef PROFILE
}
#endif
static
int
Open
(
vlc_va_t
*
va
,
AVCodecContext
*
ctx
,
const
es_format_t
*
fmt
)
{
VdpStatus
err
;
...
...
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