您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ vp56_rac_get_prob函数代码示例

51自学网 2021-06-03 09:47:38
  C++
这篇教程C++ vp56_rac_get_prob函数代码示例写得很实用,希望能帮到您。

本文整理汇总了C++中vp56_rac_get_prob函数的典型用法代码示例。如果您正苦于以下问题:C++ vp56_rac_get_prob函数的具体用法?C++ vp56_rac_get_prob怎么用?C++ vp56_rac_get_prob使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。

在下文中一共展示了vp56_rac_get_prob函数的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: vp5_parse_vector_adjustment

static void vp5_parse_vector_adjustment(VP56Context *s, VP56mv *vect){	VP56RangeCoder *c = &s->c;	VP56Model *model = s->modelp;	int comp, di;	for (comp=0; comp<2; comp++)	{		int delta = 0;		if (vp56_rac_get_prob(c, model->vector_dct[comp]))		{			int sign = vp56_rac_get_prob(c, model->vector_sig[comp]);			di  = vp56_rac_get_prob(c, model->vector_pdi[comp][0]);			di |= vp56_rac_get_prob(c, model->vector_pdi[comp][1]) << 1;			delta = vp56_rac_get_tree(c, vp56_pva_tree,			                          model->vector_pdv[comp]);			delta = di | (delta << 2);			delta = (delta ^ -sign) + sign;		}		if (!comp)			vect->x = delta;		else			vect->y = delta;	}}
开发者ID:hicks0074,项目名称:freescale_omx_framework,代码行数:25,


示例2: vp5_parse_coeff_models

static void vp5_parse_coeff_models(VP56Context *s){	VP56RangeCoder *c = &s->c;	VP56Model *model = s->modelp;	uint8_t def_prob[11];	int node, cg, ctx;	int ct;    /* code type */	int pt;    /* plane type (0 for Y, 1 for U or V) */	memset(def_prob, 0x80, sizeof(def_prob));	for (pt=0; pt<2; pt++)		for (node=0; node<11; node++)			if (vp56_rac_get_prob(c, vp5_dccv_pct[pt][node]))			{				def_prob[node] = vp56_rac_gets_nn(c, 7);				model->coeff_dccv[pt][node] = def_prob[node];			}			else if (s->framep[VP56_FRAME_CURRENT]->key_frame)			{				model->coeff_dccv[pt][node] = def_prob[node];			}	for (ct=0; ct<3; ct++)		for (pt=0; pt<2; pt++)			for (cg=0; cg<6; cg++)				for (node=0; node<11; node++)					if (vp56_rac_get_prob(c, vp5_ract_pct[ct][pt][cg][node]))					{						def_prob[node] = vp56_rac_gets_nn(c, 7);						model->coeff_ract[pt][ct][cg][node] = def_prob[node];					}					else if (s->framep[VP56_FRAME_CURRENT]->key_frame)					{						model->coeff_ract[pt][ct][cg][node] = def_prob[node];					}	/* coeff_dcct is a linear combination of coeff_dccv */	for (pt=0; pt<2; pt++)		for (ctx=0; ctx<36; ctx++)			for (node=0; node<5; node++)				model->coeff_dcct[pt][ctx][node] = av_clip(((model->coeff_dccv[pt][node] * vp5_dccv_lc[node][ctx][0] + 128) >> 8) + vp5_dccv_lc[node][ctx][1], 1, 254);	/* coeff_acct is a linear combination of coeff_ract */	for (ct=0; ct<3; ct++)		for (pt=0; pt<2; pt++)			for (cg=0; cg<3; cg++)				for (ctx=0; ctx<6; ctx++)					for (node=0; node<5; node++)						model->coeff_acct[pt][ct][cg][ctx][node] = av_clip(((model->coeff_ract[pt][ct][cg][node] * vp5_ract_lc[ct][cg][node][ctx][0] + 128) >> 8) + vp5_ract_lc[ct][cg][node][ctx][1], 1, 254);}
开发者ID:hicks0074,项目名称:freescale_omx_framework,代码行数:51,


示例3: vp56_parse_mb_type

