mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
* fixing some minor const warnings
Originally committed as revision 1205 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
92ddb69283
commit
18f770162b
@ -773,7 +773,7 @@ typedef struct AVCodecContext {
|
|||||||
} AVCodecContext;
|
} AVCodecContext;
|
||||||
|
|
||||||
typedef struct AVCodec {
|
typedef struct AVCodec {
|
||||||
char *name;
|
const char *name;
|
||||||
int type;
|
int type;
|
||||||
int id;
|
int id;
|
||||||
int priv_data_size;
|
int priv_data_size;
|
||||||
@ -1021,8 +1021,8 @@ typedef enum {
|
|||||||
int avcodec(void* handle, avc_cmd_t cmd, void* pin, void* pout);
|
int avcodec(void* handle, avc_cmd_t cmd, void* pin, void* pout);
|
||||||
|
|
||||||
/* memory */
|
/* memory */
|
||||||
void *av_malloc(int size);
|
void *av_malloc(unsigned int size);
|
||||||
void *av_mallocz(int size);
|
void *av_mallocz(unsigned int size);
|
||||||
void av_free(void *ptr);
|
void av_free(void *ptr);
|
||||||
void __av_freep(void **ptr);
|
void __av_freep(void **ptr);
|
||||||
#define av_freep(p) __av_freep((void **)(p))
|
#define av_freep(p) __av_freep((void **)(p))
|
||||||
|
@ -133,7 +133,7 @@ void align_get_bits(GetBitContext *s)
|
|||||||
if(n) skip_bits(s, n);
|
if(n) skip_bits(s, n);
|
||||||
}
|
}
|
||||||
|
|
||||||
int check_marker(GetBitContext *s, char *msg)
|
int check_marker(GetBitContext *s, const char *msg)
|
||||||
{
|
{
|
||||||
int bit= get_bits1(s);
|
int bit= get_bits1(s);
|
||||||
if(!bit) printf("Marker bit missing %s\n", msg);
|
if(!bit) printf("Marker bit missing %s\n", msg);
|
||||||
@ -147,7 +147,7 @@ int check_marker(GetBitContext *s, char *msg)
|
|||||||
|
|
||||||
#define GET_DATA(v, table, i, wrap, size) \
|
#define GET_DATA(v, table, i, wrap, size) \
|
||||||
{\
|
{\
|
||||||
UINT8 *ptr = (UINT8 *)table + i * wrap;\
|
const UINT8 *ptr = (UINT8 *)table + i * wrap;\
|
||||||
switch(size) {\
|
switch(size) {\
|
||||||
case 1:\
|
case 1:\
|
||||||
v = *(UINT8 *)ptr;\
|
v = *(UINT8 *)ptr;\
|
||||||
|
@ -639,7 +639,7 @@ static inline void skip_bits1(GetBitContext *s){
|
|||||||
void init_get_bits(GetBitContext *s,
|
void init_get_bits(GetBitContext *s,
|
||||||
UINT8 *buffer, int buffer_size);
|
UINT8 *buffer, int buffer_size);
|
||||||
|
|
||||||
int check_marker(GetBitContext *s, char *msg);
|
int check_marker(GetBitContext *s, const char *msg);
|
||||||
void align_get_bits(GetBitContext *s);
|
void align_get_bits(GetBitContext *s);
|
||||||
int init_vlc(VLC *vlc, int nb_bits, int nb_codes,
|
int init_vlc(VLC *vlc, int nb_bits, int nb_codes,
|
||||||
const void *bits, int bits_wrap, int bits_size,
|
const void *bits, int bits_wrap, int bits_size,
|
||||||
|
@ -131,7 +131,7 @@ void ff_block_permute(INT16 *block, UINT8 *permutation, const UINT8 *scantable,
|
|||||||
|
|
||||||
#if defined(HAVE_MMX)
|
#if defined(HAVE_MMX)
|
||||||
|
|
||||||
#undef emms_c()
|
#undef emms_c
|
||||||
|
|
||||||
#define MM_MMX 0x0001 /* standard MMX */
|
#define MM_MMX 0x0001 /* standard MMX */
|
||||||
#define MM_3DNOW 0x0004 /* AMD 3DNOW */
|
#define MM_3DNOW 0x0004 /* AMD 3DNOW */
|
||||||
|
@ -495,7 +495,8 @@ static int dvvideo_decode_frame(AVCodecContext *avctx,
|
|||||||
UINT8 *buf, int buf_size)
|
UINT8 *buf, int buf_size)
|
||||||
{
|
{
|
||||||
DVVideoDecodeContext *s = avctx->priv_data;
|
DVVideoDecodeContext *s = avctx->priv_data;
|
||||||
int sct, dsf, apt, ds, nb_dif_segs, vs, size, width, height, i, packet_size;
|
int sct, dsf, apt, ds, nb_dif_segs, vs, width, height, i, packet_size;
|
||||||
|
unsigned size;
|
||||||
UINT8 *buf_ptr;
|
UINT8 *buf_ptr;
|
||||||
const UINT16 *mb_pos_ptr;
|
const UINT16 *mb_pos_ptr;
|
||||||
AVPicture *picture;
|
AVPicture *picture;
|
||||||
|
@ -26,7 +26,7 @@
|
|||||||
linker will do it automatically */
|
linker will do it automatically */
|
||||||
|
|
||||||
/* memory alloc */
|
/* memory alloc */
|
||||||
void *av_malloc(int size)
|
void *av_malloc(unsigned int size)
|
||||||
{
|
{
|
||||||
void *ptr;
|
void *ptr;
|
||||||
#if defined (HAVE_MEMALIGN)
|
#if defined (HAVE_MEMALIGN)
|
||||||
|
@ -303,7 +303,8 @@ int MPV_common_init(MpegEncContext *s)
|
|||||||
s->uvlinesize = s->mb_width * 8 + EDGE_WIDTH;
|
s->uvlinesize = s->mb_width * 8 + EDGE_WIDTH;
|
||||||
|
|
||||||
for(i=0;i<3;i++) {
|
for(i=0;i<3;i++) {
|
||||||
int w, h, shift, pict_start, size;
|
int w, h, shift, pict_start;
|
||||||
|
unsigned size;
|
||||||
|
|
||||||
w = s->linesize;
|
w = s->linesize;
|
||||||
h = s->mb_height * 16 + 2 * EDGE_WIDTH;
|
h = s->mb_height * 16 + 2 * EDGE_WIDTH;
|
||||||
|
@ -591,7 +591,7 @@ static vlc_code_t svq1_inter_mean_table_5[292] = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#define SVQ1_CALC_CODEBOOK_ENTRIES(cbook)\
|
#define SVQ1_CALC_CODEBOOK_ENTRIES(cbook)\
|
||||||
codebook = (uint32_t *) cbook[level];\
|
codebook = (const uint32_t *) cbook[level];\
|
||||||
bit_cache = get_bits (bitbuf, 4*stages);\
|
bit_cache = get_bits (bitbuf, 4*stages);\
|
||||||
/* calculate codebook entries for this vector */\
|
/* calculate codebook entries for this vector */\
|
||||||
for (j=0; j < stages; j++) {\
|
for (j=0; j < stages; j++) {\
|
||||||
@ -605,11 +605,11 @@ static int svq1_decode_block_intra (bit_buffer_t *bitbuf, uint8_t *pixels, int p
|
|||||||
vlc_code_t *vlc;
|
vlc_code_t *vlc;
|
||||||
uint8_t *list[63];
|
uint8_t *list[63];
|
||||||
uint32_t *dst;
|
uint32_t *dst;
|
||||||
uint32_t *codebook;
|
const uint32_t *codebook;
|
||||||
int entries[6];
|
int entries[6];
|
||||||
int i, j, m, n;
|
int i, j, m, n;
|
||||||
int mean, stages;
|
int mean, stages;
|
||||||
int x, y, width, height, level;
|
unsigned x, y, width, height, level;
|
||||||
uint32_t n1, n2, n3, n4;
|
uint32_t n1, n2, n3, n4;
|
||||||
|
|
||||||
/* initialize list for breadth first processing of vectors */
|
/* initialize list for breadth first processing of vectors */
|
||||||
@ -681,7 +681,7 @@ static int svq1_decode_block_non_intra (bit_buffer_t *bitbuf, uint8_t *pixels, i
|
|||||||
vlc_code_t *vlc;
|
vlc_code_t *vlc;
|
||||||
uint8_t *list[63];
|
uint8_t *list[63];
|
||||||
uint32_t *dst;
|
uint32_t *dst;
|
||||||
uint32_t *codebook;
|
const uint32_t *codebook;
|
||||||
int entries[6];
|
int entries[6];
|
||||||
int i, j, m, n;
|
int i, j, m, n;
|
||||||
int mean, stages;
|
int mean, stages;
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
#include "dsputil.h"
|
#include "dsputil.h"
|
||||||
#include "mpegvideo.h"
|
#include "mpegvideo.h"
|
||||||
|
|
||||||
void *av_mallocz(int size)
|
void *av_mallocz(unsigned int size)
|
||||||
{
|
{
|
||||||
void *ptr;
|
void *ptr;
|
||||||
ptr = av_malloc(size);
|
ptr = av_malloc(size);
|
||||||
|
Loading…
Reference in New Issue
Block a user