func: void avpriv_color_frame(AVFrame *frame, const int c[4]) const AVPixFmtDescriptor * desc = av_pix_fmt_desc_get ( frame -> format ) ; int p , y , x ; for (p = 0; p<desc->nb_components; p++) uint8_t * dst = frame -> data [ p ] ; int is_chroma = p == 1 || p == 2 ; int bytes = is_chroma ? FF_CEIL_RSHIFT ( frame -> width , desc -> log2_chroma_w ) : frame -> width ; int height = is_chroma ? FF_CEIL_RSHIFT ( frame -> height , desc -> log2_chroma_h ) : frame -> height ; for (y = 0; y < height; y++) if ( desc -> comp [ 0 ] . depth_minus1 >= 8 )  ( ( uint16_t * ) dst ) [ x ] = c [ p ]; memset ( dst , c [ p ] , bytes ); dst += frame -> linesize [ p ]; 