mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-12-15 19:40:07 +01:00
lowres2 support.
The new lowres support is limited to decoders where lowres decoding is possible in high quality. I was not able to measure any speed difference, but if one is found the 2-3 lines that might affect speed can be made compile time conditional Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
@@ -149,8 +149,8 @@ unsigned avcodec_get_edge_width(void)
|
||||
void avcodec_set_dimensions(AVCodecContext *s, int width, int height){
|
||||
s->coded_width = width;
|
||||
s->coded_height= height;
|
||||
s->width = width;
|
||||
s->height = height;
|
||||
s->width = -((-width )>>s->lowres);
|
||||
s->height= -((-height)>>s->lowres);
|
||||
}
|
||||
|
||||
#define INTERNAL_BUFFER_SIZE (32+1)
|
||||
@@ -239,8 +239,9 @@ void avcodec_align_dimensions2(AVCodecContext *s, int *width, int *height,
|
||||
|
||||
*width = FFALIGN(*width , w_align);
|
||||
*height= FFALIGN(*height, h_align);
|
||||
if (s->codec_id == CODEC_ID_H264)
|
||||
if(s->codec_id == CODEC_ID_H264 || s->lowres)
|
||||
*height+=2; // some of the optimized chroma MC reads one line too much
|
||||
// which is also done in mpeg decoders with lowres > 0
|
||||
|
||||
for (i = 0; i < 4; i++)
|
||||
linesize_align[i] = STRIDE_ALIGN;
|
||||
|
||||
Reference in New Issue
Block a user