summaryrefslogtreecommitdiff
path: root/libavcodec/pcm_tablegen.h
diff options
context:
space:
mode:
authorPaul B Mahol <onemda@gmail.com>2020-02-14 21:22:08 +0100
committerPaul B Mahol <onemda@gmail.com>2020-02-14 21:23:37 +0100
commitb6e9c23d5571244dd8372b650ca0745062e1ae56 (patch)
tree7a88da2bb43e8eb6f1769ea8bb66f4dc56aa0a93 /libavcodec/pcm_tablegen.h
parente1c84856bb7d804e74904ba117a2ca9700211082 (diff)
avcodec/pcm_tablegen: nits, reindent
Diffstat (limited to 'libavcodec/pcm_tablegen.h')
-rw-r--r--libavcodec/pcm_tablegen.h52
1 files changed, 26 insertions, 26 deletions
diff --git a/libavcodec/pcm_tablegen.h b/libavcodec/pcm_tablegen.h
index d8763abc40..7274c3cd17 100644
--- a/libavcodec/pcm_tablegen.h
+++ b/libavcodec/pcm_tablegen.h
@@ -45,48 +45,48 @@
/* alaw2linear() - Convert an A-law value to 16-bit linear PCM */
static av_cold int alaw2linear(unsigned char a_val)
{
- int t;
- int seg;
+ int t;
+ int seg;
- a_val ^= 0x55;
+ a_val ^= 0x55;
- t = a_val & QUANT_MASK;
- seg = ((unsigned)a_val & SEG_MASK) >> SEG_SHIFT;
- if(seg) t= (t + t + 1 + 32) << (seg + 2);
- else t= (t + t + 1 ) << 3;
+ t = a_val & QUANT_MASK;
+ seg = ((unsigned)a_val & SEG_MASK) >> SEG_SHIFT;
+ if(seg) t= (t + t + 1 + 32) << (seg + 2);
+ else t= (t + t + 1 ) << 3;
- return (a_val & SIGN_BIT) ? t : -t;
+ return (a_val & SIGN_BIT) ? t : -t;
}
static av_cold int ulaw2linear(unsigned char u_val)
{
- int t;
+ int t;
- /* Complement to obtain normal u-law value. */
- u_val = ~u_val;
+ /* Complement to obtain normal u-law value. */
+ u_val = ~u_val;
- /*
- * Extract and bias the quantization bits. Then
- * shift up by the segment number and subtract out the bias.
- */
- t = ((u_val & QUANT_MASK) << 3) + BIAS;
- t <<= ((unsigned)u_val & SEG_MASK) >> SEG_SHIFT;
+ /*
+ * Extract and bias the quantization bits. Then
+ * shift up by the segment number and subtract out the bias.
+ */
+ t = ((u_val & QUANT_MASK) << 3) + BIAS;
+ t <<= ((unsigned)u_val & SEG_MASK) >> SEG_SHIFT;
- return (u_val & SIGN_BIT) ? (BIAS - t) : (t - BIAS);
+ return (u_val & SIGN_BIT) ? (BIAS - t) : (t - BIAS);
}
static av_cold int vidc2linear(unsigned char u_val)
{
- int t;
+ int t;
- /*
- * Extract and bias the quantization bits. Then
- * shift up by the segment number and subtract out the bias.
- */
- t = (((u_val & VIDC_QUANT_MASK) >> VIDC_QUANT_SHIFT) << 3) + BIAS;
- t <<= ((unsigned)u_val & VIDC_SEG_MASK) >> VIDC_SEG_SHIFT;
+ /*
+ * Extract and bias the quantization bits. Then
+ * shift up by the segment number and subtract out the bias.
+ */
+ t = (((u_val & VIDC_QUANT_MASK) >> VIDC_QUANT_SHIFT) << 3) + BIAS;
+ t <<= ((unsigned)u_val & VIDC_SEG_MASK) >> VIDC_SEG_SHIFT;
- return (u_val & VIDC_SIGN_BIT) ? (BIAS - t) : (t - BIAS);
+ return (u_val & VIDC_SIGN_BIT) ? (BIAS - t) : (t - BIAS);
}
#if CONFIG_HARDCODED_TABLES