Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
VLC
Manage
Activity
Members
Labels
Plan
Issues
4k
Issue boards
Milestones
Code
Merge requests
455
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
Contributor analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
VideoLAN
VLC
Commits
c97ba5de
Commit
c97ba5de
authored
7 years ago
by
François Cartegnie
Committed by
Thomas Guillem
7 years ago
Browse files
Options
Downloads
Patches
Plain Diff
hxxx_helper: add hevc_helper_get_hvcc_config
Signed-off-by:
Thomas Guillem
<
thomas@gllm.fr
>
parent
bd105c96
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
modules/codec/hxxx_helper.c
+45
-3
45 additions, 3 deletions
modules/codec/hxxx_helper.c
modules/codec/hxxx_helper.h
+1
-0
1 addition, 0 deletions
modules/codec/hxxx_helper.h
with
46 additions
and
3 deletions
modules/codec/hxxx_helper.c
+
45
−
3
View file @
c97ba5de
...
...
@@ -627,7 +627,7 @@ hxxx_helper_get_annexb_config( const struct hxxx_helper_nal *pp_nal_lists[],
{
static
const
uint8_t
annexb_startcode
[]
=
{
0x00
,
0x00
,
0x00
,
0x01
};
block_t
*
p_block_list
=
NULL
;
block_t
*
p_block_list
=
NULL
,
*
p_current
;
for
(
size_t
i
=
0
;
i
<
i_lists_size
;
++
i
)
{
size_t
i_nals_size
=
0
;
...
...
@@ -656,9 +656,12 @@ hxxx_helper_get_annexb_config( const struct hxxx_helper_nal *pp_nal_lists[],
p_block
->
i_buffer
+=
p_nal
->
b
->
i_buffer
;
}
if
(
p_block_list
==
NULL
)
p_block_list
=
p_block
;
p_current
=
p_block_list
=
p_block
;
else
p_block_list
->
p_next
=
p_block
;
{
p_current
->
p_next
=
p_block
;
p_current
=
p_block
;
}
}
return
p_block_list
;
...
...
@@ -723,6 +726,45 @@ h264_helper_get_avcc_config(const struct hxxx_helper *hh)
pp_pps_bufs
,
p_pps_sizes
,
hh
->
h264
.
i_pps_count
);
}
block_t
*
hevc_helper_get_hvcc_config
(
const
struct
hxxx_helper
*
hh
)
{
struct
hevc_dcr_params
params
=
{};
const
struct
hxxx_helper_nal
*
p_nal
;
size_t
i
=
0
;
HELPER_FOREACH_NAL
(
p_nal
,
hh
->
hevc
.
vps_list
,
hh
->
hevc
.
i_vps_count
,
HEVC_VPS_ID_MAX
+
1
)
{
params
.
p_vps
[
params
.
i_vps_count
]
=
p_nal
->
b
->
p_buffer
;
params
.
rgi_vps
[
params
.
i_vps_count
++
]
=
p_nal
->
b
->
i_buffer
;
++
i
;
}
HELPER_FOREACH_NAL
(
p_nal
,
hh
->
hevc
.
sps_list
,
hh
->
hevc
.
i_sps_count
,
HEVC_SPS_ID_MAX
+
1
)
{
params
.
p_sps
[
params
.
i_sps_count
]
=
p_nal
->
b
->
p_buffer
;
params
.
rgi_sps
[
params
.
i_sps_count
++
]
=
p_nal
->
b
->
i_buffer
;
++
i
;
}
HELPER_FOREACH_NAL
(
p_nal
,
hh
->
hevc
.
pps_list
,
hh
->
hevc
.
i_pps_count
,
HEVC_PPS_ID_MAX
+
1
)
{
params
.
p_pps
[
params
.
i_pps_count
]
=
p_nal
->
b
->
p_buffer
;
params
.
rgi_pps
[
params
.
i_pps_count
++
]
=
p_nal
->
b
->
i_buffer
;
++
i
;
}
size_t
i_dcr
;
uint8_t
*
p_dcr
=
hevc_create_dcr
(
&
params
,
4
,
true
,
&
i_dcr
);
if
(
p_dcr
==
NULL
)
return
NULL
;
return
block_heap_Alloc
(
p_dcr
,
i_dcr
);
}
static
const
struct
hxxx_helper_nal
*
h264_helper_get_current_sps
(
const
struct
hxxx_helper
*
hh
)
{
...
...
This diff is collapsed.
Click to expand it.
modules/codec/hxxx_helper.h
+
1
−
0
View file @
c97ba5de
...
...
@@ -87,6 +87,7 @@ block_t *h264_helper_get_annexb_config(const struct hxxx_helper *hh);
block_t
*
hevc_helper_get_annexb_config
(
const
struct
hxxx_helper
*
hh
);
block_t
*
h264_helper_get_avcc_config
(
const
struct
hxxx_helper
*
hh
);
block_t
*
hevc_helper_get_hvcc_config
(
const
struct
hxxx_helper
*
hh
);
int
hxxx_helper_get_current_picture_size
(
const
struct
hxxx_helper
*
hh
,
unsigned
*
p_w
,
unsigned
*
p_h
,
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment