Home | History | Annotate | Download | only in video_coding

Lines Matching refs:spatial

81   // Spatial measure: take average of 3 prediction errors.
176 down_action_history_[i].spatial = kNoChangeSpatial;
301 // 2) The possible down-sampling actions are: spatial by 1/2x1/2, 3/4x3/4;
303 // 3) The action for going back up is the reverse of last (spatial or temporal)
306 // 4) The total amount of down-sampling (spatial and/or temporal) from the
340 if (down_action_history_[0].spatial != kNoChangeSpatial ||
365 action_.spatial = kNoChangeSpatial;
398 // Use base layer frame rate for temporal layers: this will favor spatial.
428 float fac_width = kFactorWidthSpatial[down_action_history_[0].spatial];
429 float fac_height = kFactorHeightSpatial[down_action_history_[0].spatial];
432 // So if the last spatial action was 1/2x1/2 it would be undone in 2 stages.
434 if (down_action_history_[0].spatial == kOneQuarterSpatialUniform) {
442 if (down_action_history_[0].spatial != kNoChangeSpatial &&
446 action_.spatial = down_action_history_[0].spatial;
455 if (down_action_history_[0].spatial != kNoChangeSpatial) {
464 action_.spatial = down_action_history_[0].spatial;
469 action_.spatial = kNoChangeSpatial;
519 action_.spatial = kOneQuarterSpatialUniform;
523 action_.spatial = kOneHalfSpatialUniform;
527 action_.spatial = kNoChangeSpatial;
547 // Only allow for one action (spatial or temporal) at a given time.
549 action_.spatial == kNoChangeSpatial);
556 if (action_.spatial != kNoChangeSpatial ||
597 qm_->spatial_width_fact = 1.0f / kFactorWidthSpatial[action_.spatial];
598 qm_->spatial_height_fact = 1.0f / kFactorHeightSpatial[action_.spatial];
599 // If last spatial action was 1/2x1/2, we undo it in two steps, so the
600 // spatial scale factor in this first step is modified as (4.0/3.0 / 2.0).
601 if (action_.spatial == kOneQuarterSpatialUniform) {
614 qm_->spatial_width_fact = kFactorWidthSpatial[action_.spatial];
615 qm_->spatial_height_fact = kFactorHeightSpatial[action_.spatial];
631 if (action_.spatial != kNoChangeSpatial) {
640 // New sizes should be multiple of 2, otherwise spatial should not have
668 // If the spatial level is default state (neither low or high), motion level
669 // is not high, and spatial action was selected, switch to 2/3 frame rate
672 action_.spatial != kNoChangeSpatial &&
674 action_.spatial = kNoChangeSpatial;
677 // If both motion and spatial level are low, and temporal down action was
678 // selected, switch to spatial 3/4x3/4 if the frame rate is not above the
683 action_.spatial = kOneHalfSpatialUniform;
686 // If spatial action is selected, and there has been too much spatial
689 if (action_.spatial != kNoChangeSpatial &&
690 down_action_history_[0].spatial == kOneQuarterSpatialUniform &&
692 action_.spatial = kNoChangeSpatial;
698 action_.spatial = kOneHalfSpatialUniform;
702 // If spatial action was selected, we need to make sure the frame sizes
704 if (action_.spatial != kNoChangeSpatial && !EvenFrameSize()) {
705 action_.spatial = kNoChangeSpatial;
706 // Only one action (spatial or temporal) is allowed at a given time, so need
713 // If 3/4 spatial is selected, check if there has been another 3/4,
715 // Note we define 3/4x3/4 spatial as kOneHalfSpatialUniform.
716 if (action_.spatial == kOneHalfSpatialUniform) {
720 if (down_action_history_[i].spatial == kOneHalfSpatialUniform) {
727 action_.spatial = kOneQuarterSpatialUniform;
732 // Check if switching to 1/2x1/2 (=1/4) spatial is allowed.
734 if (action_.spatial == kNoChangeSpatial) {
735 // Not allowed. Go back to 3/4x3/4 spatial.
736 action_.spatial = kOneHalfSpatialUniform;
745 down_action_history_[i].spatial = down_action_history_[i + 1].spatial;
754 // Returns false if the new frame sizes, under the current spatial action,
757 if (action_.spatial == kOneHalfSpatialUniform) {
761 } else if (action_.spatial == kOneQuarterSpatialUniform) {
770 if (action_.spatial != kNoChangeSpatial) {
772 down_action_history_[i].spatial = down_action_history_[i - 1].spatial;
774 down_action_history_[0].spatial = action_.spatial;
785 if (action_.spatial != kNoChangeSpatial) {
786 // If the last spatial action was 1/2x1/2 we replace it with 3/4x3/4.
787 if (action_.spatial == kOneQuarterSpatialUniform) {
788 down_action_history_[0].spatial = kOneHalfSpatialUniform;
791 down_action_history_[i].spatial = down_action_history_[i + 1].spatial;
793 down_action_history_[kDownActionHistorySize - 1].spatial =
811 float spatial_width_fact = kFactorWidthSpatial[action_.spatial];
812 float spatial_height_fact = kFactorHeightSpatial[action_.spatial];
818 // No spatial sampling if current frame size is too small, or if the
819 // amount of spatial down-sampling is above maximum spatial down-action.
822 action_.spatial = kNoChangeSpatial;
832 // Check if the total (spatial-temporal) down-action is above maximum allowed,
835 if (action_.spatial != kNoChangeSpatial) {
836 action_.spatial = kNoChangeSpatial;
840 // We only allow for one action (spatial or temporal) at a given time, so
841 // either spatial or temporal action is selected when this function is
843 // 2 prior conditions (on spatial & temporal max down-action), then this
853 action_.spatial = down_action_history_[0].spatial;
856 action_.spatial = kNoChangeSpatial;
861 // TODO(marpan): Update when we allow for directional spatial down-sampling.