Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc
Commits
bee38da8
Commit
bee38da8
authored
Dec 09, 2015
by
Francois Cartegnie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
packetizer: add isavcC helper
parent
d76bc0b9
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
15 additions
and
2 deletions
+15
-2
modules/codec/mft.c
modules/codec/mft.c
+1
-1
modules/codec/omxil/mediacodec.c
modules/codec/omxil/mediacodec.c
+1
-1
modules/packetizer/h264_nal.c
modules/packetizer/h264_nal.c
+9
-0
modules/packetizer/h264_nal.h
modules/packetizer/h264_nal.h
+4
-0
No files found.
modules/codec/mft.c
View file @
bee38da8
...
...
@@ -992,7 +992,7 @@ static int InitializeMFT(decoder_t *p_dec)
int
buf_size
=
p_dec
->
fmt_in
.
i_extra
+
20
;
uint32_t
size
=
p_dec
->
fmt_in
.
i_extra
;
uint8_t
*
buf
=
malloc
(
buf_size
);
if
(
((
uint8_t
*
)
p_dec
->
fmt_in
.
p_extra
)[
0
]
==
1
)
if
(
h264_isavcC
((
uint8_t
*
)
p_dec
->
fmt_in
.
p_extra
,
p_dec
->
fmt_in
.
i_extra
)
)
{
h264_avcC_to_AnnexB_NAL
(
p_dec
,
p_dec
->
fmt_in
.
p_extra
,
p_dec
->
fmt_in
.
i_extra
,
buf
,
buf_size
,
...
...
modules/codec/omxil/mediacodec.c
View file @
bee38da8
...
...
@@ -313,7 +313,7 @@ static int ParseVideoExtra(decoder_t *p_dec, uint8_t *p_extra, int i_extra)
if
(
p_dec
->
fmt_in
.
i_codec
==
VLC_CODEC_H264
)
{
if
(
p_extra
[
0
]
==
1
if
(
h264_isavcC
(
p_extra
,
i_extra
)
&&
h264_avcC_to_AnnexB_NAL
(
p_dec
,
p_extra
,
i_extra
,
p_buf
,
buf_size
,
&
size
,
&
p_sys
->
u
.
video
.
i_nal_length_size
)
==
VLC_SUCCESS
)
...
...
modules/packetizer/h264_nal.c
View file @
bee38da8
...
...
@@ -31,6 +31,15 @@
static
const
uint8_t
annexb_startcode
[]
=
{
0x00
,
0x00
,
0x01
};
bool
h264_isavcC
(
const
uint8_t
*
p_buf
,
size_t
i_buf
)
{
return
(
i_buf
>
H264_MIN_AVCC_SIZE
&&
p_buf
[
0
]
==
0x01
&&
(
p_buf
[
4
]
&
0xFC
)
==
0xFC
&&
(
p_buf
[
4
]
&
0x03
)
!=
0x02
&&
(
p_buf
[
5
]
&
0xE0
)
==
0xE0
);
}
static
inline
bool
strip_AnnexB_startcode
(
const
uint8_t
**
pp_data
,
size_t
*
pi_data
)
{
const
uint8_t
*
p_data
=
*
pp_data
;
...
...
modules/packetizer/h264_nal.h
View file @
bee38da8
...
...
@@ -113,6 +113,10 @@ struct h264_nal_pps
avcC: AVCDecoderConfigurationRecord combining SPS & PPS in AVC Sample Format
*/
#define H264_MIN_AVCC_SIZE 7
bool
h264_isavcC
(
const
uint8_t
*
,
size_t
);
/* Convert AVC Sample format to Annex B in-place */
void
h264_AVC_to_AnnexB
(
uint8_t
*
p_buf
,
uint32_t
i_len
,
uint8_t
i_nal_length_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