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
74f42241
Commit
74f42241
authored
Dec 17, 2015
by
Francois Cartegnie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
packetizer: h264: remove temp ep3b to rbsp conversions
parent
e19f62b8
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
20 deletions
+9
-20
modules/packetizer/h264.c
modules/packetizer/h264.c
+4
-9
modules/packetizer/h264_nal.c
modules/packetizer/h264_nal.c
+5
-11
No files found.
modules/packetizer/h264.c
View file @
74f42241
...
...
@@ -778,8 +778,6 @@ static bool ParseSlice( decoder_t *p_dec, bool *pb_new_picture, slice_t *p_slice
int
i_nal_ref_idc
,
int
i_nal_type
,
const
block_t
*
p_frag
)
{
decoder_sys_t
*
p_sys
=
p_dec
->
p_sys
;
uint8_t
*
pb_dec
;
size_t
i_dec
=
0
;
int
i_slice_type
;
slice_t
slice
;
bs_t
s
;
...
...
@@ -787,12 +785,10 @@ static bool ParseSlice( decoder_t *p_dec, bool *pb_new_picture, slice_t *p_slice
if
(
p_frag
->
i_buffer
<
6
)
return
false
;
/* do not convert the whole frame */
pb_dec
=
hxxx_ep3b_to_rbsp
(
&
p_frag
->
p_buffer
[
5
],
__MIN
(
p_frag
->
i_buffer
-
5
,
60
),
&
i_dec
);
if
(
!
pb_dec
)
return
false
;
bs_init
(
&
s
,
pb_dec
,
i_dec
);
bs_init
(
&
s
,
&
p_frag
->
p_buffer
[
5
],
p_frag
->
i_buffer
-
5
);
unsigned
i_bitflow
=
0
;
s
.
p_fwpriv
=
&
i_bitflow
;
s
.
pf_forward
=
hxxx_bsfw_ep3b_to_rbsp
;
/* Does the emulated 3bytes conversion to rbsp */
/* first_mb_in_slice */
/* int i_first_mb = */
bs_read_ue
(
&
s
);
...
...
@@ -858,7 +854,6 @@ static bool ParseSlice( decoder_t *p_dec, bool *pb_new_picture, slice_t *p_slice
if
(
p_sys
->
i_pic_order_present_flag
&&
!
slice
.
i_field_pic_flag
)
slice
.
i_delta_pic_order_cnt1
=
bs_read_se
(
&
s
);
}
free
(
pb_dec
);
/* Detection of the first VCL NAL unit of a primary coded picture
* (cf. 7.4.1.2.4) */
...
...
modules/packetizer/h264_nal.c
View file @
74f42241
...
...
@@ -402,8 +402,6 @@ int h264_get_spspps( uint8_t *p_buf, size_t i_buf,
int
h264_parse_sps
(
const
uint8_t
*
p_sps_buf
,
int
i_sps_size
,
struct
h264_nal_sps
*
p_sps
)
{
uint8_t
*
pb_dec
=
NULL
;
size_t
i_dec
=
0
;
bs_t
s
;
int
i_tmp
;
...
...
@@ -411,11 +409,12 @@ int h264_parse_sps( const uint8_t *p_sps_buf, int i_sps_size,
return
-
1
;
memset
(
p_sps
,
0
,
sizeof
(
struct
h264_nal_sps
)
);
pb_dec
=
hxxx_ep3b_to_rbsp
(
&
p_sps_buf
[
5
],
i_sps_size
-
5
,
&
i_dec
);
if
(
!
pb_dec
)
return
-
1
;
bs_init
(
&
s
,
pb_dec
,
i_dec
);
bs_init
(
&
s
,
&
p_sps_buf
[
5
],
i_sps_size
-
5
);
unsigned
i_bitflow
=
0
;
s
.
p_fwpriv
=
&
i_bitflow
;
s
.
pf_forward
=
hxxx_bsfw_ep3b_to_rbsp
;
/* Does the emulated 3bytes conversion to rbsp */
int
i_profile_idc
=
bs_read
(
&
s
,
8
);
p_sps
->
i_profile
=
i_profile_idc
;
p_sps
->
i_profile_compatibility
=
bs_read
(
&
s
,
8
);
...
...
@@ -423,10 +422,7 @@ int h264_parse_sps( const uint8_t *p_sps_buf, int i_sps_size,
/* sps id */
p_sps
->
i_id
=
bs_read_ue
(
&
s
);
if
(
p_sps
->
i_id
>=
H264_SPS_MAX
)
{
free
(
pb_dec
);
return
-
1
;
}
if
(
i_profile_idc
==
PROFILE_H264_HIGH
||
i_profile_idc
==
PROFILE_H264_HIGH_10
||
...
...
@@ -661,8 +657,6 @@ int h264_parse_sps( const uint8_t *p_sps_buf, int i_sps_size,
/* + unparsed remains */
}
free
(
pb_dec
);
return
0
;
}
...
...
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