161 |
{ |
{ |
162 |
if (twopass->nns1.quant & NNSTATS_KEYFRAME) |
if (twopass->nns1.quant & NNSTATS_KEYFRAME) |
163 |
{ |
{ |
164 |
i_boost_total = twopass->nns2.bytes * codec->config.keyframe_boost / 100; |
i_boost_total += twopass->nns2.bytes * codec->config.keyframe_boost / 100; |
165 |
i_total += twopass->nns2.bytes; |
i_total += twopass->nns2.bytes; |
166 |
twopass->keyframe_locations[i_frames] = frames; |
twopass->keyframe_locations[i_frames] = frames; |
167 |
++i_frames; |
++i_frames; |
794 |
} |
} |
795 |
else // DLG_MODE_2PASS_2_EXT |
else // DLG_MODE_2PASS_2_EXT |
796 |
{ |
{ |
797 |
|
if (codec->config.credits_mode == CREDITS_MODE_QUANT) |
798 |
|
{ |
799 |
|
if (codec->config.credits_quant_i != codec->config.credits_quant_p) |
800 |
|
{ |
801 |
|
frame->quant = frame->intra ? |
802 |
|
codec->config.credits_quant_i : |
803 |
|
codec->config.credits_quant_p; |
804 |
|
} |
805 |
|
else |
806 |
|
{ |
807 |
|
frame->quant = codec->config.credits_quant_p; |
808 |
|
frame->intra = -1; |
809 |
|
} |
810 |
|
|
811 |
|
twopass->bytes1 = bytes1; |
812 |
|
twopass->bytes2 = bytes1; |
813 |
|
twopass->desired_bytes2 = bytes1; |
814 |
|
return ICERR_OK; |
815 |
|
} |
816 |
|
else |
817 |
bytes2 = twopass->nns2.bytes; |
bytes2 = twopass->nns2.bytes; |
818 |
} |
} |
819 |
} |
} |