Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
FFmpeg
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
libremedia
Tethys
FFmpeg
Commits
dc4b6250
Commit
dc4b6250
authored
8 years ago
by
Anton Khirnov
Committed by
Diego Biurrun
8 years ago
Browse files
Options
Downloads
Patches
Plain Diff
tta: use get_unary() instead of a custom implementation
Signed-off-by:
Diego Biurrun
<
diego@biurrun.de
>
parent
e122b12c
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
libavcodec/tta.c
+2
-11
2 additions, 11 deletions
libavcodec/tta.c
with
2 additions
and
11 deletions
libavcodec/tta.c
+
2
−
11
View file @
dc4b6250
...
@@ -35,6 +35,7 @@
...
@@ -35,6 +35,7 @@
#include
"avcodec.h"
#include
"avcodec.h"
#include
"get_bits.h"
#include
"get_bits.h"
#include
"internal.h"
#include
"internal.h"
#include
"unary.h"
#define FORMAT_SIMPLE 1
#define FORMAT_SIMPLE 1
#define FORMAT_ENCRYPTED 2
#define FORMAT_ENCRYPTED 2
...
@@ -171,16 +172,6 @@ static void rice_init(TTARice *c, uint32_t k0, uint32_t k1)
...
@@ -171,16 +172,6 @@ static void rice_init(TTARice *c, uint32_t k0, uint32_t k1)
c
->
sum1
=
shift_16
[
k1
];
c
->
sum1
=
shift_16
[
k1
];
}
}
static
int
tta_get_unary
(
GetBitContext
*
gb
)
{
int
ret
=
0
;
// count ones
while
(
get_bits_left
(
gb
)
>
0
&&
get_bits1
(
gb
))
ret
++
;
return
ret
;
}
static
int
tta_check_crc
(
TTAContext
*
s
,
const
uint8_t
*
buf
,
int
buf_size
)
static
int
tta_check_crc
(
TTAContext
*
s
,
const
uint8_t
*
buf
,
int
buf_size
)
{
{
uint32_t
crc
,
CRC
;
uint32_t
crc
,
CRC
;
...
@@ -352,7 +343,7 @@ static int tta_decode_frame(AVCodecContext *avctx, void *data,
...
@@ -352,7 +343,7 @@ static int tta_decode_frame(AVCodecContext *avctx, void *data,
uint32_t
unary
,
depth
,
k
;
uint32_t
unary
,
depth
,
k
;
int32_t
value
;
int32_t
value
;
unary
=
tta_
get_unary
(
&
s
->
gb
);
unary
=
get_unary
(
&
s
->
gb
,
0
,
get_bits_left
(
&
s
->
gb
)
);
if
(
unary
==
0
)
{
if
(
unary
==
0
)
{
depth
=
0
;
depth
=
0
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment