Answers.Body: <p>This depends on how much resources you are willing to invest into upscaling content. The default setting for libswscale in VLC seems to be bicubic, if you intend to use more sophisticated resizing filters and a particular target resolution then you should upscale the video during encode this way you also don't have to rely on the capabilities and customizing options of the player device or software.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-06-14T08:31:09.083Z
Answers.LastActivityDate: 2015-06-14T08:31:09.083Z
Answers.UserDisplayName: LiveWireBT
Answers.Body: <p>Upscaling at playback time is done by graphics hardware, not the CPU, so your assumption turns out to be false.  Good software players will feed the video through high-quality hardware scaling (e.g. <a href="http://mpv.io/" rel="nofollow">mpv</a>'s opengl-hq video-out).  HW upscaling might still default to bilinear, though, so it's worth thinking about this.</p>
  
  <p>Upscaling before encode spreads the detail information over more pixels, making more work for the codec.  However, there's no new information, and as long as you use a HQ upscaling algo, you aren't adding new detail.  (stair-stepping / aliasing artifacts from low quality upscaling looks like detail that a codec has to spend bits to preserve, at the cost of the details you want.)  I would guess that you'd get better perceptual visual quality for method 1 (encode,decode,fullscale) than 2 (hq-scale,encode,decode,fullscale).  Both relative to source->fullscale, or to source->hq-fullscale.  Given the same bitrate for both options, of course.</p>
  
  <p>However, <a href="http://forum.doom9.org/showthread.php?p=1607083#post1607083" rel="nofollow">this post</a> in a doom9 discussion about upscaling or not before encoding a dvd backup indicates that this guy got better results from upscaling before encode.  (At least when targetting low-qual playback upscalers.)  Anamorphic = non-square pixels, in this context.  e.g. a 16:9 image stored in 720x480 (square-pixel upscaling would give 853.333:480).</p>
  
  <p>I know I play back all the video I watch using high quality opengl upscaling, but the question is more about making it look good for people using the default video player in Windows and Mac.  IDK what kind of video scaling quality you get out of the box.  I hope it's pretty good these days, since AMD and NVidia have made their video pipeline a selling point of their graphics hardware.  (e.g. HW image postprocessing / high quality stuff).  I think Intel does ok too...</p>
  
  <p>I'm also not sure that HQ scaling to an intermediate resolution would even help, if the final upscaler is lower quality.  Does anyone have any data on that?  The question is whether the quality of the output of a bilinear upscaler gets worse or not depending on how much it has to upscale.</p>
  
  <p>The codec having to work harder to pull out just the information needed to recreate most of the detail could well be overshadowed by the benefit of using a good upscale to a medium rez.</p>
  
  <p>If you wanted to try it out, and have access to a mix of Windows and/or Mac computers with AMD/NVidia/Intel video hardware, then you could experiment just by first comparing a HQ software upscale to fullscreen with what you get from the hw video scaler.  Then try a SW upscale to mid rez.  Don't bother encoding, or encode to a fast lossless format for a short clip.</p>
  
  <p>Probably if you're expecting people will mostly play back your video on computers (rather than blu-ray &amp; dvd players / other set-top boxes), then not upscaling is probably the way to go.  Upscaling a bit to a medium rez is possibly helpful for some HW players, but that might only be when the source doesn't have square pixels.</p>
  
  <p>Upscaling before encoding will increase the encode time.  If encoding-time is limited (i.e. you'd have to use lower settings with a higher rez), then probably don't upscale.  Better quality at the same bitrate from spending more CPU time per pixel on the encode might be a bigger factor.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-06-16T01:28:49.073Z
Answers.LastActivityDate: 2015-06-16T02:07:51.657Z
Answers.LastEditDate: 2015-06-16T02:07:51.657Z
Answers.UserDisplayName: Peter Cordes
Body: <p>I was wondering, is upscaling from the videoplayer worse then upscaling the video during encode?</p>
  
  <p>For example, consider the original source of a video is 640 x 480. Which of the following will produce better quality on a 800 x 600 display:</p>
  
  <ol>
  <li>Encode video > play in full screen</li>
  <li>Resize video to 800 x 600 > encode > play in full screen</li>
  </ol>
  
  <p>?</p>
  
  <p>My assumption is that a lower quality resizing algoritm is chosen during video playback to save cpu. Am I right?</p>
  
Tags: <encoding><scale>
Title: Upscaling or downscaling videos
UserDisplayName: Kat
ThreadText: # Upscaling or downscaling videos
  
  (Asked by: username_0 on 2015-06-13)
  
  I was wondering, is upscaling from the videoplayer worse then upscaling the video during encode?
  
  For example, consider the original source of a video is 640 x 480. Which of the following will produce better quality on a 800 x 600 display:
  
  1. Encode video > play in full screen
  2. Resize video to 800 x 600 > encode > play in full screen
  
  ?
  
  My assumption is that a lower quality resizing algoritm is chosen during video playback to save cpu. Am I right?
  
  **Tags:** encoding, scale
  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_1 on 2015-06-14. Score: 1
  
  This depends on how much resources you are willing to invest into upscaling content. The default setting for libswscale in VLC seems to be bicubic, if you intend to use more sophisticated resizing filters and a particular target resolution then you should upscale the video during encode this way you also don't have to rely on the capabilities and customizing options of the player device or software.
  
  
  ---
  
  ### Answer by username_2 on 2015-06-16. Score: 1
  
  Upscaling at playback time is done by graphics hardware, not the CPU, so your assumption turns out to be false. Good software players will feed the video through high-quality hardware scaling (e.g. [mpv](http://mpv.io/)'s opengl-hq video-out). HW upscaling might still default to bilinear, though, so it's worth thinking about this.
  
  Upscaling before encode spreads the detail information over more pixels, making more work for the codec. However, there's no new information, and as long as you use a HQ upscaling algo, you aren't adding new detail. (stair-stepping / aliasing artifacts from low quality upscaling looks like detail that a codec has to spend bits to preserve, at the cost of the details you want.) I would guess that you'd get better perceptual visual quality for method 1 (encode,decode,fullscale) than 2 (hq-scale,encode,decode,fullscale). Both relative to source->fullscale, or to source->hq-fullscale. Given the same bitrate for both options, of course.
  
  However, [this post](http://forum.doom9.org/showthread.php?p=1607083#post1607083) in a doom9 discussion about upscaling or not before encoding a dvd backup indicates that this guy got better results from upscaling before encode. (At least when targetting low-qual playback upscalers.) Anamorphic = non-square pixels, in this context. e.g. a 16:9 image stored in 720x480 (square-pixel upscaling would give 853.333:480).
  
  I know I play back all the video I watch using high quality opengl upscaling, but the question is more about making it look good for people using the default video player in Windows and Mac. IDK what kind of video scaling quality you get out of the box. I hope it's pretty good these days, since AMD and NVidia have made their video pipeline a selling point of their graphics hardware. (e.g. HW image postprocessing / high quality stuff). I think Intel does ok too...
  
  I'm also not sure that HQ scaling to an intermediate resolution would even help, if the final upscaler is lower quality. Does anyone have any data on that? The question is whether the quality of the output of a bilinear upscaler gets worse or not depending on how much it has to upscale.
  
  The codec having to work harder to pull out just the information needed to recreate most of the detail could well be overshadowed by the benefit of using a good upscale to a medium rez.
  
  If you wanted to try it out, and have access to a mix of Windows and/or Mac computers with AMD/NVidia/Intel video hardware, then you could experiment just by first comparing a HQ software upscale to fullscreen with what you get from the hw video scaler. Then try a SW upscale to mid rez. Don't bother encoding, or encode to a fast lossless format for a short clip.
  
  Probably if you're expecting people will mostly play back your video on computers (rather than blu-ray & dvd players / other set-top boxes), then not upscaling is probably the way to go. Upscaling a bit to a medium rez is possibly helpful for some HW players, but that might only be when the source doesn't have square pixels.
  
  Upscaling before encoding will increase the encode time. If encoding-time is limited (i.e. you'd have to use lower settings with a higher rez), then probably don't upscale. Better quality at the same bitrate from spending more CPU time per pixel on the encode might be a bigger factor.
  
  
  ---
  
  