44 for (i = 0; i < 8; i++) {
49 d1 = (a - d + 3 + rnd) >> 3;
50 d2 = (a - d + b - c + 4 - rnd) >> 3;
53 src[-
stride] = av_clip_uint8(b - d2);
54 src[0] = av_clip_uint8(c + d2);
68 for (i = 0; i < 8; i++) {
73 d1 = (a - d + 3 + rnd) >> 3;
74 d2 = (a - d + b - c + 4 - rnd) >> 3;
77 src[-1] = av_clip_uint8(b - d2);
78 src[0] = av_clip_uint8(c + d2);
90 int rnd1 = 4, rnd2 = 3;
91 for (i = 0; i < 8; i++) {
99 top[48] = ((a << 3) - d1 + rnd1) >> 3;
100 top[56] = ((b << 3) - d2 + rnd2) >> 3;
101 bottom[0] = ((c << 3) + d2 + rnd1) >> 3;
102 bottom[8] = ((d << 3) + d1 + rnd2) >> 3;
116 int rnd1 = 4, rnd2 = 3;
117 for (i = 0; i < 8; i++) {
125 left[6] = ((a << 3) - d1 + rnd1) >> 3;
126 left[7] = ((b << 3) - d2 + rnd2) >> 3;
127 right[0] = ((c << 3) + d2 + rnd1) >> 3;
128 right[1] = ((d << 3) + d1 + rnd2) >> 3;
148 5 * (src[-1 * stride] - src[0 * stride]) + 4) >> 3;
149 int a0_sign = a0 >> 31;
151 a0 = (a0 ^ a0_sign) - a0_sign;
153 int a1 =
FFABS((2 * (src[-4 * stride] - src[-1 * stride]) -
154 5 * (src[-3 * stride] - src[-2 * stride]) + 4) >> 3);
155 int a2 =
FFABS((2 * (src[ 0 * stride] - src[ 3 * stride]) -
156 5 * (src[ 1 * stride] - src[ 2 * stride]) + 4) >> 3);
157 if (a1 < a0 || a2 < a0) {
159 int clip_sign = clip >> 31;
161 clip = ((clip ^ clip_sign) - clip_sign) >> 1;
164 int d = 5 * (a3 -
a0);
165 int d_sign = (d >> 31);
167 d = ((d ^ d_sign) - d_sign) >> 3;
170 if (d_sign ^ clip_sign)
174 d = (d ^ d_sign) - d_sign;
175 src[-1 *
stride] = av_clip_uint8(src[-1 * stride] - d);
176 src[ 0 *
stride] = av_clip_uint8(src[ 0 * stride] + d);
200 for (i = 0; i <
len; i += 4) {
247 dc = (3 * dc + 1) >> 1;
248 dc = (3 * dc + 16) >> 5;
250 for (i = 0; i < 8; i++) {
251 dest[0] = av_clip_uint8(dest[0] + dc);
252 dest[1] = av_clip_uint8(dest[1] + dc);
253 dest[2] = av_clip_uint8(dest[2] + dc);
254 dest[3] = av_clip_uint8(dest[3] + dc);
255 dest[4] = av_clip_uint8(dest[4] + dc);
256 dest[5] = av_clip_uint8(dest[5] + dc);
257 dest[6] = av_clip_uint8(dest[6] + dc);
258 dest[7] = av_clip_uint8(dest[7] + dc);
271 for (i = 0; i < 8; i++) {
272 t1 = 12 * (src[ 0] + src[32]) + 4;
273 t2 = 12 * (src[ 0] - src[32]) + 4;
274 t3 = 16 * src[16] + 6 * src[48];
275 t4 = 6 * src[16] - 16 * src[48];
282 t1 = 16 * src[ 8] + 15 * src[24] + 9 * src[40] + 4 * src[56];
283 t2 = 15 * src[ 8] - 4 * src[24] - 16 * src[40] - 9 * src[56];
284 t3 = 9 * src[ 8] - 16 * src[24] + 4 * src[40] + 15 * src[56];
285 t4 = 4 * src[ 8] - 9 * src[24] + 15 * src[40] - 16 * src[56];
287 dst[0] = (t5 +
t1) >> 3;
288 dst[1] = (t6 +
t2) >> 3;
289 dst[2] = (t7 +
t3) >> 3;
290 dst[3] = (t8 +
t4) >> 3;
291 dst[4] = (t8 -
t4) >> 3;
292 dst[5] = (t7 -
t3) >> 3;
293 dst[6] = (t6 -
t2) >> 3;
294 dst[7] = (t5 -
t1) >> 3;
302 for (i = 0; i < 8; i++) {
303 t1 = 12 * (src[ 0] + src[32]) + 64;
304 t2 = 12 * (src[ 0] - src[32]) + 64;
305 t3 = 16 * src[16] + 6 * src[48];
306 t4 = 6 * src[16] - 16 * src[48];
313 t1 = 16 * src[ 8] + 15 * src[24] + 9 * src[40] + 4 * src[56];
314 t2 = 15 * src[ 8] - 4 * src[24] - 16 * src[40] - 9 * src[56];
315 t3 = 9 * src[ 8] - 16 * src[24] + 4 * src[40] + 15 * src[56];
316 t4 = 4 * src[ 8] - 9 * src[24] + 15 * src[40] - 16 * src[56];
318 dst[ 0] = (t5 +
t1) >> 7;
319 dst[ 8] = (t6 +
t2) >> 7;
320 dst[16] = (t7 +
t3) >> 7;
321 dst[24] = (t8 +
t4) >> 7;
322 dst[32] = (t8 - t4 + 1) >> 7;
323 dst[40] = (t7 - t3 + 1) >> 7;
324 dst[48] = (t6 - t2 + 1) >> 7;
325 dst[56] = (t5 - t1 + 1) >> 7;
338 dc = (3 * dc + 1) >> 1;
339 dc = (17 * dc + 64) >> 7;
341 for (i = 0; i < 4; i++) {
342 dest[0] = av_clip_uint8(dest[0] + dc);
343 dest[1] = av_clip_uint8(dest[1] + dc);
344 dest[2] = av_clip_uint8(dest[2] + dc);
345 dest[3] = av_clip_uint8(dest[3] + dc);
346 dest[4] = av_clip_uint8(dest[4] + dc);
347 dest[5] = av_clip_uint8(dest[5] + dc);
348 dest[6] = av_clip_uint8(dest[6] + dc);
349 dest[7] = av_clip_uint8(dest[7] + dc);
363 for (i = 0; i < 4; i++) {
364 t1 = 12 * (src[0] + src[4]) + 4;
365 t2 = 12 * (src[0] - src[4]) + 4;
366 t3 = 16 * src[2] + 6 * src[6];
367 t4 = 6 * src[2] - 16 * src[6];
374 t1 = 16 * src[1] + 15 * src[3] + 9 * src[5] + 4 * src[7];
375 t2 = 15 * src[1] - 4 * src[3] - 16 * src[5] - 9 * src[7];
376 t3 = 9 * src[1] - 16 * src[3] + 4 * src[5] + 15 * src[7];
377 t4 = 4 * src[1] - 9 * src[3] + 15 * src[5] - 16 * src[7];
379 dst[0] = (t5 +
t1) >> 3;
380 dst[1] = (t6 +
t2) >> 3;
381 dst[2] = (t7 +
t3) >> 3;
382 dst[3] = (t8 +
t4) >> 3;
383 dst[4] = (t8 -
t4) >> 3;
384 dst[5] = (t7 -
t3) >> 3;
385 dst[6] = (t6 -
t2) >> 3;
386 dst[7] = (t5 -
t1) >> 3;
393 for (i = 0; i < 8; i++) {
394 t1 = 17 * (src[ 0] + src[16]) + 64;
395 t2 = 17 * (src[ 0] - src[16]) + 64;
396 t3 = 22 * src[ 8] + 10 * src[24];
397 t4 = 22 * src[24] - 10 * src[ 8];
399 dest[0 * linesize] = av_clip_uint8(dest[0 * linesize] + ((t1 + t3) >> 7));
400 dest[1 * linesize] = av_clip_uint8(dest[1 * linesize] + ((t2 - t4) >> 7));
401 dest[2 * linesize] = av_clip_uint8(dest[2 * linesize] + ((t2 + t4) >> 7));
402 dest[3 * linesize] = av_clip_uint8(dest[3 * linesize] + ((t1 - t3) >> 7));
415 dc = (17 * dc + 4) >> 3;
416 dc = (12 * dc + 64) >> 7;
418 for (i = 0; i < 8; i++) {
419 dest[0] = av_clip_uint8(dest[0] + dc);
420 dest[1] = av_clip_uint8(dest[1] + dc);
421 dest[2] = av_clip_uint8(dest[2] + dc);
422 dest[3] = av_clip_uint8(dest[3] + dc);
436 for (i = 0; i < 8; i++) {
437 t1 = 17 * (src[0] + src[2]) + 4;
438 t2 = 17 * (src[0] - src[2]) + 4;
439 t3 = 22 * src[1] + 10 * src[3];
440 t4 = 22 * src[3] - 10 * src[1];
442 dst[0] = (t1 +
t3) >> 3;
443 dst[1] = (t2 -
t4) >> 3;
444 dst[2] = (t2 +
t4) >> 3;
445 dst[3] = (t1 -
t3) >> 3;
452 for (i = 0; i < 4; i++) {
453 t1 = 12 * (src[ 0] + src[32]) + 64;
454 t2 = 12 * (src[ 0] - src[32]) + 64;
455 t3 = 16 * src[16] + 6 * src[48];
456 t4 = 6 * src[16] - 16 * src[48];
463 t1 = 16 * src[ 8] + 15 * src[24] + 9 * src[40] + 4 * src[56];
464 t2 = 15 * src[ 8] - 4 * src[24] - 16 * src[40] - 9 * src[56];
465 t3 = 9 * src[ 8] - 16 * src[24] + 4 * src[40] + 15 * src[56];
466 t4 = 4 * src[ 8] - 9 * src[24] + 15 * src[40] - 16 * src[56];
468 dest[0 * linesize] = av_clip_uint8(dest[0 * linesize] + ((t5 + t1) >> 7));
469 dest[1 * linesize] = av_clip_uint8(dest[1 * linesize] + ((t6 + t2) >> 7));
470 dest[2 * linesize] = av_clip_uint8(dest[2 * linesize] + ((t7 + t3) >> 7));
471 dest[3 * linesize] = av_clip_uint8(dest[3 * linesize] + ((t8 + t4) >> 7));
472 dest[4 * linesize] = av_clip_uint8(dest[4 * linesize] + ((t8 - t4 + 1) >> 7));
473 dest[5 * linesize] = av_clip_uint8(dest[5 * linesize] + ((t7 - t3 + 1) >> 7));
474 dest[6 * linesize] = av_clip_uint8(dest[6 * linesize] + ((t6 - t2 + 1) >> 7));
475 dest[7 * linesize] = av_clip_uint8(dest[7 * linesize] + ((t5 - t1 + 1) >> 7));
488 dc = (17 * dc + 4) >> 3;
489 dc = (17 * dc + 64) >> 7;
491 for (i = 0; i < 4; i++) {
492 dest[0] = av_clip_uint8(dest[0] + dc);
493 dest[1] = av_clip_uint8(dest[1] + dc);
494 dest[2] = av_clip_uint8(dest[2] + dc);
495 dest[3] = av_clip_uint8(dest[3] + dc);
508 for (i = 0; i < 4; i++) {
509 t1 = 17 * (src[0] + src[2]) + 4;
510 t2 = 17 * (src[0] - src[2]) + 4;
511 t3 = 22 * src[1] + 10 * src[3];
512 t4 = 22 * src[3] - 10 * src[1];
514 dst[0] = (t1 +
t3) >> 3;
515 dst[1] = (t2 -
t4) >> 3;
516 dst[2] = (t2 +
t4) >> 3;
517 dst[3] = (t1 -
t3) >> 3;
524 for (i = 0; i < 4; i++) {
525 t1 = 17 * (src[0] + src[16]) + 64;
526 t2 = 17 * (src[0] - src[16]) + 64;
527 t3 = 22 * src[8] + 10 * src[24];
528 t4 = 22 * src[24] - 10 * src[8];
530 dest[0 * linesize] = av_clip_uint8(dest[0 * linesize] + ((t1 + t3) >> 7));
531 dest[1 * linesize] = av_clip_uint8(dest[1 * linesize] + ((t2 - t4) >> 7));
532 dest[2 * linesize] = av_clip_uint8(dest[2 * linesize] + ((t2 + t4) >> 7));
533 dest[3 * linesize] = av_clip_uint8(dest[3 * linesize] + ((t1 - t3) >> 7));
543 #define VC1_MSPEL_FILTER_16B(DIR, TYPE) \
544 static av_always_inline int vc1_mspel_ ## DIR ## _filter_16bits(const TYPE *src, \
552 return -4 * src[-stride] + 53 * src[0] + \
553 18 * src[stride] - 3 * src[stride * 2]; \
555 return -1 * src[-stride] + 9 * src[0] + \
556 9 * src[stride] - 1 * src[stride * 2]; \
558 return -3 * src[-stride] + 18 * src[0] + \
559 53 * src[stride] - 4 * src[stride * 2]; \
575 return (-4 * src[-stride] + 53 * src[0] +
576 18 * src[stride] - 3 * src[stride * 2] + 32 - r) >> 6;
578 return (-1 * src[-stride] + 9 * src[0] +
579 9 * src[stride] - 1 * src[stride * 2] + 8 - r) >> 4;
581 return (-3 * src[-stride] + 18 * src[0] +
582 53 * src[stride] - 4 * src[stride * 2] + 32 - r) >> 6;
588 #define VC1_MSPEL_MC(OP, OP4, OPNAME) \
589 static av_always_inline void OPNAME ## vc1_mspel_mc(uint8_t *dst, \
590 const uint8_t *src, \
602 static const int shift_value[] = { 0, 5, 1, 5 }; \
603 int shift = (shift_value[hmode] + shift_value[vmode]) >> 1; \
604 int16_t tmp[11 * 8], *tptr = tmp; \
606 r = (1 << (shift - 1)) + rnd - 1; \
609 for (j = 0; j < 8; j++) { \
610 for (i = 0; i < 11; i++) \
611 tptr[i] = (vc1_mspel_ver_filter_16bits(src + i, stride, vmode) + r) >> shift; \
618 for (j = 0; j < 8; j++) { \
619 for (i = 0; i < 8; i++) \
620 OP(dst[i], (vc1_mspel_hor_filter_16bits(tptr + i, 1, hmode) + r) >> 7); \
629 for (j = 0; j < 8; j++) { \
630 for (i = 0; i < 8; i++) \
631 OP(dst[i], vc1_mspel_filter(src + i, stride, vmode, r)); \
640 for (j = 0; j < 8; j++) { \
641 for (i = 0; i < 8; i++) \
642 OP(dst[i], vc1_mspel_filter(src + i, 1, hmode, rnd)); \
647 static av_always_inline void OPNAME ## vc1_mspel_mc_16(uint8_t *dst, \
648 const uint8_t *src, \
660 static const int shift_value[] = { 0, 5, 1, 5 }; \
661 int shift = (shift_value[hmode] + shift_value[vmode]) >> 1; \
662 int16_t tmp[19 * 16], *tptr = tmp; \
664 r = (1 << (shift - 1)) + rnd - 1; \
667 for (j = 0; j < 16; j++) { \
668 for (i = 0; i < 19; i++) \
669 tptr[i] = (vc1_mspel_ver_filter_16bits(src + i, stride, vmode) + r) >> shift; \
676 for (j = 0; j < 16; j++) { \
677 for (i = 0; i < 16; i++) \
678 OP(dst[i], (vc1_mspel_hor_filter_16bits(tptr + i, 1, hmode) + r) >> 7); \
687 for (j = 0; j < 16; j++) { \
688 for (i = 0; i < 16; i++) \
689 OP(dst[i], vc1_mspel_filter(src + i, stride, vmode, r)); \
698 for (j = 0; j < 16; j++) { \
699 for (i = 0; i < 16; i++) \
700 OP(dst[i], vc1_mspel_filter(src + i, 1, hmode, rnd)); \
705 static void OPNAME ## pixels8x8_c(uint8_t *block, const uint8_t *pixels, ptrdiff_t line_size, int rnd){\
708 OP4(*(uint32_t*)(block ), AV_RN32(pixels ));\
709 OP4(*(uint32_t*)(block+4), AV_RN32(pixels+4));\
714 static void OPNAME ## pixels16x16_c(uint8_t *block, const uint8_t *pixels, ptrdiff_t line_size, int rnd){\
716 for(i=0; i<16; i++){\
717 OP4(*(uint32_t*)(block ), AV_RN32(pixels ));\
718 OP4(*(uint32_t*)(block+ 4), AV_RN32(pixels+ 4));\
719 OP4(*(uint32_t*)(block+ 8), AV_RN32(pixels+ 8));\
720 OP4(*(uint32_t*)(block+12), AV_RN32(pixels+12));\
726 #define op_put(a, b) (a) = av_clip_uint8(b)
727 #define op_avg(a, b) (a) = ((a) + av_clip_uint8(b) + 1) >> 1
728 #define op4_avg(a, b) (a) = rnd_avg32(a, b)
729 #define op4_put(a, b) (a) = (b)
736 #define PUT_VC1_MSPEL(a, b) \
737 static void put_vc1_mspel_mc ## a ## b ## _c(uint8_t *dst, \
738 const uint8_t *src, \
739 ptrdiff_t stride, int rnd) \
741 put_vc1_mspel_mc(dst, src, stride, a, b, rnd); \
743 static void avg_vc1_mspel_mc ## a ## b ## _c(uint8_t *dst, \
744 const uint8_t *src, \
745 ptrdiff_t stride, int rnd) \
747 avg_vc1_mspel_mc(dst, src, stride, a, b, rnd); \
749 static void put_vc1_mspel_mc ## a ## b ## _16_c(uint8_t *dst, \
750 const uint8_t *src, \
751 ptrdiff_t stride, int rnd) \
753 put_vc1_mspel_mc_16(dst, src, stride, a, b, rnd); \
755 static void avg_vc1_mspel_mc ## a ## b ## _16_c(uint8_t *dst, \
756 const uint8_t *src, \
757 ptrdiff_t stride, int rnd) \
759 avg_vc1_mspel_mc_16(dst, src, stride, a, b, rnd); \
781 #define chroma_mc(a) \
782 ((A * src[a] + B * src[a + 1] + \
783 C * src[stride + a] + D * src[stride + a + 1] + 32 - 4) >> 6)
788 const int A = (8 - x) * (8 - y);
789 const int B = (x) * (8 - y);
790 const int C = (8 - x) * (y);
791 const int D = (x) * (y);
794 av_assert2(x < 8 && y < 8 && x >= 0 && y >= 0);
796 for (i = 0; i <
h; i++) {
813 const int A = (8 - x) * (8 - y);
814 const int B = (x) * (8 - y);
815 const int C = (8 - x) * (y);
816 const int D = (x) * (y);
819 av_assert2(x < 8 && y < 8 && x >= 0 && y >= 0);
821 for (i = 0; i <
h; i++) {
831 #define avg2(a, b) (((a) + (b) + 1) >> 1)
836 const int A = (8 - x) * (8 - y);
837 const int B = (x) * (8 - y);
838 const int C = (8 - x) * (y);
839 const int D = (x) * (y);
842 av_assert2(x < 8 && y < 8 && x >= 0 && y >= 0);
844 for (i = 0; i <
h; i++) {
862 const int A = (8 - x) * (8 - y);
863 const int B = ( x) * (8 - y);
864 const int C = (8 - x) * ( y);
865 const int D = ( x) * ( y);
868 av_assert2(x < 8 && y < 8 && x >= 0 && y >= 0);
870 for (i = 0; i <
h; i++) {
880 #if CONFIG_WMV3IMAGE_DECODER || CONFIG_VC1IMAGE_DECODER
883 int advance,
int count)
886 int a = src[(offset >> 16)];
887 int b = src[(offset >> 16) + 1];
888 *dst++ = a + ((b -
a) * (offset & 0xFFFF) >> 16);
901 int alpha,
int scaled,
909 a1 = a1 + ((b1 -
a1) * offset1 >> 16);
915 a2 = a2 + ((b2 -
a2) * offset2 >> 16);
917 a1 = a1 + ((a2 -
a1) * alpha >> 16);
925 int offset,
int width)
927 sprite_v_template(dst, src1a, src1b, offset, 0,
NULL,
NULL, 0, 0, 1, width);
930 static void sprite_v_double_noscale_c(
uint8_t *dst,
const uint8_t *src1a,
932 int alpha,
int width)
934 sprite_v_template(dst, src1a,
NULL, 0, 1, src2a,
NULL, 0, alpha, 0, width);
937 static void sprite_v_double_onescale_c(
uint8_t *dst,
942 int alpha,
int width)
944 sprite_v_template(dst, src1a, src1b, offset1, 1, src2a,
NULL, 0, alpha, 1,
948 static void sprite_v_double_twoscale_c(
uint8_t *dst,
958 sprite_v_template(dst, src1a, src1b, offset1, 1, src2a, src2b, offset2,
963 #define FN_ASSIGN(X, Y) \
964 dsp->put_vc1_mspel_pixels_tab[1][X+4*Y] = put_vc1_mspel_mc##X##Y##_c; \
965 dsp->put_vc1_mspel_pixels_tab[0][X+4*Y] = put_vc1_mspel_mc##X##Y##_16_c; \
966 dsp->avg_vc1_mspel_pixels_tab[1][X+4*Y] = avg_vc1_mspel_mc##X##Y##_c; \
967 dsp->avg_vc1_mspel_pixels_tab[0][X+4*Y] = avg_vc1_mspel_mc##X##Y##_16_c
1020 #if CONFIG_WMV3IMAGE_DECODER || CONFIG_VC1IMAGE_DECODER
static void vc1_inv_trans_4x4_c(uint8_t *dest, int linesize, int16_t *block)
void(* vc1_h_overlap)(uint8_t *src, int stride)
static void vc1_inv_trans_4x8_dc_c(uint8_t *dest, int linesize, int16_t *block)
void(* vc1_inv_trans_8x4)(uint8_t *dest, int line_size, int16_t *block)
void(* vc1_inv_trans_4x8)(uint8_t *dest, int line_size, int16_t *block)
static void vc1_inv_trans_8x8_dc_c(uint8_t *dest, int linesize, int16_t *block)
static void put_no_rnd_vc1_chroma_mc4_c(uint8_t *dst, uint8_t *src, int stride, int h, int x, int y)
static av_always_inline int vc1_filter_line(uint8_t *src, int stride, int pq)
VC-1 in-loop deblocking filter for one line.
static void vc1_v_loop_filter16_c(uint8_t *src, int stride, int pq)
static void vc1_v_loop_filter4_c(uint8_t *src, int stride, int pq)
void(* sprite_v_double_onescale)(uint8_t *dst, const uint8_t *src1a, const uint8_t *src1b, int offset1, const uint8_t *src2a, int alpha, int width)
int(* startcode_find_candidate)(const uint8_t *buf, int size)
Search buf from the start for up to size bytes.
void(* vc1_v_loop_filter8)(uint8_t *src, int stride, int pq)
vc1op_pixels_func put_vc1_mspel_pixels_tab[2][16]
#define VC1_MSPEL_FILTER_16B(DIR, TYPE)
void(* vc1_v_loop_filter4)(uint8_t *src, int stride, int pq)
#define av_assert2(cond)
assert() equivalent, that does lie in speed critical code.
static void vc1_h_loop_filter16_c(uint8_t *src, int stride, int pq)
void(* sprite_v_double_twoscale)(uint8_t *dst, const uint8_t *src1a, const uint8_t *src1b, int offset1, const uint8_t *src2a, const uint8_t *src2b, int offset2, int alpha, int width)
void(* vc1_inv_trans_8x8)(int16_t *b)
void(* vc1_inv_trans_8x4_dc)(uint8_t *dest, int line_size, int16_t *block)
void(* vc1_h_loop_filter8)(uint8_t *src, int stride, int pq)
static void avg_no_rnd_vc1_chroma_mc8_c(uint8_t *dst, uint8_t *src, int stride, int h, int x, int y)
static void vc1_h_overlap_c(uint8_t *src, int stride)
static double alpha(void *priv, double x, double y)
void(* vc1_inv_trans_8x8_dc)(uint8_t *dest, int line_size, int16_t *block)
static void put_no_rnd_vc1_chroma_mc8_c(uint8_t *dst, uint8_t *src, int stride, int h, int x, int y)
void(* vc1_inv_trans_4x4)(uint8_t *dest, int line_size, int16_t *block)
simple assert() macros that are a bit more flexible than ISO C assert().
Accelerated start code search function for start codes common to MPEG-1/2/4 video, VC-1, H.264/5.
static const uint8_t offset[127][2]
void(* vc1_v_loop_filter16)(uint8_t *src, int stride, int pq)
void(* vc1_inv_trans_4x4_dc)(uint8_t *dest, int line_size, int16_t *block)
static void vc1_loop_filter(uint8_t *src, int step, int stride, int len, int pq)
VC-1 in-loop deblocking filter.
static void vc1_inv_trans_8x8_c(int16_t block[64])
void ff_vc1dsp_init_x86(VC1DSPContext *dsp)
static void vc1_v_s_overlap_c(int16_t *top, int16_t *bottom)
static void vc1_v_loop_filter8_c(uint8_t *src, int stride, int pq)
av_cold void ff_vc1dsp_init_aarch64(VC1DSPContext *dsp)
h264_chroma_mc_func avg_no_rnd_vc1_chroma_pixels_tab[3]
int ff_startcode_find_candidate_c(const uint8_t *buf, int size)
void(* vc1_h_loop_filter4)(uint8_t *src, int stride, int pq)
#define PUT_VC1_MSPEL(a, b)
vc1op_pixels_func avg_vc1_mspel_pixels_tab[2][16]
void(* sprite_v_double_noscale)(uint8_t *dst, const uint8_t *src1a, const uint8_t *src2a, int alpha, int width)
static void avg_no_rnd_vc1_chroma_mc4_c(uint8_t *dst, uint8_t *src, int stride, int h, int x, int y)
static void vc1_h_s_overlap_c(int16_t *left, int16_t *right)
static void vc1_v_overlap_c(uint8_t *src, int stride)
h264_chroma_mc_func put_no_rnd_vc1_chroma_pixels_tab[3]
GLint GLenum GLboolean GLsizei stride
static void vc1_h_loop_filter8_c(uint8_t *src, int stride, int pq)
common internal and external API header
static double clip(void *opaque, double val)
Clip value val in the minval - maxval range.
static void vc1_h_loop_filter4_c(uint8_t *src, int stride, int pq)
void(* vc1_v_s_overlap)(int16_t *top, int16_t *bottom)
static void vc1_inv_trans_8x4_c(uint8_t *dest, int linesize, int16_t *block)
#define VC1_MSPEL_MC(OP, OP4, OPNAME)
static av_always_inline int vc1_mspel_filter(const uint8_t *src, int stride, int mode, int r)
void(* sprite_v_single)(uint8_t *dst, const uint8_t *src1a, const uint8_t *src1b, int offset, int width)
av_cold void ff_vc1dsp_init_arm(VC1DSPContext *dsp)
uint8_t pi<< 24) CONV_FUNC_GROUP(AV_SAMPLE_FMT_FLT, float, AV_SAMPLE_FMT_U8, uint8_t,(*(constuint8_t *) pi-0x80)*(1.0f/(1<< 7))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_DBL, double, AV_SAMPLE_FMT_U8, uint8_t,(*(constuint8_t *) pi-0x80)*(1.0/(1<< 7))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_U8, uint8_t, AV_SAMPLE_FMT_S16, int16_t,(*(constint16_t *) pi >>8)+0x80) CONV_FUNC_GROUP(AV_SAMPLE_FMT_FLT, float, AV_SAMPLE_FMT_S16, int16_t,*(constint16_t *) pi *(1.0f/(1<< 15))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_DBL, double, AV_SAMPLE_FMT_S16, int16_t,*(constint16_t *) pi *(1.0/(1<< 15))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_U8, uint8_t, AV_SAMPLE_FMT_S32, int32_t,(*(constint32_t *) pi >>24)+0x80) CONV_FUNC_GROUP(AV_SAMPLE_FMT_FLT, float, AV_SAMPLE_FMT_S32, int32_t,*(constint32_t *) pi *(1.0f/(1U<< 31))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_DBL, double, AV_SAMPLE_FMT_S32, int32_t,*(constint32_t *) pi *(1.0/(1U<< 31))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_U8, uint8_t, AV_SAMPLE_FMT_FLT, float, av_clip_uint8(lrintf(*(constfloat *) pi *(1<< 7))+0x80)) CONV_FUNC_GROUP(AV_SAMPLE_FMT_S16, int16_t, AV_SAMPLE_FMT_FLT, float, av_clip_int16(lrintf(*(constfloat *) pi *(1<< 15)))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_S32, int32_t, AV_SAMPLE_FMT_FLT, float, av_clipl_int32(llrintf(*(constfloat *) pi *(1U<< 31)))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_U8, uint8_t, AV_SAMPLE_FMT_DBL, double, av_clip_uint8(lrint(*(constdouble *) pi *(1<< 7))+0x80)) CONV_FUNC_GROUP(AV_SAMPLE_FMT_S16, int16_t, AV_SAMPLE_FMT_DBL, double, av_clip_int16(lrint(*(constdouble *) pi *(1<< 15)))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_S32, int32_t, AV_SAMPLE_FMT_DBL, double, av_clipl_int32(llrint(*(constdouble *) pi *(1U<< 31))))#defineSET_CONV_FUNC_GROUP(ofmt, ifmt) staticvoidset_generic_function(AudioConvert *ac){}voidff_audio_convert_free(AudioConvert **ac){if(!*ac) return;ff_dither_free(&(*ac) ->dc);av_freep(ac);}AudioConvert *ff_audio_convert_alloc(AVAudioResampleContext *avr, enumAVSampleFormatout_fmt, enumAVSampleFormatin_fmt, intchannels, intsample_rate, intapply_map){AudioConvert *ac;intin_planar, out_planar;ac=av_mallocz(sizeof(*ac));if(!ac) returnNULL;ac->avr=avr;ac->out_fmt=out_fmt;ac->in_fmt=in_fmt;ac->channels=channels;ac->apply_map=apply_map;if(avr->dither_method!=AV_RESAMPLE_DITHER_NONE &&av_get_packed_sample_fmt(out_fmt)==AV_SAMPLE_FMT_S16 &&av_get_bytes_per_sample(in_fmt)>2){ac->dc=ff_dither_alloc(avr, out_fmt, in_fmt, channels, sample_rate, apply_map);if(!ac->dc){av_free(ac);returnNULL;}returnac;}in_planar=ff_sample_fmt_is_planar(in_fmt, channels);out_planar=ff_sample_fmt_is_planar(out_fmt, channels);if(in_planar==out_planar){ac->func_type=CONV_FUNC_TYPE_FLAT;ac->planes=in_planar?ac->channels:1;}elseif(in_planar) ac->func_type=CONV_FUNC_TYPE_INTERLEAVE;elseac->func_type=CONV_FUNC_TYPE_DEINTERLEAVE;set_generic_function(ac);if(ARCH_AARCH64) ff_audio_convert_init_aarch64(ac);if(ARCH_ARM) ff_audio_convert_init_arm(ac);if(ARCH_X86) ff_audio_convert_init_x86(ac);returnac;}intff_audio_convert(AudioConvert *ac, AudioData *out, AudioData *in){intuse_generic=1;intlen=in->nb_samples;intp;if(ac->dc){av_log(ac->avr, AV_LOG_TRACE,"%dsamples-audio_convert:%sto%s(dithered)\n", len, av_get_sample_fmt_name(ac->in_fmt), av_get_sample_fmt_name(ac->out_fmt));returnff_convert_dither(ac-> dc
static void vc1_inv_trans_8x4_dc_c(uint8_t *dest, int linesize, int16_t *block)
void(* vc1_h_s_overlap)(int16_t *left, int16_t *right)
av_cold void ff_vc1dsp_init_ppc(VC1DSPContext *dsp)
void(* vc1_v_overlap)(uint8_t *src, int stride)
av_cold void ff_vc1dsp_init(VC1DSPContext *dsp)
static void vc1_inv_trans_4x4_dc_c(uint8_t *dest, int linesize, int16_t *block)
void(* vc1_inv_trans_4x8_dc)(uint8_t *dest, int line_size, int16_t *block)
void(* sprite_h)(uint8_t *dst, const uint8_t *src, int offset, int advance, int count)
static void vc1_inv_trans_4x8_c(uint8_t *dest, int linesize, int16_t *block)
void(* vc1_h_loop_filter16)(uint8_t *src, int stride, int pq)