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
ccad34e3
Commit
ccad34e3
authored
Feb 24, 2015
by
zhaoxiu.zeng
Committed by
Michael Niedermayer
Feb 28, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avcodec/vc1_block: Simplify dcdiff initialization
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
bd55f01c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
24 deletions
+12
-24
vc1_block.c
libavcodec/vc1_block.c
+12
-24
No files found.
libavcodec/vc1_block.c
View file @
ccad34e3
...
@@ -571,16 +571,12 @@ static int vc1_decode_i_block(VC1Context *v, int16_t block[64], int n,
...
@@ -571,16 +571,12 @@ static int vc1_decode_i_block(VC1Context *v, int16_t block[64], int n,
return
-
1
;
return
-
1
;
}
}
if
(
dcdiff
)
{
if
(
dcdiff
)
{
const
int
m
=
(
v
->
pq
==
1
||
v
->
pq
==
2
)
?
3
-
v
->
pq
:
0
;
if
(
dcdiff
==
119
/* ESC index value */
)
{
if
(
dcdiff
==
119
/* ESC index value */
)
{
/* TODO: Optimize */
dcdiff
=
get_bits
(
gb
,
8
+
m
);
if
(
v
->
pq
==
1
)
dcdiff
=
get_bits
(
gb
,
10
);
else
if
(
v
->
pq
==
2
)
dcdiff
=
get_bits
(
gb
,
9
);
else
dcdiff
=
get_bits
(
gb
,
8
);
}
else
{
}
else
{
if
(
v
->
pq
==
1
)
if
(
m
)
dcdiff
=
(
dcdiff
<<
2
)
+
get_bits
(
gb
,
2
)
-
3
;
dcdiff
=
(
dcdiff
<<
m
)
+
get_bits
(
gb
,
m
)
-
((
1
<<
m
)
-
1
);
else
if
(
v
->
pq
==
2
)
dcdiff
=
(
dcdiff
<<
1
)
+
get_bits1
(
gb
)
-
1
;
}
}
if
(
get_bits1
(
gb
))
if
(
get_bits1
(
gb
))
dcdiff
=
-
dcdiff
;
dcdiff
=
-
dcdiff
;
...
@@ -739,16 +735,12 @@ static int vc1_decode_i_block_adv(VC1Context *v, int16_t block[64], int n,
...
@@ -739,16 +735,12 @@ static int vc1_decode_i_block_adv(VC1Context *v, int16_t block[64], int n,
return
-
1
;
return
-
1
;
}
}
if
(
dcdiff
)
{
if
(
dcdiff
)
{
const
int
m
=
(
mquant
==
1
||
mquant
==
2
)
?
3
-
mquant
:
0
;
if
(
dcdiff
==
119
/* ESC index value */
)
{
if
(
dcdiff
==
119
/* ESC index value */
)
{
/* TODO: Optimize */
dcdiff
=
get_bits
(
gb
,
8
+
m
);
if
(
mquant
==
1
)
dcdiff
=
get_bits
(
gb
,
10
);
else
if
(
mquant
==
2
)
dcdiff
=
get_bits
(
gb
,
9
);
else
dcdiff
=
get_bits
(
gb
,
8
);
}
else
{
}
else
{
if
(
mquant
==
1
)
if
(
m
)
dcdiff
=
(
dcdiff
<<
2
)
+
get_bits
(
gb
,
2
)
-
3
;
dcdiff
=
(
dcdiff
<<
m
)
+
get_bits
(
gb
,
m
)
-
((
1
<<
m
)
-
1
);
else
if
(
mquant
==
2
)
dcdiff
=
(
dcdiff
<<
1
)
+
get_bits1
(
gb
)
-
1
;
}
}
if
(
get_bits1
(
gb
))
if
(
get_bits1
(
gb
))
dcdiff
=
-
dcdiff
;
dcdiff
=
-
dcdiff
;
...
@@ -960,16 +952,12 @@ static int vc1_decode_intra_block(VC1Context *v, int16_t block[64], int n,
...
@@ -960,16 +952,12 @@ static int vc1_decode_intra_block(VC1Context *v, int16_t block[64], int n,
return
-
1
;
return
-
1
;
}
}
if
(
dcdiff
)
{
if
(
dcdiff
)
{
const
int
m
=
(
mquant
==
1
||
mquant
==
2
)
?
3
-
mquant
:
0
;
if
(
dcdiff
==
119
/* ESC index value */
)
{
if
(
dcdiff
==
119
/* ESC index value */
)
{
/* TODO: Optimize */
dcdiff
=
get_bits
(
gb
,
8
+
m
);
if
(
mquant
==
1
)
dcdiff
=
get_bits
(
gb
,
10
);
else
if
(
mquant
==
2
)
dcdiff
=
get_bits
(
gb
,
9
);
else
dcdiff
=
get_bits
(
gb
,
8
);
}
else
{
}
else
{
if
(
mquant
==
1
)
if
(
m
)
dcdiff
=
(
dcdiff
<<
2
)
+
get_bits
(
gb
,
2
)
-
3
;
dcdiff
=
(
dcdiff
<<
m
)
+
get_bits
(
gb
,
m
)
-
((
1
<<
m
)
-
1
);
else
if
(
mquant
==
2
)
dcdiff
=
(
dcdiff
<<
1
)
+
get_bits1
(
gb
)
-
1
;
}
}
if
(
get_bits1
(
gb
))
if
(
get_bits1
(
gb
))
dcdiff
=
-
dcdiff
;
dcdiff
=
-
dcdiff
;
...
...
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