[AV1] Palette Intra Prediction

JavaScript逆向:金某xx网站登陆指纹算法分析 声明:案例分析仅供学习交流使用,勿用于任何非法用途。如学习者进一步逆向并对版权方造成损失,请自行承担法律后果,本人概不负责。 首先查看登录时的POST请求,发现加密字段k。 通过请求调用可以定位到高度可疑的 secendVerify() 函数。 格式化后查看,找到了指纹参数来源。 fingerprint 由下面相关函数赋值。 setFingerprint: function() { var _this = this; recognition.get({ prepro. 阅读详情

返回AV1专栏目录

这篇文章主要分析AV1中的Palette Mode,但是AV1的Palette Mode也不会跟其他标准中的Palette Mode有多大的差别,我的另外一篇关于Palette Mode的文章讲了HEVC中的Palette Mode,可以参考一下。

AV1的Palette Mode

在AV1的palette mode,与其他标准不同的一点是,像HEVC中,palette mode是作为hevc scc的一个单独工具存在的,属于HEVC 的extension,而AV1的palette mode是规定在specification中,而且默认是处于开启状态的。

AV1 的palette mode 属于帧内预测编码中的一环,从代码中可以看得出来,其函数位于 **_intra_sb* 中,其对Luma和chroma采用不同的palette predictor,每一个predictor可以有2-8种颜色,在LibAOM中的定义为

// Maximum number of colors in a palette.
#define PALETTE_MAX_SIZE 8
// Minimum number of colors in a palette.
#define PALETTE_MIN_SIZE 2

不同的palette predictor意味着palette predictor预测表所包含的颜色数量可能不一样,同样,块的每一个像素mapping的color index也可能不同。

AOM LibAV1中 palette mode在编码器中的代码入口为 av1_rd_pick_palette_intra_sby 函数

// Searches palette
if (try_palette)
{
    av1_rd_pick_palette_intra_sby(
            cpi, x, bsize, bmode_costs[DC_PRED], &best_mbmi, best_palette_color_map,
            &best_rd, &best_model_rd, rate, rate_tokenonly, distortion, skippable,
            &beat_best_rd, ctx, ctx->blk_skip, ctx->tx_type_map);
}

整体的结构代码

void av1_rd_pick_palette_intra_sby(
    const AV1_COMP* cpi,
    MACROBLOCK* x,
    BLOCK_SIZE bsize,
    int dc_mode_cost,
    MB_MODE_INFO* best_mbmi,
    uint8_t* best_palette_color_map,
    int64_t* best_rd,
    int64_t* best_model_rd,
    int* rate,
    int* rate_tokenonly,
    int64_t* distortion,
    int* skippable,
    int* beat_best_rd,
    PICK_MODE_CONTEXT* ctx,
    uint8_t* best_blk_skip,
    uint8_t* tx_type_map)
{
    MACROBLOCKD* const xd = &x->e_mbd;
    MB_MODE_INFO* const mbmi = xd->mi[0];
    assert(!is_inter_block(mbmi));
    assert(av1_allow_palette(cpi->common.features.allow_screen_content_tools, bsize));
    assert(PALETTE_MAX_SIZE == 8);
    assert(PALETTE_MIN_SIZE == 2);

    const int src_stride = x->plane[0].src.stride;
    const uint8_t* const src = x->plane[0].src.buf;
    int block_width, block_height, rows, cols;
    // 获取当前块的大小
    av1_get_block_dimensions(bsize, 0, xd, &block_width, &block_height, &rows, &cols);
    const SequenceHeader* const seq_params = &cpi->common.seq_params;
    const int is_hbd = seq_params->use_highbitdepth;
    const int bit_depth = seq_params->bit_depth;
    int unused;

    int count_buf[1 << 12];      // Maximum (1 << 12) color levels.
    int count_buf_8bit[1 << 8];  // Maximum (1 << 8) bins for hbd path.
    int colors, colors_threshold = 0;
    if (is_hbd)
    {
        av1_count_colors_highbd(src, src_stride, rows, cols, bit_depth, count_buf, count_buf_8bit, &colors_threshold, &colors);
    }
    else
    {
        // 通过计算直方图统计当前block中一共包含多少种颜色
        av1_count_colors(src, src_stride, rows, cols, count_buf, &colors);
        colors_threshold = colors;
    }

    uint8_t* const color_map = xd->plane[0].color_index_map;
    if (colors_threshold > 1 && colors_threshold <= 64)
    {
        int* const data = x->palette_buffer->kmeans_data_buf;
        int centroids[PALETTE_MAX_SIZE];
        int lower_bound, upper_bound;
        // data中保存当前CU的所有unique灰度值,lower_bound和upper_bound分别是这些灰度值中最小与最大值。
        fill_data_and_get_bounds(src, src_stride, rows, cols, is_hbd, data, &lower_bound, &upper_bound);

        mbmi->mode = DC_PRED;
        mbmi->filter_intra_mode_info.use_filter_intra = 0;

        uint16_t color_cache[2 * PALETTE_MAX_SIZE];
        const int n_cache = av1_get_palette_cache(xd, 0, color_cache);

        // Find the dominant colors, stored in top_colors[].
        // 这里把之前放到data里的所有的灰度值,获取出现次数最多的前PALETTE_MAX_SIZE个放入top_colors中。
        int top_colors[PALETTE_MAX_SIZE] = { 0 };
        for (int i = 0; i < AOMMIN(colors, PALETTE_MAX_SIZE); ++i)
        {
            int max_count = 0;
            for (int j = 0; j < (1 << bit_depth); ++j)
            {
                if (count_buf[j] > max_count)
                {
                    max_count = count_buf[j];
                    top_colors[i] = j;
                }
            }
            assert(max_count > 0);
            count_buf[top_colors[i]] = 0;
        }

        // TODO(huisu@google.com): Try to avoid duplicate computation in cases
        // where the dominant colors and the k-means results are similar.
        if ((cpi->sf.intra_sf.prune_palette_search_level == 1) && (colors > PALETTE_MIN_SIZE))
        {
            // Start index and step size below are chosen to evaluate unique
            // candidates in neighbor search, in case a winner candidate is found in
            // coarse search. Example,
            // 1) 8 colors (end_n = 8): 2,3,4,5,6,7,8. start_n is chosen as 2 and step
            // size is chosen as 3. Therefore, coarse search will evaluate 2, 5 and 8.
            // If winner is found at 5, then 4 and 6 are evaluated. Similarly, for 2
            // (3) and 8 (7).
            // 2) 7 colors (end_n = 7): 2,3,4,5,6,7. If start_n is chosen as 2 (same
            // as for 8 colors) then step size should also be 2, to cover all
            // candidates. Coarse search will evaluate 2, 4 and 6. If winner is either
            // 2 or 4, 3 will be evaluated. Instead, if start_n=3 and step_size=3,
            // coarse search will evaluate 3 and 6. For the winner, unique neighbors
            // (3: 2,4 or 6: 5,7) would be evaluated.

            // Start index for coarse palette search for dominant colors and k-means
            const uint8_t start_n_lookup_table[PALETTE_MAX_SIZE + 1] = { 0, 0, 0,
                                                                         3, 3, 2,
                                                                         3, 3, 2 };
            // Step size for coarse palette search for dominant colors and k-means
            const uint8_t step_size_lookup_table[PALETTE_MAX_SIZE + 1] = { 0, 0, 0,
                                                                           3, 3, 3,
                                                                           3, 3, 3 };

            // Choose the start index and step size for coarse search based on number
            // of colors
            const int max_n = AOMMIN(colors, PALETTE_MAX_SIZE);
            const int min_n = start_n_lookup_table[max_n];
            const int step_size = step_size_lookup_table[max_n];
            assert(min_n >= PALETTE_MIN_SIZE);

            // Perform top color coarse palette search to find the winner candidate
            const int top_color_winner = perform_top_color_palette_search(
                cpi, x, mbmi, bsize, dc_mode_cost, data, top_colors, min_n, max_n + 1,
                step_size, &unused, color_cache, n_cache, best_mbmi,
                best_palette_color_map, best_rd, best_model_rd, rate, rate_tokenonly,
                distortion, skippable, beat_best_rd, ctx, best_blk_skip, tx_type_map);
            // Evaluate neighbors for the winner color (if winner is found) in the
            // above coarse search for dominant colors
            if (top_color_winner <= max_n) {
                int stage2_min_n, stage2_max_n, stage2_step_size;
                set_stage2_params(&stage2_min_n, &stage2_max_n, &stage2_step_size,
                    top_color_winner, max_n);
                // perform finer search for the winner candidate
                perform_top_color_palette_search(
                    cpi, x, mbmi, bsize, dc_mode_cost, data, top_colors, stage2_min_n,
                    stage2_max_n + 1, stage2_step_size, &unused, color_cache, n_cache,
                    best_mbmi, best_palette_color_map, best_rd, best_model_rd, rate,
                    rate_tokenonly, distortion, skippable, beat_best_rd, ctx,
                    best_blk_skip, tx_type_map);
            }
            // K-means clustering.
            // Perform k-means coarse palette search to find the winner candidate
            const int k_means_winner = perform_k_means_palette_search(
                cpi, x, mbmi, bsize, dc_mode_cost, data, lower_bound, upper_bound,
                min_n, max_n + 1, step_size, &unused, color_cache, n_cache, best_mbmi,
                best_palette_color_map, best_rd, best_model_rd, rate, rate_tokenonly,
                distortion, skippable, beat_best_rd, ctx, best_blk_skip, tx_type_map,
                color_map, rows * cols);
            // Evaluate neighbors for the winner color (if winner is found) in the
            // above coarse search for k-means
            if (k_means_winner <= max_n) {
                int start_n_stage2, end_n_stage2, step_size_stage2;
                set_stage2_params(&start_n_stage2, &end_n_stage2, &step_size_stage2, k_means_winner, max_n);
                // perform finer search for the winner candidate
                perform_k_means_palette_search(
                    cpi, x, mbmi, bsize, dc_mode_cost, data, lower_bound, upper_bound,
                    start_n_stage2, end_n_stage2 + 1, step_size_stage2, &unused,
                    color_cache, n_cache, best_mbmi, best_palette_color_map, best_rd,
                    best_model_rd, rate, rate_tokenonly, distortion, skippable,
                    beat_best_rd, ctx, best_blk_skip, tx_type_map, color_map,
                    rows * cols);
            }
        }
        else {
            const int max_n = AOMMIN(colors, PALETTE_MAX_SIZE),
                      min_n = PALETTE_MIN_SIZE;
            // Perform top color palette search in descending order
            int last_n_searched = max_n;
            perform_top_color_palette_search(cpi, x, mbmi, bsize, dc_mode_cost, data, top_colors, max_n, min_n - 1,
                -1, &last_n_searched, color_cache, n_cache, best_mbmi, best_palette_color_map, best_rd, best_model_rd, rate, rate_tokenonly, distortion, skippable, beat_best_rd, ctx, best_blk_skip, tx_type_map);

            if (last_n_searched > min_n) 
            {
                // Search in ascending order until we get to the previous best
                perform_top_color_palette_search( cpi, x, mbmi, bsize, dc_mode_cost, data, top_colors, min_n,
                    last_n_searched, 1, &unused, color_cache, n_cache, best_mbmi, best_palette_color_map, best_rd, best_model_rd, rate, rate_tokenonly, distortion, skippable, beat_best_rd, ctx, best_blk_skip, tx_type_map);
            }
            // K-means clustering.
            if (colors == PALETTE_MIN_SIZE)
            {
                // Special case: These colors automatically become the centroids.
                assert(colors == 2);
                centroids[0] = lower_bound;
                centroids[1] = upper_bound;
                palette_rd_y(cpi, x, mbmi, bsize, dc_mode_cost, data, centroids, colors, color_cache, n_cache, best_mbmi, best_palette_color_map, best_rd, best_model_rd, rate, rate_tokenonly, distortion, skippable, 
                    beat_best_rd, ctx, best_blk_skip, tx_type_map, NULL);
            }
            else {
                // Perform k-means palette search in descending order
                last_n_searched = max_n;
                perform_k_means_palette_search(cpi, x, mbmi, bsize, dc_mode_cost, data, lower_bound, upper_bound, max_n, min_n - 1, -1, &last_n_searched, color_cache, n_cache,
                    best_mbmi, best_palette_color_map, best_rd, best_model_rd, rate, rate_tokenonly, distortion, skippable, beat_best_rd, ctx, best_blk_skip, tx_type_map, color_map, rows * cols);
                if (last_n_searched > min_n) {
                    // Search in ascending order until we get to the previous best
                    perform_k_means_palette_search( cpi, x, mbmi, bsize, dc_mode_cost, data, lower_bound, upper_bound, min_n, last_n_searched, 1, &unused, color_cache, n_cache,
                        best_mbmi, best_palette_color_map, best_rd, best_model_rd, rate, rate_tokenonly, distortion, skippable, beat_best_rd, ctx, best_blk_skip, tx_type_map, color_map, rows * cols);
                }
            }
        }
    }

    if (best_mbmi->palette_mode_info.palette_size[0] > 0) {
        memcpy(color_map, best_palette_color_map,
            block_width * block_height * sizeof(best_palette_color_map[0]));
    }
    *mbmi = *best_mbmi;
}

函数 av1_count_colors是通过计算直方图统计当前block中一共包含多少种颜色。

void av1_count_colors(const uint8_t *src, int stride, int rows, int cols, int *val_count, int *num_colors) 
{
    const int max_pix_val = 1 << 8;
    memset(val_count, 0, max_pix_val * sizeof(val_count[0]));
    for (int r = 0; r < rows; ++r) 
    {
        for (int c = 0; c < cols; ++c) 
        {
            const int this_val = src[r * stride + c];
            assert(this_val < max_pix_val);
            ++val_count[this_val];
        }
    }
    int n = 0;
    for (int i = 0; i < max_pix_val; ++i) 
    {
        if (val_count[i]) ++n;
    }
    *num_colors = n;
}

关键函数perform_top_color_palette_search 负责把palette mode的2-8种颜色来与当前block的每一个像素(luma+chroma)进行mapping,通过RDO来确认最佳的颜色数量个数与每个像素的color indice。

// Performs count-based palette search with number of colors in interval [start_n, end_n) with step size step_size. If step_size < 0, then end_n can
// be less than start_n. Saves the last numbers searched in last_n_searched and returns the best number of colors found.
static AOM_INLINE int perform_top_color_palette_search(
    const AV1_COMP* const cpi, MACROBLOCK* x, MB_MODE_INFO* mbmi, BLOCK_SIZE bsize, int dc_mode_cost, const int* data, int* top_colors,
    int start_n, int end_n, int step_size, int* last_n_searched, uint16_t* color_cache, int n_cache, MB_MODE_INFO* best_mbmi, uint8_t* best_palette_color_map, int64_t* best_rd, int64_t* best_model_rd, 
    int* rate, int* rate_tokenonly, int64_t* distortion, int* skippable, int* beat_best_rd, PICK_MODE_CONTEXT* ctx, uint8_t* best_blk_skip, uint8_t* tx_type_map) 
{
    int centroids[PALETTE_MAX_SIZE];
    int n = start_n;
    int top_color_winner = end_n;
    /* clang-format off */
    assert(IMPLIES(step_size < 0, start_n > end_n));
    /* clang-format on */
    assert(IMPLIES(step_size > 0, start_n < end_n));
    // 从后(8)到前(2) 、从前(2)到后(8),抽取不同个数的颜色来计算rdcost,最后进行比较,获取最好。
    while (!is_iter_over(n, end_n, step_size)) 
    {
        int beat_best_palette_rd = 0;
        memcpy(centroids, top_colors, n * sizeof(top_colors[0]));
        palette_rd_y(cpi, x, mbmi, bsize, dc_mode_cost, data, centroids, n, color_cache, n_cache, best_mbmi, best_palette_color_map, best_rd, best_model_rd, rate, rate_tokenonly, distortion, 
            skippable, beat_best_rd, ctx, best_blk_skip, tx_type_map, &beat_best_palette_rd);
        *last_n_searched = n;
        if (beat_best_palette_rd) 
        {
            top_color_winner = n;
        }
        else if (cpi->sf.intra_sf.prune_palette_search_level == 2) 
        {
            // At search level 2, we return immediately if we don't see an improvement
            return top_color_winner;
        }
        n += step_size;
    }
    return top_color_winner;
}

在这个函数里,就是靠函数 palette_rd_y 来计算rdcost,返回一个beat_best_palette_rd 这个变量指明是否当前选项(颜色数量+color indice组合)的RD超过 best RD。

/*!\brief Calculate the luma palette cost from a given color palette
 *
 * \ingroup palette_mode_search
 * \callergraph
 * Given the base colors as specified in centroids[], calculate the RD cost
 * of palette mode.
 */
static AOM_INLINE void palette_rd_y(
    const AV1_COMP* const cpi, 
    MACROBLOCK* x, 
    MB_MODE_INFO* mbmi,
    BLOCK_SIZE bsize, 
    int dc_mode_cost, 
    const int* data, 
    int* centroids, 
    int n,
    uint16_t* color_cache, 
    int n_cache, 
    MB_MODE_INFO* best_mbmi,
    uint8_t* best_palette_color_map, 
    int64_t* best_rd, 
    int64_t* best_model_rd,
    int* rate, 
    int* rate_tokenonly, 
    int64_t* distortion, 
    int* skippable,
    int* beat_best_rd, 
    PICK_MODE_CONTEXT* ctx, 
    uint8_t* blk_skip,
    uint8_t* tx_type_map, 
    int* beat_best_palette_rd) 
{
    optimize_palette_colors(color_cache, n_cache, n, 1, centroids, cpi->common.seq_params.bit_depth);
    const int num_unique_colors = av1_remove_duplicates(centroids, n);
    if (num_unique_colors < PALETTE_MIN_SIZE) 
    {
        // Too few unique colors to create a palette. And DC_PRED will work
        // well for that case anyway. So skip.
        return;
    }
    PALETTE_MODE_INFO* const pmi = &mbmi->palette_mode_info;
    if (cpi->common.seq_params.use_highbitdepth) 
    {
        for (int i = 0; i < num_unique_colors; ++i) 
        {
            pmi->palette_colors[i] = clip_pixel_highbd((int)centroids[i], cpi->common.seq_params.bit_depth);
        }
    }
    else {
        for (int i = 0; i < num_unique_colors; ++i) 
        {
            pmi->palette_colors[i] = clip_pixel(centroids[i]);
        }
    }
    pmi->palette_size[0] = num_unique_colors;
    MACROBLOCKD* const xd = &x->e_mbd;
    uint8_t* const color_map = xd->plane[0].color_index_map;
    int block_width, block_height, rows, cols;
    av1_get_block_dimensions(bsize, 0, xd, &block_width, &block_height, &rows, &cols);
    
    // 将当前Block中的每一个pixel都归类到centroid中来,形成color_map,color map的大小为 block_width * block_height
    av1_calc_indices(data, centroids, color_map, rows * cols, num_unique_colors, 1);
    
    // 若块处于图像的边缘,可能会导致当前块的一部分并不存在color map值,所以该处是填充那些处于帧外的部分,用拷贝最近的像素进行填充
    extend_palette_color_map(color_map, cols, rows, block_width, block_height);

    if (model_intra_yrd_and_prune(cpi, x, bsize, best_model_rd)) 
    {
        return;
    }

    RD_STATS tokenonly_rd_stats;
    av1_pick_uniform_tx_size_type_yrd(cpi, x, &tokenonly_rd_stats, bsize, *best_rd);
    if (tokenonly_rd_stats.rate == INT_MAX) return;
    const int palette_mode_cost = intra_mode_info_cost_y(cpi, x, mbmi, bsize, dc_mode_cost);
    int this_rate = tokenonly_rd_stats.rate + palette_mode_cost;
    int64_t this_rd = RDCOST(x->rdmult, this_rate, tokenonly_rd_stats.dist);
    if (!xd->lossless[mbmi->segment_id] && block_signals_txsize(mbmi->bsize)) 
    {
        tokenonly_rd_stats.rate -= tx_size_cost(x, bsize, mbmi->tx_size);
    }
    // Collect mode stats for multiwinner mode processing
    const int txfm_search_done = 1;
    store_winner_mode_stats(&cpi->common, x, mbmi, NULL, NULL, NULL, THR_DC, color_map, bsize, this_rd, cpi->sf.winner_mode_sf.multi_winner_mode_type, txfm_search_done);
    if (this_rd < *best_rd) 
    {
        *best_rd = this_rd;
        // Setting beat_best_rd flag because current mode rd is better than best_rd.
        // This flag need to be updated only for palette evaluation in key frames
        if (beat_best_rd) *beat_best_rd = 1;
        memcpy(best_palette_color_map, color_map,
            block_width * block_height * sizeof(color_map[0]));
        *best_mbmi = *mbmi;
        memcpy(blk_skip, x->txfm_search_info.blk_skip,
            sizeof(x->txfm_search_info.blk_skip[0]) * ctx->num_4x4_blk);
        av1_copy_array(tx_type_map, xd->tx_type_map, ctx->num_4x4_blk);
        if (rate) *rate = this_rate;
        if (rate_tokenonly) *rate_tokenonly = tokenonly_rd_stats.rate;
        if (distortion) *distortion = tokenonly_rd_stats.dist;
        if (skippable) *skippable = tokenonly_rd_stats.skip_txfm;
        if (beat_best_palette_rd) *beat_best_palette_rd = 1;
    }
}

若palette mode的RDCost超过当前的Best RDCost,则会被判断作为帧内预测方式,相应的 palette predictor 和 indice 会经过与邻居的predictor做预测后传输到decoder。

AV1 编解码器编译以及使用 AV1编解码器编译以及使用 阅读详情

相关推荐

AV1 概括性论文《An Overview of Core Coding Tools in the AV1 Video Codec》学习

HEVC因为专利的问题一直没达到AVC的高度,但是AVC已经服役20年,还能再服役20年吗?一众大佬(公司)为改善现状,一起提出了AV1这一标准。AV1主打点就是免知识产权费,最近在国内国外已经越来越火。作为已经不年轻的码农也深感更新知识的重要性,因此就从今天开始系统性地学习一下AV1这个编码标准吧,期间也在博客上分享一些自己的心得,一方面作为记录,另一方面抛砖引玉,希望有同好能共同...

mmzx9318的博客 2399

响应服务器589,www.589bbav1.cc

Domain Name: 589BBAV1.CCDomain ID: 123390205WHOIS Server: whois.paycenter.com.cnReferral URL: http://www.xinnet.comUpdated Date: 2016-06-03T07:37:38ZCreation Date: 2016-06-03T07:37:38ZRegistry Expiry ...

weixin_31179927的博客 2万+

新手小白如何学习编程

学习目标推荐第一门语言优势网站 / APP 开发(前端)JavaScript浏览器原生支持,能快速做出可视化效果后端 / 服务器 / 数据分析Python语法简洁像英语,库多、应用广(入门友好)游戏开发先用电竞入门,再转专业引擎硬件 / 嵌入式(比如单片机)C 语言贴近硬件,行业标准办公自动化(Excel / 文档处理)Python快速解决重复工作(比如批量改文件)👉新手首选推荐。

2501_94331842的博客 2237

AV1 编码标准屏幕内容编码技术概述

AV1 编码标准屏幕内容编码技术概述

世界那么大,我想去看看~【随心更新,看世界去了😄】 2005

从Simulink仿真到DSP28335真机部署:PID闭环控制快速移植指南

本文详细介绍了如何将Simulink中的PID闭环控制算法快速移植到DSP28335嵌入式平台。通过模型与代码映射、浮点与定点数选择、定时器中断配置、物理输出实现以及调试技巧五个关键步骤,帮助工程师高效完成从仿真到真机部署的全过程,特别适合需要实现精确控制的嵌入式开发者。

weixin_42521843的博客 365

【PLL】分频器设计权衡:从CMOS到CML的电路实现与优化

本文深入探讨了PLL中分频器的设计权衡,比较了CMOS和CML两种电路实现的优缺点。通过实际案例分析,展示了如何在速度、功耗和噪声之间取得平衡,特别是在5G射频芯片和Wi-Fi 6E等高频应用中的优化实践。文章还提供了混合架构设计和电源噪声协同优化的实用技巧,适合电路设计工程师参考。

weixin_42521843的博客 449

如何分析Oracle_AWR报告

WORKLOAD REPOSITORY report for Oracle DB Name DB Id Instance Inst num Release RAC Host ICCI 1314098396 ICCI1 1 10.2.0.3.0 YES

heqiyu34的专栏 6645

昇腾AI处理器Ascend C编程:从C/C++基础到高性能算子开发实战

异构计算是提升AI算力效率的核心技术,通过在CPU之外引入专用处理器(如GPU、NPU)协同工作,实现大规模并行计算。其原理在于将计算密集型任务卸载到专用硬件,利用其高并行架构加速处理。技术价值在于突破传统CPU的算力瓶颈,为深度学习训练与推理提供强大动力,广泛应用于模型部署、科学计算和高性能计算场景。本文聚焦昇腾AI处理器的原生编程语言Ascend C,它基于C/C++标准扩展,通过显式内存管理和任务并行模型,充分发挥达芬奇架构中Cube与Vector单元的性能。针对CANN算子开发,文章详解了从环境搭建

weixin_34411563的博客 375

libaom 源码分析:帧内方向预测模式

libaom 源码分析:帧内方向预测模式

世界那么大,我想去看看~【随心更新,看世界去了😄】 1114

从选卡到验证:CST仿真GPU加速全流程实战指南

本文详细介绍了CST仿真中GPU加速的全流程实战指南,从硬件选型到软件配置,再到性能验证和常见问题排查。通过对比专业卡与游戏卡的性能差异,提供硬件选型建议,并分享驱动安装、关键设置及CST软件配置的黄金法则,帮助用户显著提升仿真效率。

weixin_30650039的博客 397

论文阅读:Visual Relationship Detection with Language Priors

Visual Relationship Detection with Language Priors(ECCV2016) 文章   尽管大多数的relationship并不常见,但是它们的object和predicate却更频繁地独立出现。paper用这个insight分别独立训练训练object和predicate的模型,然后再进行组合来预测relationship。Visual relatio...

Kivee的博客 2887

AV1代码学习6:函数av1_encode和 av1_first_pass

av1_encode没什么特别好说的,会把在av1_encode_strategy的参数(EncodeFrameInput和EncodeFrameParams)赋给结构体AV1_COMP和AV1_COMMON,对当前帧的数据进行初始化 AV1_COMP *const cpi AV1_COMMON *const cm = &cpi->common; CurrentFra...

qq_30945147的博客 2940

基于STM32的太阳能充电宝设计_资料编号31

系统硬件包括主控 STM32F103C8T6、0.96 OLED 显示屏、蜂鸣器、电源自锁开关、温度传感器 DS18B20、继电器、5 V DC 升压模块 、TB4056、18650锂电池、9 V太阳能板、稳压降压 5 V三极管。电源供应:锂电池为系统供电,9 伏太阳能板经 5 伏降压稳压三极管降压为 5 伏后传送到 TP4056,TP4056 为锂电池供电,因锂电池电压 3.7 伏,通过 5 伏 DC 升压模块升压到 5 伏为整个系统提供 5 伏电压。

嵌入式阿齐Archie 1万+

[AV1] Intra Block Copy

返回目录 Intra Block Copy

轻舞飞扬 1413

Qcom(基础篇)ROM烧录

文章摘要:该文档介绍了设备烧录操作流程。首先连接设备进入烧录模式,然后选择编译生成的配置文件,路径包括target和workspace目录下的qfil-files文件夹。重点操作包括加载prog_firehose_ddr_SM6225.elf文件,通过LoadXML选择不带efuse的配置文件,最后完成烧录。整个过程涉及文件路径选择和关键烧录步骤的执行。

weixin_49303682的博客 127

Devexpress16.2.6破解工具

Devexpress16.2.6破解工具Devexpress16.2.6破解工具Devexpress16.2.6破解工具Devexpress16.2.6破解工具

对象存储 AVIF 图片压缩,即将公测

2021年8月,腾讯云数据万象以内测方式推出了最前沿的AVIF 图片压缩服务,可以在图片主观质量相同的情况下大幅降低码率,节省储存空间。经过3个月时间的内测,我们收集到了很多热心用户的反馈,AVIF 图片压缩服务也在不断优化改进。 作为一项接近成熟的能力,我们即将正式开放全员公测!具体公测时间,我们将以站内信、邮件等方式进行通知。 在正式公测前,我们再一起来了解一下 AVIF 图片压缩技术吧~ 背景介绍 腾讯云数据万象(Cloud Infinite,CI)是一个专注于数据处理服务的产...

云存储小天使的博客 672

全球国家地区城市数据

MySQL全球国家地区城市数据报。。。。。。。。。。。。

AV1代码学习:av1_first_pass函数

在AV1中,默认是分为两次编码过程,第一次编码过程主要是用来统计信息从而加速第二次编码。第一次编码的入口函数就是av1_first_pass函数,第一次编码的过程大致如下所示: 第一次编码仅会对亮度分量进行编码。 在第一次编码中,对每一帧按照按光栅扫描顺序进行编码,并且每一个块的尺寸为16x16。 在firstpass_intra_prediction函数中进行第一次过程中的帧内预测,其所使用的的帧内预测模式为DC模式,并返回帧内预测误差(帧内预测残差的平方和)。 在firstpass_int

BigDream123的博客 3075

霍尼韦尔SoftMaster使用说明

霍尼韦尔SoftMaster使用说明

怀旧版电脑GBC模拟器

再现原版GBC掌机的界面,电脑运行连游戏界面都一样大小,很怀旧,很真实,(英文版)强烈推荐,很小的文件,很难才找到的。

html5(mp4)av,html - HTML5 Video Chrome - ffmpeg - mp4 working in all but Chrome - Stack Overflow

I have successfully encoded a file to .mp4 using ffmpeg which will play in all tested devices (Safari on PC, IE on PC, Android Browser, Andriod Video Player, and Safari iPad), except for Chrome.As a w...

weixin_33256233的博客 1万+

B站自研新一代视频编码器 BILIAV1

B站自研新一代视频编码器 BILIAV1

m0_73443478的博客 2302

[AV1] AV1 Intra Prediction 简介

返回目录 Intra Prediction 简介

轻舞飞扬 1132

【Hi3559AV100 Camera】​Hi3559AV100 双系统下使用 sharefs

前言 在开发过程中会发现 Hi3559AV100 双系统下要传输共享一些文件该如何处理,也有客户反映按照官方文档操作双系统下 sharefs 使用不了,然后就整理了这篇博文,希望能对大家日后开发有帮助。 一、Sharefs 功能 Sharefs 可使 A53UP Huawei LiteOS 访问 A53MP+A73MP Linux 上目录。其源码目录位于:sdk/osdrv/components/ipcm/class/sharefs Sharefs 采用 IPCM6 号端口。 Sharefs 采用 Serv

麻辣烫的博客 1732

AV1 编码标准中帧内预测技术概述

AV1 编码标准中帧内预测技术详细说明

世界那么大,我想去看看~【随心更新,看世界去了😄】 2528

AVC/HEVC/VVC/AV1 块划分、帧内预测过程及预测模式编码

预测过程 HEVC: 在当前块内的像素被映射到参考像素之后,用最邻近的两个参考像素通过线性插值来生成预测像素值。 VVC: 对于靠近水平和垂直方向的方向预测,采用4-tap Cubic 插值滤波器来更好的保留图像的边缘信息,对于靠近对角线方向的方向预测,采用4-tap Gaussian 插值滤波器来生成更加平滑的预测图像。 DC模式的差异: HEVC的编码块都是方形的,所以DC计算时不使用除法(移位);VVC则会出现矩形的CU,所以计算DC模式时会...

时间流浪者 8385

Cisco ASAv HA Configurations

Configuring high availability requires two identical ASAs connected to each other through a dedicated failover link and, optionally, a Stateful Failover link. The health of the active interfaces and ...

Cyber Security Memo 1671

AV1 帧间预测

AV1 帧间预测 模式和搜索顺序 最多7个参考帧,他们的名称分别是:

fresh_milk的博客 1576

AVC/HEVC/VVC/AV1 帧间预测:运动估计、运动补偿

帧间预测主要的工作是运动估计与运动补偿: 所谓运动估计简单说就是在参考帧中找到当前块的最优参考块,用运动向量(MV)表示参考块与当前块的位置关系。 所谓运动补偿简单说就是对参考块与当前块求差值得到残差用于传输。 总的过程:通过搜索算法找到最优的参考块,计算MV,计算残差, MV提供位置信息,残差提供值的信息。 =================================================================...

时间流浪者 2882
上一篇: [AV1] Paeth Intra Prediction
下一篇: [AV1] Chroma from Luma Prediction
轻舞飞扬SR
博客等级 码龄16年 580粉丝 118原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

轻舞飞扬SR

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值