static VP56mb vp56_parse_mb_type(VP56Context *s,                                 VP56mb prev_type, int ctx){    uint8_t *mb_type_model = s->modelp->mb_type[ctx][prev_type];    VP56RangeCoder *c = &s->c;    if (vp56_rac_get_prob(c, mb_type_model[0]))        return prev_type;    else        return vp56_rac_get_tree(c, vp56_pmbt_tree, mb_type_model);}
开发者ID:Unhelpful,项目名称:ffmpeg,代码行数:11,


示例4: vp5_parse_vector_models

static void vp5_parse_vector_models(VP56Context *s){    VP56RangeCoder *c = &s->c;    VP56Model *model = s->modelp;    int comp, node;    for (comp=0; comp<2; comp++) {        if (vp56_rac_get_prob(c, vp5_vmc_pct[comp][0]))            model->vector_dct[comp] = vp56_rac_gets_nn(c, 7);        if (vp56_rac_get_prob(c, vp5_vmc_pct[comp][1]))            model->vector_sig[comp] = vp56_rac_gets_nn(c, 7);        if (vp56_rac_get_prob(c, vp5_vmc_pct[comp][2]))            model->vector_pdi[comp][0] = vp56_rac_gets_nn(c, 7);        if (vp56_rac_get_prob(c, vp5_vmc_pct[comp][3]))            model->vector_pdi[comp][1] = vp56_rac_gets_nn(c, 7);    }    for (comp=0; comp<2; comp++)        for (node=0; node<7; node++)            if (vp56_rac_get_prob(c, vp5_vmc_pct[comp][4 + node]))                model->vector_pdv[comp][node] = vp56_rac_gets_nn(c, 7);}
开发者ID:andyTsing,项目名称:freedownload,代码行数:22,


示例5: vp5_parse_coeff

static void vp5_parse_coeff(VP56Context *s){    VP56RangeCoder *c = &s->c;    VP56Model *model = s->modelp;    uint8_t *permute = s->scantable.permutated;    uint8_t *model1, *model2;    int coeff, sign, coeff_idx;    int b, i, cg, idx, ctx, ctx_last;    int pt = 0;    /* plane type (0 for Y, 1 for U or V) */    for (b=0; b<6; b++) {        int ct = 1;    /* code type */        if (b > 3) pt = 1;        ctx = 6*s->coeff_ctx[vp56_b6to4[b]][0]              + s->above_blocks[s->above_block_idx[b]].not_null_dc;        model1 = model->coeff_dccv[pt];        model2 = model->coeff_dcct[pt][ctx];        for (coeff_idx=0; coeff_idx<64; ) {            if (vp56_rac_get_prob(c, model2[0])) {                if (vp56_rac_get_prob(c, model2[2])) {                    if (vp56_rac_get_prob(c, model2[3])) {                        s->coeff_ctx[vp56_b6to4[b]][coeff_idx] = 4;                        idx = vp56_rac_get_tree(c, vp56_pc_tree, model1);                        sign = vp56_rac_get(c);                        coeff = vp56_coeff_bias[idx+5];                        for (i=vp56_coeff_bit_length[idx]; i>=0; i--)                            coeff += vp56_rac_get_prob(c, vp56_coeff_parse_table[idx][i]) << i;                    } else {                        if (vp56_rac_get_prob(c, model2[4])) {                            coeff = 3 + vp56_rac_get_prob(c, model1[5]);                            s->coeff_ctx[vp56_b6to4[b]][coeff_idx] = 3;                        } else {                            coeff = 2;                            s->coeff_ctx[vp56_b6to4[b]][coeff_idx] = 2;                        }                        sign = vp56_rac_get(c);                    }                    ct = 2;                } else {                    ct = 1;                    s->coeff_ctx[vp56_b6to4[b]][coeff_idx] = 1;                    sign = vp56_rac_get(c);                    coeff = 1;                }                coeff = (coeff ^ -sign) + sign;                if (coeff_idx)                    coeff *= s->dequant_ac;                s->block_coeff[b][permute[coeff_idx]] = coeff;            } else {                if (ct && !vp56_rac_get_prob(c, model2[1]))                    break;                ct = 0;                s->coeff_ctx[vp56_b6to4[b]][coeff_idx] = 0;            }            cg = vp5_coeff_groups[++coeff_idx];            ctx = s->coeff_ctx[vp56_b6to4[b]][coeff_idx];            model1 = model->coeff_ract[pt][ct][cg];            model2 = cg > 2 ? model1 : model->coeff_acct[pt][ct][cg][ctx];        }        ctx_last = FFMIN(s->coeff_ctx_last[vp56_b6to4[b]], 24);        s->coeff_ctx_last[vp56_b6to4[b]] = coeff_idx;        if (coeff_idx < ctx_last)            for (i=coeff_idx; i<=ctx_last; i++)                s->coeff_ctx[vp56_b6to4[b]][i] = 5;        s->above_blocks[s->above_block_idx[b]].not_null_dc = s->coeff_ctx[vp56_b6to4[b]][0];    }}
开发者ID:andyTsing,项目名称:freedownload,代码行数:72,


