Unified · Split
| @@ -106,7 +106,7 @@ typedef struct Plane { · 105 unmodified lines | ||
| 106 | 106 | typedef struct SliceArgs { |
| 107 | 107 | PutBitContext pb; |
| 108 | 108 | int cache[DIRAC_MAX_QUANT_INDEX]; |
| 109 | − struct VC2EncContext *ctx; | |
| 109 | + const struct VC2EncContext *ctx; | |
| 110 | 110 | int x; |
| 111 | 111 | int y; |
| 112 | 112 | int quant_idx; |
| @@ -116,7 +116,7 @@ typedef struct SliceArgs { · 3 unmodified lines | ||
| 116 | 116 | } SliceArgs; |
| 117 | 117 | |
| 118 | 118 | typedef struct TransformArgs { |
| 119 | − struct VC2EncContext *ctx; | |
| 119 | + const struct VC2EncContext *ctx; | |
| 120 | 120 | Plane *plane; |
| 121 | 121 | const void *idata; |
| 122 | 122 | ptrdiff_t istride; |
| @@ -527,8 +527,8 @@ static void encode_picture_start(VC2EncContext *s) · 404 unmodified lines | ||
| 527 | 527 | #define QUANT(c, mul, add, shift) (((mul) * (c) + (add)) >> (shift)) |
| 528 | 528 | |
| 529 | 529 | /* VC-2 13.5.5.2 - slice_band() */ |
| 530 | −static void encode_subband(VC2EncContext *s, PutBitContext *pb, int sx, int sy, | |
| 531 | − SubBand *b, int quant) | |
| 530 | +static void encode_subband(const VC2EncContext *s, PutBitContext *pb, | |
| 531 | + int sx, int sy, const SubBand *b, int quant) | |
| 532 | 532 | { |
| 533 | 533 | int x, y; |
| 534 | 534 | |
| @@ -558,7 +558,7 @@ static int count_hq_slice(SliceArgs *slice, int quant_idx) · 23 unmodified lines | ||
| 558 | 558 | int x, y; |
| 559 | 559 | uint8_t quants[MAX_DWT_LEVELS][4]; |
| 560 | 560 | int bits = 0, p, level, orientation; |
| 561 | − VC2EncContext *s = slice->ctx; | |
| 561 | + const VC2EncContext *s = slice->ctx; | |
| 562 | 562 | |
| 563 | 563 | if (slice->cache[quant_idx]) |
| 564 | 564 | return slice->cache[quant_idx]; |
| @@ -576,7 +576,7 @@ static int count_hq_slice(SliceArgs *slice, int quant_idx) · 11 unmodified lines | ||
| 576 | 576 | bits += 8; |
| 577 | 577 | for (level = 0; level < s->wavelet_depth; level++) { |
| 578 | 578 | for (orientation = !!level; orientation < 4; orientation++) { |
| 579 | − SubBand *b = &s->plane[p].band[level][orientation]; | |
| 579 | + const SubBand *b = &s->plane[p].band[level][orientation]; | |
| 580 | 580 | |
| 581 | 581 | const int q_idx = quants[level][orientation]; |
| 582 | 582 | const uint64_t q_m = ((uint64_t)s->qmagic_lut[q_idx][0]) << 2; |
| @@ -618,7 +618,7 @@ static int count_hq_slice(SliceArgs *slice, int quant_idx) · 35 unmodified lines | ||
| 618 | 618 | static int rate_control(AVCodecContext *avctx, void *arg) |
| 619 | 619 | { |
| 620 | 620 | SliceArgs *slice_dat = arg; |
| 621 | − VC2EncContext *s = slice_dat->ctx; | |
| 621 | + const VC2EncContext *s = slice_dat->ctx; | |
| 622 | 622 | const int top = slice_dat->bits_ceil; |
| 623 | 623 | const int bottom = slice_dat->bits_floor; |
| 624 | 624 | int quant_buf[2] = {-1, -1}; |
| @@ -724,7 +724,7 @@ static int calc_slice_sizes(VC2EncContext *s) · 99 unmodified lines | ||
| 724 | 724 | static int encode_hq_slice(AVCodecContext *avctx, void *arg) |
| 725 | 725 | { |
| 726 | 726 | SliceArgs *slice_dat = arg; |
| 727 | − VC2EncContext *s = slice_dat->ctx; | |
| 727 | + const VC2EncContext *s = slice_dat->ctx; | |
| 728 | 728 | PutBitContext *pb = &slice_dat->pb; |
| 729 | 729 | const int slice_x = slice_dat->x; |
| 730 | 730 | const int slice_y = slice_dat->y; |
| @@ -839,7 +839,7 @@ static int encode_slices(VC2EncContext *s) · 108 unmodified lines | ||
| 839 | 839 | static int dwt_plane(AVCodecContext *avctx, void *arg) |
| 840 | 840 | { |
| 841 | 841 | TransformArgs *transform_dat = arg; |
| 842 | − VC2EncContext *s = transform_dat->ctx; | |
| 842 | + const VC2EncContext *s = transform_dat->ctx; | |
| 843 | 843 | const void *frame_data = transform_dat->idata; |
| 844 | 844 | const ptrdiff_t linesize = transform_dat->istride; |
| 845 | 845 | const int field = transform_dat->field; |