Revision a20df858 libavcodec/ansi.c

View differences:

libavcodec/ansi.c
28 28
#include "cga_data.h"
29 29
#include <libavutil/lfg.h>
30 30

  
31
#define ATTR_BOLD         0x01  /** Bold/Bright-foreground (mode 1) */
32
#define ATTR_FAINT        0x02  /** Faint (mode 2) */
33
#define ATTR_UNDERLINE    0x08  /** Underline (mode 4) */
34
#define ATTR_BLINK        0x10  /** Blink/Bright-background (mode 5) */
35
#define ATTR_REVERSE      0x40  /** Reverse (mode 7) */
36
#define ATTR_CONCEALED    0x80  /** Concealed (mode 8) */
31
#define ATTR_BOLD         0x01  /**< Bold/Bright-foreground (mode 1) */
32
#define ATTR_FAINT        0x02  /**< Faint (mode 2) */
33
#define ATTR_UNDERLINE    0x08  /**< Underline (mode 4) */
34
#define ATTR_BLINK        0x10  /**< Blink/Bright-background (mode 5) */
35
#define ATTR_REVERSE      0x40  /**< Reverse (mode 7) */
36
#define ATTR_CONCEALED    0x80  /**< Concealed (mode 8) */
37 37

  
38
#define DEFAULT_FG_COLOR     7  /** CGA color index */
38
#define DEFAULT_FG_COLOR     7  /**< CGA color index */
39 39
#define DEFAULT_BG_COLOR     0
40
#define DEFAULT_SCREEN_MODE  3  /** 80x25 */
40
#define DEFAULT_SCREEN_MODE  3  /**< 80x25 */
41 41

  
42
#define FONT_WIDTH           8  /** Font width */
42
#define FONT_WIDTH           8  /**< Font width */
43 43

  
44 44
/** map ansi color index to cga palette index */
45 45
static const uint8_t ansi_to_cga[16] = {
......
48 48

  
49 49
typedef struct {
50 50
    AVFrame frame;
51
    int x, y;             /** cursor position (pixels) */
52
    int sx, sy;           /** saved cursor position (pixels) */
53
    const uint8_t* font;  /** font */
54
    int font_height;      /** font height */
55
    int attributes;       /** attribute flags */
56
    int fg, bg;           /** foreground and background color */
51
    int x;                /**< x cursor position (pixels) */
52
    int y;                /**< y cursor position (pixels) */
53
    int sx;               /**< saved x cursor position (pixels) */
54
    int sy;               /**< saved y cursor position (pixels) */
55
    const uint8_t* font;  /**< font */
56
    int font_height;      /**< font height */
57
    int attributes;       /**< attribute flags */
58
    int fg;               /**< foreground color */
59
    int bg;               /**< background color */
57 60

  
58 61
    /* ansi parser state machine */
59 62
    enum {
......
64 67
    } state;
65 68
#define MAX_NB_ARGS 4
66 69
    int args[MAX_NB_ARGS];
67
    int nb_args;          /** number of arguments (may exceed MAX_NB_ARGS) */
70
    int nb_args;          /**< number of arguments (may exceed MAX_NB_ARGS) */
68 71
} AnsiContext;
69 72

  
70 73
static av_cold int decode_init(AVCodecContext *avctx)

Also available in: Unified diff