Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
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-gpu
Commits
b3fe4787
Commit
b3fe4787
authored
Aug 31, 2007
by
Jean-Paul Saman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Honor --ffmpeg-skip-frame setting when used with --ffmpeg-hurry-up.
parent
ab7ce0df
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
4 deletions
+10
-4
modules/codec/ffmpeg/video.c
modules/codec/ffmpeg/video.c
+10
-4
No files found.
modules/codec/ffmpeg/video.c
View file @
b3fe4787
...
@@ -56,6 +56,8 @@ struct decoder_sys_t
...
@@ -56,6 +56,8 @@ struct decoder_sys_t
/* for frame skipping algo */
/* for frame skipping algo */
int
b_hurry_up
;
int
b_hurry_up
;
enum
AVDiscard
i_skip_frame
;
enum
AVDiscard
i_skip_idct
;
/* how many decoded frames are late */
/* how many decoded frames are late */
int
i_late_frames
;
int
i_late_frames
;
...
@@ -294,6 +296,7 @@ int E_(InitVideoDec)( decoder_t *p_dec, AVCodecContext *p_context,
...
@@ -294,6 +296,7 @@ int E_(InitVideoDec)( decoder_t *p_dec, AVCodecContext *p_context,
p_sys
->
p_context
->
skip_frame
=
AVDISCARD_NONE
;
p_sys
->
p_context
->
skip_frame
=
AVDISCARD_NONE
;
break
;
break
;
}
}
p_sys
->
i_skip_frame
=
p_sys
->
p_context
->
skip_frame
;
var_Create
(
p_dec
,
"ffmpeg-skip-idct"
,
VLC_VAR_INTEGER
|
VLC_VAR_DOINHERIT
);
var_Create
(
p_dec
,
"ffmpeg-skip-idct"
,
VLC_VAR_INTEGER
|
VLC_VAR_DOINHERIT
);
var_Get
(
p_dec
,
"ffmpeg-skip-idct"
,
&
val
);
var_Get
(
p_dec
,
"ffmpeg-skip-idct"
,
&
val
);
...
@@ -318,6 +321,7 @@ int E_(InitVideoDec)( decoder_t *p_dec, AVCodecContext *p_context,
...
@@ -318,6 +321,7 @@ int E_(InitVideoDec)( decoder_t *p_dec, AVCodecContext *p_context,
p_sys
->
p_context
->
skip_idct
=
AVDISCARD_NONE
;
p_sys
->
p_context
->
skip_idct
=
AVDISCARD_NONE
;
break
;
break
;
}
}
p_sys
->
i_skip_idct
=
p_sys
->
p_context
->
skip_idct
;
/* ***** ffmpeg direct rendering ***** */
/* ***** ffmpeg direct rendering ***** */
p_sys
->
b_direct_rendering
=
0
;
p_sys
->
b_direct_rendering
=
0
;
...
@@ -464,7 +468,9 @@ picture_t *E_(DecodeVideo)( decoder_t *p_dec, block_t **pp_block )
...
@@ -464,7 +468,9 @@ picture_t *E_(DecodeVideo)( decoder_t *p_dec, block_t **pp_block )
b_drawpicture
=
0
;
b_drawpicture
=
0
;
if
(
p_sys
->
i_late_frames
<
8
)
if
(
p_sys
->
i_late_frames
<
8
)
{
{
p_sys
->
p_context
->
skip_frame
=
AVDISCARD_BIDIR
;
p_sys
->
p_context
->
skip_frame
=
(
p_sys
->
i_skip_frame
<=
AVDISCARD_BIDIR
)
?
AVDISCARD_BIDIR
:
p_sys
->
i_skip_frame
;
}
}
else
else
{
{
...
@@ -480,7 +486,7 @@ picture_t *E_(DecodeVideo)( decoder_t *p_dec, block_t **pp_block )
...
@@ -480,7 +486,7 @@ picture_t *E_(DecodeVideo)( decoder_t *p_dec, block_t **pp_block )
else
else
{
{
if
(
p_sys
->
b_hurry_up
)
if
(
p_sys
->
b_hurry_up
)
p_sys
->
p_context
->
skip_frame
=
AVDISCARD_DEFAULT
;
p_sys
->
p_context
->
skip_frame
=
p_sys
->
i_skip_frame
;
if
(
!
(
p_block
->
i_flags
&
BLOCK_FLAG_PREROLL
)
)
if
(
!
(
p_block
->
i_flags
&
BLOCK_FLAG_PREROLL
)
)
b_drawpicture
=
1
;
b_drawpicture
=
1
;
else
else
...
@@ -490,7 +496,7 @@ picture_t *E_(DecodeVideo)( decoder_t *p_dec, block_t **pp_block )
...
@@ -490,7 +496,7 @@ picture_t *E_(DecodeVideo)( decoder_t *p_dec, block_t **pp_block )
if
(
p_sys
->
p_context
->
width
<=
0
||
p_sys
->
p_context
->
height
<=
0
)
if
(
p_sys
->
p_context
->
width
<=
0
||
p_sys
->
p_context
->
height
<=
0
)
{
{
if
(
p_sys
->
b_hurry_up
)
if
(
p_sys
->
b_hurry_up
)
p_sys
->
p_context
->
skip_frame
=
AVDISCARD_ALL
;
p_sys
->
p_context
->
skip_frame
=
p_sys
->
i_skip_frame
;
b_null_size
=
VLC_TRUE
;
b_null_size
=
VLC_TRUE
;
}
}
...
@@ -538,7 +544,7 @@ picture_t *E_(DecodeVideo)( decoder_t *p_dec, block_t **pp_block )
...
@@ -538,7 +544,7 @@ picture_t *E_(DecodeVideo)( decoder_t *p_dec, block_t **pp_block )
/* Reparse it to not drop the I frame */
/* Reparse it to not drop the I frame */
b_null_size
=
VLC_FALSE
;
b_null_size
=
VLC_FALSE
;
if
(
p_sys
->
b_hurry_up
)
if
(
p_sys
->
b_hurry_up
)
p_sys
->
p_context
->
skip_frame
=
AVDISCARD_DEFAULT
;
p_sys
->
p_context
->
skip_frame
=
p_sys
->
i_skip_frame
;
i_used
=
avcodec_decode_video
(
p_sys
->
p_context
,
p_sys
->
p_ff_pic
,
i_used
=
avcodec_decode_video
(
p_sys
->
p_context
,
p_sys
->
p_ff_pic
,
&
b_gotpicture
,
&
b_gotpicture
,
(
uint8_t
*
)
p_sys
->
p_buffer
,
p_sys
->
i_buffer
);
(
uint8_t
*
)
p_sys
->
p_buffer
,
p_sys
->
i_buffer
);
...
...
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