23 #ifndef AVCODEC_SCPR_H
24 #define AVCODEC_SCPR_H
81 int *px,
int *py, uint32_t clr, uint32_t *dst,
82 int linesize, uint32_t *plx, uint32_t *ply,
83 uint32_t backstep,
int off,
int *cx,
int *cx1)
98 dst[y * linesize + x] = clr;
102 if (x >= avctx->
width) {
112 dst[y * linesize + x] = dst[ly * linesize + lx];
116 if (x >= avctx->
width) {
123 clr = dst[ly * linesize + lx];
130 clr = dst[y * linesize + x + off + 1];
131 dst[y * linesize + x] = clr;
135 if (x >= avctx->
width) {
144 if (y < 1 || (y == 1 && x == 0))
149 int off1 = (ly * linesize + lx) * 4;
150 int off2 = ((y * linesize + x) + off) * 4;
167 clr = ((
b & 0xFF) << 16) + ((
g & 0xFF) << 8) + (
r & 0xFF);
168 dst[y * linesize + x] = clr;
172 if (x >= avctx->
width) {
181 if (y < 1 || (y == 1 && x == 0))
191 clr = dst[y * linesize + x + off - z];
192 dst[y * linesize + x] = clr;
196 if (x >= avctx->
width) {
212 *cx1 = (clr & 0x3F00) >> 2;
213 *cx = (clr & 0x3FFFFF) >> 16;
215 *cx1 = (clr & 0xFC00) >> 4;
216 *cx = (clr & 0xFFFFFF) >> 18;
223 int x,
int y, uint32_t clr,
224 uint32_t *dst, uint32_t *prev,
225 int linesize,
int plinesize,
226 uint32_t *bx, uint32_t *by,
227 uint32_t backstep,
int sx1,
int sx2,
239 dst[*by * linesize + *bx] = clr;
241 if (*bx >= x * 16 + sx2 || *bx >= avctx->
width) {
260 clr = dst[*by * linesize + *bx - 1 - z];
261 dst[*by * linesize + *bx] = clr;
263 if (*bx >= x * 16 + sx2 || *bx >= avctx->
width) {
271 if (*by < 1 || *by >= avctx->
height)
274 clr = dst[(*by - 1) * linesize + *bx];
275 dst[*by * linesize + *bx] = clr;
277 if (*bx >= x * 16 + sx2 || *bx >= avctx->
width) {
288 clr = prev[*by * plinesize + *bx];
289 dst[*by * linesize + *bx] = clr;
291 if (*bx >= x * 16 + sx2 || *bx >= avctx->
width) {
301 if (*by < 1 || *by >= avctx->
height)
312 r = odst[((*by - 1) * linesize + *bx) * 4] +
313 odst[(*by * linesize + *bx - 1 - z) * 4] -
314 odst[((*by - 1) * linesize + *bx - 1 - z) * 4];
315 g = odst[((*by - 1) * linesize + *bx) * 4 + 1] +
316 odst[(*by * linesize + *bx - 1 - z) * 4 + 1] -
317 odst[((*by - 1) * linesize + *bx - 1 - z) * 4 + 1];
318 b = odst[((*by - 1) * linesize + *bx) * 4 + 2] +
319 odst[(*by * linesize + *bx - 1 - z) * 4 + 2] -
320 odst[((*by - 1) * linesize + *bx - 1 - z) * 4 + 2];
321 clr = ((
b & 0xFF) << 16) + ((
g & 0xFF) << 8) + (
r & 0xFF);
322 dst[*by * linesize + *bx] = clr;
324 if (*bx >= x * 16 + sx2 || *bx >= avctx->
width) {
332 if (*by < 1 || *by >= avctx->
height)
343 clr = dst[(*by - 1) * linesize + *bx - 1 - z];
344 dst[*by * linesize + *bx] = clr;
346 if (*bx >= x * 16 + sx2 || *bx >= avctx->
width) {
355 *cx1 = (clr & 0x3F00) >> 2;
356 *cx = (clr & 0x3FFFFF) >> 16;
358 *cx1 = (clr & 0xFC00) >> 4;
359 *cx = (clr & 0xFFFFFF) >> 18;