static void check_pred8x8l(H264PredContext *h, uint8_t *buf0, uint8_t *buf1,

                           int codec, int chroma_format, int bit_depth)

{

    if (chroma_format == 1 && codec_ids[codec] == AV_CODEC_ID_H264) {

        int pred_mode;

        for (pred_mode = 0; pred_mode < 12; pred_mode++) {

            if (check_pred_func(h->pred8x8l[pred_mode], "8x8l", pred4x4_modes[codec][pred_mode])) {

                int neighbors;

                for (neighbors = 0; neighbors <= 0xc000; neighbors += 0x4000) {

                    int has_topleft  = neighbors & 0x8000;

                    int has_topright = neighbors & 0x4000;



                    if ((pred_mode == DIAG_DOWN_RIGHT_PRED || pred_mode == VERT_RIGHT_PRED) && !has_topleft)

                        continue; /* Those aren't allowed according to the spec */



                    randomize_buffers();

                    call_ref(src0, has_topleft, has_topright, (ptrdiff_t)24*SIZEOF_PIXEL);

                    call_new(src1, has_topleft, has_topright, (ptrdiff_t)24*SIZEOF_PIXEL);

                    if (memcmp(buf0, buf1, BUF_SIZE))

                        fail();

                    bench_new(src1, has_topleft, has_topright, (ptrdiff_t)24*SIZEOF_PIXEL);

                }

            }

        }

    }

}

static void check_pred8x8l(H264PredContext *h, uint8_t *buf0, uint8_t *buf1,

                           int codec, int chroma_format, int bit_depth)

{

    if (chroma_format == 1 && codec_ids[codec] == AV_CODEC_ID_H264) {

        int pred_mode;

        for (pred_mode = 0; pred_mode < 12; pred_mode++) {

            if (check_pred_func(h->pred8x8l[pred_mode], "8x8l", pred4x4_modes[codec][pred_mode])) {

                int neighbors;

                for (neighbors = 0; neighbors <= 0xc000; neighbors += 0x4000) {

                    int has_topleft  = neighbors & 0x8000;

                    int has_topright = neighbors & 0x4000;



                    if ((pred_mode == DIAG_DOWN_RIGHT_PRED || pred_mode == VERT_RIGHT_PRED) && !has_topleft)

                        continue; 



                    randomize_buffers();

                    call_ref(src0, has_topleft, has_topright, (ptrdiff_t)24*SIZEOF_PIXEL);

                    call_new(src1, has_topleft, has_topright, (ptrdiff_t)24*SIZEOF_PIXEL);

                    if (memcmp(buf0, buf1, BUF_SIZE))

                        fail();

                    bench_new(src1, has_topleft, has_topright, (ptrdiff_t)24*SIZEOF_PIXEL);

                }

            }

        }

    }

}

static void FUNC_0(H264PredContext *VAR_0, uint8_t *VAR_1, uint8_t *VAR_2,

                           int VAR_3, int VAR_4, int VAR_5)

{

    if (VAR_4 == 1 && codec_ids[VAR_3] == AV_CODEC_ID_H264) {

        int VAR_6;

        for (VAR_6 = 0; VAR_6 < 12; VAR_6++) {

            if (check_pred_func(VAR_0->pred8x8l[VAR_6], "8x8l", pred4x4_modes[VAR_3][VAR_6])) {

                int VAR_7;

                for (VAR_7 = 0; VAR_7 <= 0xc000; VAR_7 += 0x4000) {

                    int VAR_8  = VAR_7 & 0x8000;

                    int VAR_9 = VAR_7 & 0x4000;



                    if ((VAR_6 == DIAG_DOWN_RIGHT_PRED || VAR_6 == VERT_RIGHT_PRED) && !VAR_8)

                        continue; 



                    randomize_buffers();

                    call_ref(src0, VAR_8, VAR_9, (ptrdiff_t)24*SIZEOF_PIXEL);

                    call_new(src1, VAR_8, VAR_9, (ptrdiff_t)24*SIZEOF_PIXEL);

                    if (memcmp(VAR_1, VAR_2, BUF_SIZE))

                        fail();

                    bench_new(src1, VAR_8, VAR_9, (ptrdiff_t)24*SIZEOF_PIXEL);

                }

            }

        }

    }

}

static void FUNC_0(H264PredContext *VAR_0, uint8_t *VAR_1, uint8_t *VAR_2,
int VAR_3, int VAR_4, int VAR_5)
{ if (VAR_4 == 1 && codec_ids[VAR_3] == AV_CODEC_ID_H264) { int VAR_6; for (VAR_6 = 0; VAR_6 < 12; VAR_6++) { if (check_pred_func(VAR_0->pred8x8l[VAR_6], "8x8l", pred4x4_modes[VAR_3][VAR_6])) { int VAR_7; for (VAR_7 = 0; VAR_7 <= 0xc000; VAR_7 += 0x4000) { int VAR_8  = VAR_7 & 0x8000; int VAR_9 = VAR_7 & 0x4000; if ((VAR_6 == DIAG_DOWN_RIGHT_PRED || VAR_6 == VERT_RIGHT_PRED) && !VAR_8)
continue; randomize_buffers(); call_ref(src0, VAR_8, VAR_9, (ptrdiff_t)24*SIZEOF_PIXEL); call_new(src1, VAR_8, VAR_9, (ptrdiff_t)24*SIZEOF_PIXEL); if (memcmp(VAR_1, VAR_2, BUF_SIZE))
fail(); bench_new(src1, VAR_8, VAR_9, (ptrdiff_t)24*SIZEOF_PIXEL); } } } } }