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
e76f2d11
Commit
e76f2d11
authored
Jul 27, 2014
by
Anton Khirnov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
hevc: eliminate the last element from TransformTree
Replace it by passing an additional parameter to transform_unit()
parent
4aa80808
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
13 deletions
+7
-13
hevc.c
libavcodec/hevc.c
+7
-8
hevc.h
libavcodec/hevc.h
+0
-5
No files found.
libavcodec/hevc.c
View file @
e76f2d11
...
...
@@ -1234,7 +1234,7 @@ static int hls_transform_unit(HEVCContext *s, int x0, int y0,
int
xBase
,
int
yBase
,
int
cb_xBase
,
int
cb_yBase
,
int
log2_cb_size
,
int
log2_trafo_size
,
int
trafo_depth
,
int
blk_idx
,
int
cbf_cb
,
int
cbf_cr
)
int
cbf_
luma
,
int
cbf_
cb
,
int
cbf_cr
)
{
HEVCLocalContext
*
lc
=
&
s
->
HEVClc
;
...
...
@@ -1257,7 +1257,7 @@ static int hls_transform_unit(HEVCContext *s, int x0, int y0,
}
}
if
(
lc
->
tt
.
cbf_luma
||
cbf_cb
||
cbf_cr
)
{
if
(
cbf_luma
||
cbf_cb
||
cbf_cr
)
{
int
scan_idx
=
SCAN_DIAG
;
int
scan_idx_c
=
SCAN_DIAG
;
...
...
@@ -1300,7 +1300,7 @@ static int hls_transform_unit(HEVCContext *s, int x0, int y0,
}
}
if
(
lc
->
tt
.
cbf_luma
)
if
(
cbf_luma
)
hls_residual_coding
(
s
,
x0
,
y0
,
log2_trafo_size
,
scan_idx
,
0
);
if
(
log2_trafo_size
>
2
)
{
if
(
cbf_cb
)
...
...
@@ -1349,8 +1349,6 @@ static int hls_transform_tree(HEVCContext *s, int x0, int y0,
lc
->
tu
.
cur_intra_pred_mode
=
lc
->
pu
.
intra_pred_mode
[
0
];
}
lc
->
tt
.
cbf_luma
=
1
;
if
(
log2_trafo_size
<=
s
->
sps
->
log2_max_trafo_size
&&
log2_trafo_size
>
s
->
sps
->
log2_min_tb_size
&&
trafo_depth
<
lc
->
cu
.
max_trafo_depth
&&
...
...
@@ -1400,18 +1398,19 @@ do {
int
min_tu_size
=
1
<<
s
->
sps
->
log2_min_tb_size
;
int
log2_min_tu_size
=
s
->
sps
->
log2_min_tb_size
;
int
min_tu_width
=
s
->
sps
->
min_tb_width
;
int
cbf_luma
=
1
;
if
(
lc
->
cu
.
pred_mode
==
MODE_INTRA
||
trafo_depth
!=
0
||
cbf_cb
||
cbf_cr
)
lc
->
tt
.
cbf_luma
=
ff_hevc_cbf_luma_decode
(
s
,
trafo_depth
);
cbf_luma
=
ff_hevc_cbf_luma_decode
(
s
,
trafo_depth
);
ret
=
hls_transform_unit
(
s
,
x0
,
y0
,
xBase
,
yBase
,
cb_xBase
,
cb_yBase
,
log2_cb_size
,
log2_trafo_size
,
trafo_depth
,
blk_idx
,
cbf_cb
,
cbf_cr
);
blk_idx
,
cbf_
luma
,
cbf_
cb
,
cbf_cr
);
if
(
ret
<
0
)
return
ret
;
// TODO: store cbf_luma somewhere else
if
(
lc
->
tt
.
cbf_luma
)
{
if
(
cbf_luma
)
{
int
i
,
j
;
for
(
i
=
0
;
i
<
(
1
<<
log2_trafo_size
);
i
+=
min_tu_size
)
for
(
j
=
0
;
j
<
(
1
<<
log2_trafo_size
);
j
+=
min_tu_size
)
{
...
...
libavcodec/hevc.h
View file @
e76f2d11
...
...
@@ -645,10 +645,6 @@ typedef struct PredictionUnit {
uint8_t
intra_pred_mode_c
;
}
PredictionUnit
;
typedef
struct
TransformTree
{
uint8_t
cbf_luma
;
}
TransformTree
;
typedef
struct
TransformUnit
{
int
cu_qp_delta
;
...
...
@@ -724,7 +720,6 @@ typedef struct HEVCLocalContext {
GetBitContext
gb
;
CABACContext
cc
;
TransformTree
tt
;
int8_t
qp_y
;
int8_t
curr_qp_y
;
...
...
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