Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
F
ffmpeg
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
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
ffmpeg
Commits
0e29c4f7
Commit
0e29c4f7
authored
Jul 30, 2011
by
Reimar Döffinger
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert bink dequantization hack that is no longer necessary.
Signed-off-by:
Reimar Döffinger
<
Reimar.Doeffinger@gmx.de
>
parent
faba79e0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
18 deletions
+2
-18
bink.c
libavcodec/bink.c
+2
-18
No files found.
libavcodec/bink.c
View file @
0e29c4f7
...
...
@@ -572,22 +572,6 @@ static inline int binkb_get_value(BinkContext *c, int bundle_num)
return
ret
;
}
static
inline
DCTELEM
dequant
(
DCTELEM
in
,
uint32_t
quant
,
int
dc
)
{
/* Note: multiplication is unsigned but we want signed shift
* otherwise clipping breaks.
* TODO: The official decoder does not use clipping at all
* but instead uses the full 32-bit result.
* However clipping at least gets rid of the case that a
* half-black half-white intra block gets black and white swapped
* and should cause at most minor differences (except for DC). */
int32_t
res
=
in
*
quant
;
res
>>=
11
;
if
(
!
dc
)
res
=
av_clip_int16
(
res
);
return
res
;
}
/**
* Read 8x8 block of DCT coefficients.
*
...
...
@@ -686,10 +670,10 @@ static int read_dct_coeffs(GetBitContext *gb, int32_t block[64], const uint8_t *
quant
=
quant_matrices
[
quant_idx
];
block
[
0
]
=
dequant
(
block
[
0
],
quant
[
0
],
1
)
;
block
[
0
]
=
(
block
[
0
]
*
quant
[
0
])
>>
11
;
for
(
i
=
0
;
i
<
coef_count
;
i
++
)
{
int
idx
=
coef_idx
[
i
];
block
[
scan
[
idx
]]
=
dequant
(
block
[
scan
[
idx
]],
quant
[
idx
],
0
)
;
block
[
scan
[
idx
]]
=
(
block
[
scan
[
idx
]]
*
quant
[
idx
])
>>
11
;
}
return
0
;
...
...
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