示例6: vp56_parse_mb_type_models

static void vp56_parse_mb_type_models(VP56Context *s){    VP56RangeCoder *c = &s->c;    VP56Model *model = s->modelp;    int i, ctx, type;    for (ctx=0; ctx<3; ctx++) {        if (vp56_rac_get_prob(c, 174)) {            int idx = vp56_rac_gets(c, 4);            memcpy(model->mb_types_stats[ctx],                   vp56_pre_def_mb_type_stats[idx][ctx],                   sizeof(model->mb_types_stats[ctx]));        }        if (vp56_rac_get_prob(c, 254)) {            for (type=0; type<10; type++) {                for(i=0; i<2; i++) {                    if (vp56_rac_get_prob(c, 205)) {                        int delta, sign = vp56_rac_get(c);                        delta = vp56_rac_get_tree(c, vp56_pmbtm_tree,                                                  vp56_mb_type_model_model);                        if (!delta)                            delta = 4 * vp56_rac_gets(c, 7);                        model->mb_types_stats[ctx][type][i] += (delta ^ -sign) + sign;                    }                }            }        }    }    /* compute MB type probability tables based on previous MB type */    for (ctx=0; ctx<3; ctx++) {        int p[10];        for (type=0; type<10; type++)            p[type] = 100 * model->mb_types_stats[ctx][type][1];        for (type=0; type<10; type++) {            int p02, p34, p0234, p17, p56, p89, p5689, p156789;            /* conservative MB type probability */            model->mb_type[ctx][type][0] = 255 - (255 * model->mb_types_stats[ctx][type][0]) / (1 + model->mb_types_stats[ctx][type][0] + model->mb_types_stats[ctx][type][1]);            p[type] = 0;    /* same MB type => weight is null */            /* binary tree parsing probabilities */            p02 = p[0] + p[2];            p34 = p[3] + p[4];            p0234 = p02 + p34;            p17 = p[1] + p[7];            p56 = p[5] + p[6];            p89 = p[8] + p[9];            p5689 = p56 + p89;            p156789 = p17 + p5689;            model->mb_type[ctx][type][1] = 1 + 255 * p0234/(1+p0234+p156789);            model->mb_type[ctx][type][2] = 1 + 255 * p02  / (1+p0234);            model->mb_type[ctx][type][3] = 1 + 255 * p17  / (1+p156789);            model->mb_type[ctx][type][4] = 1 + 255 * p[0] / (1+p02);            model->mb_type[ctx][type][5] = 1 + 255 * p[3] / (1+p34);            model->mb_type[ctx][type][6] = 1 + 255 * p[1] / (1+p17);            model->mb_type[ctx][type][7] = 1 + 255 * p56  / (1+p5689);            model->mb_type[ctx][type][8] = 1 + 255 * p[5] / (1+p56);            model->mb_type[ctx][type][9] = 1 + 255 * p[8] / (1+p89);            /* restore initial value */            p[type] = 100 * model->mb_types_stats[ctx][type][1];        }    }}
开发者ID:Unhelpful,项目名称:ffmpeg,代码行数:70,



注:本文中的vp56_rac_get_prob函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


C++ vpERROR_TRACE函数代码示例
C++ vp函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。