Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ffmpeg.wasm-core
Commits
1358f7dd
Commit
1358f7dd
authored
Nov 04, 2017
by
Kieran Kunhya
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert "vc2enc: Calculate average slice quantiser correctly"
This reverts commit
626d200e
.
parent
415038f2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
vc2enc.c
libavcodec/vc2enc.c
+3
-3
No files found.
libavcodec/vc2enc.c
View file @
1358f7dd
...
...
@@ -167,7 +167,7 @@ typedef struct VC2EncContext {
int
slice_max_bytes
;
int
slice_min_bytes
;
int
q_ceil
;
int
64_t
q_avg
;
int
q_avg
;
/* Options */
double
tolerance
;
...
...
@@ -755,7 +755,7 @@ static int calc_slice_sizes(VC2EncContext *s)
for
(
i
=
0
;
i
<
s
->
num_x
*
s
->
num_y
;
i
++
)
{
SliceArgs
*
args
=
&
enc_args
[
i
];
total_bytes_needed
+=
args
->
bytes
;
s
->
q_avg
+=
args
->
quant_idx
;
s
->
q_avg
=
(
s
->
q_avg
+
args
->
quant_idx
)
/
2
;
}
return
total_bytes_needed
;
...
...
@@ -1045,7 +1045,7 @@ static av_cold int vc2_encode_end(AVCodecContext *avctx)
int
i
;
VC2EncContext
*
s
=
avctx
->
priv_data
;
av_log
(
avctx
,
AV_LOG_INFO
,
"Qavg: %
f
\n
"
,
(
float
)
s
->
q_avg
/
(
s
->
num_x
*
s
->
num_y
)
);
av_log
(
avctx
,
AV_LOG_INFO
,
"Qavg: %
i
\n
"
,
s
->
q_avg
);
for
(
i
=
0
;
i
<
3
;
i
++
)
{
ff_vc2enc_free_transforms
(
&
s
->
transform_args
[
i
].
t
);
...
...
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