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
71af42bd
Commit
71af42bd
authored
Mar 09, 2012
by
Ronald S. Bultje
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
xxan: reindent xan_unpack_luma().
It used 3-space indent instead of 4-space indent.
parent
f77bfa83
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
36 additions
and
36 deletions
+36
-36
xxan.c
libavcodec/xxan.c
+36
-36
No files found.
libavcodec/xxan.c
View file @
71af42bd
...
@@ -62,42 +62,42 @@ static av_cold int xan_decode_init(AVCodecContext *avctx)
...
@@ -62,42 +62,42 @@ static av_cold int xan_decode_init(AVCodecContext *avctx)
static
int
xan_unpack_luma
(
XanContext
*
s
,
static
int
xan_unpack_luma
(
XanContext
*
s
,
uint8_t
*
dst
,
const
int
dst_size
)
uint8_t
*
dst
,
const
int
dst_size
)
{
{
int
tree_size
,
eof
;
int
tree_size
,
eof
;
int
bits
,
mask
;
int
bits
,
mask
;
int
tree_root
,
node
;
int
tree_root
,
node
;
const
uint8_t
*
dst_end
=
dst
+
dst_size
;
const
uint8_t
*
dst_end
=
dst
+
dst_size
;
GetByteContext
tree
=
s
->
gb
;
GetByteContext
tree
=
s
->
gb
;
int
start_off
=
bytestream2_tell
(
&
tree
);
int
start_off
=
bytestream2_tell
(
&
tree
);
tree_size
=
bytestream2_get_byte
(
&
s
->
gb
);
tree_size
=
bytestream2_get_byte
(
&
s
->
gb
);
eof
=
bytestream2_get_byte
(
&
s
->
gb
);
eof
=
bytestream2_get_byte
(
&
s
->
gb
);
tree_root
=
eof
+
tree_size
;
tree_root
=
eof
+
tree_size
;
bytestream2_skip
(
&
s
->
gb
,
tree_size
*
2
);
bytestream2_skip
(
&
s
->
gb
,
tree_size
*
2
);
node
=
tree_root
;
node
=
tree_root
;
bits
=
bytestream2_get_byte
(
&
s
->
gb
);
bits
=
bytestream2_get_byte
(
&
s
->
gb
);
mask
=
0x80
;
mask
=
0x80
;
for
(;;)
{
for
(;;)
{
int
bit
=
!!
(
bits
&
mask
);
int
bit
=
!!
(
bits
&
mask
);
mask
>>=
1
;
mask
>>=
1
;
bytestream2_seek
(
&
tree
,
start_off
+
node
*
2
+
bit
-
eof
*
2
,
SEEK_SET
);
bytestream2_seek
(
&
tree
,
start_off
+
node
*
2
+
bit
-
eof
*
2
,
SEEK_SET
);
node
=
bytestream2_get_byte
(
&
tree
);
node
=
bytestream2_get_byte
(
&
tree
);
if
(
node
==
eof
)
if
(
node
==
eof
)
break
;
break
;
if
(
node
<
eof
)
{
if
(
node
<
eof
)
{
*
dst
++
=
node
;
*
dst
++
=
node
;
if
(
dst
>
dst_end
)
if
(
dst
>
dst_end
)
break
;
break
;
node
=
tree_root
;
node
=
tree_root
;
}
}
if
(
!
mask
)
{
if
(
!
mask
)
{
if
(
bytestream2_get_bytes_left
(
&
s
->
gb
)
<=
0
)
if
(
bytestream2_get_bytes_left
(
&
s
->
gb
)
<=
0
)
break
;
break
;
bits
=
bytestream2_get_byteu
(
&
s
->
gb
);
bits
=
bytestream2_get_byteu
(
&
s
->
gb
);
mask
=
0x80
;
mask
=
0x80
;
}
}
}
}
return
dst
!=
dst_end
?
AVERROR_INVALIDDATA
:
0
;
return
dst
!=
dst_end
?
AVERROR_INVALIDDATA
:
0
;
}
}
/* almost the same as in xan_wc3 decoder */
/* almost the same as in xan_wc3 decoder */
...
...
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