## Revision 0e8c148b libavutil/common.h

View differences:

libavutil/common.h
322 322
#define MKTAG(a,b,c,d) (a | (b << 8) | (c << 16) | (d << 24))

323 323
#define MKBETAG(a,b,c,d) (d | (c << 8) | (b << 16) | (a << 24))

324 324

325
/*!

326
 * \def PUT_UTF8(val, GET_BYTE, ERROR)

327
 * converts a 32-bit unicode character to its utf-8 encoded form (up to 6 bytes long).

328
 * \param val is an input only argument and should be of type uint32_t. It holds

329
 * a ucs4 encoded unicode character that is to be converted to utf-8. If

330
 * val is given as a function it's executed only once.

331
 * \param tmp is a temporary variable and should be of type uint8_t. It

332
 * represents an intermediate value during conversion that is to be

333
 * outputted by PUT_BYTE.

334
 * \param PUT_BYTE writes the converted utf-8 bytes to any proper destination.

335
 * It could be a function or a statement, and uses tmp as the input byte.

336
 * For example, PUT_BYTE could be "*output++ = tmp;" PUT_BYTE will be

337
 * executed up to 6 times, depending on the length of the converted

338
 * unicode character.

339
 */

340 325
#define GET_UTF8(val, GET_BYTE, ERROR)\

341 326
    val= GET_BYTE;\

342 327
    {\

......
352 337
        }\

353 338
    }

354 339

340
/*!

341
 * \def PUT_UTF8(val, GET_BYTE, ERROR)

342
 * converts a 32-bit unicode character to its utf-8 encoded form (up to 6 bytes long).

343
 * \param val is an input only argument and should be of type uint32_t. It holds

344
 * a ucs4 encoded unicode character that is to be converted to utf-8. If

345
 * val is given as a function it's executed only once.

346
 * \param tmp is a temporary variable and should be of type uint8_t. It

347
 * represents an intermediate value during conversion that is to be

348
 * outputted by PUT_BYTE.

349
 * \param PUT_BYTE writes the converted utf-8 bytes to any proper destination.

350
 * It could be a function or a statement, and uses tmp as the input byte.

351
 * For example, PUT_BYTE could be "*output++ = tmp;" PUT_BYTE will be

352
 * executed up to 6 times, depending on the length of the converted

353
 * unicode character.

354
 */

355 355
#define PUT_UTF8(val, tmp, PUT_BYTE)\

356 356
    {\

357 357
        int bytes, shift;\


Also available in: Unified diff