mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
Add some forgotten const to function arguments in libavfilter & libavformat.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
f2962ac8ad
commit
e6e7ba0ce3
@ -33,16 +33,16 @@ typedef struct {
|
||||
int chroma_r; ///< blur radius for the chroma planes
|
||||
uint16_t *buf; ///< holds image data for blur algorithm passed into filter.
|
||||
/// DSP functions.
|
||||
void (*filter_line) (uint8_t *dst, uint8_t *src, uint16_t *dc, int width, int thresh, const uint16_t *dithers);
|
||||
void (*blur_line) (uint16_t *dc, uint16_t *buf, uint16_t *buf1, uint8_t *src, int src_linesize, int width);
|
||||
void (*filter_line) (uint8_t *dst, const uint8_t *src, const uint16_t *dc, int width, int thresh, const uint16_t *dithers);
|
||||
void (*blur_line) (uint16_t *dc, uint16_t *buf, const uint16_t *buf1, const uint8_t *src, int src_linesize, int width);
|
||||
} GradFunContext;
|
||||
|
||||
void ff_gradfun_filter_line_c(uint8_t *dst, uint8_t *src, uint16_t *dc, int width, int thresh, const uint16_t *dithers);
|
||||
void ff_gradfun_blur_line_c(uint16_t *dc, uint16_t *buf, uint16_t *buf1, uint8_t *src, int src_linesize, int width);
|
||||
void ff_gradfun_filter_line_c(uint8_t *dst, const uint8_t *src, const uint16_t *dc, int width, int thresh, const uint16_t *dithers);
|
||||
void ff_gradfun_blur_line_c(uint16_t *dc, uint16_t *buf, const uint16_t *buf1, const uint8_t *src, int src_linesize, int width);
|
||||
|
||||
void ff_gradfun_filter_line_mmx2(uint8_t *dst, uint8_t *src, uint16_t *dc, int width, int thresh, const uint16_t *dithers);
|
||||
void ff_gradfun_filter_line_ssse3(uint8_t *dst, uint8_t *src, uint16_t *dc, int width, int thresh, const uint16_t *dithers);
|
||||
void ff_gradfun_filter_line_mmx2(uint8_t *dst, const uint8_t *src, const uint16_t *dc, int width, int thresh, const uint16_t *dithers);
|
||||
void ff_gradfun_filter_line_ssse3(uint8_t *dst, const uint8_t *src, const uint16_t *dc, int width, int thresh, const uint16_t *dithers);
|
||||
|
||||
void ff_gradfun_blur_line_sse2(uint16_t *dc, uint16_t *buf, uint16_t *buf1, uint8_t *src, int src_linesize, int width);
|
||||
void ff_gradfun_blur_line_sse2(uint16_t *dc, uint16_t *buf, const uint16_t *buf1, const uint8_t *src, int src_linesize, int width);
|
||||
|
||||
#endif /* AVFILTER_GRADFUN_H */
|
||||
|
@ -49,7 +49,7 @@ DECLARE_ALIGNED(16, static const uint16_t, dither)[8][8] = {
|
||||
{0x54,0x34,0x4C,0x2C,0x52,0x32,0x4A,0x2A},
|
||||
};
|
||||
|
||||
void ff_gradfun_filter_line_c(uint8_t *dst, uint8_t *src, uint16_t *dc, int width, int thresh, const uint16_t *dithers)
|
||||
void ff_gradfun_filter_line_c(uint8_t *dst, const uint8_t *src, const uint16_t *dc, int width, int thresh, const uint16_t *dithers)
|
||||
{
|
||||
int x;
|
||||
for (x = 0; x < width; x++, dc += x & 1) {
|
||||
@ -63,7 +63,7 @@ void ff_gradfun_filter_line_c(uint8_t *dst, uint8_t *src, uint16_t *dc, int widt
|
||||
}
|
||||
}
|
||||
|
||||
void ff_gradfun_blur_line_c(uint16_t *dc, uint16_t *buf, uint16_t *buf1, uint8_t *src, int src_linesize, int width)
|
||||
void ff_gradfun_blur_line_c(uint16_t *dc, uint16_t *buf, const uint16_t *buf1, const uint8_t *src, int src_linesize, int width)
|
||||
{
|
||||
int x, v, old;
|
||||
for (x = 0; x < width; x++) {
|
||||
@ -74,7 +74,7 @@ void ff_gradfun_blur_line_c(uint16_t *dc, uint16_t *buf, uint16_t *buf1, uint8_t
|
||||
}
|
||||
}
|
||||
|
||||
static void filter(GradFunContext *ctx, uint8_t *dst, uint8_t *src, int width, int height, int dst_linesize, int src_linesize, int r)
|
||||
static void filter(GradFunContext *ctx, uint8_t *dst, const uint8_t *src, int width, int height, int dst_linesize, int src_linesize, int r)
|
||||
{
|
||||
int bstride = FFALIGN(width, 16) / 2;
|
||||
int y;
|
||||
|
@ -63,7 +63,7 @@ typedef struct {
|
||||
FilterParam chroma; ///< chroma parameters (width, height, amount)
|
||||
} UnsharpContext;
|
||||
|
||||
static void unsharpen(uint8_t *dst, uint8_t *src, int dst_stride, int src_stride, int width, int height, FilterParam *fp)
|
||||
static void unsharpen(uint8_t *dst, const uint8_t *src, int dst_stride, int src_stride, int width, int height, FilterParam *fp)
|
||||
{
|
||||
uint32_t **sc = fp->sc;
|
||||
uint32_t sr[(MAX_SIZE * MAX_SIZE) - 1], tmp1, tmp2;
|
||||
@ -96,7 +96,7 @@ static void unsharpen(uint8_t *dst, uint8_t *src, int dst_stride, int src_stride
|
||||
tmp1 = sc[z + 1][x + fp->steps_x] + tmp2; sc[z + 1][x + fp->steps_x] = tmp2;
|
||||
}
|
||||
if (x >= fp->steps_x && y >= fp->steps_y) {
|
||||
uint8_t* srx = src - fp->steps_y * src_stride + x - fp->steps_x;
|
||||
const uint8_t* srx = src - fp->steps_y * src_stride + x - fp->steps_x;
|
||||
uint8_t* dsx = dst - fp->steps_y * dst_stride + x - fp->steps_x;
|
||||
|
||||
res = (int32_t)*srx + ((((int32_t) * srx - (int32_t)((tmp1 + fp->halfscale) >> fp->scalebits)) * fp->amount) >> 16);
|
||||
|
@ -23,7 +23,7 @@
|
||||
DECLARE_ALIGNED(16, static const uint16_t, pw_7f)[8] = {0x7F,0x7F,0x7F,0x7F,0x7F,0x7F,0x7F,0x7F};
|
||||
DECLARE_ALIGNED(16, static const uint16_t, pw_ff)[8] = {0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF};
|
||||
|
||||
void ff_gradfun_filter_line_mmx2(uint8_t *dst, uint8_t *src, uint16_t *dc, int width, int thresh, const uint16_t *dithers)
|
||||
void ff_gradfun_filter_line_mmx2(uint8_t *dst, const uint8_t *src, const uint16_t *dc, int width, int thresh, const uint16_t *dithers)
|
||||
{
|
||||
#if HAVE_MMX
|
||||
intptr_t x;
|
||||
@ -71,7 +71,7 @@ void ff_gradfun_filter_line_mmx2(uint8_t *dst, uint8_t *src, uint16_t *dc, int w
|
||||
#endif
|
||||
}
|
||||
|
||||
void ff_gradfun_filter_line_ssse3(uint8_t *dst, uint8_t *src, uint16_t *dc, int width, int thresh, const uint16_t *dithers)
|
||||
void ff_gradfun_filter_line_ssse3(uint8_t *dst, const uint8_t *src, const uint16_t *dc, int width, int thresh, const uint16_t *dithers)
|
||||
{
|
||||
#if HAVE_SSSE3
|
||||
intptr_t x;
|
||||
@ -118,7 +118,7 @@ void ff_gradfun_filter_line_ssse3(uint8_t *dst, uint8_t *src, uint16_t *dc, int
|
||||
#endif // HAVE_SSSE3
|
||||
}
|
||||
|
||||
void ff_gradfun_blur_line_sse2(uint16_t *dc, uint16_t *buf, uint16_t *buf1, uint8_t *src, int src_linesize, int width)
|
||||
void ff_gradfun_blur_line_sse2(uint16_t *dc, uint16_t *buf, const uint16_t *buf1, const uint8_t *src, int src_linesize, int width)
|
||||
{
|
||||
#if HAVE_SSE
|
||||
#define BLURV(load)\
|
||||
|
@ -152,7 +152,7 @@ static int send_command_packet(MMSTContext *mmst)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void mms_put_utf16(MMSContext *mms, uint8_t *src)
|
||||
static void mms_put_utf16(MMSContext *mms, const uint8_t *src)
|
||||
{
|
||||
AVIOContext bic;
|
||||
int size = mms->write_out_ptr - mms->out_buffer;
|
||||
|
@ -1689,13 +1689,13 @@ static void mov_build_index(MOVContext *mov, AVStream *st)
|
||||
}
|
||||
}
|
||||
|
||||
static int mov_open_dref(AVIOContext **pb, char *src, MOVDref *ref)
|
||||
static int mov_open_dref(AVIOContext **pb, const char *src, MOVDref *ref)
|
||||
{
|
||||
/* try relative path, we do not try the absolute because it can leak information about our
|
||||
system to an attacker */
|
||||
if (ref->nlvl_to > 0 && ref->nlvl_from > 0) {
|
||||
char filename[1024];
|
||||
char *src_path;
|
||||
const char *src_path;
|
||||
int i, l;
|
||||
|
||||
/* find a source dir */
|
||||
|
Loading…
Reference in New Issue
Block a user