# Pastebin Q5chYDZK init_put_bits(&pb, pkt->data, size); const uint16_t *y = (const uint16_t *)pic->data[0]; int h; for (h = 0; h < avctx->height; h++) { int w; for (w = 0; w < avctx->width; w++) { put_bits(&pb, 10, y[w] & 0x3ff); } y += pic->linesize[0] / 2; } flush_put_bits(&pb);