Home | History | Annotate | Download | only in libvpx

Lines Matching refs:src

271 static void highbd_img_upshift(vpx_image_t *dst, vpx_image_t *src,
276 if (dst->d_w != src->d_w || dst->d_h != src->d_h ||
277 dst->x_chroma_shift != src->x_chroma_shift ||
278 dst->y_chroma_shift != src->y_chroma_shift || dst->fmt != src->fmt ||
282 switch (src->fmt) {
290 int w = src->d_w;
291 int h = src->d_h;
294 w = (w + src->x_chroma_shift) >> src->x_chroma_shift;
295 h = (h + src->y_chroma_shift) >> src->y_chroma_shift;
299 (uint16_t *)(src->planes[plane] + y * src->stride[plane]);
307 static void lowbd_img_upshift(vpx_image_t *dst, vpx_image_t *src,
312 if (dst->d_w != src->d_w || dst->d_h != src->d_h ||
313 dst->x_chroma_shift != src->x_chroma_shift ||
314 dst->y_chroma_shift != src->y_chroma_shift ||
315 dst->fmt != src->fmt + VPX_IMG_FMT_HIGHBITDEPTH || input_shift < 0) {
318 switch (src->fmt) {
326 int w = src->d_w;
327 int h = src->d_h;
330 w = (w + src->x_chroma_shift) >> src->x_chroma_shift;
331 h = (h + src->y_chroma_shift) >> src->y_chroma_shift;
334 uint8_t *p_src = src->planes[plane] + y * src->stride[plane];
344 void vpx_img_upshift(vpx_image_t *dst, vpx_image_t *src, int input_shift) {
345 if (src->fmt & VPX_IMG_FMT_HIGHBITDEPTH) {
346 highbd_img_upshift(dst, src, input_shift);
348 lowbd_img_upshift(dst, src, input_shift);
352 void vpx_img_truncate_16_to_8(vpx_image_t *dst, vpx_image_t *src) {
354 if (dst->fmt + VPX_IMG_FMT_HIGHBITDEPTH != src->fmt || dst->d_w != src->d_w ||
355 dst->d_h != src->d_h || dst->x_chroma_shift != src->x_chroma_shift ||
356 dst->y_chroma_shift != src->y_chroma_shift) {
367 int w = src->d_w;
368 int h = src->d_h;
371 w = (w + src->x_chroma_shift) >> src->x_chroma_shift;
372 h = (h + src->y_chroma_shift) >> src->y_chroma_shift;
376 (uint16_t *)(src->planes[plane] + y * src->stride[plane]);
385 static void highbd_img_downshift(vpx_image_t *dst, vpx_image_t *src,
388 if (dst->d_w != src->d_w || dst->d_h != src->d_h ||
389 dst->x_chroma_shift != src->x_chroma_shift ||
390 dst->y_chroma_shift != src->y_chroma_shift || dst->fmt != src->fmt ||
394 switch (src->fmt) {
402 int w = src->d_w;
403 int h = src->d_h;
406 w = (w + src->x_chroma_shift) >> src->x_chroma_shift;
407 h = (h + src->y_chroma_shift) >> src->y_chroma_shift;
411 (uint16_t *)(src->planes[plane] + y * src->stride[plane]);
419 static void lowbd_img_downshift(vpx_image_t *dst, vpx_image_t *src,
422 if (dst->d_w != src->d_w || dst->d_h != src->d_h ||
423 dst->x_chroma_shift != src->x_chroma_shift ||
424 dst->y_chroma_shift != src->y_chroma_shift ||
425 src->fmt != dst->fmt + VPX_IMG_FMT_HIGHBITDEPTH || down_shift < 0) {
436 int w = src->d_w;
437 int h = src->d_h;
440 w = (w + src->x_chroma_shift) >> src->x_chroma_shift;
441 h = (h + src->y_chroma_shift) >> src->y_chroma_shift;
445 (uint16_t *)(src->planes[plane] + y * src->stride[plane]);
454 void vpx_img_downshift(vpx_image_t *dst, vpx_image_t *src, int down_shift) {
456 highbd_img_downshift(dst, src, down_shift);
458 lowbd_img_downshift(dst, src, down_shift);