History

avcodec/dovi_rpu: use OR instead of addition

Niklas Haas committed 2 years ago

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

Showing the changes to libavcodec (1 of 1 file). Show all

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
145 case RPU_COEFF_FIXED:145 case RPU_COEFF_FIXED:
146 ipart = get_ue_golomb_long(gb);146 ipart = get_ue_golomb_long(gb);
147 fpart.u32 = get_bits_long(gb, hdr->coef_log2_denom);147 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;
149 149
150 case RPU_COEFF_FLOAT:150 case RPU_COEFF_FLOAT:
151 fpart.u32 = get_bits_long(gb, 32);151 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
164 case RPU_COEFF_FIXED:164 case RPU_COEFF_FIXED:
165 ipart = get_se_golomb_long(gb);165 ipart = get_se_golomb_long(gb);
166 fpart.u32 = get_bits_long(gb, hdr->coef_log2_denom);166 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;
168 168
169 case RPU_COEFF_FLOAT:169 case RPU_COEFF_FLOAT:
170 fpart.u32 = get_bits_long(gb, 32);170 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