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
27ba121e
Commit
27ba121e
authored
Sep 22, 2011
by
Diego Biurrun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
prores: cosmetics: prettyprinting, drop useless parentheses
parent
2983f1f3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
9 deletions
+7
-9
proresdec.c
libavcodec/proresdec.c
+7
-9
No files found.
libavcodec/proresdec.c
View file @
27ba121e
...
...
@@ -256,9 +256,9 @@ static int decode_picture_header(ProresContext *ctx, const uint8_t *buf,
ctx
->
slice_height_factor
=
slice_height_factor
;
ctx
->
num_x_mbs
=
(
avctx
->
width
+
15
)
>>
4
;
ctx
->
num_y_mbs
=
(
avctx
->
height
+
(
1
<<
(
4
+
ctx
->
picture
.
interlaced_frame
))
-
1
)
>>
(
4
+
ctx
->
picture
.
interlaced_frame
);
ctx
->
num_y_mbs
=
(
avctx
->
height
+
(
1
<<
(
4
+
ctx
->
picture
.
interlaced_frame
))
-
1
)
>>
(
4
+
ctx
->
picture
.
interlaced_frame
);
remainder
=
ctx
->
num_x_mbs
&
((
1
<<
slice_width_factor
)
-
1
);
num_x_slices
=
(
ctx
->
num_x_mbs
>>
slice_width_factor
)
+
(
remainder
&
1
)
+
...
...
@@ -272,8 +272,7 @@ static int decode_picture_header(ProresContext *ctx, const uint8_t *buf,
if
(
ctx
->
total_slices
!=
num_slices
)
{
av_freep
(
&
ctx
->
slice_data_index
);
ctx
->
slice_data_index
=
av_malloc
((
num_slices
+
1
)
*
sizeof
(
uint8_t
*
));
ctx
->
slice_data_index
=
av_malloc
((
num_slices
+
1
)
*
sizeof
(
uint8_t
*
));
if
(
!
ctx
->
slice_data_index
)
return
AVERROR
(
ENOMEM
);
ctx
->
total_slices
=
num_slices
;
...
...
@@ -330,7 +329,7 @@ static inline int decode_vlc_codeword(GetBitContext *gb, uint8_t codebook)
LAST_SKIP_BITS
(
re
,
gb
,
log
+
1
);
}
else
{
prefix_len
=
log
+
1
;
code
=
(
log
<<
rice_order
)
+
NEG_USR32
(
(
buf
<<
prefix_len
)
,
rice_order
);
code
=
(
log
<<
rice_order
)
+
NEG_USR32
(
buf
<<
prefix_len
,
rice_order
);
LAST_SKIP_BITS
(
re
,
gb
,
prefix_len
+
rice_order
);
}
}
else
{
/* otherwise we got a exp golomb code */
...
...
@@ -519,8 +518,7 @@ static void decode_slice_plane(ProresContext *ctx, const uint8_t *buf,
/* inverse quantization, inverse transform and output */
block_ptr
=
ctx
->
blocks
;
for
(
blk_num
=
0
;
blk_num
<
blocks_per_slice
;
blk_num
++
,
block_ptr
+=
64
)
{
for
(
blk_num
=
0
;
blk_num
<
blocks_per_slice
;
blk_num
++
,
block_ptr
+=
64
)
{
/* TODO: the correct solution shoud be (block_ptr[i] * qmat[i]) >> 1
* and the input of the inverse transform should be scaled by 2
* in order to avoid rounding errors.
...
...
@@ -595,7 +593,7 @@ static int decode_slice(ProresContext *ctx, int pic_num, int slice_num,
if
(
ctx
->
qmat_changed
||
sf
!=
ctx
->
prev_slice_sf
)
{
ctx
->
prev_slice_sf
=
sf
;
for
(
i
=
0
;
i
<
64
;
i
++
)
{
ctx
->
qmat_luma_scaled
[
i
]
=
ctx
->
qmat_luma
[
i
]
*
sf
;
ctx
->
qmat_luma_scaled
[
i
]
=
ctx
->
qmat_luma
[
i
]
*
sf
;
ctx
->
qmat_chroma_scaled
[
i
]
=
ctx
->
qmat_chroma
[
i
]
*
sf
;
}
}
...
...
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