|
|
@@ -21,6 +21,7 @@
|
|
|
#include "libavutil/frame.h"
|
|
|
#include "libavutil/adler32.h"
|
|
|
#include "libpostproc/postprocess.h"
|
|
|
+#include "test_utils.h"
|
|
|
|
|
|
typedef const uint8_t *cuint8;
|
|
|
|
|
|
@@ -39,21 +40,6 @@ static void blocks(AVFrame *frame, int blocksize, int mul)
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-static int64_t chksum(AVFrame *f)
|
|
|
-{
|
|
|
- AVAdler a = 123;
|
|
|
-
|
|
|
- for(int y=0; y<f->height; y++) {
|
|
|
- a = av_adler32_update(a, &f->data[0][y*f->linesize[0]], f->width);
|
|
|
- }
|
|
|
- for(int y=0; y<(f->height+1)/2; y++) {
|
|
|
- a = av_adler32_update(a, &f->data[1][y*f->linesize[1]], (f->width+1)/2);
|
|
|
- a = av_adler32_update(a, &f->data[2][y*f->linesize[2]], (f->width+1)/2);
|
|
|
- }
|
|
|
-
|
|
|
- return a;
|
|
|
-}
|
|
|
-
|
|
|
static int64_t test(int width, int height, const char * filter_string, int blocksize, int flags, int pict_type, int quality) {
|
|
|
AVFrame *in = av_frame_alloc();
|
|
|
AVFrame *out = av_frame_alloc();
|
|
|
@@ -90,7 +76,7 @@ static int64_t test(int width, int height, const char * filter_string, int block
|
|
|
width, height, qp, QP_STRIDE,
|
|
|
mode, context, pict_type);
|
|
|
|
|
|
- ret = chksum(out);
|
|
|
+ ret = ff_chksum(out);
|
|
|
end:
|
|
|
av_frame_free(&in);
|
|
|
av_frame_free(&out);
|