mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
Merge commit '3fd22538bc0e0de84b31335266b4b1577d3d609e'
* commit '3fd22538bc0e0de84b31335266b4b1577d3d609e': prores: Change type of stride parameters to ptrdiff_t Merged-by: James Almer <jamrial@gmail.com>
This commit is contained in:
commit
663640d745
@ -36,11 +36,11 @@
|
||||
/**
|
||||
* Add bias value, clamp and output pixels of a slice
|
||||
*/
|
||||
static void put_pixels(uint16_t *dst, int stride, const int16_t *in)
|
||||
static void put_pixels(uint16_t *dst, ptrdiff_t linesize, const int16_t *in)
|
||||
{
|
||||
int x, y, src_offset, dst_offset;
|
||||
|
||||
for (y = 0, dst_offset = 0; y < 8; y++, dst_offset += stride) {
|
||||
for (y = 0, dst_offset = 0; y < 8; y++, dst_offset += linesize) {
|
||||
for (x = 0; x < 8; x++) {
|
||||
src_offset = (y << 3) + x;
|
||||
|
||||
@ -49,7 +49,7 @@ static void put_pixels(uint16_t *dst, int stride, const int16_t *in)
|
||||
}
|
||||
}
|
||||
|
||||
static void prores_idct_put_c(uint16_t *out, int linesize, int16_t *block, const int16_t *qmat)
|
||||
static void prores_idct_put_c(uint16_t *out, ptrdiff_t linesize, int16_t *block, const int16_t *qmat)
|
||||
{
|
||||
ff_prores_idct(block, qmat);
|
||||
put_pixels(out, linesize >> 1, block);
|
||||
|
@ -23,6 +23,7 @@
|
||||
#ifndef AVCODEC_PRORESDSP_H
|
||||
#define AVCODEC_PRORESDSP_H
|
||||
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
#include "avcodec.h"
|
||||
|
||||
@ -31,7 +32,7 @@
|
||||
typedef struct ProresDSPContext {
|
||||
int idct_permutation_type;
|
||||
uint8_t idct_permutation[64];
|
||||
void (* idct_put) (uint16_t *out, int linesize, int16_t *block, const int16_t *qmat);
|
||||
void (*idct_put)(uint16_t *out, ptrdiff_t linesize, int16_t *block, const int16_t *qmat);
|
||||
} ProresDSPContext;
|
||||
|
||||
void ff_proresdsp_init(ProresDSPContext *dsp, AVCodecContext *avctx);
|
||||
|
@ -196,7 +196,7 @@ typedef struct ProresContext {
|
||||
const uint8_t *scantable;
|
||||
|
||||
void (*fdct)(FDCTDSPContext *fdsp, const uint16_t *src,
|
||||
int linesize, int16_t *block);
|
||||
ptrdiff_t linesize, int16_t *block);
|
||||
FDCTDSPContext fdsp;
|
||||
|
||||
const AVFrame *pic;
|
||||
@ -227,13 +227,13 @@ typedef struct ProresContext {
|
||||
} ProresContext;
|
||||
|
||||
static void get_slice_data(ProresContext *ctx, const uint16_t *src,
|
||||
int linesize, int x, int y, int w, int h,
|
||||
ptrdiff_t linesize, int x, int y, int w, int h,
|
||||
int16_t *blocks, uint16_t *emu_buf,
|
||||
int mbs_per_slice, int blocks_per_mb, int is_chroma)
|
||||
{
|
||||
const uint16_t *esrc;
|
||||
const int mb_width = 4 * blocks_per_mb;
|
||||
int elinesize;
|
||||
ptrdiff_t elinesize;
|
||||
int i, j, k;
|
||||
|
||||
for (i = 0; i < mbs_per_slice; i++, src += mb_width) {
|
||||
@ -298,7 +298,7 @@ static void get_slice_data(ProresContext *ctx, const uint16_t *src,
|
||||
}
|
||||
|
||||
static void get_alpha_data(ProresContext *ctx, const uint16_t *src,
|
||||
int linesize, int x, int y, int w, int h,
|
||||
ptrdiff_t linesize, int x, int y, int w, int h,
|
||||
int16_t *blocks, int mbs_per_slice, int abits)
|
||||
{
|
||||
const int slice_width = 16 * mbs_per_slice;
|
||||
@ -421,7 +421,7 @@ static void encode_acs(PutBitContext *pb, int16_t *blocks,
|
||||
}
|
||||
|
||||
static int encode_slice_plane(ProresContext *ctx, PutBitContext *pb,
|
||||
const uint16_t *src, int linesize,
|
||||
const uint16_t *src, ptrdiff_t linesize,
|
||||
int mbs_per_slice, int16_t *blocks,
|
||||
int blocks_per_mb, int plane_size_factor,
|
||||
const int16_t *qmat)
|
||||
@ -514,7 +514,8 @@ static int encode_slice(AVCodecContext *avctx, const AVFrame *pic,
|
||||
int total_size = 0;
|
||||
const uint16_t *src;
|
||||
int slice_width_factor = av_log2(mbs_per_slice);
|
||||
int num_cblocks, pwidth, linesize, line_add;
|
||||
int num_cblocks, pwidth, line_add;
|
||||
ptrdiff_t linesize;
|
||||
int plane_factor, is_chroma;
|
||||
uint16_t *qmat;
|
||||
|
||||
@ -670,7 +671,7 @@ static int estimate_acs(int *error, int16_t *blocks, int blocks_per_slice,
|
||||
}
|
||||
|
||||
static int estimate_slice_plane(ProresContext *ctx, int *error, int plane,
|
||||
const uint16_t *src, int linesize,
|
||||
const uint16_t *src, ptrdiff_t linesize,
|
||||
int mbs_per_slice,
|
||||
int blocks_per_mb, int plane_size_factor,
|
||||
const int16_t *qmat, ProresThreadData *td)
|
||||
@ -703,7 +704,7 @@ static int est_alpha_diff(int cur, int prev, int abits)
|
||||
}
|
||||
|
||||
static int estimate_alpha_plane(ProresContext *ctx, int *error,
|
||||
const uint16_t *src, int linesize,
|
||||
const uint16_t *src, ptrdiff_t linesize,
|
||||
int mbs_per_slice, int quant,
|
||||
int16_t *blocks)
|
||||
{
|
||||
@ -1103,7 +1104,7 @@ static av_cold int encode_close(AVCodecContext *avctx)
|
||||
}
|
||||
|
||||
static void prores_fdct(FDCTDSPContext *fdsp, const uint16_t *src,
|
||||
int linesize, int16_t *block)
|
||||
ptrdiff_t linesize, int16_t *block)
|
||||
{
|
||||
int x, y;
|
||||
const uint16_t *tsrc = src;
|
||||
|
@ -25,9 +25,9 @@
|
||||
#include "libavcodec/idctdsp.h"
|
||||
#include "libavcodec/proresdsp.h"
|
||||
|
||||
void ff_prores_idct_put_10_sse2(uint16_t *dst, int linesize,
|
||||
void ff_prores_idct_put_10_sse2(uint16_t *dst, ptrdiff_t linesize,
|
||||
int16_t *block, const int16_t *qmat);
|
||||
void ff_prores_idct_put_10_avx (uint16_t *dst, int linesize,
|
||||
void ff_prores_idct_put_10_avx (uint16_t *dst, ptrdiff_t linesize,
|
||||
int16_t *block, const int16_t *qmat);
|
||||
|
||||
av_cold void ff_proresdsp_init_x86(ProresDSPContext *dsp, AVCodecContext *avctx)
|
||||
|
@ -211,7 +211,7 @@
|
||||
SUMSUB_SHPK m2, m3, m4, m5, m6, m7, %2
|
||||
%endmacro
|
||||
|
||||
; void ff_prores_idct_put_10_<opt>(uint8_t *pixels, int stride,
|
||||
; void ff_prores_idct_put_10_<opt>(uint8_t *pixels, ptrdiff_t stride,
|
||||
; int16_t *block, const int16_t *qmat);
|
||||
|
||||
; %1 = row shift
|
||||
|
Loading…
Reference in New Issue
Block a user