Coverage Report

Created: 2025-08-28 07:12

/src/libvpx/vpx_dsp/bitwriter.h
Line
Count
Source
1
/*
2
 *  Copyright (c) 2010 The WebM project authors. All Rights Reserved.
3
 *
4
 *  Use of this source code is governed by a BSD-style license
5
 *  that can be found in the LICENSE file in the root of the source
6
 *  tree. An additional intellectual property rights grant can be found
7
 *  in the file PATENTS.  All contributing project authors may
8
 *  be found in the AUTHORS file in the root of the source tree.
9
 */
10
11
#ifndef VPX_VPX_DSP_BITWRITER_H_
12
#define VPX_VPX_DSP_BITWRITER_H_
13
14
#include <stdio.h>
15
16
#include "vpx_ports/compiler_attributes.h"
17
#include "vpx_ports/mem.h"
18
19
#include "vpx_dsp/prob.h"
20
#if CONFIG_BITSTREAM_DEBUG
21
#include "vpx_util/vpx_debug_util.h"
22
#endif  // CONFIG_BITSTREAM_DEBUG
23
24
#ifdef __cplusplus
25
extern "C" {
26
#endif
27
28
typedef struct vpx_writer {
29
  unsigned int lowvalue;
30
  unsigned int range;
31
  int count;
32
  // Whether there has been an error.
33
  int error;
34
  // We maintain the invariant that pos <= size, i.e., we never write beyond
35
  // the end of the buffer. If pos would be incremented to be greater than
36
  // size, leave pos unchanged and set error to 1.
37
  unsigned int pos;
38
  unsigned int size;
39
  uint8_t *buffer;
40
} vpx_writer;
41
42
void vpx_start_encode(vpx_writer *br, uint8_t *source, size_t size);
43
// Returns 0 on success and returns -1 in case of error.
44
int vpx_stop_encode(vpx_writer *br);
45
46
static INLINE VPX_NO_UNSIGNED_SHIFT_CHECK void vpx_write(vpx_writer *br,
47
                                                         int bit,
48
939M
                                                         int probability) {
49
939M
  unsigned int split;
50
939M
  int count = br->count;
51
939M
  unsigned int range = br->range;
52
939M
  unsigned int lowvalue = br->lowvalue;
53
939M
  int shift;
54
55
#if CONFIG_BITSTREAM_DEBUG
56
  /*
57
  int queue_r = 0;
58
  int frame_idx_r = 0;
59
  int queue_w = bitstream_queue_get_write();
60
  int frame_idx_w = bitstream_queue_get_frame_write();
61
  if (frame_idx_w == frame_idx_r && queue_w == queue_r) {
62
    fprintf(stderr, "\n *** bitstream queue at frame_idx_w %d queue_w %d\n",
63
            frame_idx_w, queue_w);
64
    assert(0);
65
  }
66
  */
67
  bitstream_queue_push(bit, probability);
68
#endif
69
70
939M
  split = 1 + (((range - 1) * probability) >> 8);
71
72
939M
  range = split;
73
74
939M
  if (bit) {
75
560M
    lowvalue += split;
76
560M
    range = br->range - split;
77
560M
  }
78
79
939M
  shift = vpx_norm[range];
80
81
939M
  range <<= shift;
82
939M
  count += shift;
83
84
939M
  if (count >= 0) {
85
81.2M
    int offset = shift - count;
86
87
81.2M
    if (!br->error) {
88
81.2M
      if ((lowvalue << (offset - 1)) & 0x80000000) {
89
502
        int x = (int)br->pos - 1;
90
91
582
        while (x >= 0 && br->buffer[x] == 0xff) {
92
80
          br->buffer[x] = 0;
93
80
          x--;
94
80
        }
95
96
        // TODO(wtc): How to prove x >= 0?
97
502
        br->buffer[x] += 1;
98
502
      }
99
100
81.2M
      if (br->pos < br->size) {
101
81.2M
        br->buffer[br->pos++] = (lowvalue >> (24 - offset)) & 0xff;
102
81.2M
      } else {
103
80
        br->error = 1;
104
80
      }
105
81.2M
    }
106
81.2M
    lowvalue <<= offset;
107
81.2M
    shift = count;
108
81.2M
    lowvalue &= 0xffffff;
109
81.2M
    count -= 8;
110
81.2M
  }
111
112
939M
  lowvalue <<= shift;
113
939M
  br->count = count;
114
939M
  br->lowvalue = lowvalue;
115
939M
  br->range = range;
116
939M
}
Unexecuted instantiation: vp9_frame_scale.c:vpx_write
Unexecuted instantiation: vp9_encoder.c:vpx_write
Unexecuted instantiation: vp9_picklpf.c:vpx_write
Unexecuted instantiation: vp9_quantize.c:vpx_write
Unexecuted instantiation: vp9_ratectrl.c:vpx_write
Unexecuted instantiation: vp9_rd.c:vpx_write
Unexecuted instantiation: vp9_segmentation.c:vpx_write
Unexecuted instantiation: vp9_speed_features.c:vpx_write
Unexecuted instantiation: vp9_svc_layercontext.c:vpx_write
Unexecuted instantiation: vp9_tokenize.c:vpx_write
Unexecuted instantiation: vp9_aq_variance.c:vpx_write
Unexecuted instantiation: vp9_aq_360.c:vpx_write
Unexecuted instantiation: vp9_aq_cyclicrefresh.c:vpx_write
Unexecuted instantiation: vp9_aq_complexity.c:vpx_write
Unexecuted instantiation: vp9_alt_ref_aq.c:vpx_write
Unexecuted instantiation: vp9_skin_detection.c:vpx_write
Unexecuted instantiation: vp9_noise_estimate.c:vpx_write
Unexecuted instantiation: vp9_ext_ratectrl.c:vpx_write
Unexecuted instantiation: vp9_temporal_filter.c:vpx_write
Unexecuted instantiation: vp9_tpl_model.c:vpx_write
Unexecuted instantiation: vp9_mbgraph.c:vpx_write
Unexecuted instantiation: temporal_filter_sse4.c:vpx_write
Unexecuted instantiation: highbd_temporal_filter_sse4.c:vpx_write
Unexecuted instantiation: vp9_cx_iface.c:vpx_write
vp9_bitstream.c:vpx_write
Line
Count
Source
48
919M
                                                         int probability) {
49
919M
  unsigned int split;
50
919M
  int count = br->count;
51
919M
  unsigned int range = br->range;
52
919M
  unsigned int lowvalue = br->lowvalue;
53
919M
  int shift;
54
55
#if CONFIG_BITSTREAM_DEBUG
56
  /*
57
  int queue_r = 0;
58
  int frame_idx_r = 0;
59
  int queue_w = bitstream_queue_get_write();
60
  int frame_idx_w = bitstream_queue_get_frame_write();
61
  if (frame_idx_w == frame_idx_r && queue_w == queue_r) {
62
    fprintf(stderr, "\n *** bitstream queue at frame_idx_w %d queue_w %d\n",
63
            frame_idx_w, queue_w);
64
    assert(0);
65
  }
66
  */
67
  bitstream_queue_push(bit, probability);
68
#endif
69
70
919M
  split = 1 + (((range - 1) * probability) >> 8);
71
72
919M
  range = split;
73
74
919M
  if (bit) {
75
555M
    lowvalue += split;
76
555M
    range = br->range - split;
77
555M
  }
78
79
919M
  shift = vpx_norm[range];
80
81
919M
  range <<= shift;
82
919M
  count += shift;
83
84
919M
  if (count >= 0) {
85
79.9M
    int offset = shift - count;
86
87
79.9M
    if (!br->error) {
88
79.9M
      if ((lowvalue << (offset - 1)) & 0x80000000) {
89
485
        int x = (int)br->pos - 1;
90
91
565
        while (x >= 0 && br->buffer[x] == 0xff) {
92
80
          br->buffer[x] = 0;
93
80
          x--;
94
80
        }
95
96
        // TODO(wtc): How to prove x >= 0?
97
485
        br->buffer[x] += 1;
98
485
      }
99
100
79.9M
      if (br->pos < br->size) {
101
79.9M
        br->buffer[br->pos++] = (lowvalue >> (24 - offset)) & 0xff;
102
79.9M
      } else {
103
74
        br->error = 1;
104
74
      }
105
79.9M
    }
106
79.9M
    lowvalue <<= offset;
107
79.9M
    shift = count;
108
79.9M
    lowvalue &= 0xffffff;
109
79.9M
    count -= 8;
110
79.9M
  }
111
112
919M
  lowvalue <<= shift;
113
919M
  br->count = count;
114
919M
  br->lowvalue = lowvalue;
115
919M
  br->range = range;
116
919M
}
Unexecuted instantiation: vp9_context_tree.c:vpx_write
Unexecuted instantiation: vp9_encodeframe.c:vpx_write
Unexecuted instantiation: vp9_encodemb.c:vpx_write
vp9_encodemv.c:vpx_write
Line
Count
Source
48
7.79M
                                                         int probability) {
49
7.79M
  unsigned int split;
50
7.79M
  int count = br->count;
51
7.79M
  unsigned int range = br->range;
52
7.79M
  unsigned int lowvalue = br->lowvalue;
53
7.79M
  int shift;
54
55
#if CONFIG_BITSTREAM_DEBUG
56
  /*
57
  int queue_r = 0;
58
  int frame_idx_r = 0;
59
  int queue_w = bitstream_queue_get_write();
60
  int frame_idx_w = bitstream_queue_get_frame_write();
61
  if (frame_idx_w == frame_idx_r && queue_w == queue_r) {
62
    fprintf(stderr, "\n *** bitstream queue at frame_idx_w %d queue_w %d\n",
63
            frame_idx_w, queue_w);
64
    assert(0);
65
  }
66
  */
67
  bitstream_queue_push(bit, probability);
68
#endif
69
70
7.79M
  split = 1 + (((range - 1) * probability) >> 8);
71
72
7.79M
  range = split;
73
74
7.79M
  if (bit) {
75
3.49M
    lowvalue += split;
76
3.49M
    range = br->range - split;
77
3.49M
  }
78
79
7.79M
  shift = vpx_norm[range];
80
81
7.79M
  range <<= shift;
82
7.79M
  count += shift;
83
84
7.79M
  if (count >= 0) {
85
479k
    int offset = shift - count;
86
87
479k
    if (!br->error) {
88
479k
      if ((lowvalue << (offset - 1)) & 0x80000000) {
89
16
        int x = (int)br->pos - 1;
90
91
16
        while (x >= 0 && br->buffer[x] == 0xff) {
92
0
          br->buffer[x] = 0;
93
0
          x--;
94
0
        }
95
96
        // TODO(wtc): How to prove x >= 0?
97
16
        br->buffer[x] += 1;
98
16
      }
99
100
479k
      if (br->pos < br->size) {
101
479k
        br->buffer[br->pos++] = (lowvalue >> (24 - offset)) & 0xff;
102
479k
      } else {
103
2
        br->error = 1;
104
2
      }
105
479k
    }
106
479k
    lowvalue <<= offset;
107
479k
    shift = count;
108
479k
    lowvalue &= 0xffffff;
109
479k
    count -= 8;
110
479k
  }
111
112
7.79M
  lowvalue <<= shift;
113
7.79M
  br->count = count;
114
7.79M
  br->lowvalue = lowvalue;
115
7.79M
  br->range = range;
116
7.79M
}
Unexecuted instantiation: vp9_ethread.c:vpx_write
Unexecuted instantiation: vp9_firstpass.c:vpx_write
Unexecuted instantiation: vp9_lookahead.c:vpx_write
Unexecuted instantiation: vp9_multi_thread.c:vpx_write
Unexecuted instantiation: vp9_mcomp.c:vpx_write
Unexecuted instantiation: vp9_rdopt.c:vpx_write
Unexecuted instantiation: vp9_pickmode.c:vpx_write
vp9_subexp.c:vpx_write
Line
Count
Source
48
8.60M
                                                         int probability) {
49
8.60M
  unsigned int split;
50
8.60M
  int count = br->count;
51
8.60M
  unsigned int range = br->range;
52
8.60M
  unsigned int lowvalue = br->lowvalue;
53
8.60M
  int shift;
54
55
#if CONFIG_BITSTREAM_DEBUG
56
  /*
57
  int queue_r = 0;
58
  int frame_idx_r = 0;
59
  int queue_w = bitstream_queue_get_write();
60
  int frame_idx_w = bitstream_queue_get_frame_write();
61
  if (frame_idx_w == frame_idx_r && queue_w == queue_r) {
62
    fprintf(stderr, "\n *** bitstream queue at frame_idx_w %d queue_w %d\n",
63
            frame_idx_w, queue_w);
64
    assert(0);
65
  }
66
  */
67
  bitstream_queue_push(bit, probability);
68
#endif
69
70
8.60M
  split = 1 + (((range - 1) * probability) >> 8);
71
72
8.60M
  range = split;
73
74
8.60M
  if (bit) {
75
1.58M
    lowvalue += split;
76
1.58M
    range = br->range - split;
77
1.58M
  }
78
79
8.60M
  shift = vpx_norm[range];
80
81
8.60M
  range <<= shift;
82
8.60M
  count += shift;
83
84
8.60M
  if (count >= 0) {
85
430k
    int offset = shift - count;
86
87
430k
    if (!br->error) {
88
430k
      if ((lowvalue << (offset - 1)) & 0x80000000) {
89
0
        int x = (int)br->pos - 1;
90
91
0
        while (x >= 0 && br->buffer[x] == 0xff) {
92
0
          br->buffer[x] = 0;
93
0
          x--;
94
0
        }
95
96
        // TODO(wtc): How to prove x >= 0?
97
0
        br->buffer[x] += 1;
98
0
      }
99
100
430k
      if (br->pos < br->size) {
101
430k
        br->buffer[br->pos++] = (lowvalue >> (24 - offset)) & 0xff;
102
430k
      } else {
103
0
        br->error = 1;
104
0
      }
105
430k
    }
106
430k
    lowvalue <<= offset;
107
430k
    shift = count;
108
430k
    lowvalue &= 0xffffff;
109
430k
    count -= 8;
110
430k
  }
111
112
8.60M
  lowvalue <<= shift;
113
8.60M
  br->count = count;
114
8.60M
  br->lowvalue = lowvalue;
115
8.60M
  br->range = range;
116
8.60M
}
Unexecuted instantiation: vp9_treewriter.c:vpx_write
bitwriter.c:vpx_write
Line
Count
Source
48
3.65M
                                                         int probability) {
49
3.65M
  unsigned int split;
50
3.65M
  int count = br->count;
51
3.65M
  unsigned int range = br->range;
52
3.65M
  unsigned int lowvalue = br->lowvalue;
53
3.65M
  int shift;
54
55
#if CONFIG_BITSTREAM_DEBUG
56
  /*
57
  int queue_r = 0;
58
  int frame_idx_r = 0;
59
  int queue_w = bitstream_queue_get_write();
60
  int frame_idx_w = bitstream_queue_get_frame_write();
61
  if (frame_idx_w == frame_idx_r && queue_w == queue_r) {
62
    fprintf(stderr, "\n *** bitstream queue at frame_idx_w %d queue_w %d\n",
63
            frame_idx_w, queue_w);
64
    assert(0);
65
  }
66
  */
67
  bitstream_queue_push(bit, probability);
68
#endif
69
70
3.65M
  split = 1 + (((range - 1) * probability) >> 8);
71
72
3.65M
  range = split;
73
74
3.65M
  if (bit) {
75
0
    lowvalue += split;
76
0
    range = br->range - split;
77
0
  }
78
79
3.65M
  shift = vpx_norm[range];
80
81
3.65M
  range <<= shift;
82
3.65M
  count += shift;
83
84
3.65M
  if (count >= 0) {
85
401k
    int offset = shift - count;
86
87
401k
    if (!br->error) {
88
401k
      if ((lowvalue << (offset - 1)) & 0x80000000) {
89
1
        int x = (int)br->pos - 1;
90
91
1
        while (x >= 0 && br->buffer[x] == 0xff) {
92
0
          br->buffer[x] = 0;
93
0
          x--;
94
0
        }
95
96
        // TODO(wtc): How to prove x >= 0?
97
1
        br->buffer[x] += 1;
98
1
      }
99
100
401k
      if (br->pos < br->size) {
101
401k
        br->buffer[br->pos++] = (lowvalue >> (24 - offset)) & 0xff;
102
401k
      } else {
103
4
        br->error = 1;
104
4
      }
105
401k
    }
106
401k
    lowvalue <<= offset;
107
401k
    shift = count;
108
401k
    lowvalue &= 0xffffff;
109
401k
    count -= 8;
110
401k
  }
111
112
3.65M
  lowvalue <<= shift;
113
3.65M
  br->count = count;
114
3.65M
  br->lowvalue = lowvalue;
115
3.65M
  br->range = range;
116
3.65M
}
117
118
103M
static INLINE void vpx_write_bit(vpx_writer *w, int bit) {
119
103M
  vpx_write(w, bit, 128);  // vpx_prob_half
120
103M
}
Unexecuted instantiation: vp9_frame_scale.c:vpx_write_bit
Unexecuted instantiation: vp9_encoder.c:vpx_write_bit
Unexecuted instantiation: vp9_picklpf.c:vpx_write_bit
Unexecuted instantiation: vp9_quantize.c:vpx_write_bit
Unexecuted instantiation: vp9_ratectrl.c:vpx_write_bit
Unexecuted instantiation: vp9_rd.c:vpx_write_bit
Unexecuted instantiation: vp9_segmentation.c:vpx_write_bit
Unexecuted instantiation: vp9_speed_features.c:vpx_write_bit
Unexecuted instantiation: vp9_svc_layercontext.c:vpx_write_bit
Unexecuted instantiation: vp9_tokenize.c:vpx_write_bit
Unexecuted instantiation: vp9_aq_variance.c:vpx_write_bit
Unexecuted instantiation: vp9_aq_360.c:vpx_write_bit
Unexecuted instantiation: vp9_aq_cyclicrefresh.c:vpx_write_bit
Unexecuted instantiation: vp9_aq_complexity.c:vpx_write_bit
Unexecuted instantiation: vp9_alt_ref_aq.c:vpx_write_bit
Unexecuted instantiation: vp9_skin_detection.c:vpx_write_bit
Unexecuted instantiation: vp9_noise_estimate.c:vpx_write_bit
Unexecuted instantiation: vp9_ext_ratectrl.c:vpx_write_bit
Unexecuted instantiation: vp9_temporal_filter.c:vpx_write_bit
Unexecuted instantiation: vp9_tpl_model.c:vpx_write_bit
Unexecuted instantiation: vp9_mbgraph.c:vpx_write_bit
Unexecuted instantiation: temporal_filter_sse4.c:vpx_write_bit
Unexecuted instantiation: highbd_temporal_filter_sse4.c:vpx_write_bit
Unexecuted instantiation: vp9_cx_iface.c:vpx_write_bit
vp9_bitstream.c:vpx_write_bit
Line
Count
Source
118
96.1M
static INLINE void vpx_write_bit(vpx_writer *w, int bit) {
119
96.1M
  vpx_write(w, bit, 128);  // vpx_prob_half
120
96.1M
}
Unexecuted instantiation: vp9_context_tree.c:vpx_write_bit
Unexecuted instantiation: vp9_encodeframe.c:vpx_write_bit
Unexecuted instantiation: vp9_encodemb.c:vpx_write_bit
vp9_encodemv.c:vpx_write_bit
Line
Count
Source
118
54.8k
static INLINE void vpx_write_bit(vpx_writer *w, int bit) {
119
54.8k
  vpx_write(w, bit, 128);  // vpx_prob_half
120
54.8k
}
Unexecuted instantiation: vp9_ethread.c:vpx_write_bit
Unexecuted instantiation: vp9_firstpass.c:vpx_write_bit
Unexecuted instantiation: vp9_lookahead.c:vpx_write_bit
Unexecuted instantiation: vp9_multi_thread.c:vpx_write_bit
Unexecuted instantiation: vp9_mcomp.c:vpx_write_bit
Unexecuted instantiation: vp9_rdopt.c:vpx_write_bit
Unexecuted instantiation: vp9_pickmode.c:vpx_write_bit
vp9_subexp.c:vpx_write_bit
Line
Count
Source
118
3.35M
static INLINE void vpx_write_bit(vpx_writer *w, int bit) {
119
3.35M
  vpx_write(w, bit, 128);  // vpx_prob_half
120
3.35M
}
Unexecuted instantiation: vp9_treewriter.c:vpx_write_bit
bitwriter.c:vpx_write_bit
Line
Count
Source
118
3.65M
static INLINE void vpx_write_bit(vpx_writer *w, int bit) {
119
3.65M
  vpx_write(w, bit, 128);  // vpx_prob_half
120
3.65M
}
121
122
1.50M
static INLINE void vpx_write_literal(vpx_writer *w, int data, int bits) {
123
1.50M
  int bit;
124
125
5.00M
  for (bit = bits - 1; bit >= 0; bit--) vpx_write_bit(w, 1 & (data >> bit));
126
1.50M
}
Unexecuted instantiation: vp9_frame_scale.c:vpx_write_literal
Unexecuted instantiation: vp9_encoder.c:vpx_write_literal
Unexecuted instantiation: vp9_picklpf.c:vpx_write_literal
Unexecuted instantiation: vp9_quantize.c:vpx_write_literal
Unexecuted instantiation: vp9_ratectrl.c:vpx_write_literal
Unexecuted instantiation: vp9_rd.c:vpx_write_literal
Unexecuted instantiation: vp9_segmentation.c:vpx_write_literal
Unexecuted instantiation: vp9_speed_features.c:vpx_write_literal
Unexecuted instantiation: vp9_svc_layercontext.c:vpx_write_literal
Unexecuted instantiation: vp9_tokenize.c:vpx_write_literal
Unexecuted instantiation: vp9_aq_variance.c:vpx_write_literal
Unexecuted instantiation: vp9_aq_360.c:vpx_write_literal
Unexecuted instantiation: vp9_aq_cyclicrefresh.c:vpx_write_literal
Unexecuted instantiation: vp9_aq_complexity.c:vpx_write_literal
Unexecuted instantiation: vp9_alt_ref_aq.c:vpx_write_literal
Unexecuted instantiation: vp9_skin_detection.c:vpx_write_literal
Unexecuted instantiation: vp9_noise_estimate.c:vpx_write_literal
Unexecuted instantiation: vp9_ext_ratectrl.c:vpx_write_literal
Unexecuted instantiation: vp9_temporal_filter.c:vpx_write_literal
Unexecuted instantiation: vp9_tpl_model.c:vpx_write_literal
Unexecuted instantiation: vp9_mbgraph.c:vpx_write_literal
Unexecuted instantiation: temporal_filter_sse4.c:vpx_write_literal
Unexecuted instantiation: highbd_temporal_filter_sse4.c:vpx_write_literal
Unexecuted instantiation: vp9_cx_iface.c:vpx_write_literal
vp9_bitstream.c:vpx_write_literal
Line
Count
Source
122
45.8k
static INLINE void vpx_write_literal(vpx_writer *w, int data, int bits) {
123
45.8k
  int bit;
124
125
137k
  for (bit = bits - 1; bit >= 0; bit--) vpx_write_bit(w, 1 & (data >> bit));
126
45.8k
}
Unexecuted instantiation: vp9_context_tree.c:vpx_write_literal
Unexecuted instantiation: vp9_encodeframe.c:vpx_write_literal
Unexecuted instantiation: vp9_encodemb.c:vpx_write_literal
vp9_encodemv.c:vpx_write_literal
Line
Count
Source
122
7.84k
static INLINE void vpx_write_literal(vpx_writer *w, int data, int bits) {
123
7.84k
  int bit;
124
125
62.7k
  for (bit = bits - 1; bit >= 0; bit--) vpx_write_bit(w, 1 & (data >> bit));
126
7.84k
}
Unexecuted instantiation: vp9_ethread.c:vpx_write_literal
Unexecuted instantiation: vp9_firstpass.c:vpx_write_literal
Unexecuted instantiation: vp9_lookahead.c:vpx_write_literal
Unexecuted instantiation: vp9_multi_thread.c:vpx_write_literal
Unexecuted instantiation: vp9_mcomp.c:vpx_write_literal
Unexecuted instantiation: vp9_rdopt.c:vpx_write_literal
Unexecuted instantiation: vp9_pickmode.c:vpx_write_literal
vp9_subexp.c:vpx_write_literal
Line
Count
Source
122
1.44M
static INLINE void vpx_write_literal(vpx_writer *w, int data, int bits) {
123
1.44M
  int bit;
124
125
4.80M
  for (bit = bits - 1; bit >= 0; bit--) vpx_write_bit(w, 1 & (data >> bit));
126
1.44M
}
Unexecuted instantiation: vp9_treewriter.c:vpx_write_literal
Unexecuted instantiation: bitwriter.c:vpx_write_literal
127
128
#define vpx_write_prob(w, v) vpx_write_literal((w), (v), 8)
129
130
#ifdef __cplusplus
131
}  // extern "C"
132
#endif
133
134
#endif  // VPX_VPX_DSP_BITWRITER_H_