Compare commits
No commits in common. "cc88f1f0dd56e567d8f4770dde40d29bc58b9739" and "fb3c9d892dc7f9abb30dc4723bd8c55f2c1f3c2b" have entirely different histories.
cc88f1f0dd
...
fb3c9d892d
@ -22,14 +22,12 @@ static int encodeopus_perform(CHiPubNode *pubn) {
|
||||
|
||||
CHiImage *newpcm = CHi_Crawl(&pubn->sinks[0])->data.sample;
|
||||
|
||||
if(newpcm) {
|
||||
if(n->pcmSamples + newpcm->width > n->pcmCapacity) {
|
||||
n->pcmbuf = realloc(n->pcmbuf, sizeof(*n->pcmbuf) * (n->pcmCapacity = ((n->pcmSamples + newpcm->width + 1023) & ~1023)));
|
||||
}
|
||||
|
||||
memcpy(&n->pcmbuf[n->pcmSamples], newpcm->data16, sizeof(*n->pcmbuf) * newpcm->width);
|
||||
n->pcmSamples += newpcm->width;
|
||||
}
|
||||
|
||||
CHiBSFrames *frames = malloc(sizeof(*frames));
|
||||
frames->count = 0;
|
||||
|
18
hi/vpxenc.c
18
hi/vpxenc.c
@ -110,26 +110,22 @@ static int encodevpx_start(CHiPubNode *pubn) {
|
||||
vpx_codec_enc_config_default(node->iface, &node->cfg, 0);
|
||||
node->cfg.g_w = firstFrame->width;
|
||||
node->cfg.g_h = firstFrame->height;
|
||||
node->cfg.g_profile = 2;
|
||||
node->cfg.g_timebase.num = 1;
|
||||
node->cfg.g_timebase.den = 30;
|
||||
node->cfg.g_lag_in_frames = 0;
|
||||
node->cfg.g_threads = 4;
|
||||
node->cfg.g_threads = 8;
|
||||
node->cfg.kf_mode = VPX_KF_AUTO;
|
||||
node->cfg.kf_max_dist = 300;
|
||||
node->cfg.rc_end_usage = VPX_CBR;
|
||||
node->cfg.rc_target_bitrate = 3000;
|
||||
node->cfg.rc_min_quantizer = 24;
|
||||
node->cfg.rc_max_quantizer = 32;
|
||||
node->cfg.rc_undershoot_pct = 95;
|
||||
node->cfg.rc_end_usage = VPX_VBR;
|
||||
node->cfg.rc_target_bitrate = 512;
|
||||
node->cfg.rc_min_quantizer = 4;
|
||||
node->cfg.rc_max_quantizer = 48;
|
||||
|
||||
vpx_codec_enc_init(&node->codec, node->iface, &node->cfg, 0);
|
||||
vpx_codec_control(&node->codec, VP8E_SET_CPUUSED, 9);
|
||||
//vpx_codec_control(&node->codec, VP9E_SET_SVC, 1);
|
||||
vpx_codec_control(&node->codec, VP8E_SET_CPUUSED, 8);
|
||||
vpx_codec_control(&node->codec, VP9E_SET_ROW_MT, 1);
|
||||
//vpx_codec_control(&node->codec, VP9E_SET_TILE_COLUMNS, 3);
|
||||
vpx_codec_control(&node->codec, VP9E_SET_TILE_COLUMNS, 2);
|
||||
vpx_codec_control(&node->codec, VP9E_SET_TILE_ROWS, 1);
|
||||
vpx_codec_control(&node->codec, VP9E_SET_NOISE_SENSITIVITY, 0);
|
||||
vpx_codec_control(&node->codec, VP9E_SET_TUNE_CONTENT, VP9E_CONTENT_SCREEN);
|
||||
|
||||
node->strideY = (node->cfg.g_w + 64) & ~63;
|
||||
|
Loading…
Reference in New Issue
Block a user