vita v0.0.1
AAGaming 5 months ago
parent c234786ecd
commit 96d7acca84
Signed by: aa
GPG Key ID: 00CFCD925A3E0C50

@ -28,6 +28,7 @@
#define ROUND_NEAREST_16(x) (round(((double) (x)) / 16) * 16)
#define VITA_DECODER_RESOLUTION_LOWER_BOUND(x) ((x) < 64 ? 64 : (x))
#define VITA_DECODER_RESOLUTION(x) (VITA_DECODER_RESOLUTION_LOWER_BOUND(ROUND_NEAREST_16(x)))
#define REF_FRAMES 8
void vita_h264_start();
void vita_h264_stop();

@ -170,7 +170,7 @@ int host_stream(VitaChiakiHost* host) {
ChiakiConnectVideoProfile profile = {};
chiaki_connect_video_profile_preset(&profile,
context.config.resolution, context.config.fps);
profile.bitrate = 15000;
// profile.bitrate = 15000;
// Build chiaki ps4 stream session
ChiakiAudioSink audio_sink;
chiaki_opus_decoder_init(&context.stream.opus_decoder, &context.log);

@ -397,7 +397,7 @@ int vita_h264_setup(int width, int height) {
initVideodec.hwAvc.horizontal = VITA_DECODER_RESOLUTION(width);
initVideodec.hwAvc.vertical = VITA_DECODER_RESOLUTION(height);
initVideodec.hwAvc.numOfStreams = 1;
initVideodec.hwAvc.numOfRefFrames = 5;
initVideodec.hwAvc.numOfRefFrames = REF_FRAMES;
ret = sceVideodecQueryMemSize(SCE_VIDEODEC_TYPE_HW_AVCDEC, &initVideodec, &libMemInfo);
if (ret < 0) {
@ -617,7 +617,7 @@ bool vita_h264_process_header(uint8_t *data, size_t data_len) {
return false;
}
// h->nal->nal_unit_type = NAL_UNIT_TYPE_SPS;
h->sps->num_ref_frames = 5;
h->sps->num_ref_frames = REF_FRAMES;
// h->sps->level_idc = 32; // Max 5 buffered frames at 1280x720x60
// h->sps->vui.bitstream_restriction_flag = 1;
// h->sps->vui.max_bits_per_mb_denom = 1;
@ -650,7 +650,7 @@ bool vita_h264_process_header(uint8_t *data, size_t data_len) {
// h->sps->vui.chroma_loc_info_present_flag = 0;
// // Some devices throw errors if max_dec_frame_buffering < num_ref_frames
h->sps->vui.max_dec_frame_buffering = 5;
h->sps->vui.max_dec_frame_buffering = REF_FRAMES;
// // These values are the default for the fields, but they are more aggressive
// // than what GFE sends in 2.5.11, but it doesn't seem to cause picture problems.

Loading…
Cancel
Save