av_qsv_list_rem() ---> av_qsv_list_rem()
Drop semicola from macro declarations; add them to macro uses.
Remove some pointless parentheses.
Initialize one more pointer to NULL, not 0.
Separate header #includes from atomic operations.
cosmetics: Separate AV_QSV_MASK and AV_QSV_STAGE_TYPE.
cosmetics: Rearrange some variable declarations.
Drop some unnecessary variable initializations.
cosmetics: Reformat a while condition in libav style.