Salvaging upgraded items: Jewel shards

So I became interested about what exactly is the equivalent of one jewel upgrade to a shard.
Like when we salvage a blue or green level item from farming we’d obtain the same number of jewel shards for the corresponding upgraded times.
Then what about purple and orange/red levels?
Salvaging a +500 level 90 gear gave 15 jewel A shards, 35 jewel B shards, I don’t remember the number of jewel C shards, and around 170 jewel D shards. This is unlike how we’d normally expect- 300 D shards.
Is this affected by the level of the upgraded gear, or the number of upgrades, or the jewel itself? Is it undefined?
It is more likely in a sense that it would not give the exact shards for legendary items, which would be a good reason for anyone to be more reluctant in salvaging such items; even for obtaining the infused weapon material thingy.
It would be great if anyone can spare their time to explain the concept behind this salvaged upgraded items providing jewel shards.
Thanks.