  
          float taby = 1.f/INTER_TAB_SIZE*ay;
          float tabx = 1.f/INTER_TAB_SIZE*ax;
  
          int dst_index = mad24(dy, dst_step, dst_offset + dx);
  
          int itab0 = convert_short_sat_rte( (1.0f-taby)*(1.0f-tabx) * INTER_REMAP_COEF_SCALE );
          int itab1 = convert_short_sat_rte( (1.0f-taby)*tabx * INTER_REMAP_COEF_SCALE );
          int itab2 = convert_short_sat_rte( taby*(1.0f-tabx) * INTER_REMAP_COEF_SCALE );
          int itab3 = convert_short_sat_rte( taby*tabx * INTER_REMAP_COEF_SCALE );
 
</s> remove                               int src_step, int src_offset, int src_rows, int src_cols,
 </s> add                               int src_row_stride, int src_px_stride, int src_offset, int src_rows, int src_cols, </s> remove                               int dst_step, int dst_offset, int dst_rows, int dst_cols,
 </s> add                               int dst_row_stride, int dst_offset, int dst_rows, int dst_cols, </s> remove   "  float u = texture(uTextureU, vTexCoord).r - 0.5;\n"
  "  float v = texture(uTextureV, vTexCoord).r - 0.5;\n"
  "  float r = y + 1.402 * v;\n"
  "  float g = y - 0.344 * u - 0.714 * v;\n"
  "  float b = y + 1.772 * u;\n"
 </s> add   "  vec2 uv = texture(uTextureUV, vTexCoord).rg - 0.5;\n"
  "  float r = y + 1.402 * uv.y;\n"
  "  float g = y - 0.344 * uv.x - 0.714 * uv.y;\n"
  "  float b = y + 1.772 * uv.x;\n" </s> remove             convert_int(src[mad24(sy, src_step, src_offset + sx)]) : 0;
 </s> add             convert_int(src[mad24(sy, src_row_stride, src_offset + sx*src_px_stride)]) : 0;
        int dst_index = mad24(dy, dst_row_stride, dst_offset + dx);
  
          float taby = 1.f/INTER_TAB_SIZE*ay;
          float tabx = 1.f/INTER_TAB_SIZE*ax;
  
        int dst_index = mad24(dy, dst_row_stride, dst_offset + dx);
  
          int itab0 = convert_short_sat_rte( (1.0f-taby)*(1.0f-tabx) * INTER_REMAP_COEF_SCALE );
          int itab1 = convert_short_sat_rte( (1.0f-taby)*tabx * INTER_REMAP_COEF_SCALE );
          int itab2 = convert_short_sat_rte( taby*(1.0f-tabx) * INTER_REMAP_COEF_SCALE );
          int itab3 = convert_short_sat_rte( taby*tabx * INTER_REMAP_COEF_SCALE );
keep keep keep keep replace keep keep keep keep keep
 nv12: encoderd avoids a full frame copy (#24519)

* rgb to nv12

* nv12 works (w memcpy)

* correct now

* no copy

* fix nv12 with fast debayer

* reverts of unused stuff

* ui use nv12

* comment out thumbnails for now

* rebase fix

* dm read nv12

* model read nv12

* fix ffmpeg encoder

* thumbnails from nv12

* replay to nv12

* python framereader support nv12

* remove hardcoded frame/buffer sizes

* fix build

* ffmpeg encoder fix buffers

* small cleanup

* reduce power usage test

* fix cpu usage test

* fix snapshot

* fix loggerd test

* bump cereal

Co-authored-by: Comma Device <device@comma.ai>
Co-authored-by: Joost Wooning <jwooning@gmail.com> 
selfdrive/modeld/transforms/transform.cl