comparison avcodec.h @ 690:a1c69cb685b3 libavcodec

adaptive quantization (lumi/temporal & spatial complexity masking)
author michaelni
date Mon, 23 Sep 2002 14:56:11 +0000
parents 83d2c9d50d7d
children b6a7ff92df57
comparison
equal deleted inserted replaced
689:efcbfbd18864 690:a1c69cb685b3
3 3
4 #include "common.h" 4 #include "common.h"
5 5
6 #define LIBAVCODEC_VERSION_INT 0x000406 6 #define LIBAVCODEC_VERSION_INT 0x000406
7 #define LIBAVCODEC_VERSION "0.4.6" 7 #define LIBAVCODEC_VERSION "0.4.6"
8 #define LIBAVCODEC_BUILD 4624 8 #define LIBAVCODEC_BUILD 4625
9 #define LIBAVCODEC_BUILD_STR "4624" 9 #define LIBAVCODEC_BUILD_STR "4625"
10 10
11 enum CodecID { 11 enum CodecID {
12 CODEC_ID_NONE, 12 CODEC_ID_NONE,
13 CODEC_ID_MPEG1VIDEO, 13 CODEC_ID_MPEG1VIDEO,
14 CODEC_ID_H263, 14 CODEC_ID_H263,
121 #define CODEC_FLAG_GRAY 0x2000 /* only decode/encode grayscale */ 121 #define CODEC_FLAG_GRAY 0x2000 /* only decode/encode grayscale */
122 #define CODEC_FLAG_EMU_EDGE 0x4000/* dont draw edges */ 122 #define CODEC_FLAG_EMU_EDGE 0x4000/* dont draw edges */
123 #define CODEC_FLAG_DR1 0x8000 /* direct renderig type 1 (store internal frames in external buffers) */ 123 #define CODEC_FLAG_DR1 0x8000 /* direct renderig type 1 (store internal frames in external buffers) */
124 #define CODEC_FLAG_NOT_TRUNCATED 0x00010000 /* input bitstream is not truncated, except before a startcode 124 #define CODEC_FLAG_NOT_TRUNCATED 0x00010000 /* input bitstream is not truncated, except before a startcode
125 allows the last part of a frame to be decoded earlier */ 125 allows the last part of a frame to be decoded earlier */
126 #define CODEC_FLAG_NORMALIZE_AQP 0x00020000 /* normalize adaptive quantization */
127
126 /* codec capabilities */ 128 /* codec capabilities */
127 129
128 #define CODEC_CAP_DRAW_HORIZ_BAND 0x0001 /* decoder can use draw_horiz_band callback */ 130 #define CODEC_CAP_DRAW_HORIZ_BAND 0x0001 /* decoder can use draw_horiz_band callback */
129 #define CODEC_CAP_DR1 0x0002 /* direct rendering method 1 */ 131 #define CODEC_CAP_DR1 0x0002 /* direct rendering method 1 */
130 /* if 'parse_only' field is true, then avcodec_parse_frame() can be 132 /* if 'parse_only' field is true, then avcodec_parse_frame() can be
172 174
173 /** 175 /**
174 * some codecs need / can use extra-data like huffman tables 176 * some codecs need / can use extra-data like huffman tables
175 * mjpeg: huffman tables 177 * mjpeg: huffman tables
176 * rv10: additional flags 178 * rv10: additional flags
177 * encoding: set/allocated/freed by user. 179 * encoding: set/allocated/freed by lavc.
178 * decoding: set/allocated/freed by lavc. (can be NULL) 180 * decoding: set/allocated/freed by user.
179 */ 181 */
180 void *extradata; 182 void *extradata;
181 int extradata_size; 183 int extradata_size;
182 184
183 /* video only */ 185 /* video only */
283 * decoding: set by lavc 285 * decoding: set by lavc
284 */ 286 */
285 uint8_t *mbskip_table; 287 uint8_t *mbskip_table;
286 288
287 /* encoding parameters */ 289 /* encoding parameters */
290 /**
291 * quality (between 1 (good) and 31 (bad))
292 * encoding: set by user if CODEC_FLAG_QSCALE is set otherwise set by lavc
293 * decoding: set by lavc
294 */
288 int quality; /* quality of the previous encoded frame 295 int quality; /* quality of the previous encoded frame
289 (between 1 (good) and 31 (bad)) 296
290 this is allso used to set the quality in vbr mode 297 this is allso used to set the quality in vbr mode
291 and the per frame quality in CODEC_FLAG_TYPE (second pass mode) */ 298 and the per frame quality in CODEC_FLAG_TYPE (second pass mode) */
292 float qcompress; /* amount of qscale change between easy & hard scenes (0.0-1.0)*/ 299 float qcompress; /* amount of qscale change between easy & hard scenes (0.0-1.0)*/
293 float qblur; /* amount of qscale smoothing over time (0.0-1.0) */ 300 float qblur; /* amount of qscale smoothing over time (0.0-1.0) */
294 301
630 * if 0 then the frame_rate will be used as reference 637 * if 0 then the frame_rate will be used as reference
631 * encoding: set by user 638 * encoding: set by user
632 * decoding; set by lavc 639 * decoding; set by lavc
633 */ 640 */
634 long long int pts; 641 long long int pts;
642
643 /**
644 * luminance masking (0-> disabled)
645 * encoding: set by user
646 * decoding: unused
647 */
648 float lumi_masking;
649
650 /**
651 * temporary complexity masking (0-> disabled)
652 * encoding: set by user
653 * decoding: unused
654 */
655 float temporal_cplx_masking;
656
657 /**
658 * spatial complexity masking (0-> disabled)
659 * encoding: set by user
660 * decoding: unused
661 */
662 float spatial_cplx_masking;
663
664 /**
665 * p block masking (0-> disabled)
666 * encoding: set by user
667 * decoding: unused
668 */
669 float p_masking;
635 670
636 //FIXME this should be reordered after kabis API is finished ... 671 //FIXME this should be reordered after kabis API is finished ...
637 //TODO kill kabi 672 //TODO kill kabi
638 /* 673 /*
639 Note: Below are located reserved fields for further usage 674 Note: Below are located reserved fields for further usage