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
1eacc8c9
Commit
1eacc8c9
authored
Jan 18, 2016
by
Francois Cartegnie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mux: mp4: move in mpeg_parser_helpers remains
parent
d99478cb
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
27 additions
and
56 deletions
+27
-56
modules/demux/mpeg/mpeg_parser_helpers.h
modules/demux/mpeg/mpeg_parser_helpers.h
+0
-54
modules/mux/Makefile.am
modules/mux/Makefile.am
+0
-1
modules/mux/mp4/libmp4mux.c
modules/mux/mp4/libmp4mux.c
+27
-1
No files found.
modules/demux/mpeg/mpeg_parser_helpers.h
deleted
100644 → 0
View file @
d99478cb
/*****************************************************************************
* packetizer_helper.h: Packetizer helpers
*****************************************************************************
* Copyright (C) 2014 VLC authors and VideoLAN
* $Id$
*
* Authors: Denis Charmet <typx@videolan.org>
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation; either version 2.1 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
#ifndef MPEG_PARSER_HELPERS_H
#define MPEG_PARSER_HELPERS_H
#include <stdint.h>
#include <vlc_bits.h>
static
inline
void
hevc_skip_profile_tiers_level
(
bs_t
*
bs
,
int32_t
max_sub_layer_minus1
)
{
uint8_t
sub_layer_profile_present_flag
[
8
];
uint8_t
sub_layer_level_present_flag
[
8
];
/* skipping useless fields of the VPS see https://www.itu.int/rec/dologin_pub.asp?lang=e&id=T-REC-H.265-201304-I!!PDF-E&type=item */
bs_skip
(
bs
,
2
+
1
+
5
+
32
+
1
+
1
+
1
+
1
+
44
+
8
);
for
(
int32_t
i
=
0
;
i
<
max_sub_layer_minus1
;
i
++
)
{
sub_layer_profile_present_flag
[
i
]
=
bs_read1
(
bs
);
sub_layer_level_present_flag
[
i
]
=
bs_read1
(
bs
);
}
if
(
max_sub_layer_minus1
>
0
)
bs_skip
(
bs
,
(
8
-
max_sub_layer_minus1
)
*
2
);
for
(
int32_t
i
=
0
;
i
<
max_sub_layer_minus1
;
i
++
)
{
if
(
sub_layer_profile_present_flag
[
i
]
)
bs_skip
(
bs
,
2
+
1
+
5
+
32
+
1
+
1
+
1
+
1
+
44
);
if
(
sub_layer_level_present_flag
[
i
]
)
bs_skip
(
bs
,
8
);
}
}
#endif
/*MPEG_PARSER_HELPERS_H*/
modules/mux/Makefile.am
View file @
1eacc8c9
...
...
@@ -7,7 +7,6 @@ libmux_avi_plugin_la_SOURCES = mux/avi.c
libmux_mp4_plugin_la_SOURCES
=
mux/mp4/mp4.c
\
mux/mp4/libmp4mux.c mux/mp4/libmp4mux.h
\
packetizer/hxxx_nal.h demux/mp4/libmp4.h
\
demux/mpeg/mpeg_parser_helpers.h
\
packetizer/h264_nal.c packetizer/h264_nal.h
libmux_mpjpeg_plugin_la_SOURCES
=
mux/mpjpeg.c
libmux_ps_plugin_la_SOURCES
=
\
...
...
modules/mux/mp4/libmp4mux.c
View file @
1eacc8c9
...
...
@@ -22,7 +22,6 @@
*****************************************************************************/
#include "libmp4mux.h"
#include "../demux/mp4/libmp4.h"
/* flags */
#include "../demux/mpeg/mpeg_parser_helpers.h"
#include "../packetizer/hevc_nal.h"
#include "../packetizer/h264_nal.h"
/* h264_get_spspps */
#include "../packetizer/hxxx_nal.h"
...
...
@@ -33,6 +32,7 @@
#include <vlc_es.h>
#include <vlc_iso_lang.h>
#include <vlc_bits.h>
#include <assert.h>
#include <time.h>
...
...
@@ -529,6 +529,32 @@ static void hevcParseVPS(uint8_t * p_buffer, size_t i_buffer, uint8_t *general,
general
[
i
]
=
bs_read
(
&
bs
,
8
);
}
static
inline
void
hevc_skip_profile_tiers_level
(
bs_t
*
bs
,
int32_t
max_sub_layer_minus1
)
{
uint8_t
sub_layer_profile_present_flag
[
8
];
uint8_t
sub_layer_level_present_flag
[
8
];
/* skipping useless fields of the VPS see https://www.itu.int/rec/dologin_pub.asp?lang=e&id=T-REC-H.265-201304-I!!PDF-E&type=item */
bs_skip
(
bs
,
2
+
1
+
5
+
32
+
1
+
1
+
1
+
1
+
44
+
8
);
for
(
int32_t
i
=
0
;
i
<
max_sub_layer_minus1
;
i
++
)
{
sub_layer_profile_present_flag
[
i
]
=
bs_read1
(
bs
);
sub_layer_level_present_flag
[
i
]
=
bs_read1
(
bs
);
}
if
(
max_sub_layer_minus1
>
0
)
bs_skip
(
bs
,
(
8
-
max_sub_layer_minus1
)
*
2
);
for
(
int32_t
i
=
0
;
i
<
max_sub_layer_minus1
;
i
++
)
{
if
(
sub_layer_profile_present_flag
[
i
]
)
bs_skip
(
bs
,
2
+
1
+
5
+
32
+
1
+
1
+
1
+
1
+
44
);
if
(
sub_layer_level_present_flag
[
i
]
)
bs_skip
(
bs
,
8
);
}
}
static
void
hevcParseSPS
(
uint8_t
*
p_buffer
,
size_t
i_buffer
,
uint8_t
*
chroma_idc
,
uint8_t
*
bit_depth_luma_minus8
,
uint8_t
*
bit_depth_chroma_minus8
)
{
...
...
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