mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2026-06-16 04:32:47 +02:00
swscale/ops_dispatch: drop pointless const (cosmetic)
These are clearly not mutated within their constrained scope, and it just wastes valuable horizontal space. Signed-off-by: Niklas Haas <git@haasn.dev>
This commit is contained in:
+17
-17
@@ -154,15 +154,15 @@ static int op_pass_setup(const SwsFrame *out, const SwsFrame *in,
|
||||
p->memcpy_out = false;
|
||||
|
||||
for (int i = 0; i < p->planes_in; i++) {
|
||||
const int idx = p->idx_in[i];
|
||||
const int chroma = idx == 1 || idx == 2;
|
||||
const int sub_x = chroma ? indesc->log2_chroma_w : 0;
|
||||
const int sub_y = chroma ? indesc->log2_chroma_h : 0;
|
||||
const int plane_w = AV_CEIL_RSHIFT(aligned_w, sub_x);
|
||||
const int plane_pad = AV_CEIL_RSHIFT(comp->over_read, sub_x);
|
||||
const int plane_size = plane_w * p->pixel_bits_in >> 3;
|
||||
const int total_size = plane_size + plane_pad;
|
||||
const int loop_size = num_blocks * exec->block_size_in;
|
||||
int idx = p->idx_in[i];
|
||||
int chroma = idx == 1 || idx == 2;
|
||||
int sub_x = chroma ? indesc->log2_chroma_w : 0;
|
||||
int sub_y = chroma ? indesc->log2_chroma_h : 0;
|
||||
int plane_w = AV_CEIL_RSHIFT(aligned_w, sub_x);
|
||||
int plane_pad = AV_CEIL_RSHIFT(comp->over_read, sub_x);
|
||||
int plane_size = plane_w * p->pixel_bits_in >> 3;
|
||||
int total_size = plane_size + plane_pad;
|
||||
int loop_size = num_blocks * exec->block_size_in;
|
||||
if (in->linesize[idx] >= 0) {
|
||||
p->memcpy_last |= total_size > in->linesize[idx];
|
||||
} else {
|
||||
@@ -176,14 +176,14 @@ static int op_pass_setup(const SwsFrame *out, const SwsFrame *in,
|
||||
}
|
||||
|
||||
for (int i = 0; i < p->planes_out; i++) {
|
||||
const int idx = p->idx_out[i];
|
||||
const int chroma = idx == 1 || idx == 2;
|
||||
const int sub_x = chroma ? outdesc->log2_chroma_w : 0;
|
||||
const int sub_y = chroma ? outdesc->log2_chroma_h : 0;
|
||||
const int plane_w = AV_CEIL_RSHIFT(aligned_w, sub_x);
|
||||
const int plane_pad = AV_CEIL_RSHIFT(comp->over_write, sub_x);
|
||||
const int plane_size = plane_w * p->pixel_bits_out >> 3;
|
||||
const int loop_size = num_blocks * exec->block_size_out;
|
||||
int idx = p->idx_out[i];
|
||||
int chroma = idx == 1 || idx == 2;
|
||||
int sub_x = chroma ? outdesc->log2_chroma_w : 0;
|
||||
int sub_y = chroma ? outdesc->log2_chroma_h : 0;
|
||||
int plane_w = AV_CEIL_RSHIFT(aligned_w, sub_x);
|
||||
int plane_pad = AV_CEIL_RSHIFT(comp->over_write, sub_x);
|
||||
int plane_size = plane_w * p->pixel_bits_out >> 3;
|
||||
int loop_size = num_blocks * exec->block_size_out;
|
||||
p->memcpy_out |= plane_size + plane_pad > FFABS(out->linesize[idx]);
|
||||
exec->out[i] = out->data[idx];
|
||||
exec->out_stride[i] = out->linesize[idx];
|
||||
|
||||
Reference in New Issue
Block a user