30 #define DEFINE_CKSUM_LINE(name, type, conv) \
31 static void cksum_line_ ## name(unsigned *cksum, void *data, unsigned size) \
34 unsigned a = *cksum & 0xFFFF, b = *cksum >> 16; \
35 for (; size > 0; size--, p++) { \
36 a = (a + (unsigned)(conv)) % 65521; \
37 b = (b + a) % 65521; \
39 *cksum = a | (b << 16); \
53 int linesize[5] = { 0 };
55 av_bprintf(bp,
", %d x %d", frame->width, frame->height);
63 for (i = 0; linesize[i]; i++) {
65 int h = frame->height;
68 data = frame->data[i];
69 for (y = 0; y < h; y++) {
71 data += frame->linesize[i];
79 int nb_planes, nb_samples, p;
85 nb_samples *= nb_planes;
90 av_bprintf(bp,
", %s", name ? name :
"unknown");
91 for (p = 0; p < nb_planes; p++) {
97 cksum_line_u8(&cksum, d, nb_samples);
101 cksum_line_s16(&cksum, d, nb_samples);
105 cksum_line_s32(&cksum, d, nb_samples);
109 cksum_line_flt(&cksum, d, nb_samples);
113 cksum_line_dbl(&cksum, d, nb_samples);
128 const char *type_name;
135 stream_index, (*frame)->pts);
138 av_bprintf(&bp,
", %s", type_name ? type_name :
"unknown");
163 .
name =
"uncodedframecrc",