📄 changes_sm0.1.txt
字号:
解码器修改
1) L142 in the file image.c
Delete
if (img->type != B_IMG&&!progressive_sequence)
{
img->height >>= 1;
img->height_cr >>= 1;
init_top_buffer();
split_field_top();
Update_Picture_top_field();
init_bot_buffer();
split_field_bot();
Update_Picture_bot_field();
img->height <<= 1;
img->height_cr <<= 1;
}
3) L238 in the file image.c
Delete
if(!progressive_sequence)
{
store_field_MV(img);
}
2) L942 in the file image.c
Delete
mref[0] = mref_frm[0]; //mref[ref_index][yuv]height(height/2)][width] ref_index=0,1 for P frame, ref_index = 0,1,2,3 for P field
mref[1] = mref_frm[1];
mref_fref[0] = mref_fref_frm[0]; //mref_fref[ref_index][yuv]height(height/2)][width] ref_index=0 for B frame, ref_index = 0,1 for B field
mref_bref[0] = mref_bref_frm[0];
//chroma
mcef[0][0] = mcef_frm[0][0]; //mcef[ref_index][uv][height][width]
mcef[0][1] = mcef_frm[0][1];
mcef[1][0] = mcef_frm[1][0];
mcef[1][1] = mcef_frm[1][1];
mcef_fref[0][0] = mcef_fref_frm[0][0]; //mcef_fref[ref_index][uv][height/2][width]
mcef_fref[0][1] = mcef_fref_frm[0][1];
mcef_bref[0][0] = mcef_bref_frm[0][0];
mcef_bref[0][1] = mcef_bref_frm[0][1];
编码器修改
注释掉global.h中,enum Codingtype中的PAFF_CODING,line 81
typedef enum {
FRAME_CODING,
FIELD_CODING,
// PAFF_CODING
} CodingType;
注释掉函数static void picture_header()中line 164
if((input->InterlaceCodingOption == PAFF_CODING))
img->count=img->count+1; //add by wuzhongmou
注释掉函数encode_one_frame中line 504至line 564
// !! picture adaptive frame field coding
if(input->InterlaceCodingOption == PAFF_CODING)
{……}
注释掉函数PBPictureHeader()中line 200至line 211中if部分程序
if(input->InterlaceCodingOption == PAFF_CODING)
{……}//add by wuzhongmou
注释掉结构体ImageParameters中成员变量count_PAFF,注释掉程序中所有出现的img->count_PAFF
注释掉函数start_macroblock()中line 249至line 253
else if((input->InterlaceCodingOption==2)&&(img->IFLAG==0))
{……}
注释掉函数rc_init_GOP()中line 252至line 265
/*adaptive field/frame coding*/
if((input->InterlaceCodingOption==2))
{……}
注释掉函数rc_init_pict()中line 347至line 355以及line 358
if(((input->InterlaceCodingOption==2))&&(img->FieldControl==1))
{……}
注释掉函数updateQuantizationParameter()中line 638至line 659, line 674至line 694,line 732至line 733(有疑问), line 740至line 758,line 810至line 811(有疑问), line 833至line 834(有疑问), line 867至line 887, line 903至line 923,line 976至line 988, line 1016至line 1035,line 1109至line 1123, line 1135至line 1148, line 1212至line 1226
修改函数ProfileCheck()中line 375:
if(input->InterlaceCodingOption>2)
修改函数rc_init_pict()中line 465:if((topfield)||(fieldpic&&((input->InterlaceCodingOption==2))))
注释掉函数updateRCModel()中line 1281至line 1284
if(((input->InterlaceCodingOption==2))&&(img->FieldControl==1))
FCBUCFMAD[TotalNumberofBasicUnit-1-NumberofBasicUnit]=CurrentFrameMAD;
注释调函数updateMADModel()中line 1473至line 1476
if(((input->InterlaceCodingOption==2))&&(img->FieldControl==1))
ReferenceMAD[0]=FCBUPFMAD[TotalNumberofBasicUnit-1-NumberofBasicUnit];
注释掉函数code_a_picture()中line 685至line 691,以下语句在没有PAFF时不会满足
if (input->InterlaceCodingOption != FRAME_CODING)
{
……
}
函数encode_one_frame()中
1. 注释掉line 315、316,增加if下的程序
if(input->InterlaceCodingOption==FIELD_CODING)
2. 注释掉line 323至line 326,增加条件if下的程序
if(input->InterlaceCodingOption==1)
rc_init_pict(0,1,1);
else
rc_init_pict(0,1,0);
3. 注释掉line 351至line 365,增加条件if下的程序
if (input->InterlaceCodingOption == FIELD_CODING)
{……}
Else
{……}
4. 注释掉line 491至line 498,
if (input->InterlaceCodingOption != FIELD_CODING)
{……}
注释掉函数decide_fld_frame()和函数picture_structure_decision()
注释掉函数store_field_mv()
修改函数init_frame_buffers()
修改函数free_global_buffers()中的相应部分
注释掉函数init_frame()中
if(!img->picture_structure) //field coding
{
……
}else
修改函数init_frame()
修改函数Get_IP_direct(),按照标准中的定义重新清理了一下(张吉)。
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -