Lines Matching defs:pixel_shift
450 int pixel_shift, int chroma_idc)
456 int offset = ((mx>>2) << pixel_shift) + (my>>2)*h->mb_linesize;
475 s->dsp.emulated_edge_mc(s->edge_emu_buffer, src_y - (2 << pixel_shift) - 2*h->mb_linesize, h->mb_linesize,
477 src_y= s->edge_emu_buffer + (2 << pixel_shift) + 2*h->mb_linesize;
491 s->dsp.emulated_edge_mc(s->edge_emu_buffer, src_cb - (2 << pixel_shift) - 2*h->mb_linesize, h->mb_linesize,
493 src_cb= s->edge_emu_buffer + (2 << pixel_shift) + 2*h->mb_linesize;
502 s->dsp.emulated_edge_mc(s->edge_emu_buffer, src_cr - (2 << pixel_shift) - 2*h->mb_linesize, h->mb_linesize,
504 src_cr= s->edge_emu_buffer + (2 << pixel_shift) + 2*h->mb_linesize;
520 src_cb = pic->f.data[1] + ((mx >> 3) << pixel_shift) + (my >> ysh) * h->mb_uvlinesize;
521 src_cr = pic->f.data[2] + ((mx >> 3) << pixel_shift) + (my >> ysh) * h->mb_uvlinesize;
548 int list0, int list1, int pixel_shift, int chroma_idc)
554 dest_y += (2*x_offset << pixel_shift) + 2*y_offset*h->mb_linesize;
556 dest_cb += (2*x_offset << pixel_shift) + 2*y_offset*h->mb_linesize;
557 dest_cr += (2*x_offset << pixel_shift) + 2*y_offset*h->mb_linesize;
559 dest_cb += ( x_offset << pixel_shift) + 2*y_offset*h->mb_uvlinesize;
560 dest_cr += ( x_offset << pixel_shift) + 2*y_offset*h->mb_uvlinesize;
562 dest_cb += ( x_offset << pixel_shift) + y_offset*h->mb_uvlinesize;
563 dest_cr += ( x_offset << pixel_shift) + y_offset*h->mb_uvlinesize;
572 qpix_op, chroma_op, pixel_shift, chroma_idc);
582 qpix_op, chroma_op, pixel_shift, chroma_idc);
593 int list0, int list1, int pixel_shift, int chroma_idc){
597 dest_y += (2*x_offset << pixel_shift) + 2*y_offset*h->mb_linesize;
602 dest_cb += (2*x_offset << pixel_shift) + 2*y_offset*h->mb_linesize;
603 dest_cr += (2*x_offset << pixel_shift) + 2*y_offset*h->mb_linesize;
606 dest_cb += ( x_offset << pixel_shift) + 2*y_offset*h->mb_uvlinesize;
607 dest_cr += ( x_offset << pixel_shift) + 2*y_offset*h->mb_uvlinesize;
610 dest_cb += ( x_offset << pixel_shift) + y_offset*h->mb_uvlinesize;
611 dest_cr += ( x_offset << pixel_shift) + y_offset*h->mb_uvlinesize;
620 uint8_t *tmp_cr = s->obmc_scratchpad + (16 << pixel_shift);
628 pixel_shift, chroma_idc);
632 pixel_shift, chroma_idc);
660 qpix_put, chroma_put, pixel_shift, chroma_idc);
680 int list0, int list1, int pixel_shift, int chroma_idc)
688 weight_avg[1], list0, list1, pixel_shift, chroma_idc);
692 chroma_avg, list0, list1, pixel_shift, chroma_idc);
696 prefetch_motion(H264Context *h, int list, int pixel_shift, int chroma_idc)
706 int off= (mx << pixel_shift) + (my + (s->mb_x&3)*4)*h->mb_linesize + (64 << pixel_shift);
712 off= ((mx>>1) << pixel_shift) + ((my>>1) + (s->mb_x&7))*s->uvlinesize + (64 << pixel_shift);
722 int pixel_shift, int chroma_idc)
732 prefetch_motion(h, 0, pixel_shift, chroma_idc);
739 pixel_shift, chroma_idc);
741 mc_part(h, 0, 0, 8, 8 << pixel_shift, dest_y, dest_cb, dest_cr, 0, 0,
745 pixel_shift, chroma_idc);
746 mc_part(h, 8, 0, 8, 8 << pixel_shift, dest_y, dest_cb, dest_cr, 0, 4,
750 pixel_shift, chroma_idc);
756 pixel_shift, chroma_idc);
761 pixel_shift, chroma_idc);
778 pixel_shift, chroma_idc);
780 mc_part(h, n , 0, 4, 4 << pixel_shift, dest_y, dest_cb, dest_cr, x_offset, y_offset,
784 pixel_shift, chroma_idc);
785 mc_part(h, n+2, 0, 4, 4 << pixel_shift, dest_y, dest_cb, dest_cr, x_offset, y_offset+2,
789 pixel_shift, chroma_idc);
795 pixel_shift, chroma_idc);
800 pixel_shift, chroma_idc);
811 pixel_shift, chroma_idc);
817 prefetch_motion(h, 1, pixel_shift, chroma_idc);
825 int pixel_shift)
828 qpix_avg, chroma_avg, weight_op, weight_avg, pixel_shift, 1);
836 int pixel_shift)
839 qpix_avg, chroma_avg, weight_op, weight_avg, pixel_shift, 2);
1121 h->pixel_shift = 0;
1227 s->dsp.clear_blocks(h->mb+(24*16<<h->pixel_shift));
1282 const int pixel_shift = h->pixel_shift;
1299 h->block_offset[i]= (4*((scan8[i] - scan8[0])&7) << pixel_shift) + 4*s->linesize*((scan8[i] - scan8[0])>>3);
1300 h->block_offset[48+i]= (4*((scan8[i] - scan8[0])&7) << pixel_shift) + 8*s->linesize*((scan8[i] - scan8[0])>>3);
1304 h->block_offset[32+i]= (4*((scan8[i] - scan8[0])&7) << pixel_shift) + 4*s->uvlinesize*((scan8[i] - scan8[0])>>3);
1306 h->block_offset[48+32+i]= (4*((scan8[i] - scan8[0])&7) << pixel_shift) + 8*s->uvlinesize*((scan8[i] - scan8[0])>>3);
1554 const int pixel_shift = h->pixel_shift;
1567 if (pixel_shift)
1571 if (pixel_shift){
1581 if (pixel_shift) {
1589 if (pixel_shift) {
1609 if (pixel_shift)
1614 if (pixel_shift){
1624 if (pixel_shift) {
1632 if (pixel_shift) {
1647 int simple, int pixel_shift){
1672 src_y -= linesize + 1 + pixel_shift;
1673 src_cb -= uvlinesize + 1 + pixel_shift;
1674 src_cr -= uvlinesize + 1 + pixel_shift;
1680 if (pixel_shift) {\
1693 XCHG(top_border_m1 + (8 << pixel_shift), src_y - (7 << pixel_shift), 1);
1695 XCHG(top_border + (0 << pixel_shift), src_y + (1 << pixel_shift), xchg);
1696 XCHG(top_border + (8 << pixel_shift), src_y + (9 << pixel_shift), 1);
1698 XCHG(h->top_borders[top_idx][s->mb_x+1], src_y + (17 << pixel_shift), 1);
1704 XCHG(top_border_m1 + (24 << pixel_shift), src_cb - (7 << pixel_shift), 1);
1705 XCHG(top_border_m1 + (40 << pixel_shift), src_cr - (7 << pixel_shift), 1);
1707 XCHG(top_border + (16 << pixel_shift), src_cb + (1 << pixel_shift), xchg);
1708 XCHG(top_border + (24 << pixel_shift), src_cb + (9 << pixel_shift), 1);
1709 XCHG(top_border + (32 << pixel_shift), src_cr + (1 << pixel_shift), xchg);
1710 XCHG(top_border + (40 << pixel_shift), src_cr + (9 << pixel_shift), 1);
1712 XCHG(h->top_borders[top_idx][s->mb_x+1] + (16 << pixel_shift), src_cb + (17 << pixel_shift), 1);
1713 XCHG(h->top_borders[top_idx][s->mb_x+1] + (32 << pixel_shift), src_cr + (17 << pixel_shift), 1);
1718 XCHG(top_border_m1 + (16 << pixel_shift), src_cb - (7 << pixel_shift), 1);
1719 XCHG(top_border_m1 + (24 << pixel_shift), src_cr - (7 << pixel_shift), 1);
1721 XCHG(top_border + (16 << pixel_shift), src_cb+1+pixel_shift, 1);
1722 XCHG(top_border + (24 << pixel_shift), src_cr+1+pixel_shift, 1);
1743 int pixel_shift, int *block_offset, int linesize, uint8_t *dest_y, int p)
1765 h->hpc.pred8x8l_add[dir](ptr, h->mb + (i*16+p*256 << pixel_shift), linesize);
1771 if(nnz == 1 && dctcoef_get(h->mb, pixel_shift, i*16+p*256))
1772 idct_dc_add(ptr, h->mb + (i*16+p*256 << pixel_shift), linesize);
1774 idct_add (ptr, h->mb + (i*16+p*256 << pixel_shift), linesize);
1791 h->hpc.pred4x4_add[dir](ptr, h->mb + (i*16+p*256 << pixel_shift), linesize);
1800 if (pixel_shift) {
1808 topright= ptr + (4 << pixel_shift) - linesize;
1816 if(nnz == 1 && dctcoef_get(h->mb, pixel_shift, i*16+p*256))
1817 idct_dc_add(ptr, h->mb + (i*16+p*256 << pixel_shift), linesize);
1819 idct_add (ptr, h->mb + (i*16+p*256 << pixel_shift), linesize);
1832 h->h264dsp.h264_luma_dc_dequant_idct(h->mb+(p*256 << pixel_shift), h->mb_luma_dc[p], h->dequant4_coeff[p][qscale][0]);
1837 dctcoef_set(h->mb+(p*256 << pixel_shift), pixel_shift, dc_mapping[i], dctcoef_get(h->mb_luma_dc[p], pixel_shift, i));
1846 int pixel_shift, int *block_offset, int linesize, uint8_t *dest_y, int p)
1857 h->hpc.pred16x16_add[h->intra16x16_pred_mode](dest_y, block_offset, h->mb + (p*256 << pixel_shift), linesize);
1860 if(h->non_zero_count_cache[ scan8[i+p*16] ] || dctcoef_get(h->mb, pixel_shift, i*16+p*256))
1861 s->dsp.add_pixels4(dest_y + block_offset[i], h->mb + (i*16+p*256 << pixel_shift), linesize);
1865 h->h264dsp.h264_idct_add16intra(dest_y, block_offset, h->mb + (p*256 << pixel_shift), linesize, h->non_zero_count_cache+p*5*8);
1873 idct_add(dest_y + block_offset[i], h->mb + (i*16+p*256 << pixel_shift), linesize);
1878 h->h264dsp.h264_idct8_add4(dest_y, block_offset, h->mb + (p*256 << pixel_shift), linesize, h->non_zero_count_cache+p*5*8);
1880 h->h264dsp.h264_idct_add16(dest_y, block_offset, h->mb + (p*256 << pixel_shift), linesize, h->non_zero_count_cache+p*5*8);
1895 static av_always_inline void hl_decode_mb_internal(H264Context *h, int simple, int pixel_shift)
1913 dest_y = s->current_picture.f.data[0] + ((mb_x << pixel_shift) + mb_y * s->linesize ) * 16;
1914 dest_cb = s->current_picture.f.data[1] + (mb_x << pixel_shift)*8 + mb_y * s->uvlinesize * block_h;
1915 dest_cr = s->current_picture.f.data[2] + (mb_x << pixel_shift)*8 + mb_y * s->uvlinesize * block_h;
1917 s->dsp.prefetch(dest_y + (s->mb_x&3)*4*s->linesize + (64 << pixel_shift), s->linesize, 4);
1918 s->dsp.prefetch(dest_cb + (s->mb_x&7)*s->uvlinesize + (64 << pixel_shift), dest_cr - dest_cb, 2);
1955 if (pixel_shift) {
2014 xchg_mb_border(h, dest_y, dest_cb, dest_cr, linesize, uvlinesize, 1, 0, simple, pixel_shift);
2021 hl_decode_mb_predict_luma(h, mb_type, is_h264, simple, transform_bypass, pixel_shift, block_offset, linesize, dest_y, 0);
2024 xchg_mb_border(h, dest_y, dest_cb, dest_cr, linesize, uvlinesize, 0, 0, simple, pixel_shift);
2032 pixel_shift);
2039 pixel_shift);
2043 hl_decode_mb_idct_luma(h, mb_type, is_h264, simple, transform_bypass, pixel_shift, block_offset, linesize, dest_y, 0);
2049 h->hpc.pred8x8_add[h->chroma_pred_mode](dest[0], block_offset + 16, h->mb + (16*16*1 << pixel_shift), uvlinesize);
2050 h->hpc.pred8x8_add[h->chroma_pred_mode](dest[1], block_offset + 32, h->mb + (16*16*2 << pixel_shift), uvlinesize);
2055 if(h->non_zero_count_cache[ scan8[i] ] || dctcoef_get(h->mb, pixel_shift, i*16))
2056 idct_add (dest[j-1] + block_offset[i], h->mb + (i*16 << pixel_shift), uvlinesize);
2060 if(h->non_zero_count_cache[ scan8[i+4] ] || dctcoef_get(h->mb, pixel_shift, i*16))
2061 idct_add (dest[j-1] + block_offset[i+4], h->mb + (i*16 << pixel_shift), uvlinesize);
2077 h->h264dsp.h264_chroma_dc_dequant_idct(h->mb + (16*16*1 << pixel_shift), h->dequant4_coeff[IS_INTRA(mb_type) ? 1:4][qp[0]][0]);
2079 h->h264dsp.h264_chroma_dc_dequant_idct(h->mb + (16*16*2 << pixel_shift), h->dequant4_coeff[IS_INTRA(mb_type) ? 2:5][qp[1]][0]);
2101 s->dsp.clear_blocks(h->mb+(24*16<<pixel_shift));
2105 static av_always_inline void hl_decode_mb_444_internal(H264Context *h, int simple, int pixel_shift){
2120 dest[p] = s->current_picture.f.data[p] + ((mb_x << pixel_shift) + mb_y * s->linesize) * 16;
2121 s->dsp.prefetch(dest[p] + (s->mb_x&3)*4*s->linesize + (64 << pixel_shift), s->linesize, 4);
2154 if (pixel_shift) {
2176 xchg_mb_border(h, dest[0], dest[1], dest[2], linesize, linesize, 1, 1, simple, pixel_shift);
2179 hl_decode_mb_predict_luma(h, mb_type, 1, simple, transform_bypass, pixel_shift, block_offset, linesize, dest[p], p);
2182 xchg_mb_border(h, dest[0], dest[1], dest[2], linesize, linesize, 0, 1, simple, pixel_shift);
2188 h->h264dsp.biweight_h264_pixels_tab, pixel_shift, 3);
2192 hl_decode_mb_idct_luma(h, mb_type, 1, simple, transform_bypass, pixel_shift, block_offset, linesize, dest[p], p);
2197 s->dsp.clear_blocks(h->mb+(24*16<<pixel_shift));
2215 hl_decode_mb_internal(h, 0, h->pixel_shift);
2219 hl_decode_mb_444_internal(h, 0, h->pixel_shift);
2233 if(is_complex || h->pixel_shift)
2239 } else if (h->pixel_shift) {
2646 if((s->avctx->flags2 & CODEC_FLAG2_FAST) && !h->nal_ref_idc && !h->pixel_shift){
2846 c->pixel_shift = h->pixel_shift;
3564 const int pixel_shift = h->pixel_shift;
3581 dest_y = s->current_picture.f.data[0] + ((mb_x << pixel_shift) + mb_y * s->linesize ) * 16;
3582 dest_cb = s->current_picture.f.data[1] + (mb_x << pixel_shift) * (8 << CHROMA444) + mb_y * s->uvlinesize * block_h;
3583 dest_cr = s->current_picture.f.data[2] + (mb_x << pixel_shift) * (8 << CHROMA444) + mb_y * s->uvlinesize * block_h;
4069 h->pixel_shift = h->sps.bit_depth_luma > 8;