Message ID | 6c53e23f3062492e477061303bd0ce35c46556ed.1584374867.git.porschegt23@foxmail.com |
---|---|
State | New |
Headers | show |
Series | [FFmpeg-devel,v2] Encapsulation macro to get width and height of macroblock | expand |
Context | Check | Description |
---|---|---|
andriy/ffmpeg-patchwork | warning | Failed to apply patch |
Am Mo., 16. März 2020 um 17:21 Uhr schrieb numberwolf <porschegt23@foxmail.com>: > > modify: using the IS_* macros > most of mb's checked oper are defined in mpegutils' marcos, so mb's checked oper about width/height should be put it together with others > > Signed-off-by: numberwolf <porschegt23@foxmail.com> > --- > libavcodec/mpegutils.h | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/libavcodec/mpegutils.h b/libavcodec/mpegutils.h > index ed59716..bcf604f 100644 > --- a/libavcodec/mpegutils.h > +++ b/libavcodec/mpegutils.h > @@ -95,8 +95,8 @@ > #define IS_QUANT(a) ((a) & MB_TYPE_QUANT) > #define IS_DIR(a, part, list) ((a) & (MB_TYPE_P0L0 << ((part) + 2 * (list)))) > > -#define MB_SIZE_WIDTH(a) (((a) & MB_TYPE_8x8) || ((a) & MB_TYPE_8x16)) ? 8 : 16 > -#define MB_SIZE_HEIGHT(a) (((a) & MB_TYPE_8x8) || ((a) & MB_TYPE_16x8)) ? 8 : 16 > +#define MB_SIZE_WIDTH(a) (IS_8X8(a) || IS_8X16(a)) ? 8 : 16 > +#define MB_SIZE_HEIGHT(a) (IS_8X8(a) || IS_16X8(a)) ? 8 : 16 I don't maintain this file but this looks like an improvement to me. Carl Eugen
diff --git a/libavcodec/mpegutils.h b/libavcodec/mpegutils.h index ed59716..bcf604f 100644 --- a/libavcodec/mpegutils.h +++ b/libavcodec/mpegutils.h @@ -95,8 +95,8 @@ #define IS_QUANT(a) ((a) & MB_TYPE_QUANT) #define IS_DIR(a, part, list) ((a) & (MB_TYPE_P0L0 << ((part) + 2 * (list)))) -#define MB_SIZE_WIDTH(a) (((a) & MB_TYPE_8x8) || ((a) & MB_TYPE_8x16)) ? 8 : 16 -#define MB_SIZE_HEIGHT(a) (((a) & MB_TYPE_8x8) || ((a) & MB_TYPE_16x8)) ? 8 : 16 +#define MB_SIZE_WIDTH(a) (IS_8X8(a) || IS_8X16(a)) ? 8 : 16 +#define MB_SIZE_HEIGHT(a) (IS_8X8(a) || IS_16X8(a)) ? 8 : 16 // does this mb use listX, note does not work if subMBs #define USES_LIST(a, list) ((a) & ((MB_TYPE_P0L0 | MB_TYPE_P1L0) << (2 * (list))))
modify: using the IS_* macros most of mb's checked oper are defined in mpegutils' marcos, so mb's checked oper about width/height should be put it together with others Signed-off-by: numberwolf <porschegt23@foxmail.com> --- libavcodec/mpegutils.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)