forked from Green-Sky/tomato
Squashed 'external/toxcore/c-toxcore/' changes from 76bc4c496d..501a32937f
501a32937f Merge branch 'toxav_deadline' of github.com:Green-Sky/c-toxcore into tomato_testing_in_prod 0b49ba2d94 Merge branch 'toxav_video_bitrate' of github.com:Green-Sky/c-toxcore into tomato_testing_in_prod 9c0977d7c6 Merge branch 'toxav_remove_img_copy_encode' of github.com:Green-Sky/c-toxcore into tomato_testing_in_prod 4071d74cc9 fix(ngc): dont double every message, if we are not directly connected but we and the other peer would support direct. 1d4cc783b1 fix(bazel): one more fuzz target that needs netprof 066aafbfcd fix(bazel): make net_prof visible to its consumers fa015c7e2e fix(toxav): remove extra copy of video frame on encode Tested and works, but there might be alignment issues and other stuff. d34f7d1f5c fix(toxav): handle vpx_image_alloc failure 865261a67a chore(toxav): use realtime deadline for vp8 encoder Technically all this does is choose a quality based on frame duration, which we always set to 1, and as such is always realtime. (In same timebase as pts, which we use as a frame counter...) dd12b9889a chore(toxav): tighten the video bitrate to the same as the vp8 encoder internally checks. 9dcc2f530d fix(bazel): missing dep for auto_tests 741ac5f5e6 fix(bazel): missing dep for fuzz target git-subtree-dir: external/toxcore/c-toxcore git-subtree-split: 501a32937f4550d4340406a6a73da548849a53af
This commit is contained in:
@@ -15,27 +15,6 @@
|
||||
#include "../toxcore/logger.h"
|
||||
#include "../toxcore/mono_time.h"
|
||||
|
||||
/**
|
||||
* Soft deadline the decoder should attempt to meet, in "us" (microseconds).
|
||||
* Set to zero for unlimited.
|
||||
*
|
||||
* By convention, the value 1 is used to mean "return as fast as possible."
|
||||
*/
|
||||
// TODO(zoff99): don't hardcode this, let the application choose it
|
||||
#define WANTED_MAX_DECODER_FPS 40
|
||||
|
||||
/**
|
||||
* VPX_DL_REALTIME (1)
|
||||
* deadline parameter analogous to VPx REALTIME mode.
|
||||
*
|
||||
* VPX_DL_GOOD_QUALITY (1000000)
|
||||
* deadline parameter analogous to VPx GOOD QUALITY mode.
|
||||
*
|
||||
* VPX_DL_BEST_QUALITY (0)
|
||||
* deadline parameter analogous to VPx BEST QUALITY mode.
|
||||
*/
|
||||
#define MAX_DECODE_TIME_US (1000000 / WANTED_MAX_DECODER_FPS) // to allow x fps
|
||||
|
||||
/**
|
||||
* Codec control function to set encoder internal speed settings. Changes in
|
||||
* this value influences, among others, the encoder's selection of motion
|
||||
@@ -320,7 +299,7 @@ void vc_iterate(VCSession *vc)
|
||||
|
||||
LOGGER_DEBUG(vc->log, "vc_iterate: rb_read p->len=%d p->header.xe=%d", (int)full_data_len, p->header.xe);
|
||||
LOGGER_DEBUG(vc->log, "vc_iterate: rb_read rb size=%d", (int)log_rb_size);
|
||||
const vpx_codec_err_t rc = vpx_codec_decode(vc->decoder, p->data, full_data_len, nullptr, MAX_DECODE_TIME_US);
|
||||
const vpx_codec_err_t rc = vpx_codec_decode(vc->decoder, p->data, full_data_len, nullptr, 0);
|
||||
free(p);
|
||||
|
||||
if (rc != VPX_CODEC_OK) {
|
||||
|
Reference in New Issue
Block a user