History

avcodec/dovi_rpu: use OR instead of addition

Niklas Haas committed 2 years ago

Commit d5648a81 parent 48691711 file · +2 −2Browse files

Unified · Split

libavcodec/dovi_rpu.c+2−2
@@ -145,7 +145,7 @@ static inline uint64_t get_ue_coef(GetBitContext *gb, const AVDOVIRpuDataHeader · 144 unmodified lines
145145 case RPU_COEFF_FIXED:
146146 ipart = get_ue_golomb_long(gb);
147147 fpart.u32 = get_bits_long(gb, hdr->coef_log2_denom);
148− return (ipart << hdr->coef_log2_denom) + fpart.u32;
148+ return (ipart << hdr->coef_log2_denom) | fpart.u32;
149149
150150 case RPU_COEFF_FLOAT:
151151 fpart.u32 = get_bits_long(gb, 32);
@@ -164,7 +164,7 @@ static inline int64_t get_se_coef(GetBitContext *gb, const AVDOVIRpuDataHeader * · 12 unmodified lines
164164 case RPU_COEFF_FIXED:
165165 ipart = get_se_golomb_long(gb);
166166 fpart.u32 = get_bits_long(gb, hdr->coef_log2_denom);
167− return ipart * (1LL << hdr->coef_log2_denom) + fpart.u32;
167+ return ipart * (1LL << hdr->coef_log2_denom) | fpart.u32;
168168
169169 case RPU_COEFF_FLOAT:
170170 fpart.u32 = get_bits_long(gb, 32);

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t