[fix] find out dav1d decode error

This commit is contained in:
dijunkun
2024-10-15 17:36:18 +08:00
parent 9a6def32fd
commit 6e622b4ab2
2 changed files with 58 additions and 27 deletions

View File

@@ -6,7 +6,7 @@
#include "log.h"
#define SAVE_RECEIVED_NV12_STREAM 0
#define SAVE_ENCODED_AV1_STREAM 1
#define SAVE_ENCODED_AV1_STREAM 0
#define SET_ENCODER_PARAM_OR_RETURN_ERROR(param_id, param_value) \
do { \
@@ -25,8 +25,6 @@ constexpr int kLagInFrames = 0; // No look ahead.
constexpr int kRtpTicksPerSecond = 90000;
constexpr double kMinimumFrameRate = 1.0;
constexpr uint8_t kObuSizePresentBit = 0b0'0000'010;
static aom_superblock_size_t GetSuperblockSize(int width, int height,
int threads) {
int resolution = width * height;
@@ -341,6 +339,7 @@ int AomAv1Encoder::Encode(const XVideoFrame *video_frame,
// LOG_INFO("Encoded frame qp = {}", qp);
if (on_encoded_image) {
LOG_ERROR("enc {}x{}", video_frame->width, video_frame->height);
on_encoded_image((char *)encoded_frame_, encoded_frame_size_,
frame_type);
if (SAVE_ENCODED_AV1_STREAM) {