@@ -163,10 +163,10 @@ void allocate_selected_decoding_fields(int p_videoFileIndex, int _mbHeight, int
163
163
for (l_i = 0 ; l_i < _mbHeight ; ++ l_i ) {
164
164
gVideoCodecCtxList [p_videoFileIndex ]-> selected_mb_mask [l_i ] = (unsigned char * ) malloc (_mbWidth * sizeof (unsigned char ));
165
165
}
166
- gVideoCodecCtxList [p_videoFileIndex ]-> pred_dc_dir = (unsigned char * * ) malloc (_mbHeight * sizeof (unsigned char * ));
166
+ /* gVideoCodecCtxList[p_videoFileIndex]->pred_dc_dir = (unsigned char **) malloc(_mbHeight * sizeof(unsigned char *));
167
167
for (l_i = 0; l_i < _mbHeight; ++l_i) {
168
168
gVideoCodecCtxList[p_videoFileIndex]->pred_dc_dir[l_i] = (unsigned char *) malloc(_mbWidth * sizeof(unsigned char));
169
- }
169
+ }*/
170
170
LOGI (10 , "allocate %d video selected decoding fields: %d, %d is done" , p_videoFileIndex , _mbHeight , _mbWidth );
171
171
}
172
172
@@ -177,10 +177,10 @@ void free_selected_decoding_fields(int p_videoFileIndex, int _mbHeight) {
177
177
free (gVideoCodecCtxList [p_videoFileIndex ]-> selected_mb_mask [l_i ]);
178
178
}
179
179
free (gVideoCodecCtxList [p_videoFileIndex ]-> selected_mb_mask );
180
- for (l_i = 0 ; l_i < _mbHeight ; ++ l_i ) {
180
+ /* for (l_i = 0; l_i < _mbHeight; ++l_i) {
181
181
free(gVideoCodecCtxList[p_videoFileIndex]->pred_dc_dir[l_i]);
182
182
}
183
- free (gVideoCodecCtxList [p_videoFileIndex ]-> pred_dc_dir );
183
+ free(gVideoCodecCtxList[p_videoFileIndex]->pred_dc_dir);*/
184
184
}
185
185
186
186
int * mbStartPos ;
@@ -441,18 +441,19 @@ static void load_gop_dc_pred_direction(int p_videoFileIndex) {
441
441
442
442
443
443
static void load_frame_dc_pred_direction (int p_videoFileIndex , int _height , int _width ) {
444
- FILE * testF ;
444
+ // FILE *testF;
445
445
int i , j ;
446
446
LOGI (10 , "load_frame_dc_pred_direction\n" );
447
- memset (gVideoCodecCtxList [p_videoFileIndex ]-> pred_dc_dir , 0 , _height * _width * sizeof (gVideoCodecCtxList [p_videoFileIndex ]-> pred_dc_dir [0 ][0 ]));
447
+ // memset(gVideoCodecCtxList[p_videoFileIndex]->pred_dc_dir, 0, _height*_width*sizeof(gVideoCodecCtxList[p_videoFileIndex]->pred_dc_dir[0][0]));
448
448
gVideoCodecCtxList [p_videoFileIndex ]-> pred_dc_dir = dcpPosMove ;
449
- testF = fopen ("test.txt" , "a+" );
449
+ /* testF = fopen("test.txt", "a+");
450
450
for (i = 0; i < _height; ++i) {
451
451
for (j = 0; j < _width; ++j) {
452
- fprintf ("%d:%d:%d\n" , i , j , gVideoCodecCtxList [p_videoFileIndex ]-> pred_dc_dir [i ][j ]);
452
+ //fprintf("%d:%d:%d\n", i, j, *(gVideoCodecCtxList[p_videoFileIndex]->pred_dc_dir + (i*_width) + j));
453
+ fprintf(testF, "%d:%d:%d\n", i, j, gVideoCodecCtxList[p_videoFileIndex]->pred_dc_dir[(i*_width) + j]);
453
454
}
454
455
}
455
- fclose (testF );
456
+ fclose(testF);*/
456
457
dcpPosMove += _height * _width ;
457
458
LOGI (10 , "load_frame_dc_pred_direction done\n" );
458
459
}
@@ -982,7 +983,7 @@ void decode_a_video_packet(int p_videoFileIndex, int _roiStH, int _roiStW, int _
982
983
l_dcpF = fopen (l_dcpFName , "w" );
983
984
for (l_i = 0 ; l_i < l_mbHeight ; ++ l_i ) {
984
985
for (l_j = 0 ; l_j < l_mbWidth ; ++ l_j ) {
985
- fprintf (l_dcpF , "%d:" , gVideoCodecCtxList [p_videoFileIndex ]-> pred_dc_dir [l_i ][l_j ]);
986
+ // fprintf(l_dcpF, "%d:", gVideoCodecCtxList[p_videoFileIndex]->pred_dc_dir[l_i][l_j]);
986
987
}
987
988
fprintf (l_dcpF , "\n" );
988
989
}
0 commit comments