亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? estimation.c

?? h.264編碼庫 (T264)..........................
?? C
?? 第 1 頁 / 共 2 頁
字號:
            // bottom
            CHECK_CANDIDATE(0, 1, stride_ref);
            // bottom-right
            CHECK_CANDIDATE(1, 1, stride_ref + 1);
        }

        mvx = better_mvx;
        mvy = better_mvy;
        ref_st = better_ref;
        if (ABS(mvx) > limit_x || ABS(mvy) > limit_y)
        {
            break;
        }
    }

    // final mv
    context->vec_best.x = mvx << 2;
    context->vec_best.y = mvy << 2;
    // mostly we use sad as cmp function
    if (t->cmp[context->mb_part] == t->sad[context->mb_part])
        return sad;

    ref = ref_st + mvy * stride_ref + mvx;
    sad = t->cmp[context->mb_part](cur, stride_cur, ref, stride_ref) +
        t->mb.lambda * (eg_size_se(t->bs, context->vec_best.x - context->vec[0].x) + 
        eg_size_se(t->bs, context->vec_best.y - context->vec[0].y));
    return sad;
}

uint32_t
diamond_search(T264_t* t, uint8_t* cur, uint8_t* ref_st, T264_search_context_t* context, int32_t stride_cur, int32_t stride_ref, uint32_t sad)
{
    int32_t limit_x = context->limit_x;
    int32_t limit_y = context->limit_y;
    //start mv
    int32_t mvx = context->vec_best.x >> 2;
    int32_t mvy = context->vec_best.y >> 2;
    // sad for start mv
    uint8_t* ref;
    uint8_t* better_ref;
    int32_t better_mvx;
    int32_t better_mvy;
    uint32_t cursad;
    uint8_t stop = 0;

    ref_st += mvy * stride_ref + mvx;

    better_mvx = mvx;
    better_mvy = mvy;
    better_ref = ref_st;

    // large diamond
    while(!stop)
    {
        stop = 1;

        // search 8 points of ldsp
        {
            // left
            CHECK_CANDIDATE(-2, 0, -2);
            // right
            CHECK_CANDIDATE(2, 0, 2);
            // top
            CHECK_CANDIDATE(0, -2, -(stride_ref << 1));
            // bottom
            CHECK_CANDIDATE(0, 2, (stride_ref << 1));
            // top-left
            CHECK_CANDIDATE(-1, -1, -stride_ref - 1);
            // top-right
            CHECK_CANDIDATE(1, -1, -stride_ref + 1);
            // bottom-left
            CHECK_CANDIDATE(-1, 1, stride_ref - 1);
            // bottom-right
            CHECK_CANDIDATE(1, 1, stride_ref + 1);
        }

        mvx = better_mvx;
        mvy = better_mvy;
        ref_st = better_ref;
        if (ABS(mvx) > limit_x || ABS(mvy) > limit_y)
        {
            break;
        }
    }

    // small diamond
	stop = 0;
    while(!stop)
    {
        stop = 1;

        // search 4 points of sdsp
        {
            // left
            CHECK_CANDIDATE(-1, 0, -1);
            // right
            CHECK_CANDIDATE(1, 0, 1);
            // top
            CHECK_CANDIDATE(0, -1, -stride_ref);
            // bottom
            CHECK_CANDIDATE(0, 1, stride_ref);
        }

        mvx = better_mvx;
        mvy = better_mvy;
        ref_st = better_ref;
        if (ABS(mvx) > limit_x || ABS(mvy) > limit_y)
        {
            break;
        }
    }
	
    // final mv
    context->vec_best.x = mvx << 2;
    context->vec_best.y = mvy << 2;
    // mostly we use sad as cmp function
    if (t->cmp[context->mb_part] == t->sad[context->mb_part])
        return sad;

    ref = ref_st + mvy * stride_ref + mvx;
    sad = t->cmp[context->mb_part](cur, stride_cur, ref, stride_ref) +
        t->mb.lambda * (eg_size_se(t->bs, context->vec_best.x - context->vec[0].x) + 
        eg_size_se(t->bs, context->vec_best.y - context->vec[0].y));
    return sad;
}

/*
*	Full Search
*/

uint32_t
T264_search_full(T264_t* t, T264_search_context_t* context)
{
    uint32_t sad;
    uint32_t cursad;
    int32_t i, j;

    int16_t mb_xy = t->mb.mb_xy;
    int16_t mb_x = t->mb.mb_x;
    int16_t mb_y = t->mb.mb_y;
    int32_t height = context->height;
    int32_t width = context->width;
    int32_t limit_x = context->limit_x;
    int32_t limit_y = context->limit_y;
    int32_t stride_cur = t->stride;
    int32_t stride_ref = t->edged_stride;
    int32_t list_index = context->list_index;

    // start point of current and reference block 
    int32_t row = context->offset / t->edged_stride;
    int32_t col = context->offset % t->edged_stride;
    uint8_t* cur = t->cur.Y[0] + row * stride_cur + col;
    uint8_t* ref_st = t->ref[list_index][0]->Y[0] + row * stride_ref + col;	
    uint8_t* ref;
    context->vec_best.refno = 0;

    // full search
    sad = width * height * 255;
    for(i = -limit_y + (context->vec[0].y >> 2); i <= (limit_y + (context->vec[0].y >> 2)) ; i++)
        for(j = -limit_x + (context->vec[0].x >> 2); j <= (limit_x + (context->vec[0].x >> 2)) ; j++)
        {
            ref = ref_st + i * stride_ref + j;
            cursad = t->sad[context->mb_part](cur, stride_cur, ref, stride_ref) +
                t->mb.lambda * (eg_size_se(t->bs, (j << 2) - context->vec[0].x) + 
                eg_size_se(t->bs, (i << 2) - context->vec[0].y));
            if(cursad < sad)
            {
                sad = cursad;
                context->vec_best.y = i;
                context->vec_best.x = j;
            }
        }

        ref = ref_st + context->vec_best.y * stride_ref + context->vec_best.x;
        context->vec_best.y <<= 2;
        context->vec_best.x <<= 2;

        sad = t->cmp[context->mb_part](cur, t->stride, ref, t->edged_stride) +
            t->mb.lambda * (eg_size_se(t->bs, context->vec_best.x - context->vec[0].x) + 
            eg_size_se(t->bs, context->vec_best.y - context->vec[0].y));

        return sad;	
}

// xxx, never used, just for compare to jm80.
uint32_t
T264_spiral_search_full(T264_t* t, T264_search_context_t* context)
{
    uint32_t sad;
    uint32_t cursad;
    int32_t i, j, k, l;

    int16_t mb_xy = t->mb.mb_xy;
    int16_t mb_x = t->mb.mb_x;
    int16_t mb_y = t->mb.mb_y;
    int32_t height = context->height;
    int32_t width = context->width;
    int32_t limit_x = context->limit_x;
    int32_t limit_y = context->limit_y;
    int32_t stride_cur = t->stride;
    int32_t stride_ref = t->edged_stride;
    int32_t list_index = context->list_index;

    // start point of current and reference block 
    int32_t row = context->offset / t->edged_stride;
    int32_t col = context->offset % t->edged_stride;
    uint8_t* cur = t->cur.Y[0] + row * stride_cur + col;
    uint8_t* ref_st = t->ref[list_index][context->vec[0].refno]->Y[0] + row * stride_ref + col;	
    uint8_t* ref;
    int32_t spiral_search_x[33 * 33];
    int32_t spiral_search_y[33 * 33];
    context->vec_best.refno = context->vec[0].refno;

    spiral_search_x[0] = spiral_search_y[0] = 0;
    for (k=1, l=1; l<=T264_MAX(1,16); l++)
    {
        for (i=-l+1; i< l; i++)
        {
            spiral_search_x[k] = l;  spiral_search_y[k++] =  i;
            spiral_search_x[k] =  -l;  spiral_search_y[k++] =  i;
        }
        for (i=-l;   i<=l; i++)
        {
            spiral_search_x[k] =  i;  spiral_search_y[k++] = l;
            spiral_search_x[k] =  i;  spiral_search_y[k++] =  -l;
        }
    }

    // full search
    sad = width * height * 255;
    for(k = 0 ; k < 33 * 33 ; k ++)
    {
        i = (context->vec[0].y / 4) + spiral_search_y[k];
        j = (context->vec[0].x / 4) + spiral_search_x[k];

        ref = ref_st + i * stride_ref + j;
        cursad = t->sad[context->mb_part](cur, stride_cur, ref, stride_ref) +
            t->mb.lambda * (eg_size_se(t->bs, (j << 2) - context->vec[0].x) + 
            eg_size_se(t->bs, (i << 2) - context->vec[0].y));
        if(cursad < sad)
        {
            sad = cursad;
            context->vec_best.y = i;
            context->vec_best.x = j;
        }
    }

    ref = ref_st + context->vec_best.y * stride_ref + context->vec_best.x;
    context->vec_best.y <<= 2;
    context->vec_best.x <<= 2;

    sad = t->cmp[context->mb_part](cur, t->stride, ref, t->edged_stride) +
        t->mb.lambda * (eg_size_se(t->bs, context->vec_best.x - context->vec[0].x) + 
        eg_size_se(t->bs, context->vec_best.y - context->vec[0].y));

    return sad;	
}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
色网综合在线观看| 久久久激情视频| 日韩va欧美va亚洲va久久| 国产精品久久久久久久裸模 | 国产精品久久久久婷婷| 精品国产一区二区三区久久影院| 欧美精品精品一区| 麻豆精品新av中文字幕| 美女诱惑一区二区| 国产精品久久三| 成人欧美一区二区三区小说| 亚洲你懂的在线视频| 亚洲影视在线播放| 久久久久久久久久电影| 久久久久国色av免费看影院| 欧美日韩一卡二卡| 欧美一区二区三区公司| 精品理论电影在线观看| 国产喂奶挤奶一区二区三区 | 成人激情小说网站| 亚洲午夜视频在线| 视频一区二区三区入口| 国产一区在线视频| 97se亚洲国产综合自在线不卡| 一本到不卡免费一区二区| 欧美色欧美亚洲另类二区| 国产一区福利在线| 奇米色777欧美一区二区| 日韩一区中文字幕| 久久久久9999亚洲精品| 亚洲日本在线观看| 蜜桃av一区二区| 成+人+亚洲+综合天堂| 欧美精品第一页| 欧美性三三影院| 欧美va日韩va| 日韩一二三四区| 中文字幕不卡一区| 欧美极品少妇xxxxⅹ高跟鞋| 欧美一区二区三区免费视频| 国产精品久久久久天堂| 日本三级韩国三级欧美三级| 亚洲电影你懂得| 岛国精品在线播放| 91麻豆精品国产91久久久资源速度 | 色久综合一二码| 风流少妇一区二区| 国产成人精品在线看| 欧美午夜精品一区| 国产精品乱码一区二三区小蝌蚪| 日韩精彩视频在线观看| 日韩高清在线一区| 91麻豆精东视频| 国产日产欧美精品一区二区三区| 精品国产精品一区二区夜夜嗨| 日韩三级电影网址| 亚洲成av人片一区二区| 91麻豆精品一区二区三区| 国产丝袜欧美中文另类| 美腿丝袜亚洲色图| 国产福利一区二区| 日韩一本二本av| 久久精品人人做人人综合| 蜜桃一区二区三区四区| 国产一二三精品| 国产成人免费在线视频| 久久久久久久综合狠狠综合| 久久国产福利国产秒拍| 日韩欧美中文字幕公布| 国产欧美日韩不卡| 亚洲精品高清视频在线观看| 福利一区二区在线| 中文字幕av资源一区| 国产成人亚洲综合a∨婷婷图片| 欧美一个色资源| 奇米精品一区二区三区在线观看一| 久久99国产精品久久99| 欧美一级片在线看| 国产精品久久久久久久浪潮网站 | 一卡二卡欧美日韩| 色综合色综合色综合| 亚洲精品免费在线| 欧美日韩综合一区| 欧美精品一区二区不卡| 国产精品影视在线观看| 91福利小视频| 337p日本欧洲亚洲大胆精品| 精品在线观看视频| 91电影在线观看| 337p粉嫩大胆色噜噜噜噜亚洲| 另类小说一区二区三区| 国产欧美一区二区三区鸳鸯浴| 伊人一区二区三区| 欧美精品色综合| 国产精品黄色在线观看| 色综合中文综合网| 日韩欧美一区二区免费| 国产精品影视网| 欧美浪妇xxxx高跟鞋交| 国产精品美女久久久久久2018| 香蕉久久一区二区不卡无毒影院| 国产成人av一区二区三区在线 | 亚洲一区视频在线观看视频| 51午夜精品国产| 亚洲欧美日韩在线| 欧美一区二区精品在线| 亚洲综合视频在线| 日韩精品中文字幕一区二区三区 | 久久99精品国产麻豆不卡| 色综合一区二区| 毛片av中文字幕一区二区| 欧美喷水一区二区| 国产传媒日韩欧美成人| 亚洲一区二区三区四区五区黄| 日韩欧美一级在线播放| 免费人成精品欧美精品| 国产精品美女久久久久高潮| 国产美女精品人人做人人爽| 亚洲视频免费在线观看| 不卡一卡二卡三乱码免费网站| 亚洲成人在线观看视频| 国产精品美女久久久久久 | 久久午夜羞羞影院免费观看| 91浏览器打开| 国产精品一区专区| 久久欧美中文字幕| 欧美电影在哪看比较好| 首页国产丝袜综合| 成人欧美一区二区三区白人| av中文字幕一区| 精品一区二区三区久久久| 日韩视频一区二区三区在线播放| 午夜影视日本亚洲欧洲精品| 欧美日韩国产综合视频在线观看 | 亚洲黄色免费网站| 国产欧美日韩另类一区| 9久草视频在线视频精品| 经典三级一区二区| 欧美a级一区二区| 一区二区久久久| 欧美肥妇free| 狠狠色丁香婷婷综合久久片| 久久丝袜美腿综合| av电影在线观看不卡| 国产成人精品网址| 国产福利91精品一区| 亚洲日本免费电影| 亚洲欧美电影一区二区| 欧美精品一级二级| 在线电影院国产精品| 欧美精品v国产精品v日韩精品| 色94色欧美sute亚洲线路一久| 亚洲综合视频网| 日韩精品中文字幕一区二区三区 | 成人avav影音| av动漫一区二区| 成人激情综合网站| 亚洲综合成人网| www精品美女久久久tv| 9人人澡人人爽人人精品| 成人午夜在线免费| 亚洲国产成人av好男人在线观看| 亚洲欧美视频在线观看| 欧美一级免费观看| 日韩美女一区二区三区四区| 99久久久国产精品| 欧美体内she精视频| 国产九色sp调教91| 成人不卡免费av| 免费不卡在线观看| 亚洲欧美一区二区三区国产精品| 日韩欧美成人一区| 久久夜色精品一区| 亚洲人精品午夜| 亚洲高清在线精品| 中文字幕亚洲在| 亚欧色一区w666天堂| 中文字幕av一区 二区| 亚洲三级免费电影| 国产区在线观看成人精品| 欧美精品免费视频| 91美女在线视频| 国产成人午夜高潮毛片| 色婷婷狠狠综合| 国产91精品在线观看| 精品影视av免费| 不卡av在线免费观看| 国产麻豆精品一区二区| 99久久精品免费看国产免费软件| 欧美日韩视频在线一区二区| 久久一二三国产| 26uuu欧美| 亚洲精品国产第一综合99久久 | 日韩一级黄色大片| 中文字幕不卡在线观看| 亚洲va国产va欧美va观看| 亚洲精品欧美在线| 成人免费视频在线观看| 狠狠色综合播放一区二区| 在线观看国产日韩|