mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-12-29 02:42:21 +00:00
Merge commit '131a85a1fed9966bbd38517f76abfac0237e39dc'
* commit '131a85a1fed9966bbd38517f76abfac0237e39dc': utvideo: Change type of array stride parameters to ptrdiff_t Merged-by: Clément Bœsch <u@pkh.me>
This commit is contained in:
commit
eed8ccde3e
@ -81,7 +81,7 @@ typedef struct UtvideoContext {
|
||||
int frame_pred;
|
||||
int pro;
|
||||
|
||||
int slice_stride;
|
||||
ptrdiff_t slice_stride;
|
||||
uint8_t *slice_bits, *slice_buffer[4];
|
||||
int slice_bits_size;
|
||||
} UtvideoContext;
|
||||
|
@ -124,7 +124,7 @@ static int build_huff(const uint8_t *src, VLC *vlc, int *fsym)
|
||||
}
|
||||
|
||||
static int decode_plane10(UtvideoContext *c, int plane_no,
|
||||
uint16_t *dst, int step, int stride,
|
||||
uint16_t *dst, int step, ptrdiff_t stride,
|
||||
int width, int height,
|
||||
const uint8_t *src, const uint8_t *huff,
|
||||
int use_pred)
|
||||
@ -229,7 +229,7 @@ fail:
|
||||
}
|
||||
|
||||
static int decode_plane(UtvideoContext *c, int plane_no,
|
||||
uint8_t *dst, int step, int stride,
|
||||
uint8_t *dst, int step, ptrdiff_t stride,
|
||||
int width, int height,
|
||||
const uint8_t *src, int use_pred)
|
||||
{
|
||||
@ -333,8 +333,8 @@ fail:
|
||||
return AVERROR_INVALIDDATA;
|
||||
}
|
||||
|
||||
static void restore_rgb_planes(uint8_t *src, int step, int stride, int width,
|
||||
int height)
|
||||
static void restore_rgb_planes(uint8_t *src, int step, ptrdiff_t stride,
|
||||
int width, int height)
|
||||
{
|
||||
int i, j;
|
||||
uint8_t r, g, b;
|
||||
@ -377,7 +377,7 @@ static void restore_rgb_planes10(AVFrame *frame, int width, int height)
|
||||
#undef B
|
||||
#undef C
|
||||
|
||||
static void restore_median_planar(UtvideoContext *c, uint8_t *src, int stride,
|
||||
static void restore_median_planar(UtvideoContext *c, uint8_t *src, ptrdiff_t stride,
|
||||
int width, int height, int slices, int rmode)
|
||||
{
|
||||
int i, j, slice;
|
||||
@ -425,7 +425,7 @@ static void restore_median_planar(UtvideoContext *c, uint8_t *src, int stride,
|
||||
* so restoring function should take care of possible padding between
|
||||
* two parts of the same "line".
|
||||
*/
|
||||
static void restore_median_planar_il(UtvideoContext *c, uint8_t *src, int stride,
|
||||
static void restore_median_planar_il(UtvideoContext *c, uint8_t *src, ptrdiff_t stride,
|
||||
int width, int height, int slices, int rmode)
|
||||
{
|
||||
int i, j, slice;
|
||||
@ -433,7 +433,7 @@ static void restore_median_planar_il(UtvideoContext *c, uint8_t *src, int stride
|
||||
uint8_t *bsrc;
|
||||
int slice_start, slice_height;
|
||||
const int cmask = ~(rmode ? 3 : 1);
|
||||
const int stride2 = stride << 1;
|
||||
const ptrdiff_t stride2 = stride << 1;
|
||||
|
||||
for (slice = 0; slice < slices; slice++) {
|
||||
slice_start = ((slice * height) / slices) & cmask;
|
||||
@ -476,7 +476,7 @@ static void restore_median_planar_il(UtvideoContext *c, uint8_t *src, int stride
|
||||
}
|
||||
}
|
||||
|
||||
static void restore_median_packed(uint8_t *src, int step, int stride,
|
||||
static void restore_median_packed(uint8_t *src, int step, ptrdiff_t stride,
|
||||
int width, int height, int slices, int rmode)
|
||||
{
|
||||
int i, j, slice;
|
||||
@ -532,7 +532,7 @@ static void restore_median_packed(uint8_t *src, int step, int stride,
|
||||
* so restoring function should take care of possible padding between
|
||||
* two parts of the same "line".
|
||||
*/
|
||||
static void restore_median_packed_il(uint8_t *src, int step, int stride,
|
||||
static void restore_median_packed_il(uint8_t *src, int step, ptrdiff_t stride,
|
||||
int width, int height, int slices, int rmode)
|
||||
{
|
||||
int i, j, slice;
|
||||
@ -540,7 +540,7 @@ static void restore_median_packed_il(uint8_t *src, int step, int stride,
|
||||
uint8_t *bsrc;
|
||||
int slice_start, slice_height;
|
||||
const int cmask = ~(rmode ? 3 : 1);
|
||||
const int stride2 = stride << 1;
|
||||
const ptrdiff_t stride2 = stride << 1;
|
||||
|
||||
for (slice = 0; slice < slices; slice++) {
|
||||
slice_start = ((slice * height) / slices) & cmask;
|
||||
|
@ -242,8 +242,9 @@ FF_ENABLE_DEPRECATION_WARNINGS
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void mangle_rgb_planes(uint8_t *dst[4], int dst_stride, uint8_t *src,
|
||||
int step, int stride, int width, int height)
|
||||
static void mangle_rgb_planes(uint8_t *dst[4], ptrdiff_t dst_stride,
|
||||
uint8_t *src, int step, ptrdiff_t stride,
|
||||
int width, int height)
|
||||
{
|
||||
int i, j;
|
||||
int k = 2 * dst_stride;
|
||||
@ -276,7 +277,7 @@ static void mangle_rgb_planes(uint8_t *dst[4], int dst_stride, uint8_t *src,
|
||||
}
|
||||
|
||||
/* Write data to a plane with left prediction */
|
||||
static void left_predict(uint8_t *src, uint8_t *dst, int stride,
|
||||
static void left_predict(uint8_t *src, uint8_t *dst, ptrdiff_t stride,
|
||||
int width, int height)
|
||||
{
|
||||
int i, j;
|
||||
@ -296,8 +297,8 @@ static void left_predict(uint8_t *src, uint8_t *dst, int stride,
|
||||
#undef B
|
||||
|
||||
/* Write data to a plane with median prediction */
|
||||
static void median_predict(UtvideoContext *c, uint8_t *src, uint8_t *dst, int stride,
|
||||
int width, int height)
|
||||
static void median_predict(UtvideoContext *c, uint8_t *src, uint8_t *dst,
|
||||
ptrdiff_t stride, int width, int height)
|
||||
{
|
||||
int i, j;
|
||||
int A, B;
|
||||
@ -398,7 +399,7 @@ static int write_huff_codes(uint8_t *src, uint8_t *dst, int dst_size,
|
||||
}
|
||||
|
||||
static int encode_plane(AVCodecContext *avctx, uint8_t *src,
|
||||
uint8_t *dst, int stride, int plane_no,
|
||||
uint8_t *dst, ptrdiff_t stride, int plane_no,
|
||||
int width, int height, PutByteContext *pb)
|
||||
{
|
||||
UtvideoContext *c = avctx->priv_data;
|
||||
|
Loading…
Reference in New Issue
Block a user