• R/O
  • HTTP
  • SSH
  • HTTPS

提交

标签
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

hardware/intel/libva


Commit MetaInfo

修订版167579d0bfd54daaae38357b16e2923c705b3091 (tree)
时间2013-05-28 17:46:48
作者Zhou Chang <chang.zhou@inte...>
CommiterXiang, Haihao

Log Message

test/encode/avcenc: Simplify the IPB pattern file upload

Signed-off-by: Zhou Chang <chang.zhou@intel.com>

更改概述

差异

--- a/test/encode/avcenc.c
+++ b/test/encode/avcenc.c
@@ -1019,7 +1019,8 @@ encode_picture(FILE *yuv_fp, FILE *avc_fp,
10191019
10201020 begin_picture(yuv_fp, frame_num, display_num, slice_type, is_idr);
10211021
1022- if (next_display_num < frame_number) {
1022+ //if (next_display_num < frame_number) {
1023+ if (1) {
10231024 int index;
10241025
10251026 /* prepare for next frame */
@@ -1027,7 +1028,8 @@ encode_picture(FILE *yuv_fp, FILE *avc_fp,
10271028 index = SID_INPUT_PICTURE_1;
10281029 else
10291030 index = SID_INPUT_PICTURE_0;
1030-
1031+ if ( next_display_num >= frame_number )
1032+ next_display_num = frame_number - 1;
10311033 fseek(yuv_fp, frame_size * next_display_num, SEEK_SET);
10321034
10331035 avcenc_context.upload_thread_param.yuv_fp = yuv_fp;
@@ -1323,8 +1325,8 @@ int main(int argc, char *argv[])
13231325 static int fcurrent = 0;
13241326 int fnext;
13251327
1326- fcurrent = fcurrent % sizeof(frame_type_pattern)/sizeof(int[2]);
1327- fnext = (fcurrent+1) % sizeof(frame_type_pattern)/sizeof(int[2]);
1328+ fcurrent = fcurrent % (sizeof(frame_type_pattern)/sizeof(int[2]));
1329+ fnext = (fcurrent+1) % (sizeof(frame_type_pattern)/sizeof(int[2]));
13281330
13291331 if ( frame_type_pattern[fcurrent][0] == SLICE_TYPE_I ) {
13301332 encode_picture(yuv_fp, avc_fp,enc_frame_number, f, f==0, SLICE_TYPE_I, 0,