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
5338566e
Commit
5338566e
authored
Feb 10, 2012
by
Reimar Döffinger
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mpegvideodec: minor simplifications.
Signed-off-by:
Reimar Döffinger
<
Reimar.Doeffinger@gmx.de
>
parent
af46ca73
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
16 deletions
+4
-16
mpegvideo.c
libavcodec/mpegvideo.c
+4
-16
No files found.
libavcodec/mpegvideo.c
View file @
5338566e
...
@@ -2648,10 +2648,7 @@ static void dct_unquantize_mpeg1_intra_c(MpegEncContext *s,
...
@@ -2648,10 +2648,7 @@ static void dct_unquantize_mpeg1_intra_c(MpegEncContext *s,
nCoeffs
=
s
->
block_last_index
[
n
];
nCoeffs
=
s
->
block_last_index
[
n
];
if
(
n
<
4
)
block
[
0
]
*=
n
<
4
?
s
->
y_dc_scale
:
s
->
c_dc_scale
;
block
[
0
]
=
block
[
0
]
*
s
->
y_dc_scale
;
else
block
[
0
]
=
block
[
0
]
*
s
->
c_dc_scale
;
/* XXX: only mpeg1 */
/* XXX: only mpeg1 */
quant_matrix
=
s
->
intra_matrix
;
quant_matrix
=
s
->
intra_matrix
;
for
(
i
=
1
;
i
<=
nCoeffs
;
i
++
)
{
for
(
i
=
1
;
i
<=
nCoeffs
;
i
++
)
{
...
@@ -2710,10 +2707,7 @@ static void dct_unquantize_mpeg2_intra_c(MpegEncContext *s,
...
@@ -2710,10 +2707,7 @@ static void dct_unquantize_mpeg2_intra_c(MpegEncContext *s,
if
(
s
->
alternate_scan
)
nCoeffs
=
63
;
if
(
s
->
alternate_scan
)
nCoeffs
=
63
;
else
nCoeffs
=
s
->
block_last_index
[
n
];
else
nCoeffs
=
s
->
block_last_index
[
n
];
if
(
n
<
4
)
block
[
0
]
*=
n
<
4
?
s
->
y_dc_scale
:
s
->
c_dc_scale
;
block
[
0
]
=
block
[
0
]
*
s
->
y_dc_scale
;
else
block
[
0
]
=
block
[
0
]
*
s
->
c_dc_scale
;
quant_matrix
=
s
->
intra_matrix
;
quant_matrix
=
s
->
intra_matrix
;
for
(
i
=
1
;
i
<=
nCoeffs
;
i
++
)
{
for
(
i
=
1
;
i
<=
nCoeffs
;
i
++
)
{
int
j
=
s
->
intra_scantable
.
permutated
[
i
];
int
j
=
s
->
intra_scantable
.
permutated
[
i
];
...
@@ -2741,10 +2735,7 @@ static void dct_unquantize_mpeg2_intra_bitexact(MpegEncContext *s,
...
@@ -2741,10 +2735,7 @@ static void dct_unquantize_mpeg2_intra_bitexact(MpegEncContext *s,
if
(
s
->
alternate_scan
)
nCoeffs
=
63
;
if
(
s
->
alternate_scan
)
nCoeffs
=
63
;
else
nCoeffs
=
s
->
block_last_index
[
n
];
else
nCoeffs
=
s
->
block_last_index
[
n
];
if
(
n
<
4
)
block
[
0
]
*=
n
<
4
?
s
->
y_dc_scale
:
s
->
c_dc_scale
;
block
[
0
]
=
block
[
0
]
*
s
->
y_dc_scale
;
else
block
[
0
]
=
block
[
0
]
*
s
->
c_dc_scale
;
quant_matrix
=
s
->
intra_matrix
;
quant_matrix
=
s
->
intra_matrix
;
for
(
i
=
1
;
i
<=
nCoeffs
;
i
++
)
{
for
(
i
=
1
;
i
<=
nCoeffs
;
i
++
)
{
int
j
=
s
->
intra_scantable
.
permutated
[
i
];
int
j
=
s
->
intra_scantable
.
permutated
[
i
];
...
@@ -2806,10 +2797,7 @@ static void dct_unquantize_h263_intra_c(MpegEncContext *s,
...
@@ -2806,10 +2797,7 @@ static void dct_unquantize_h263_intra_c(MpegEncContext *s,
qmul
=
qscale
<<
1
;
qmul
=
qscale
<<
1
;
if
(
!
s
->
h263_aic
)
{
if
(
!
s
->
h263_aic
)
{
if
(
n
<
4
)
block
[
0
]
*=
n
<
4
?
s
->
y_dc_scale
:
s
->
c_dc_scale
;
block
[
0
]
=
block
[
0
]
*
s
->
y_dc_scale
;
else
block
[
0
]
=
block
[
0
]
*
s
->
c_dc_scale
;
qadd
=
(
qscale
-
1
)
|
1
;
qadd
=
(
qscale
-
1
)
|
1
;
}
else
{
}
else
{
qadd
=
0
;
qadd
=
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