static void encode_rgb48_10bit(AVCodecContext *avctx, const AVPicture *pic, uint8_t *dst)

{

    DPXContext *s = avctx->priv_data;

    const uint8_t *src = pic->data[0];

    int x, y;



    for (y = 0; y < avctx->height; y++) {

        for (x = 0; x < avctx->width; x++) {

            int value;

            if (s->big_endian) {

                value = ((AV_RB16(src + 6*x + 4) & 0xFFC0) >> 4)

                      | ((AV_RB16(src + 6*x + 2) & 0xFFC0) << 6)

                      | ((AV_RB16(src + 6*x + 0) & 0xFFC0) << 16);

            } else {

                value = ((AV_RL16(src + 6*x + 4) & 0xFFC0) >> 4)

                      | ((AV_RL16(src + 6*x + 2) & 0xFFC0) << 6)

                      | ((AV_RL16(src + 6*x + 0) & 0xFFC0) << 16);

            }

            write32(dst, value);

            dst += 4;

        }

        src += pic->linesize[0];

    }

}

static void encode_rgb48_10bit(AVCodecContext *avctx, const AVPicture *pic, uint8_t *dst)

{

    DPXContext *s = avctx->priv_data;

    const uint8_t *src = pic->data[0];

    int x, y;



    for (y = 0; y < avctx->height; y++) {

        for (x = 0; x < avctx->width; x++) {

            int value;

            if (s->big_endian) {

                value = ((AV_RB16(src + 6*x + 4) & 0xFFC0) >> 4)

                      | ((AV_RB16(src + 6*x + 2) & 0xFFC0) << 6)

                      | ((AV_RB16(src + 6*x + 0) & 0xFFC0) << 16);

            } else {

                value = ((AV_RL16(src + 6*x + 4) & 0xFFC0) >> 4)

                      | ((AV_RL16(src + 6*x + 2) & 0xFFC0) << 6)

                      | ((AV_RL16(src + 6*x + 0) & 0xFFC0) << 16);

            }

            write32(dst, value);

            dst += 4;

        }

        src += pic->linesize[0];

    }

}

                value = ((AV_RB16(src + 6*x + 4) & 0xFFC0) >> 4)                       | ((AV_RB16(src + 6*x + 2) & 0xFFC0) << 6)                       | ((AV_RB16(src + 6*x + 0) & 0xFFC0) << 16);                 value = ((AV_RL16(src + 6*x + 4) & 0xFFC0) >> 4)                       | ((AV_RL16(src + 6*x + 2) & 0xFFC0) << 6)                       | ((AV_RL16(src + 6*x + 0) & 0xFFC0) << 16);
static void FUNC_0(AVCodecContext *VAR_0, const AVPicture *VAR_1, uint8_t *VAR_2)

{

    DPXContext *s = VAR_0->priv_data;

    const uint8_t *VAR_3 = VAR_1->data[0];

    int VAR_4, VAR_5;



    for (VAR_5 = 0; VAR_5 < VAR_0->height; VAR_5++) {

        for (VAR_4 = 0; VAR_4 < VAR_0->width; VAR_4++) {

            int value;

            if (s->big_endian) {

                value = ((AV_RB16(VAR_3 + 6*VAR_4 + 4) & 0xFFC0) >> 4)

                      | ((AV_RB16(VAR_3 + 6*VAR_4 + 2) & 0xFFC0) << 6)

                      | ((AV_RB16(VAR_3 + 6*VAR_4 + 0) & 0xFFC0) << 16);

            } else {

                value = ((AV_RL16(VAR_3 + 6*VAR_4 + 4) & 0xFFC0) >> 4)

                      | ((AV_RL16(VAR_3 + 6*VAR_4 + 2) & 0xFFC0) << 6)

                      | ((AV_RL16(VAR_3 + 6*VAR_4 + 0) & 0xFFC0) << 16);

            }

            write32(VAR_2, value);

            VAR_2 += 4;

        }

        VAR_3 += VAR_1->linesize[0];

    }

}

static void FUNC_0(AVCodecContext *VAR_0, const AVPicture *VAR_1, uint8_t *VAR_2)
{ DPXContext *s = VAR_0->priv_data; const uint8_t *VAR_3 = VAR_1->data[0]; int VAR_4, VAR_5; for (VAR_5 = 0; VAR_5 < VAR_0->height; VAR_5++) { for (VAR_4 = 0; VAR_4 < VAR_0->width; VAR_4++) { int value; if (s->big_endian) { value = ((AV_RB16(VAR_3 + 6*VAR_4 + 4) & 0xFFC0) >> 4)
| ((AV_RB16(VAR_3 + 6*VAR_4 + 2) & 0xFFC0) << 6)
| ((AV_RB16(VAR_3 + 6*VAR_4 + 0) & 0xFFC0) << 16); } else { value = ((AV_RL16(VAR_3 + 6*VAR_4 + 4) & 0xFFC0) >> 4)
| ((AV_RL16(VAR_3 + 6*VAR_4 + 2) & 0xFFC0) << 6)
| ((AV_RL16(VAR_3 + 6*VAR_4 + 0) & 0xFFC0) << 16); } write32(VAR_2, value); VAR_2 += 4; } VAR_3 += VAR_1->linesize[0]; } }