前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >[AV1] Smooth Intra Prediction

[AV1] Smooth Intra Prediction

作者头像
轻舞飞扬SR
发布2021-02-24 11:08:50
6290
发布2021-02-24 11:08:50
举报
文章被收录于专栏:Visual CodexVisual Codex

返回AV1专栏目录

AV1中的Smooth帧内预测模式通过对左边和上方的参考像素值进行线性插值滤波来生成smooth像素值。

Smooth Intra Prediction

smooth intra prediction 其实一共包含三种模式,分别为

intra_frame_y_mode

Name of intra_frame_y_mode

9

SMOOTH_PRED

10

SMOOTH_V_PRED

11

SMOOTH_H_PRED

这三种模式分别对垂直方向、水平方向、以及综合垂直和水平方向进行滤波。

Smooth Vertical Prediction

垂直预测采用上方一条参考像素以及左边一列的最下面的一个像素来生成预测值。每一个像素会采用最左下角的像素以及上方参考像素对应横坐标的那个像素来进行预测。

相应的示意代码为

代码语言:javascript
复制
smoothPred = smWeights[i] * AboveRow[j] + (256-smWeights[i]) * LeftCol[h-1]
pred[i][j] = Round2(smoothPred, 8)
Smooth Horizontal Prediction

若是水平预测的话,则是采用上方参考像素的最右边那个与左边一列与当前像素纵坐标对应的那个像素一同生成预测像素。

相应的示意代码为

代码语言:javascript
复制
smoothPred = smWeights[j] * LeftCol[i] + (256-smWeights[j]) * AboveRow[w-1]
pred[i][j] = Round2(smoothPred, 8)
Smooth Prediction

smooth prediction即可以看作是上述两种smooth prediction的综合。先分别求出垂直与水平,然后取其平均。

示意代码如下

代码语言:javascript
复制
smoothPred = smWeights[i] * AboveRow[j] + (256-smWeights[i]) * LeftCol[h-1] +
             smWeights[j] * LeftCol[i] + (256-smWeights[j]) * AboveRow[w-1]
pred[i][j] = Round2(smoothPred, 9)

至于smweights是怎么来的,可以参考标准文档 9.3节

代码语言:javascript
复制
Sm_Weights_Tx_4x4 [ 4 ] = { 255, 149, 85, 64 }
Sm_Weights_Tx_8x8 [ 8 ] = { 255, 197, 146, 105, 73, 50, 37, 32 }
Sm_Weights_Tx_16x16[ 16 ] = { 255, 225, 196, 170, 145, 123, 102, 84, 68, 54, 43, 33, 26, 20, 17, 16 }
Sm_Weights_Tx_32x32[ 32 ] = { 255, 240, 225, 210, 196, 182, 169, 157, 145, 133, 122, 111, 101, 92, 83, 74, 66, 59, 52, 45, 39, 34, 29, 25, 21, 17, 14, 12, 10, 9, 8, 8 }
Sm_Weights_Tx_64x64[ 64 ] = { 255, 248, 240, 233, 225, 218, 210, 203, 196, 189, 182, 176, 169, 163, 156, 150, 144, 138, 133, 127, 121, 116, 111, 106, 101, 96, 91, 86, 82, 77, 73, 69, 65, 61, 57, 54, 50, 47, 44, 41, 38, 35, 32, 29, 27, 25, 22, 20, 18, 16, 15, 13, 12, 10, 9, 8, 7, 6, 6, 5, 5, 4, 4, 4 }
本文参与 腾讯云自媒体同步曝光计划,分享自作者个人站点/博客。
原始发表:2020/12/29 ,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体同步曝光计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
目录
  • Smooth Intra Prediction
    • Smooth Vertical Prediction
      • Smooth Horizontal Prediction
        • Smooth Prediction
        领券
        问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档