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
6b5ea562
Commit
6b5ea562
authored
Jan 02, 2015
by
Jean-Baptiste Kempf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cdrom.h: use static inline instead of macros
parent
e83d098a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
4 deletions
+9
-4
modules/access/vcd/cdrom.h
modules/access/vcd/cdrom.h
+9
-4
No files found.
modules/access/vcd/cdrom.h
View file @
6b5ea562
...
@@ -60,10 +60,15 @@ enum {
...
@@ -60,10 +60,15 @@ enum {
/*****************************************************************************
/*****************************************************************************
* Misc. Macros
* Misc. Macros
*****************************************************************************/
*****************************************************************************/
/* LBA = msf.frame + 75 * ( msf.second + 60 * msf.minute ) */
static
inline
int
MSF_TO_LBA
(
uint8_t
min
,
uint8_t
sec
,
uint8_t
frame
)
#define MSF_TO_LBA(min, sec, frame) ((int)frame + 75 * (sec + 60 * min))
{
/* LBA = msf.frame + 75 * ( msf.second - 2 + 60 * msf.minute ) */
return
(
int
)(
frame
+
75
*
(
sec
+
60
*
min
));
#define MSF_TO_LBA2(min, sec, frame) ((int)frame + 75 * (sec -2 + 60 * min))
}
static
inline
int
MSF_TO_LBA2
(
uint8_t
min
,
uint8_t
sec
,
uint8_t
frame
)
{
return
(
int
)(
frame
+
75
*
(
sec
-
2
+
60
*
min
));
}
/* Converts BCD to Binary data */
/* Converts BCD to Binary data */
#define BCD_TO_BIN(i) \
#define BCD_TO_BIN(i) \
(uint8_t)((uint8_t)(0xf & (uint8_t)i)+((uint8_t)10*((uint8_t)i >> 4)))
(uint8_t)((uint8_t)(0xf & (uint8_t)i)+((uint8_t)10*((uint8_t)i >> 4)))
...
...
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