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
bcc6c7bb
Commit
bcc6c7bb
authored
Jul 12, 2015
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avcodec/hevc: Move skipped_bytes_pos_size_nal into HAVCNAL
Signed-off-by:
Michael Niedermayer
<
michael@niedermayer.cc
>
parent
5620ed35
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
12 deletions
+7
-12
hevc.c
libavcodec/hevc.c
+0
-1
hevc.h
libavcodec/hevc.h
+1
-1
hevc_parse.c
libavcodec/hevc_parse.c
+6
-10
No files found.
libavcodec/hevc.c
View file @
bcc6c7bb
...
...
@@ -2974,7 +2974,6 @@ static av_cold int hevc_decode_free(AVCodecContext *avctx)
for
(
i
=
0
;
i
<
s
->
pkt
.
nals_allocated
;
i
++
)
{
av_freep
(
&
s
->
skipped_bytes_pos_nal
[
i
]);
}
av_freep
(
&
s
->
skipped_bytes_pos_size_nal
);
av_freep
(
&
s
->
skipped_bytes_pos_nal
);
av_freep
(
&
s
->
cabac_state
);
...
...
libavcodec/hevc.h
View file @
bcc6c7bb
...
...
@@ -761,6 +761,7 @@ typedef struct HEVCNAL {
int
temporal_id
;
int
skipped_bytes
;
int
skipped_bytes_pos_size_nal
;
}
HEVCNAL
;
/* an input packet split into unescaped NAL units */
...
...
@@ -903,7 +904,6 @@ typedef struct HEVCContext {
int
skipped_bytes_pos_size
;
int
**
skipped_bytes_pos_nal
;
int
*
skipped_bytes_pos_size_nal
;
const
uint8_t
*
data
;
...
...
libavcodec/hevc_parse.c
View file @
bcc6c7bb
...
...
@@ -218,32 +218,28 @@ int ff_hevc_split_packet(HEVCContext *s, HEVCPacket *pkt, const uint8_t *buf, in
memset
(
pkt
->
nals
+
pkt
->
nals_allocated
,
0
,
(
new_size
-
pkt
->
nals_allocated
)
*
sizeof
(
*
pkt
->
nals
));
tmp
=
av_realloc_array
(
s
->
skipped_bytes_pos_size_nal
,
new_size
,
sizeof
(
*
s
->
skipped_bytes_pos_size_nal
));
if
(
!
tmp
)
return
AVERROR
(
ENOMEM
);
s
->
skipped_bytes_pos_size_nal
=
tmp
;
tmp
=
av_realloc_array
(
s
->
skipped_bytes_pos_nal
,
new_size
,
sizeof
(
*
s
->
skipped_bytes_pos_nal
));
if
(
!
tmp
)
return
AVERROR
(
ENOMEM
);
s
->
skipped_bytes_pos_nal
=
tmp
;
s
->
skipped_bytes_pos_size_nal
[
pkt
->
nals_allocated
]
=
1024
;
// initial buffer size
s
->
skipped_bytes_pos_nal
[
pkt
->
nals_allocated
]
=
av_malloc_array
(
s
->
skipped_bytes_pos_size_nal
[
pkt
->
nals_allocated
],
sizeof
(
*
s
->
skipped_bytes_pos
));
nal
=
&
pkt
->
nals
[
pkt
->
nb_nals
];
nal
->
skipped_bytes_pos_size_nal
=
1024
;
// initial buffer size
s
->
skipped_bytes_pos_nal
[
pkt
->
nals_allocated
]
=
av_malloc_array
(
nal
->
skipped_bytes_pos_size_nal
,
sizeof
(
*
s
->
skipped_bytes_pos
));
if
(
!
s
->
skipped_bytes_pos_nal
[
pkt
->
nals_allocated
])
return
AVERROR
(
ENOMEM
);
pkt
->
nals_allocated
=
new_size
;
}
s
->
skipped_bytes_pos_size
=
s
->
skipped_bytes_pos_size_nal
[
pkt
->
nb_nals
];
s
->
skipped_bytes_pos
=
s
->
skipped_bytes_pos_nal
[
pkt
->
nb_nals
];
nal
=
&
pkt
->
nals
[
pkt
->
nb_nals
];
s
->
skipped_bytes_pos_size
=
nal
->
skipped_bytes_pos_size_nal
;
s
->
skipped_bytes_pos
=
s
->
skipped_bytes_pos_nal
[
pkt
->
nb_nals
];
consumed
=
ff_hevc_extract_rbsp
(
s
,
buf
,
extract_length
,
nal
);
if
(
consumed
<
0
)
return
consumed
;
s
->
skipped_bytes_pos_size_nal
[
pkt
->
nb_nals
]
=
s
->
skipped_bytes_pos_size
;
nal
->
skipped_bytes_pos_size_nal
=
s
->
skipped_bytes_pos_size
;
s
->
skipped_bytes_pos_nal
[
pkt
->
nb_nals
++
]
=
s
->
skipped_bytes_pos
;
ret
=
init_get_bits8
(
&
nal
->
gb
,
nal
->
data
,
nal
->
size
);
...
...
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