#include "contributors.h"
#include "global.h"
#include "image.h"
#include "wp.h"
Go to the source code of this file.
Functions | |
void | InitWP (ImageParameters *p_Img, InputParameters *p_Inp) |
double | ComputeImgSum (imgpel **CurrentImage, int height, int width) |
void | EstimateWPPSliceAlg0 (Slice *currSlice, int select_offset) |
void | EstimateWPBSliceAlg0 (Slice *currSlice) |
int | TestWPPSliceAlg0 (ImageParameters *p_Img, InputParameters *p_Inp, int select_offset) |
int | TestWPBSliceAlg0 (ImageParameters *p_Img, InputParameters *p_Inp, int select_method) |
Definition in file weighted_prediction.c.
double ComputeImgSum | ( | imgpel ** | CurrentImage, | |
int | height, | |||
int | width | |||
) |
Compute sum of samples in a picture.
Definition at line 63 of file weighted_prediction.c.
Referenced by EstimateWPBSliceAlg0(), EstimateWPBSliceAlg1(), EstimateWPBSliceAlg2(), EstimateWPPSliceAlg0(), EstimateWPPSliceAlg1(), EstimateWPPSliceAlg2(), TestWPBSliceAlg0(), TestWPBSliceAlg1(), TestWPBSliceAlg2(), TestWPPSliceAlg0(), TestWPPSliceAlg1(), and TestWPPSliceAlg2().
void EstimateWPBSliceAlg0 | ( | Slice * | currSlice | ) |
Estimates reference picture weighting factors for B slices.
implicit mode. Values are fixed and it is important to show it here
explicit mode. Values can be changed for higher precision.
implicit mode
Definition at line 217 of file weighted_prediction.c.
References inp_par_enc::ChromaWeightSupport, ComputeImgSum(), img_par::height, img_par::height_cr, storable_picture::imgUV, img_par::mb_data, storable_picture::p_curr_img, img_par::pCurImg, slice::wbp_weight, img_par::width, img_par::width_cr, slice::wp_offset, slice::wp_weight, and wpxDetermineWP().
Referenced by InitWP().
void EstimateWPPSliceAlg0 | ( | Slice * | currSlice, | |
int | select_offset | |||
) |
Estimates reference picture weighting factors for P slices.
Definition at line 85 of file weighted_prediction.c.
References inp_par_enc::ChromaWeightSupport, ComputeImgSum(), img_par::height, img_par::height_cr, storable_picture::imgUV, img_par::mb_data, storable_picture::p_curr_img, img_par::pCurImg, img_par::size, img_par::size_cr, img_par::width, img_par::width_cr, slice::wp_offset, slice::wp_weight, and wpxDetermineWP().
Referenced by InitWP().
void InitWP | ( | ImageParameters * | p_Img, | |
InputParameters * | p_Inp | |||
) |
Initialize weighting parameter functions.
Definition at line 27 of file weighted_prediction.c.
References EstimateWPBSliceAlg0(), EstimateWPBSliceAlg1(), EstimateWPBSliceAlg2(), EstimateWPPSliceAlg0(), EstimateWPPSliceAlg1(), EstimateWPPSliceAlg2(), TestWPBSliceAlg0(), TestWPBSliceAlg1(), TestWPBSliceAlg2(), TestWPPSliceAlg0(), TestWPPSliceAlg1(), TestWPPSliceAlg2(), inp_par_enc::WPIterMC, and inp_par_enc::WPMethod.
Referenced by init_slice().
int TestWPBSliceAlg0 | ( | ImageParameters * | p_Img, | |
InputParameters * | p_Inp, | |||
int | select_method | |||
) |
TestWPBSliceAlg0: Tests B slice weighting prediction.
implicit mode
explicit mode
implicit mode
Definition at line 594 of file weighted_prediction.c.
References inp_par_enc::B_List0_refs, inp_par_enc::B_List1_refs, inp_par_enc::ChromaWeightSupport, ComputeImgSum(), img_par::currentSlice, img_par::height, img_par::height_cr, storable_picture::imgUV, img_par::mb_data, img_par::MbaffFrameFlag, storable_picture::p_curr_img, img_par::pCurImg, slice::wbp_weight, img_par::width, img_par::width_cr, slice::wp_offset, and slice::wp_weight.
Referenced by InitWP().
int TestWPPSliceAlg0 | ( | ImageParameters * | p_Img, | |
InputParameters * | p_Inp, | |||
int | select_offset | |||
) |
Tests P slice weighting factors to perform or not WP RD decision.
Definition at line 443 of file weighted_prediction.c.
References BASELINE, inp_par_enc::ChromaWeightSupport, ComputeImgSum(), img_par::height, img_par::height_cr, storable_picture::imgUV, img_par::mb_data, img_par::MbaffFrameFlag, storable_picture::p_curr_img, img_par::pCurImg, inp_par_enc::RDPSliceBTest, img_par::size, img_par::size_cr, img_par::width, and img_par::width_cr.
Referenced by InitWP().