avcodec/hevcdec: Check luma/chroma_log2_weight_denom