23 #ifndef AVCODEC_SCPR_H
24 #define AVCODEC_SCPR_H
76 int *px,
int *py, uint32_t clr, uint32_t *dst,
77 int linesize, uint32_t *plx, uint32_t *ply,
78 uint32_t backstep,
int off,
int *cx,
int *cx1)
93 dst[y * linesize + x] = clr;
97 if (x >= avctx->
width) {
107 dst[y * linesize + x] = dst[ly * linesize + lx];
111 if (x >= avctx->
width) {
118 clr = dst[ly * linesize + lx];
125 clr = dst[y * linesize + x + off + 1];
126 dst[y * linesize + x] = clr;
130 if (x >= avctx->
width) {
139 if (y < 1 || (y == 1 && x == 0))
143 uint8_t *odst = (uint8_t *)dst;
144 int off1 = (ly * linesize + lx) * 4;
145 int off2 = ((y * linesize + x) + off) * 4;
162 clr = ((
b & 0xFF) << 16) + ((
g & 0xFF) << 8) + (
r & 0xFF);
163 dst[y * linesize + x] = clr;
167 if (x >= avctx->
width) {
176 if (y < 1 || (y == 1 && x == 0))
186 clr = dst[y * linesize + x + off - z];
187 dst[y * linesize + x] = clr;
191 if (x >= avctx->
width) {
207 *cx1 = (clr & 0x3F00) >> 2;
208 *cx = (clr & 0x3FFFFF) >> 16;
210 *cx1 = (clr & 0xFC00) >> 4;
211 *cx = (clr & 0xFFFFFF) >> 18;
218 int x,
int y, uint32_t clr,
219 uint32_t *dst, uint32_t *prev,
220 int linesize,
int plinesize,
221 uint32_t *bx, uint32_t *by,
222 uint32_t backstep,
int sx1,
int sx2,
234 dst[*by * linesize + *bx] = clr;
236 if (*bx >= x * 16 + sx2 || *bx >= avctx->
width) {
255 clr = dst[*by * linesize + *bx - 1 - z];
256 dst[*by * linesize + *bx] = clr;
258 if (*bx >= x * 16 + sx2 || *bx >= avctx->
width) {
266 if (*by < 1 || *by >= avctx->
height)
269 clr = dst[(*by - 1) * linesize + *bx];
270 dst[*by * linesize + *bx] = clr;
272 if (*bx >= x * 16 + sx2 || *bx >= avctx->
width) {
283 clr = prev[*by * plinesize + *bx];
284 dst[*by * linesize + *bx] = clr;
286 if (*bx >= x * 16 + sx2 || *bx >= avctx->
width) {
294 uint8_t *odst = (uint8_t *)dst;
296 if (*by < 1 || *by >= avctx->
height)
307 r = odst[((*by - 1) * linesize + *bx) * 4] +
308 odst[(*by * linesize + *bx - 1 - z) * 4] -
309 odst[((*by - 1) * linesize + *bx - 1 - z) * 4];
310 g = odst[((*by - 1) * linesize + *bx) * 4 + 1] +
311 odst[(*by * linesize + *bx - 1 - z) * 4 + 1] -
312 odst[((*by - 1) * linesize + *bx - 1 - z) * 4 + 1];
313 b = odst[((*by - 1) * linesize + *bx) * 4 + 2] +
314 odst[(*by * linesize + *bx - 1 - z) * 4 + 2] -
315 odst[((*by - 1) * linesize + *bx - 1 - z) * 4 + 2];
316 clr = ((
b & 0xFF) << 16) + ((
g & 0xFF) << 8) + (
r & 0xFF);
317 dst[*by * linesize + *bx] = clr;
319 if (*bx >= x * 16 + sx2 || *bx >= avctx->
width) {
327 if (*by < 1 || *by >= avctx->
height)
338 clr = dst[(*by - 1) * linesize + *bx - 1 - z];
339 dst[*by * linesize + *bx] = clr;
341 if (*bx >= x * 16 + sx2 || *bx >= avctx->
width) {
350 *cx1 = (clr & 0x3F00) >> 2;
351 *cx = (clr & 0x3FFFFF) >> 16;
353 *cx1 = (clr & 0xFC00) >> 4;
354 *cx = (clr & 0xFFFFFF) >> 18;