History

avcodec/proresenc_anatoliy: import GET_SIGN() macro from Kostya encoder and use it

Clément Bœsch committed 2 years ago

Commit 17392ca1 parent 273f5911 file · +4 −3Browse files

Unified · Split

libavcodec/proresenc_anatoliy.c+4−3
@@ -255,9 +255,10 @@ static void encode_vlc_codeword(PutBitContext *pb, unsigned codebook, int val) · 254 unmodified lines
255 }255 }
256}256}
257 257
258#define TO_GOLOMB(val) (((val) * 2) ^ ((val) >> 31))258#define GET_SIGN(x) ((x) >> 31)
259#define DIFF_SIGN(val, sign) (((val) >> 31) ^ (sign))259#define TO_GOLOMB(val) (((val) * 2) ^ GET_SIGN(val))
260#define IS_NEGATIVE(val) ((((val) >> 31) ^ -1) + 1)260#define DIFF_SIGN(val, sign) (GET_SIGN(val) ^ (sign))
261#define IS_NEGATIVE(val) ((GET_SIGN(val) ^ -1) + 1)
261#define TO_GOLOMB2(val,sign) ((val)==0 ? 0 : ((val) << 1) + (sign))262#define TO_GOLOMB2(val,sign) ((val)==0 ? 0 : ((val) << 1) + (sign))
262 263
263static av_always_inline int get_level(int val)264static av_always_inline int get_level(int val)

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