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
74459468
Commit
74459468
authored
Apr 10, 2015
by
Timothy Gu
Committed by
Michael Niedermayer
Apr 10, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cabac-test: Return 1 if there are any errors
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
61090db2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
5 deletions
+11
-5
cabac.c
libavcodec/cabac.c
+11
-5
No files found.
libavcodec/cabac.c
View file @
74459468
...
@@ -174,7 +174,7 @@ int main(void){
...
@@ -174,7 +174,7 @@ int main(void){
CABACContext
c
;
CABACContext
c
;
uint8_t
b
[
9
*
SIZE
];
uint8_t
b
[
9
*
SIZE
];
uint8_t
r
[
9
*
SIZE
];
uint8_t
r
[
9
*
SIZE
];
int
i
;
int
i
,
ret
=
0
;
uint8_t
state
[
10
]
=
{
0
};
uint8_t
state
[
10
]
=
{
0
};
AVLFG
prng
;
AVLFG
prng
;
...
@@ -207,21 +207,27 @@ STOP_TIMER("put_cabac")
...
@@ -207,21 +207,27 @@ STOP_TIMER("put_cabac")
for
(
i
=
0
;
i
<
SIZE
;
i
++
){
for
(
i
=
0
;
i
<
SIZE
;
i
++
){
START_TIMER
START_TIMER
if
(
(
r
[
i
]
&
1
)
!=
get_cabac_bypass
(
&
c
)
)
if
(
(
r
[
i
]
&
1
)
!=
get_cabac_bypass
(
&
c
)
)
{
av_log
(
NULL
,
AV_LOG_ERROR
,
"CABAC bypass failure at %d
\n
"
,
i
);
av_log
(
NULL
,
AV_LOG_ERROR
,
"CABAC bypass failure at %d
\n
"
,
i
);
ret
=
1
;
}
STOP_TIMER
(
"get_cabac_bypass"
)
STOP_TIMER
(
"get_cabac_bypass"
)
}
}
for
(
i
=
0
;
i
<
SIZE
;
i
++
){
for
(
i
=
0
;
i
<
SIZE
;
i
++
){
START_TIMER
START_TIMER
if
(
(
r
[
i
]
&
1
)
!=
get_cabac_noinline
(
&
c
,
state
)
)
if
(
(
r
[
i
]
&
1
)
!=
get_cabac_noinline
(
&
c
,
state
)
)
{
av_log
(
NULL
,
AV_LOG_ERROR
,
"CABAC failure at %d
\n
"
,
i
);
av_log
(
NULL
,
AV_LOG_ERROR
,
"CABAC failure at %d
\n
"
,
i
);
ret
=
1
;
}
STOP_TIMER
(
"get_cabac"
)
STOP_TIMER
(
"get_cabac"
)
}
}
if
(
!
get_cabac_terminate
(
&
c
))
if
(
!
get_cabac_terminate
(
&
c
))
{
av_log
(
NULL
,
AV_LOG_ERROR
,
"where's the Terminator?
\n
"
);
av_log
(
NULL
,
AV_LOG_ERROR
,
"where's the Terminator?
\n
"
);
ret
=
1
;
}
return
0
;
return
ret
;
}
}
#endif
/* TEST */
#endif
/* TEST */
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