Mercurial > libavcodec.hg
comparison avcodec.h @ 1585:6b224ca24033 libavcodec
revised palette API, courtesy of Roberto Togni (rtogni at freemail.it)
author | melanson |
---|---|
date | Thu, 30 Oct 2003 05:40:58 +0000 |
parents | ece0ad14a35d |
children | 6d37b161cf85 |
comparison
equal
deleted
inserted
replaced
1584:3615999a7284 | 1585:6b224ca24033 |
---|---|
451 * Pan scan.\ | 451 * Pan scan.\ |
452 * - encoding: set by user\ | 452 * - encoding: set by user\ |
453 * - decoding: set by lavc\ | 453 * - decoding: set by lavc\ |
454 */\ | 454 */\ |
455 AVPanScan *pan_scan;\ | 455 AVPanScan *pan_scan;\ |
456 | 456 \ |
457 /**\ | |
458 * tell user application that palette has changed from previous frame.\ | |
459 * - encoding: ??? (no palette-enabled encoder yet)\ | |
460 * - decoding: set by lavc (default 0)\ | |
461 */\ | |
462 int palette_has_changed;\ | |
457 | 463 |
458 #define FF_QSCALE_TYPE_MPEG1 0 | 464 #define FF_QSCALE_TYPE_MPEG1 0 |
459 #define FF_QSCALE_TYPE_MPEG2 1 | 465 #define FF_QSCALE_TYPE_MPEG2 1 |
460 | 466 |
461 #define FF_BUFFER_TYPE_INTERNAL 1 | 467 #define FF_BUFFER_TYPE_INTERNAL 1 |
1343 * maximum lagrange multipler | 1349 * maximum lagrange multipler |
1344 * - encoding: set by user. | 1350 * - encoding: set by user. |
1345 * - decoding: unused | 1351 * - decoding: unused |
1346 */ | 1352 */ |
1347 int lmax; | 1353 int lmax; |
1354 | |
1355 /** | |
1356 * Palette control structure | |
1357 * - encoding: ??? (no palette-enabled encoder yet) | |
1358 * - decoding: set by user. | |
1359 */ | |
1360 struct AVPaletteControl *palctrl; | |
1348 | 1361 |
1349 } AVCodecContext; | 1362 } AVCodecContext; |
1350 | 1363 |
1351 | 1364 |
1352 /** | 1365 /** |
1424 /** | 1437 /** |
1425 * AVPaletteControl | 1438 * AVPaletteControl |
1426 * This structure defines a method for communicating palette changes | 1439 * This structure defines a method for communicating palette changes |
1427 * between and demuxer and a decoder. | 1440 * between and demuxer and a decoder. |
1428 */ | 1441 */ |
1442 #define AVPALETTE_SIZE 256 | |
1429 typedef struct AVPaletteControl { | 1443 typedef struct AVPaletteControl { |
1430 | 1444 |
1431 /* demuxer sets this to 1 to indicate the palette has changed; | 1445 /* demuxer sets this to 1 to indicate the palette has changed; |
1432 * decoder resets to 0 */ | 1446 * decoder resets to 0 */ |
1433 int palette_changed; | 1447 int palette_changed; |
1434 | 1448 |
1435 /* 256 3-byte RGB palette entries; the components should be | 1449 /* 4-byte ARGB palette entries, stored in native byte order; note that |
1436 * formatted in the buffer as "RGBRGB..." and should be scaled to | 1450 * the individual palette components should be on a 8-bit scale; if |
1437 * 8 bits if they originally represented 6-bit VGA palette | 1451 * the palette data comes from a IBM VGA native format, the component |
1438 * components */ | 1452 * data is probably 6 bits in size and needs to be scaled */ |
1439 unsigned char palette[256 * 3]; | 1453 unsigned int palette[AVPALETTE_SIZE]; |
1440 | 1454 |
1441 } AVPaletteControl; | 1455 } AVPaletteControl; |
1442 | 1456 |
1443 extern AVCodec ac3_encoder; | 1457 extern AVCodec ac3_encoder; |
1444 extern AVCodec mp2_encoder; | 1458 extern AVCodec mp2_encoder; |