Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
FFmpeg
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
libremedia
Tethys
FFmpeg
Commits
c2a5b473
Commit
c2a5b473
authored
14 years ago
by
Måns Rullgård
Browse files
Options
Downloads
Patches
Plain Diff
Improve GET_UTF{8,16} documentation
Originally committed as revision 23909 to
svn://svn.ffmpeg.org/ffmpeg/trunk
parent
12633044
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
libavutil/common.h
+18
-23
18 additions, 23 deletions
libavutil/common.h
with
18 additions
and
23 deletions
libavutil/common.h
+
18
−
23
View file @
c2a5b473
...
@@ -192,18 +192,16 @@ static inline av_const int av_ceil_log2(int x)
...
@@ -192,18 +192,16 @@ static inline av_const int av_ceil_log2(int x)
#define MKTAG(a,b,c,d) ((a) | ((b) << 8) | ((c) << 16) | ((d) << 24))
#define MKTAG(a,b,c,d) ((a) | ((b) << 8) | ((c) << 16) | ((d) << 24))
#define MKBETAG(a,b,c,d) ((d) | ((c) << 8) | ((b) << 16) | ((a) << 24))
#define MKBETAG(a,b,c,d) ((d) | ((c) << 8) | ((b) << 16) | ((a) << 24))
/*!
/**
* \def GET_UTF8(val, GET_BYTE, ERROR)
* Convert a UTF-8 character (up to 4 bytes) to its 32-bit UCS-4 encoded form.
* Convert a UTF-8 character (up to 4 bytes long) to its 32-bit UCS-4 encoded form
*
* \param val is the output and should be of type uint32_t. It holds the converted
* @param val Output value, must be an lvalue of type uint32_t.
* UCS-4 character and should be a left value.
* @param GET_BYTE Expression reading one byte from the input.
* \param GET_BYTE gets UTF-8 encoded bytes from any proper source. It can be
* Evaluated up to 7 times (4 for the currently
* a function or a statement whose return value or evaluated value is of type
* assigned Unicode range). With a memory buffer
* uint8_t. It will be executed up to 4 times for values in the valid UTF-8 range,
* input, this could be *ptr++.
* and up to 7 times in the general case.
* @param ERROR Expression to be evaluated on invalid input,
* \param ERROR action that should be taken when an invalid UTF-8 byte is returned
* typically a goto statement.
* from GET_BYTE. It should be a statement that jumps out of the macro,
* like exit(), goto, return, break, or continue.
*/
*/
#define GET_UTF8(val, GET_BYTE, ERROR)\
#define GET_UTF8(val, GET_BYTE, ERROR)\
val= GET_BYTE;\
val= GET_BYTE;\
...
@@ -220,17 +218,14 @@ static inline av_const int av_ceil_log2(int x)
...
@@ -220,17 +218,14 @@ static inline av_const int av_ceil_log2(int x)
}\
}\
}
}
/*!
/**
* \def GET_UTF16(val, GET_16BIT, ERROR)
* Convert a UTF-16 character (2 or 4 bytes) to its 32-bit UCS-4 encoded form.
* Convert a UTF-16 character (2 or 4 bytes) to its 32-bit UCS-4 encoded form
*
* \param val is the output and should be of type uint32_t. It holds the converted
* @param val Output value, must be an lvalue of type uint32_t.
* UCS-4 character and should be a left value.
* @param GET_16BIT Expression returning two bytes of UTF-16 data converted
* \param GET_16BIT gets two bytes of UTF-16 encoded data converted to native endianness.
* to native byte order. Evaluated one or two times.
* It can be a function or a statement whose return value or evaluated value is of type
* @param ERROR Expression to be evaluated on invalid input,
* uint16_t. It will be executed up to 2 times.
* typically a goto statement.
* \param ERROR action that should be taken when an invalid UTF-16 surrogate is
* returned from GET_BYTE. It should be a statement that jumps out of the macro,
* like exit(), goto, return, break, or continue.
*/
*/
#define GET_UTF16(val, GET_16BIT, ERROR)\
#define GET_UTF16(val, GET_16BIT, ERROR)\
val = GET_16BIT;\
val = GET_16BIT;\
...
...
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