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
e19f62b8
Commit
e19f62b8
authored
Dec 17, 2015
by
Francois Cartegnie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mux: mp4: remove temp ep3b->rbsp conversions
parent
a0e20c60
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
18 deletions
+17
-18
modules/mux/mp4/libmp4mux.c
modules/mux/mp4/libmp4mux.c
+17
-18
No files found.
modules/mux/mp4/libmp4mux.c
View file @
e19f62b8
...
...
@@ -498,13 +498,14 @@ static bo_t *GetD263Tag(void)
static
void
hevcParseVPS
(
uint8_t
*
p_buffer
,
size_t
i_buffer
,
uint8_t
*
general
,
uint8_t
*
numTemporalLayer
,
bool
*
temporalIdNested
)
{
size_t
i_decoded_nal_size
;
uint8_t
*
p_dec_nal
=
hxxx_ep3b_to_rbsp
(
p_buffer
,
i_buffer
,
&
i_decoded_nal_size
);
if
(
!
p_dec_nal
||
i_decoded_nal_size
<
19
)
{
free
(
p_dec_nal
);
if
(
i_buffer
<
19
)
return
;
}
bs_t
bs
;
bs_init
(
&
bs
,
p_buffer
,
i_buffer
);
unsigned
i_bitflow
=
0
;
bs
.
p_fwpriv
=
&
i_bitflow
;
bs
.
pf_forward
=
hxxx_bsfw_ep3b_to_rbsp
;
/* Does the emulated 3bytes conversion to rbsp */
/* first two bytes are the NAL header, 3rd and 4th are:
vps_video_parameter_set_id(4)
...
...
@@ -513,13 +514,15 @@ static void hevcParseVPS(uint8_t * p_buffer, size_t i_buffer, uint8_t *general,
vps_max_sub_layers_minus1(3)
vps_temporal_id_nesting_flags
*/
*
numTemporalLayer
=
((
p_dec_nal
[
3
]
&
0x0E
)
>>
1
)
+
1
;
*
temporalIdNested
=
(
bool
)(
p_dec_nal
[
3
]
&
0x01
);
bs_skip
(
&
bs
,
16
+
4
+
2
+
6
);
*
numTemporalLayer
=
bs_read
(
&
bs
,
3
)
+
1
;
*
temporalIdNested
=
bs_read1
(
&
bs
);
/* 5th & 6th are reserved 0xffff */
bs_skip
(
&
bs
,
16
);
/* copy the first 12 bytes of profile tier */
memcpy
(
general
,
&
p_dec_nal
[
6
],
12
);
free
(
p_dec_nal
);
for
(
unsigned
i
=
0
;
i
<
12
;
i
++
)
general
[
i
]
=
bs_read
(
&
bs
,
8
);
}
static
void
hevcParseSPS
(
uint8_t
*
p_buffer
,
size_t
i_buffer
,
uint8_t
*
chroma_idc
,
...
...
@@ -528,13 +531,11 @@ static void hevcParseSPS(uint8_t * p_buffer, size_t i_buffer, uint8_t * chroma_i
if
(
i_buffer
<
2
)
return
;
size_t
i_decoded_nal_size
;
uint8_t
*
p_dec_nal
=
hxxx_ep3b_to_rbsp
(
p_buffer
+
2
,
i_buffer
-
2
,
&
i_decoded_nal_size
);
if
(
!
p_dec_nal
)
return
;
bs_t
bs
;
bs_init
(
&
bs
,
p_dec_nal
,
i_decoded_nal_size
);
bs_init
(
&
bs
,
p_buffer
+
2
,
i_buffer
-
2
);
unsigned
i_bitflow
=
0
;
bs
.
p_fwpriv
=
&
i_bitflow
;
bs
.
pf_forward
=
hxxx_bsfw_ep3b_to_rbsp
;
/* Does the emulated 3bytes conversion to rbsp */
/* skip vps id */
bs_skip
(
&
bs
,
4
);
...
...
@@ -566,8 +567,6 @@ static void hevcParseSPS(uint8_t * p_buffer, size_t i_buffer, uint8_t * chroma_i
}
*
bit_depth_luma_minus8
=
bs_read_ue
(
&
bs
);
*
bit_depth_chroma_minus8
=
bs_read_ue
(
&
bs
);
free
(
p_dec_nal
);
}
static
bo_t
*
GetHvcCTag
(
es_format_t
*
p_fmt
,
bool
b_completeness
)
...
...
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