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
1bb171da
Commit
1bb171da
authored
Sep 27, 2015
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vda: use avcodec context parameters
parent
e8d10e59
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
22 deletions
+10
-22
modules/codec/Makefile.am
modules/codec/Makefile.am
+0
-1
modules/codec/avcodec/vda.c
modules/codec/avcodec/vda.c
+10
-21
No files found.
modules/codec/Makefile.am
View file @
1bb171da
...
...
@@ -367,7 +367,6 @@ endif
libvda_plugin_la_SOURCES
=
\
video_chroma/copy.c video_chroma/copy.h
\
packetizer/h264_nal.c packetizer/h264_nal.h
\
codec/avcodec/vda.c
libvda_plugin_la_CFLAGS
=
$(AM_CFLAGS)
$(AVCODEC_CFLAGS)
libvda_plugin_la_LDFLAGS
=
-Wl
,-framework,CoreFoundation,-framework,VideoDecodeAcceleration,-framework,QuartzCore
...
...
modules/codec/avcodec/vda.c
View file @
1bb171da
...
...
@@ -37,7 +37,6 @@
#include "avcodec.h"
#include "va.h"
#include "../../packetizer/h264_nal.h"
#include "../../video_chroma/copy.h"
#include <libavcodec/vda.h>
...
...
@@ -102,41 +101,31 @@ static int Open(vlc_va_t *va,
(
void
)
fmt
;
(
void
)
p_sys
;
VLC_UNUSED
(
avctx
);
size_t
i_profile
=
0xFFFF
,
i_level
=
0xFFFF
;
bool
b_ret
=
false
;
switch
(
fmt
->
i_codec
)
{
case
VLC_CODEC_H264
:
b_ret
=
h264_get_profile_level
(
fmt
,
&
i_profile
,
&
i_level
,
NULL
);
if
(
!
b_ret
)
{
msg_Warn
(
va
,
"H264 profile and level parsing failed because it didn't arrive yet"
);
return
VLC_EGENERIC
;
}
msg_Dbg
(
va
,
"trying to decode MPEG-4 Part 10: profile %zu, level %zu"
,
i_profile
,
i_level
);
switch
(
avctx
->
codec_id
)
{
case
AV_CODEC_ID_H264
:
msg_Dbg
(
va
,
"trying to decode MPEG-4 Part 10: profile %d, level %d"
,
avctx
->
profile
,
avctx
->
level
);
switch
(
i_profile
)
{
case
PROFILE_H264_BASELINE
:
case
PROFILE_H264_MAIN
:
case
PROFILE_H264_HIGH
:
switch
(
avctx
->
profile
&
~
FF_PROFILE_H264_INTRA
)
{
case
FF_PROFILE_H264_CONSTRAINED_BASELINE
:
case
FF_PROFILE_H264_BASELINE
:
case
FF_PROFILE_H264_MAIN
:
case
FF_PROFILE_H264_HIGH
:
break
;
default:
{
msg_Dbg
(
va
,
"unsupported H264 profile %zu"
,
i_profile
);
msg_Dbg
(
va
,
"unsupported H264 profile %d"
,
avctx
->
profile
);
return
-
1
;
}
}
break
;
default:
#ifndef NDEBUG
msg_Err
(
va
,
"
'%4.4s' is not supported"
,
(
char
*
)
&
fmt
->
i_codec
);
msg_Err
(
va
,
"
codec %d is not supported"
,
avctx
->
codec_id
);
#endif
return
VLC_EGENERIC
;
break
;
}
vlc_va_sys_t
*
sys
=
calloc
(
1
,
sizeof
(
*
sys
));
...
...
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