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
358ea75e
Commit
358ea75e
authored
Dec 19, 2011
by
Janne Grunau
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert "h264: skip start code search if the size of the nal unit is known"
This reverts commit
87eebb34
.
parent
7b3894be
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
14 deletions
+4
-14
h264.c
libavcodec/h264.c
+2
-9
h264.h
libavcodec/h264.h
+1
-4
h264_parser.c
libavcodec/h264_parser.c
+1
-1
No files found.
libavcodec/h264.c
View file @
358ea75e
...
...
@@ -137,10 +137,7 @@ int ff_h264_check_intra_pred_mode(H264Context *h, int mode){
return
mode
;
}
const
uint8_t
*
ff_h264_decode_nal
(
H264Context
*
h
,
const
uint8_t
*
src
,
int
*
dst_length
,
int
*
consumed
,
int
length
,
int
nalsize_known
)
{
const
uint8_t
*
ff_h264_decode_nal
(
H264Context
*
h
,
const
uint8_t
*
src
,
int
*
dst_length
,
int
*
consumed
,
int
length
){
int
i
,
si
,
di
;
uint8_t
*
dst
;
int
bufidx
;
...
...
@@ -151,9 +148,6 @@ const uint8_t *ff_h264_decode_nal(H264Context *h, const uint8_t *src,
src
++
;
length
--
;
if
(
nalsize_known
)
{
i
=
length
;
}
else
#if HAVE_FAST_UNALIGNED
# if HAVE_FAST_64BIT
# define RS 7
...
...
@@ -3795,8 +3789,7 @@ static int decode_nal_units(H264Context *h, const uint8_t *buf, int buf_size){
hx
=
h
->
thread_context
[
context_count
];
ptr
=
ff_h264_decode_nal
(
hx
,
buf
+
buf_index
,
&
dst_length
,
&
consumed
,
next_avc
-
buf_index
,
!!
nalsize
);
ptr
=
ff_h264_decode_nal
(
hx
,
buf
+
buf_index
,
&
dst_length
,
&
consumed
,
next_avc
-
buf_index
);
if
(
ptr
==
NULL
||
dst_length
<
0
){
return
-
1
;
}
...
...
libavcodec/h264.h
View file @
358ea75e
...
...
@@ -610,12 +610,9 @@ int ff_h264_decode_picture_parameter_set(H264Context *h, int bit_length);
* @param consumed is the number of bytes used as input
* @param length is the length of the array
* @param dst_length is the number of decoded bytes FIXME here or a decode rbsp tailing?
* @param nalsize_known skip start code search if the size of the nalu is known
* @return decoded bytes, might be src+1 if no escapes
*/
const
uint8_t
*
ff_h264_decode_nal
(
H264Context
*
h
,
const
uint8_t
*
src
,
int
*
dst_length
,
int
*
consumed
,
int
length
,
int
nalsize_known
);
const
uint8_t
*
ff_h264_decode_nal
(
H264Context
*
h
,
const
uint8_t
*
src
,
int
*
dst_length
,
int
*
consumed
,
int
length
);
/**
* Free any data that may have been allocated in the H264 context like SPS, PPS etc.
...
...
libavcodec/h264_parser.c
View file @
358ea75e
...
...
@@ -144,7 +144,7 @@ static inline int parse_nal_units(AVCodecParserContext *s,
src_length
=
20
;
break
;
}
ptr
=
ff_h264_decode_nal
(
h
,
buf
,
&
dst_length
,
&
consumed
,
src_length
,
0
);
ptr
=
ff_h264_decode_nal
(
h
,
buf
,
&
dst_length
,
&
consumed
,
src_length
);
if
(
ptr
==
NULL
||
dst_length
<
0
)
break
;
...
...
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