Remove encoder_control.cqmfile

This commit is contained in:
Laurent Fasnacht 2014-04-15 14:20:26 +02:00
parent 7897f7d5cd
commit ae2d79c954
3 changed files with 11 additions and 10 deletions

View file

@ -59,7 +59,6 @@ int main(int argc, char *argv[])
config *cfg = NULL; //!< Global configuration config *cfg = NULL; //!< Global configuration
FILE *input = NULL; //!< input file (YUV) FILE *input = NULL; //!< input file (YUV)
FILE *output = NULL; //!< output file (HEVC NAL stream) FILE *output = NULL; //!< output file (HEVC NAL stream)
FILE *cqmfile = NULL; //!< HM-compatible CQM file
encoder_control *encoder = NULL; //!< Encoder control struct encoder_control *encoder = NULL; //!< Encoder control struct
double psnr[3] = { 0.0, 0.0, 0.0 }; double psnr[3] = { 0.0, 0.0, 0.0 };
uint64_t curpos = 0; uint64_t curpos = 0;
@ -250,9 +249,6 @@ int main(int argc, char *argv[])
encoder->vui.chroma_loc = (int8_t)encoder->cfg->vui.chroma_loc; encoder->vui.chroma_loc = (int8_t)encoder->cfg->vui.chroma_loc;
// AUD // AUD
encoder->aud_enable = (int8_t)encoder->cfg->aud_enable; encoder->aud_enable = (int8_t)encoder->cfg->aud_enable;
// CQM
cqmfile = cfg->cqmfile ? fopen(cfg->cqmfile, "rb") : NULL;
encoder->cqmfile = cqmfile;
init_encoder_input(&encoder->in, input, cfg->width, cfg->height); init_encoder_input(&encoder->in, input, cfg->width, cfg->height);
@ -392,7 +388,6 @@ int main(int argc, char *argv[])
fclose(input); fclose(input);
fclose(output); fclose(output);
if(cqmfile != NULL) fclose(cqmfile);
if(recout != NULL) fclose(recout); if(recout != NULL) fclose(recout);
// Deallocating // Deallocating

View file

@ -312,6 +312,16 @@ encoder_control *init_encoder_control(config *cfg)
enc_c->ref = pic_list; enc_c->ref = pic_list;
enc_c->ref_list = REF_PIC_LIST_0; enc_c->ref_list = REF_PIC_LIST_0;
// CQM
{
FILE* cqmfile;
cqmfile = cfg->cqmfile ? fopen(cfg->cqmfile, "rb") : NULL;
if (cqmfile) {
scalinglist_parse(enc_c, cqmfile);
fclose(cqmfile);
}
}
return enc_c; return enc_c;
init_failure: init_failure:
@ -409,9 +419,6 @@ void encode_one_frame(encoder_control* encoder)
picture_list_rem(encoder->ref, encoder->ref->used_size - 1, 1); picture_list_rem(encoder->ref, encoder->ref->used_size - 1, 1);
} }
if (encoder->frame == 0 && encoder->cqmfile)
scalinglist_parse(encoder, encoder->cqmfile);
encoder->poc = 0; encoder->poc = 0;
encoder->in.cur_pic->slicetype = SLICE_I; encoder->in.cur_pic->slicetype = SLICE_I;

View file

@ -106,7 +106,6 @@ typedef struct
} vui; } vui;
int8_t aud_enable; int8_t aud_enable;
FILE *cqmfile; // \brief Costum Quantization Matrices
//scaling list //scaling list
uint8_t scaling_list_enable; uint8_t scaling_list_enable;