Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
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-2-2
Commits
f95cb82f
Commit
f95cb82f
authored
Oct 10, 2012
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avcodec: reduce indentation, fix spelling
parent
a294d6af
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
28 deletions
+24
-28
modules/codec/avcodec/video.c
modules/codec/avcodec/video.c
+24
-28
No files found.
modules/codec/avcodec/video.c
View file @
f95cb82f
...
...
@@ -1144,14 +1144,13 @@ static enum PixelFormat ffmpeg_GetFormat( AVCodecContext *p_context,
msg_Dbg
(
p_dec
,
"Available decoder output format %d (%s)"
,
pi_fmt
[
i
],
name
?
name
:
"unknown"
);
vlc_va_t
*
p_va
=
NULL
;
#ifdef HAVE_AVCODEC_VAAPI
/* Only VLD supported */
if
(
pi_fmt
[
i
]
==
PIX_FMT_VAAPI_VLD
)
{
msg_Dbg
(
p_dec
,
"Trying VA API"
);
p_sys
->
p_va
=
vlc_va_NewVaapi
(
VLC_OBJECT
(
p_dec
),
p_sys
->
i_codec_id
);
if
(
!
p_sys
->
p_va
)
msg_Warn
(
p_dec
,
"Failed to open VA API"
);
p_va
=
vlc_va_NewVaapi
(
VLC_OBJECT
(
p_dec
),
p_sys
->
i_codec_id
);
}
#endif
...
...
@@ -1159,9 +1158,7 @@ static enum PixelFormat ffmpeg_GetFormat( AVCodecContext *p_context,
if
(
pi_fmt
[
i
]
==
PIX_FMT_DXVA2_VLD
)
{
msg_Dbg
(
p_dec
,
"Trying DXVA2"
);
p_sys
->
p_va
=
vlc_va_NewDxva2
(
VLC_OBJECT
(
p_dec
),
p_sys
->
i_codec_id
);
if
(
!
p_sys
->
p_va
)
msg_Warn
(
p_dec
,
"Failed to open DXVA2"
);
p_va
=
vlc_va_NewDxva2
(
VLC_OBJECT
(
p_dec
),
p_sys
->
i_codec_id
);
}
#endif
...
...
@@ -1169,40 +1166,39 @@ static enum PixelFormat ffmpeg_GetFormat( AVCodecContext *p_context,
if
(
pi_fmt
[
i
]
==
PIX_FMT_VDA_VLD
)
{
msg_Dbg
(
p_dec
,
"Trying VDA"
);
p_sys
->
p_va
=
vlc_va_NewVDA
(
VLC_OBJECT
(
p_dec
),
p_sys
->
i_codec_id
,
p_dec
->
fmt_in
.
p_extra
,
p_dec
->
fmt_in
.
i_extra
);
if
(
!
p_sys
->
p_va
)
msg_Warn
(
p_dec
,
"Failed to open VDA"
);
p_va
=
vlc_va_NewVDA
(
VLC_OBJECT
(
p_dec
),
p_sys
->
i_codec_id
,
p_dec
->
fmt_in
.
p_extra
,
p_dec
->
fmt_in
.
i_extra
);
}
#endif
if
(
p_sys
->
p_va
&&
p_context
->
width
>
0
&&
p_context
->
height
>
0
)
if
(
p_va
==
NULL
)
{
msg_Dbg
(
p_dec
,
"acceleration not available"
);
continue
;
}
if
(
p_context
->
width
>
0
&&
p_context
->
height
>
0
)
{
/* We try to call vlc_va_Setup when possible to detect errors when
* possible (later is too late) */
if
(
vlc_va_Setup
(
p_sys
->
p_va
,
&
p_context
->
hwaccel_context
,
if
(
vlc_va_Setup
(
p_va
,
&
p_context
->
hwaccel_context
,
&
p_dec
->
fmt_out
.
video
.
i_chroma
,
p_context
->
width
,
p_context
->
height
)
)
{
msg_Err
(
p_dec
,
"vlc_va_Setup failed"
);
vlc_va_Delete
(
p_
sys
->
p_
va
);
p_sys
->
p_va
=
NULL
;
vlc_va_Delete
(
p_va
);
continue
;
}
}
if
(
p_sys
->
p_va
)
{
if
(
p_sys
->
p_va
->
description
)
msg_Info
(
p_dec
,
"Using %s for hardware decoding."
,
p_sys
->
p_va
->
description
);
/* FIXME this will disabled direct rendering
* even if a new pixel format is renegociated
*/
p_sys
->
b_direct_rendering
=
false
;
p_context
->
draw_horiz_band
=
NULL
;
return
pi_fmt
[
i
];
}
p_sys
->
p_va
=
p_va
;
if
(
p_va
->
description
)
msg_Info
(
p_dec
,
"Using %s for hardware decoding."
,
p_va
->
description
);
/* FIXME this will disable direct rendering
* even if a new pixel format is renegotiated
*/
p_sys
->
b_direct_rendering
=
false
;
p_context
->
draw_horiz_band
=
NULL
;
return
pi_fmt
[
i
];
}
/* Fallback to default behaviour */
...
...
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