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
64c6d660
Commit
64c6d660
authored
Nov 30, 2014
by
Frédéric Yhuel
Committed by
Jean-Baptiste Kempf
Dec 01, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
stream_filter: smooth: minor optimization
Signed-off-by:
Jean-Baptiste Kempf
<
jb@videolan.org
>
parent
4b94eddd
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
modules/stream_filter/smooth/smooth.h
modules/stream_filter/smooth/smooth.h
+1
-0
modules/stream_filter/smooth/utils.c
modules/stream_filter/smooth/utils.c
+2
-3
No files found.
modules/stream_filter/smooth/smooth.h
View file @
64c6d660
...
...
@@ -93,6 +93,7 @@ typedef struct sms_stream_s
int
type
;
quality_level_t
*
current_qlvl
;
/* current quality level for Download() */
uint64_t
rgi_bw
[
SMS_BW_SHORTSTATS
];
/* Measured bandwidths of the N last chunks */
int
rgi_tidx
;
/* tail index of rgi_bw */
uint64_t
i_obw
;
/* Overwall bandwidth average */
unsigned
int
i_obw_samples
;
/* used to compute overall incrementally */
}
sms_stream_t
;
...
...
modules/stream_filter/smooth/utils.c
View file @
64c6d660
...
...
@@ -170,9 +170,8 @@ void bw_stats_put( sms_stream_t *sms, const uint64_t bw )
}
else
{
memmove
(
sms
->
rgi_bw
,
&
sms
->
rgi_bw
[
1
],
sizeof
(
sms
->
rgi_bw
[
0
])
*
(
SMS_BW_SHORTSTATS
-
1
)
);
sms
->
rgi_bw
[
SMS_BW_SHORTSTATS
-
1
]
=
bw
;
sms
->
rgi_tidx
=
(
sms
->
rgi_tidx
+
1
)
%
SMS_BW_SHORTSTATS
;
sms
->
rgi_bw
[
sms
->
rgi_tidx
]
=
bw
;
}
}
...
...
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