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
4d3bc8d9
Commit
4d3bc8d9
authored
Aug 13, 2014
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mpeg: avoid double upconversion
parent
a161bda6
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
8 deletions
+9
-8
modules/demux/mpeg/es.c
modules/demux/mpeg/es.c
+1
-1
modules/demux/mpeg/h264.c
modules/demux/mpeg/h264.c
+4
-4
modules/demux/mpeg/hevc.c
modules/demux/mpeg/hevc.c
+4
-3
No files found.
modules/demux/mpeg/es.c
View file @
4d3bc8d9
...
...
@@ -362,7 +362,7 @@ static int Control( demux_t *p_demux, int i_query, va_list args )
(
double
)(
uint64_t
)(
stream_Size
(
p_demux
->
s
)
);
/* The first few seconds are guaranteed to be very whacky,
* don't bother trying ... Too bad */
if
(
f_pos
<
0
.
01
||
if
(
f_pos
<
0
.
01
f
||
(
p_sys
->
i_pts
+
p_sys
->
i_time_offset
)
<
8000000
)
{
return
VLC_EGENERIC
;
...
...
modules/demux/mpeg/h264.c
View file @
4d3bc8d9
...
...
@@ -104,9 +104,9 @@ static int Open( vlc_object_t * p_this )
p_sys
->
p_es
=
NULL
;
p_sys
->
i_dts
=
0
;
p_sys
->
f_fps
=
var_CreateGetFloat
(
p_demux
,
"h264-fps"
);
if
(
p_sys
->
f_fps
<
0
.
001
)
p_sys
->
f_fps
=
0
.
001
;
msg_Dbg
(
p_demux
,
"using %.2f fps"
,
p_sys
->
f_fps
);
if
(
p_sys
->
f_fps
<
0
.
001
f
)
p_sys
->
f_fps
=
0
.
001
f
;
msg_Dbg
(
p_demux
,
"using %.2f fps"
,
(
double
)
p_sys
->
f_fps
);
/* Load the mpegvideo packetizer */
es_format_Init
(
&
fmt
,
VIDEO_ES
,
VLC_CODEC_H264
);
...
...
@@ -173,7 +173,7 @@ static int Demux( demux_t *p_demux)
p_block_out
=
p_next
;
p_sys
->
i_dts
+=
(
int64_t
)((
double
)
1000000
.
0
/
p_sys
->
f_fps
);
p_sys
->
i_dts
+=
(
int64_t
)((
float
)
CLOCK_FREQ
/
p_sys
->
f_fps
);
}
}
return
1
;
...
...
modules/demux/mpeg/hevc.c
View file @
4d3bc8d9
...
...
@@ -115,7 +115,7 @@ static int Open( vlc_object_t * p_this )
{
p_sys
->
f_fps
=
(
p_sys
->
f_force_fps
<
0
.
001
f
)
?
0
.
001
f
:
p_sys
->
f_force_fps
;
msg_Dbg
(
p_demux
,
"using %.2f fps"
,
p_sys
->
f_fps
);
msg_Dbg
(
p_demux
,
"using %.2f fps"
,
(
double
)
p_sys
->
f_fps
);
}
else
p_sys
->
f_fps
=
0
.
0
f
;
...
...
@@ -201,7 +201,7 @@ static int Demux( demux_t *p_demux)
if
(
nal_type
<
0x40
&&
p_sys
->
f_fps
)
{
es_out_Control
(
p_demux
->
out
,
ES_OUT_SET_PCR
,
p_sys
->
i_dts
);
p_sys
->
i_dts
+=
(
int64_t
)((
double
)
1000000
.
0
/
p_sys
->
f_fps
);
p_sys
->
i_dts
+=
(
int64_t
)((
float
)
CLOCK_FREQ
/
p_sys
->
f_fps
);
}
es_out_Send
(
p_demux
->
out
,
p_sys
->
p_es
,
p_block_out
);
...
...
@@ -278,7 +278,8 @@ static int32_t getFPS( demux_t *p_demux, block_t * p_block )
if
(
num_units_in_tick
)
{
p_sys
->
f_fps
=
(
(
float
)
time_scale
)
/
(
(
float
)
num_units_in_tick
);
msg_Dbg
(
p_demux
,
"Using framerate %f fps from VPS"
,
p_sys
->
f_fps
);
msg_Dbg
(
p_demux
,
"Using framerate %f fps from VPS"
,
(
double
)
p_sys
->
f_fps
);
}
else
{
...
...
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