#include <math.h>
#include <limits.h>
#include "global.h"
#include "rdopt.h"
#include "q_around.h"
#include "rdopt_coding_state.h"
#include "memalloc.h"
#include "mb_access.h"
#include "elements.h"
#include "intrarefresh.h"
#include "image.h"
#include "transform8x8.h"
#include "cabac.h"
#include "biariencode.h"
#include "vlc.h"
#include "me_umhex.h"
#include "ratectl.h"
#include "mode_decision.h"
#include "rd_intra_jm.h"
#include "rd_intra_jm444.h"
#include "fmo.h"
#include "macroblock.h"
#include "symbol.h"
#include "q_offsets.h"
#include "conformance.h"
#include "errdo.h"
#include "mv_search.h"
#include "md_common.h"
#include "md_distortion.h"
Go to the source code of this file.
Defines | |
#define | FASTMODE 1 |
#define | IS_FW ((b8x8info->best[mode][k].pdir==0 || b8x8info->best[mode][k].pdir==2) && (mode!=P8x8 || b8x8info->best[mode][k].mode!=0 || currSlice->slice_type != B_SLICE)) |
#define | IS_BW ((b8x8info->best[mode][k].pdir==1 || b8x8info->best[mode][k].pdir==2) && (mode!=P8x8 || b8x8info->best[mode][k].mode!=0)) |
Functions | |
static void | compute_sad4x4_cost (ImageParameters *p_Img, imgpel **cur_img, imgpel **prd_img, int pic_opix_x, int *cost, int min_cost) |
static void | compute_sse4x4_cost (ImageParameters *p_Img, imgpel **cur_img, imgpel **prd_img, int pic_opix_x, int *cost, int min_cost) |
static void | compute_satd4x4_cost (ImageParameters *p_Img, imgpel **cur_img, imgpel **prd_img, int pic_opix_x, int *cost, int min_cost) |
static void | compute_comp4x4_cost (ImageParameters *p_Img, imgpel **cur_img, imgpel **prd_img, int pic_opix_x, int *cost, int min_cost) |
static void | set_stored_macroblock_parameters (Macroblock *currMB) |
static void | set_stored_macroblock_parameters_sp (Macroblock *currMB) |
static void | set_stored_macroblock_parameters_mpass (Macroblock *currMB) |
static void | set_ref_and_motion_vectors_P_slice (Macroblock *currMB, PicMotionParams *motion, Info8x8 *part, int block) |
static void | set_ref_and_motion_vectors_B_slice (Macroblock *currMB, PicMotionParams *motion, Info8x8 *part, int block) |
static void | copy_motion_vectors_MB (Slice *currSlice, RD_DATA *rdopt) |
void | alloc_rd8x8data (RD_8x8DATA *rd_data) |
void | free_rd8x8data (RD_8x8DATA *rd_data) |
void | clear_rdopt (Slice *currSlice) |
void | setupDistCost (Slice *currSlice, InputParameters *p_Inp) |
void | init_rdopt (Slice *currSlice) |
void | UpdatePixelMap (ImageParameters *p_Img, InputParameters *p_Inp) |
int | CheckReliabilityOfRef (Macroblock *currMB, int block, int list_idx, int ref, int mode) |
double | rdcost_for_4x4_intra_blocks (Macroblock *currMB, int *nonzero, int b8, int b4, int ipmode, double lambda, int mostProbableMode, double min_rdcost) |
double | rdcost_for_4x4_intra_blocks_444 (Macroblock *currMB, int *nonzero, int b8, int b4, int ipmode, double lambda, int mostProbableMode, double min_rdcost) |
double | RDCost_for_8x8blocks (Macroblock *currMB, RD_8x8DATA *dataTr, int *cnt_nonz, int64 *cbp_blk, double lambda, int block, short mode, Info8x8 *part, double min_rdcost) |
short | I16Offset (int cbp, short i16mode) |
void | SetModesAndRefframeForBlocks (Macroblock *currMB, short mode) |
void | SetCoeffAndReconstruction8x8 (Macroblock *currMB) |
void | restore_nz_coeff (Macroblock *currMB) |
int | RDCost_for_macroblocks (Macroblock *currMB, double lambda, short mode) |
void | init_md_best (BestMode *best) |
void | store_macroblock_parameters (Macroblock *currMB, int mode) |
byte | field_flag_inference (Macroblock *currMB) |
void | StoreMVBlock8x8 (Slice *currSlice, int dir, int block8x8, int mode, Info8x8 *B8x8Info) |
void | StoreMV8x8 (Slice *currSlice, int dir) |
void | RestoreMVBlock8x8 (Slice *currSlice, int dir, int block8x8, RD_8x8DATA *tr) |
void | RestoreMV8x8 (Slice *currSlice, int dir) |
void | StoreNewMotionVectorsBlock8x8 (Slice *currSlice, int dir, int block8x8, Info8x8 *B8x8Info) |
int | GetBestTransformP8x8 (Macroblock *currMB) |
void | set_mbaff_parameters (Macroblock *currMB) |
void | assign_enc_picture_params (Macroblock *currMB, int mode, Info8x8 *best, int block) |
void | set_block8x8_info (Block8x8Info *b8x8info, int mode, int block, Info8x8 *best) |
void | set_subblock8x8_info (Block8x8Info *b8x8info, int mode, int block, RD_8x8DATA *tr) |
void | update_refresh_map (Macroblock *currMB, int intra, int intra1) |
int | valid_intra_mode (Slice *currSlice, int ipmode) |
void | generate_pred_error_4x4 (imgpel **cur_img, imgpel **prd_img, imgpel **cur_prd, int **m7, int pic_opix_x, int block_x) |
void | generate_pred_error_8x8 (imgpel **cur_img, imgpel **prd_img, imgpel **cur_prd, int **m7, int pic_opix_x, int block_x) |
void | update_qp_cbp_tmp (Macroblock *currMB, int cbp) |
void | update_qp_cbp (Macroblock *currMB) |
void | copy_rdopt_data (Macroblock *currMB) |
Definition in file rdopt.c.
int CheckReliabilityOfRef | ( | Macroblock * | currMB, | |
int | block, | |||
int | list_idx, | |||
int | ref, | |||
int | mode | |||
) |
Checks if a given reference frame is reliable for the current macroblock, given the motion vectors that the motion search has returned.
Definition at line 351 of file rdopt.c.
References slice::all_mv, macroblock::block_x, macroblock::block_y, img_par::height, macroblock::p_Img, macroblock::p_slice, img_par::pixel_map, and img_par::width.
Referenced by list_prediction_cost().
void clear_rdopt | ( | Slice * | currSlice | ) |
delete structure for RD-optimized mode decision
Definition at line 92 of file rdopt.c.
References delete_coding_state(), EXTENDED, free_mem2D(), free_mem2Dint(), free_mem2Dpel(), free_mem3Dint(), free_mem3Dpel(), free_mem5Dshort(), free_mem_ACcoeff(), free_mem_ACcoeff_new(), free_mem_DCcoeff(), and inp_par_enc::ProfileIDC.
Referenced by free_slice().
void copy_rdopt_data | ( | Macroblock * | currMB | ) |
For MB level field/frame coding
Definition at line 3572 of file rdopt.c.
References rd_data::all_mv, macroblock::block_x, macroblock::block_y, macroblock::c_ipred_mode, macroblock::cbp_blk, slice::cofAC, slice::cofDC, copy_image_data(), copy_image_data_16x16(), storable_picture::imgUV, storable_picture::imgY, macroblock::intra_pred_modes8x8, img_par::ipredmode, macroblock::mb_type, storable_picture::motion, pic_motion_params::mv, macroblock::p_Img, macroblock::p_slice, macroblock::pix_c_x, macroblock::pix_c_y, macroblock::pix_x, macroblock::pix_y, macroblock::qp, rd_data::rec_mb, pic_motion_params::ref_idx, pic_motion_params::ref_pic_id, rd_data::refar, slice::slice_type, update_qp(), and YUV400.
Referenced by encode_one_slice_MBAFF().
byte field_flag_inference | ( | Macroblock * | currMB | ) |
skip macroblock field inference
Definition at line 2803 of file rdopt.c.
References img_par::mb_data, and macroblock::p_Img.
Referenced by end_encode_one_macroblock(), RDCost_for_macroblocks(), writeMBLayerBSlice(), and writeMBLayerPSlice().
int GetBestTransformP8x8 | ( | Macroblock * | currMB | ) |
Makes the decision if 8x8 tranform will be used (for RD-off).
Definition at line 3061 of file rdopt.c.
References macroblock::opix_y, macroblock::p_Img, macroblock::p_slice, img_par::pCurImg, and macroblock::pix_x.
Referenced by encode_one_macroblock_low().
void init_md_best | ( | BestMode * | best | ) |
Initialize best mode information.
Definition at line 1711 of file rdopt.c.
Referenced by encode_one_macroblock_high(), encode_one_macroblock_highfast(), encode_one_macroblock_highloss(), and encode_one_macroblock_low().
void init_rdopt | ( | Slice * | currSlice | ) |
create structure for RD-optimized mode decision
Definition at line 178 of file rdopt.c.
References create_coding_state(), inp_par_enc::CtxAdptLagrangeMult, encode_one_macroblock_high(), encode_one_macroblock_highfast(), encode_one_macroblock_highloss(), encode_one_macroblock_low(), EXTENDED, find_sad_16x16_JM(), get_mem2D(), get_mem2Dint(), get_mem2Dpel(), get_mem3Dint(), get_mem3Dpel(), get_mem5Dshort(), get_mem_ACcoeff(), get_mem_ACcoeff_new(), get_mem_DCcoeff(), Mode_Decision_for_4x4IntraBlocks_JM_High(), Mode_Decision_for_4x4IntraBlocks_JM_High444(), Mode_Decision_for_4x4IntraBlocks_JM_Low(), Mode_Decision_for_4x4IntraBlocks_JM_Low444(), Mode_Decision_for_8x8IntraBlocks_JM_High(), Mode_Decision_for_8x8IntraBlocks_JM_High444(), Mode_Decision_for_8x8IntraBlocks_JM_Low(), Mode_Decision_for_8x8IntraBlocks_JM_Low444(), no_mem_exit(), inp_par_enc::ProfileIDC, rdcost_for_4x4_intra_blocks(), rdcost_for_4x4_intra_blocks_444(), rdcost_for_8x8_intra_blocks(), rdcost_for_8x8_intra_blocks_444(), set_ref_and_motion_vectors_B_slice(), set_ref_and_motion_vectors_P_slice(), set_stored_macroblock_parameters(), set_stored_macroblock_parameters_mpass(), set_stored_macroblock_parameters_sp(), slice::slice_type, and YUV444.
Referenced by init_slice().
double rdcost_for_4x4_intra_blocks | ( | Macroblock * | currMB, | |
int * | nonzero, | |||
int | b8, | |||
int | b4, | |||
int | ipmode, | |||
double | lambda, | |||
int | mostProbableMode, | |||
double | min_rdcost | |||
) |
R-D Cost for an 4x4 Intra block.
Definition at line 498 of file rdopt.c.
References assignSE2partition, compute_SSE4x4(), syntaxelement::context, storable_picture::imgY, syntaxelement::len, macroblock::opix_y, macroblock::p_Img, macroblock::p_slice, slice::partArr, img_par::pCurImg, macroblock::pix_x, macroblock::pix_y, syntaxelement::type, syntaxelement::value1, and writeCoeff4x4_CABAC().
Referenced by init_rdopt().
double rdcost_for_4x4_intra_blocks_444 | ( | Macroblock * | currMB, | |
int * | nonzero, | |||
int | b8, | |||
int | b4, | |||
int | ipmode, | |||
double | lambda, | |||
int | mostProbableMode, | |||
double | min_rdcost | |||
) |
R-D Cost for an 4x4 Intra block.
Definition at line 573 of file rdopt.c.
References assignSE2partition, compute_SSE4x4(), syntaxelement::context, storable_picture::imgY, syntaxelement::len, macroblock::opix_y, storable_picture::p_curr_img, macroblock::p_Img, macroblock::p_slice, slice::partArr, img_par::pCurImg, macroblock::pix_x, macroblock::pix_y, select_plane(), syntaxelement::type, syntaxelement::value1, and writeCoeff4x4_CABAC().
Referenced by init_rdopt().
double RDCost_for_8x8blocks | ( | Macroblock * | currMB, | |
RD_8x8DATA * | dataTr, | |||
int * | cnt_nonz, | |||
int64 * | cbp_blk, | |||
double | lambda, | |||
int | block, | |||
short | mode, | |||
Info8x8 * | part, | |||
double | min_rdcost | |||
) |
R-D Cost for an 8x8 Partition.
Definition at line 664 of file rdopt.c.
References macroblock::ar_mode, arienco_bits_written(), assignSE2partition, B8Mode2Value(), macroblock::block_x, macroblock::block_y, compute_residue_block(), compute_SSE8x8(), decode_one_b8block(), slice::direct_pdir, slice::direct_ref_idx, storable_picture::imgUV, storable_picture::imgY, syntaxelement::len, luma_residual_coding_8x8(), luma_residual_coding_p444_8x8(), slice::mb_pred, macroblock::opix_y, storable_picture::p_dec_img, storable_picture::p_img, macroblock::p_Img, macroblock::p_slice, slice::partArr, img_par::pCurImg, macroblock::pix_x, macroblock::pix_y, decoders::res_img, slice::slice_type, slice::tex_ctx, syntaxelement::type, ue_linfo(), syntaxelement::value1, slice::wbp_weight, writeCBP_BIT_CABAC(), writeCoeff8x8(), writeMotionVector8x8(), and writeReferenceFrame().
Referenced by submacroblock_mode_decision().
int RDCost_for_macroblocks | ( | Macroblock * | currMB, | |
double | lambda, | |||
short | mode | |||
) |
R-D Cost for a macroblock.
Definition at line 1459 of file rdopt.c.
References slice::all_mv, chroma_residual_coding(), img_par::cod_counter, compute_residue_block(), compute_SSE16x16(), copy_image_data(), copy_image_data_16x16(), decode_one_mb(), field_flag_inference(), storable_picture::imgUV, storable_picture::imgY, Intra16x16_Mode_Decision444(), Intra16x16_Mode_Decision_RDopt(), Intra16x16_Mode_Decision_SAD(), luma_residual_coding(), luma_residual_coding_p444(), slice::mb_pred, macroblock::mb_type, macroblock::mbAddrX, Mode_Decision_for_Intra4x4Macroblock(), Mode_Decision_for_Intra8x8Macroblock(), storable_picture::motion, slice::mpr_16x16, img_par::nz_coeff, macroblock::opix_c_y, macroblock::opix_y, out_of_bounds_mvs(), storable_picture::p_curr_img, storable_picture::p_dec_img, macroblock::p_Img, macroblock::p_slice, img_par::pCurImg, macroblock::pix_c_x, macroblock::pix_c_y, macroblock::pix_x, macroblock::pix_y, inp_par_enc::ProfileIDC, macroblock::qp_scaled, inp_par_enc::RCEnable, decoders::res_img, SetCoeffAndReconstruction8x8(), SetModesAndRefframeForBlocks(), slice::slice_type, ue_linfo(), YUV400, and YUV444.
Referenced by compute_mode_RD_cost().
void restore_nz_coeff | ( | Macroblock * | currMB | ) |
Restore Non zero coefficients.
Definition at line 1441 of file rdopt.c.
References macroblock::mbAddrX, img_par::nz_coeff, and macroblock::p_Img.
Referenced by encode_one_macroblock_high(), encode_one_macroblock_highfast(), and encode_one_macroblock_highloss().
void RestoreMV8x8 | ( | Slice * | currSlice, | |
int | dir | |||
) |
Restore motion vectors of 8x8 partitions of one macroblock.
Definition at line 2971 of file rdopt.c.
References RestoreMVBlock8x8().
Referenced by set_stored_macroblock_parameters(), set_stored_macroblock_parameters_mpass(), set_stored_macroblock_parameters_sp(), and SetCoeffAndReconstruction8x8().
void RestoreMVBlock8x8 | ( | Slice * | currSlice, | |
int | dir, | |||
int | block8x8, | |||
RD_8x8DATA * | tr | |||
) |
Restore motion vectors for 8x8 partition.
Definition at line 2909 of file rdopt.c.
References slice::all_mv, slice::bipred_mv, error(), and slice::slice_type.
Referenced by RestoreMV8x8().
void set_block8x8_info | ( | Block8x8Info * | b8x8info, | |
int | mode, | |||
int | block, | |||
Info8x8 * | best | |||
) |
Set block 8x8 mode information.
Definition at line 3306 of file rdopt.c.
Referenced by encode_one_macroblock_high(), encode_one_macroblock_highfast(), encode_one_macroblock_highloss(), and encode_one_macroblock_low().
void set_mbaff_parameters | ( | Macroblock * | currMB | ) |
Sets MBAFF RD parameters.
Definition at line 3120 of file rdopt.c.
References inp_par_enc::BiPredMERefinements, macroblock::block_x, macroblock::block_y, macroblock::cbp_blk, slice::cofAC, slice::cofDC, copy_image_data(), copy_image_data_16x16(), storable_picture::imgUV, storable_picture::imgY, macroblock::intra_pred_modes8x8, img_par::ipredmode, macroblock::mb_type, storable_picture::motion, macroblock::p_Img, macroblock::p_slice, macroblock::pix_c_x, macroblock::pix_c_y, macroblock::pix_x, macroblock::pix_y, rd_data::rec_mb, pic_motion_params::ref_idx, rd_data::refar, slice::slice_type, and YUV400.
Referenced by encode_one_macroblock_low().
static void set_ref_and_motion_vectors_B_slice | ( | Macroblock * | currMB, | |
PicMotionParams * | motion, | |||
Info8x8 * | pred, | |||
int | block | |||
) | [static] |
Set reference frames and motion vectors.
Definition at line 2621 of file rdopt.c.
References slice::all_mv, slice::bipred_mv, macroblock::block_x, macroblock::block_y, slice::direct_ref_idx, is_bipred_enabled(), pic_motion_params::mv, macroblock::p_Img, macroblock::p_slice, pic_motion_params::ref_idx, and pic_motion_params::ref_pic_id.
Referenced by init_rdopt().
void set_ref_and_motion_vectors_P_slice | ( | Macroblock * | currMB, | |
PicMotionParams * | motion, | |||
Info8x8 * | pred, | |||
int | block | |||
) | [static] |
Set reference frames and motion vectors.
Definition at line 2568 of file rdopt.c.
References slice::all_mv, macroblock::block_x, macroblock::block_y, pic_motion_params::mv, macroblock::p_Img, macroblock::p_slice, pic_motion_params::ref_idx, and pic_motion_params::ref_pic_id.
Referenced by init_rdopt().
static void set_stored_macroblock_parameters | ( | Macroblock * | currMB | ) | [static] |
Set stored macroblock parameters (non RDOQ or MBAFF).
Definition at line 2126 of file rdopt.c.
References img_par::AdaptiveRounding, slice::all_mv, slice::bipred_mv, macroblock::block_x, macroblock::block_y, macroblock::c_ipred_mode, macroblock::cbp_blk, slice::cofAC, slice::cofDC, copy_image_data(), copy_image_data_16x16(), decoders::dec_mbY_best, errdo_get_best_block(), storable_picture::imgUV, storable_picture::imgY, macroblock::intra_pred_modes8x8, img_par::ipredmode, img_par::ipredmode8x8, is_bipred_enabled(), macroblock::mb_type, storable_picture::motion, pic_motion_params::mv, storable_picture::p_dec_img, macroblock::p_Img, macroblock::p_slice, macroblock::pix_c_x, macroblock::pix_c_y, macroblock::pix_x, macroblock::pix_y, pic_motion_params::ref_idx, pic_motion_params::ref_pic_id, RestoreMV8x8(), slice::slice_type, update_offset_params(), and YUV400.
Referenced by init_rdopt().
static void set_stored_macroblock_parameters_mpass | ( | Macroblock * | currMB | ) | [static] |
Set stored macroblock parameters.
Definition at line 1842 of file rdopt.c.
References img_par::AdaptiveRounding, slice::all_mv, slice::bipred_mv, macroblock::block_x, macroblock::block_y, macroblock::c_ipred_mode, macroblock::cbp_blk, slice::cofAC, slice::cofDC, copy_image_data(), copy_image_data_16x16(), decoders::dec_mbY_best, errdo_get_best_block(), storable_picture::imgUV, storable_picture::imgY, macroblock::intra_pred_modes8x8, img_par::ipredmode, img_par::ipredmode8x8, is_bipred_enabled(), macroblock::mb_type, storable_picture::motion, pic_motion_params::mv, storable_picture::p_dec_img, macroblock::p_Img, macroblock::p_slice, macroblock::pix_c_x, macroblock::pix_c_y, macroblock::pix_x, macroblock::pix_y, macroblock::qp, rd_data::rec_mb, pic_motion_params::ref_idx, pic_motion_params::ref_pic_id, rd_data::refar, RestoreMV8x8(), slice::slice_type, update_offset_params(), and YUV400.
Referenced by init_rdopt().
static void set_stored_macroblock_parameters_sp | ( | Macroblock * | currMB | ) | [static] |
Set stored macroblock parameters (non RDOQ or MBAFF).
Definition at line 2339 of file rdopt.c.
References img_par::AdaptiveRounding, slice::all_mv, slice::bipred_mv, macroblock::block_x, macroblock::block_y, macroblock::c_ipred_mode, macroblock::cbp_blk, slice::cofAC, slice::cofDC, copy_image_data(), copy_image_data_16x16(), decoders::dec_mbY_best, errdo_get_best_block(), storable_picture::imgUV, storable_picture::imgY, macroblock::intra_pred_modes8x8, img_par::ipredmode, img_par::ipredmode8x8, is_bipred_enabled(), macroblock::mb_type, storable_picture::motion, pic_motion_params::mv, storable_picture::p_dec_img, macroblock::p_Img, macroblock::p_slice, macroblock::pix_c_x, macroblock::pix_c_y, macroblock::pix_x, macroblock::pix_y, pic_motion_params::ref_idx, pic_motion_params::ref_pic_id, RestoreMV8x8(), slice::slice_type, update_offset_params(), and YUV400.
Referenced by init_rdopt().
void set_subblock8x8_info | ( | Block8x8Info * | b8x8info, | |
int | mode, | |||
int | block, | |||
RD_8x8DATA * | tr | |||
) |
Set block 8x8 mode information for P8x8 mode.
Definition at line 3339 of file rdopt.c.
Referenced by encode_one_macroblock_high(), encode_one_macroblock_highfast(), encode_one_macroblock_highloss(), and encode_one_macroblock_low().
void SetCoeffAndReconstruction8x8 | ( | Macroblock * | currMB | ) |
Sets Coefficients and reconstruction for an 8x8 block.
Definition at line 1181 of file rdopt.c.
References _LUMA_8x8_COEFF_COST_, macroblock::block_x, macroblock::block_y, macroblock::cbp_blk, slice::cofAC, copy_image_data_16x16(), decoders::dec_mb_pred_best8x8, decoders::dec_mbY_best8x8, errdo_get_best_block(), storable_picture::imgUV, storable_picture::imgY, storable_picture::motion, storable_picture::p_dec_img, macroblock::p_Img, macroblock::p_slice, macroblock::pix_x, macroblock::pix_y, macroblock::qp_scaled, pic_motion_params::ref_idx, pic_motion_params::ref_pic_id, RestoreMV8x8(), slice::slice_type, and StoreMV8x8().
Referenced by encode_one_macroblock_low(), and RDCost_for_macroblocks().
void SetModesAndRefframeForBlocks | ( | Macroblock * | currMB, | |
short | mode | |||
) |
Sets modes and reference frames for a macroblock.
Definition at line 884 of file rdopt.c.
References macroblock::ar_mode, img_par::b8x8info, macroblock::block_x, macroblock::block_y, slice::direct_pdir, slice::direct_ref_idx, macroblock::mb_type, storable_picture::motion, macroblock::p_Img, macroblock::p_slice, pic_motion_params::ref_idx, pic_motion_params::ref_pic_id, and slice::slice_type.
Referenced by compute_mode_RD_cost(), encode_one_macroblock_low(), and RDCost_for_macroblocks().
void store_macroblock_parameters | ( | Macroblock * | currMB, | |
int | mode | |||
) |
Store macroblock parameters.
Definition at line 1729 of file rdopt.c.
References img_par::AdaptiveRounding, img_par::ARCofAdj4x4, img_par::ARCofAdj8x8, macroblock::block_x, macroblock::block_y, macroblock::c_ipred_mode, macroblock::cbp_blk, slice::cofAC, slice::cofDC, copy_image_data(), copy_image_data_16x16(), decoders::dec_mbY_best, errdo_store_best_block(), storable_picture::imgUV, storable_picture::imgY, macroblock::intra_pred_modes8x8, img_par::ipredmode, img_par::ipredmode8x8, storable_picture::motion, storable_picture::p_dec_img, macroblock::p_Img, macroblock::p_slice, macroblock::pix_c_x, macroblock::pix_c_y, macroblock::pix_x, macroblock::pix_y, pic_motion_params::ref_idx, slice::slice_type, store_adaptive_rounding_16x16(), and YUV400.
Referenced by compute_mode_RD_cost().
void StoreMV8x8 | ( | Slice * | currSlice, | |
int | dir | |||
) |
Store motion vectors of 8x8 partitions of one macroblock.
Definition at line 2894 of file rdopt.c.
References StoreMVBlock8x8().
Referenced by SetCoeffAndReconstruction8x8().
Store motion vectors for 8x8 partition.
Definition at line 2831 of file rdopt.c.
References slice::all_mv, slice::bipred_mv, error(), and slice::slice_type.
Referenced by StoreMV8x8().
Store predictors for 8x8 partition.
Definition at line 2987 of file rdopt.c.
References slice::all_mv, slice::bipred_mv, and slice::slice_type.
Referenced by submacroblock_mode_decision(), and submacroblock_mode_decision_low().
void update_qp_cbp | ( | Macroblock * | currMB | ) |
Update QP Parameters (in case of SKIP MBs or MBAFF).
Definition at line 3542 of file rdopt.c.
References inp_par_enc::MbInterlace, macroblock::p_Img, macroblock::p_slice, img_par::qp, macroblock::qp, and update_qp().
Referenced by end_encode_one_macroblock().
void UpdatePixelMap | ( | ImageParameters * | p_Img, | |
InputParameters * | p_Inp | |||
) |
Updates the pixel map that shows, which reference frames are reliable for each MB-area of the picture.
Definition at line 302 of file rdopt.c.
References img_par::height, inp_par_enc::num_ref_frames, img_par::pixel_map, img_par::refresh_map, and img_par::width.
Referenced by encode_one_frame().