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
e36a2f4c
Commit
e36a2f4c
authored
Jul 27, 2014
by
Anton Khirnov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
hevc: eliminate an unnecessary array
We do not need to store the value of the split flag.
parent
4b169321
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
10 deletions
+5
-10
hevc.c
libavcodec/hevc.c
+5
-9
hevc.h
libavcodec/hevc.h
+0
-1
No files found.
libavcodec/hevc.c
View file @
e36a2f4c
...
...
@@ -166,7 +166,6 @@ static void pic_arrays_free(HEVCContext *s)
{
av_freep
(
&
s
->
sao
);
av_freep
(
&
s
->
deblock
);
av_freep
(
&
s
->
split_cu_flag
);
av_freep
(
&
s
->
skip_flag
);
av_freep
(
&
s
->
tab_ct_depth
);
...
...
@@ -192,7 +191,6 @@ static int pic_arrays_init(HEVCContext *s, const HEVCSPS *sps)
int
log2_min_cb_size
=
sps
->
log2_min_cb_size
;
int
width
=
sps
->
width
;
int
height
=
sps
->
height
;
int
pic_size
=
width
*
height
;
int
pic_size_in_ctb
=
((
width
>>
log2_min_cb_size
)
+
1
)
*
((
height
>>
log2_min_cb_size
)
+
1
);
int
ctb_count
=
sps
->
ctb_width
*
sps
->
ctb_height
;
...
...
@@ -203,8 +201,7 @@ static int pic_arrays_init(HEVCContext *s, const HEVCSPS *sps)
s
->
sao
=
av_mallocz_array
(
ctb_count
,
sizeof
(
*
s
->
sao
));
s
->
deblock
=
av_mallocz_array
(
ctb_count
,
sizeof
(
*
s
->
deblock
));
s
->
split_cu_flag
=
av_malloc
(
pic_size
);
if
(
!
s
->
sao
||
!
s
->
deblock
||
!
s
->
split_cu_flag
)
if
(
!
s
->
sao
||
!
s
->
deblock
)
goto
fail
;
s
->
skip_flag
=
av_malloc
(
pic_size_in_ctb
);
...
...
@@ -2234,16 +2231,15 @@ static int hls_coding_quadtree(HEVCContext *s, int x0, int y0,
{
HEVCLocalContext
*
lc
=
&
s
->
HEVClc
;
const
int
cb_size
=
1
<<
log2_cb_size
;
int
split_cu
;
lc
->
ct
.
depth
=
cb_depth
;
if
(
x0
+
cb_size
<=
s
->
sps
->
width
&&
y0
+
cb_size
<=
s
->
sps
->
height
&&
log2_cb_size
>
s
->
sps
->
log2_min_cb_size
)
{
SAMPLE
(
s
->
split_cu_flag
,
x0
,
y0
)
=
ff_hevc_split_coding_unit_flag_decode
(
s
,
cb_depth
,
x0
,
y0
);
split_cu
=
ff_hevc_split_coding_unit_flag_decode
(
s
,
cb_depth
,
x0
,
y0
);
}
else
{
SAMPLE
(
s
->
split_cu_flag
,
x0
,
y0
)
=
(
log2_cb_size
>
s
->
sps
->
log2_min_cb_size
);
split_cu
=
(
log2_cb_size
>
s
->
sps
->
log2_min_cb_size
);
}
if
(
s
->
pps
->
cu_qp_delta_enabled_flag
&&
log2_cb_size
>=
s
->
sps
->
log2_ctb_size
-
s
->
pps
->
diff_cu_qp_delta_depth
)
{
...
...
@@ -2251,7 +2247,7 @@ static int hls_coding_quadtree(HEVCContext *s, int x0, int y0,
lc
->
tu
.
cu_qp_delta
=
0
;
}
if
(
SAMPLE
(
s
->
split_cu_flag
,
x0
,
y0
)
)
{
if
(
split_cu
)
{
const
int
cb_size_split
=
cb_size
>>
1
;
const
int
x1
=
x0
+
cb_size_split
;
const
int
y1
=
y0
+
cb_size_split
;
...
...
libavcodec/hevc.h
View file @
e36a2f4c
...
...
@@ -806,7 +806,6 @@ typedef struct HEVCContext {
VideoDSPContext
vdsp
;
BswapDSPContext
bdsp
;
int8_t
*
qp_y_tab
;
uint8_t
*
split_cu_flag
;
uint8_t
*
horizontal_bs
;
uint8_t
*
vertical_bs
;
...
...
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