Algorithms and Architectures for Real-Time Image and Video Enhancement