Skip to content

Instantly share code, notes, and snippets.

View hasenbanck's full-sized avatar

Nils Hasenbanck hasenbanck

  • Hamburg, Germany
View GitHub Profile
@crearo
crearo / fragment_shader_NV12_to_RGB.frag
Last active December 1, 2023 09:56
A fragment shader to convert NV12 to RGB.
/** A fragment shader to convert NV12 to RGB.
* Input textures Y - is a block of size w*h.
* texture UV is of size w*h/2.
* Remember, both U and V are individually of size w/2*h/2, but they are interleaved.
* The layout looks like this :
* ----------
* | |
* | Y | size = w*h
* | |
* |________|
@anataliocs
anataliocs / CacheConfig.java
Last active September 17, 2020 10:30
Guava cache with spring boot and clear cache method
import com.google.common.cache.CacheBuilder;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.cache.CacheManager;
import org.springframework.cache.annotation.CachingConfigurer;
import org.springframework.cache.annotation.EnableCaching;
import org.springframework.cache.guava.GuavaCache;
import org.springframework.cache.interceptor.CacheErrorHandler;
import org.springframework.cache.interceptor.CacheResolver;
import org.springframework.cache.interceptor.KeyGenerator;