T264 的一个小问题

在 T264 中对 I 帧 的 色度信息 进行编码时,具体地说是在进行模式选择时,存在着两种模式不匹配的问题.

static void
T264_intra_8x8_available(T264_t* t, int32_t preds[], int32_t* modes,
       uint8_t* top_u, uint8_t* left_u, uint8_t* top_v, uint8_t* left_v)
{
    int32_t i;
    uint8_t* p_u, *p_v;
 
    if ((t->mb->mb_neighbour & (MB_LEFT | MB_TOP)) == (MB_LEFT | MB_TOP))
    {
        preds[0] = Intra_8x8_DC;           // 0
        preds[1] = Intra_8x8_TOP;        // 2
        preds[2] = Intra_8x8_LEFT;       // 1

        preds[3] = Intra_8x8_PLANE;    // 3

    };

  .............................................................
 }

void
T264_mode_decision_intra_uv(_RW T264_t* t)
{

.............................................................

static const uint8_t fixmode_8x8[] =
    {
        Intra_8x8_DC,        // 0
        Intra_8x8_LEFT,    // 1
        Intra_8x8_TOP,     // 2

        Intra_8x8_PLANE, // 3
   
       Intra_8x8_DC,        // 0
       Intra_8x8_DC,        // 0
       Intra_8x8_DC         // 0   
    };

.......................................................

}

应该将 T264_intra_8x8_available() 改正如下:

static void
T264_intra_8x8_available(T264_t* t, int32_t preds[], int32_t* modes,
       uint8_t* top_u, uint8_t* left_u, uint8_t* top_v, uint8_t* left_v)
{
    int32_t i;
    uint8_t* p_u, *p_v;
 
    if ((t->mb->mb_neighbour & (MB_LEFT | MB_TOP)) == (MB_LEFT | MB_TOP))
    {
       /*
        preds[0] = Intra_8x8_DC;           // 0
        preds[1] = Intra_8x8_TOP;        // 2
        preds[2] = Intra_8x8_LEFT;       // 1

        preds[3] = Intra_8x8_PLANE;    // 3
       */
        // quanming1119 2006.2.16
        preds[0] = Intra_8x8_DC;          // 0
        preds[1] = Intra_8x8_LEFT;      // 1
        preds[2] = Intra_8x8_TOP;       // 2

        preds[3] = Intra_8x8_PLANE;   // 3
  

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值