libhevc-mirror/decoder
Harish Mahendrakar 1fac8cc5fe Updates to odd dimension support.
Reverted some of the unnecessary changes from commit: f6ef16b0f9

- Restored the format conversion structure prior to f6ef16b0f9
- No need to handle odd stride for 420 and 422 output.
- Dimensions for output format 444 and 400 format can be odd

Tested with few YUV444 and YUV400 odd dimension clips

To generate:
$ ffmpeg -f lavfi -i testsrc=s=511x511 -c:v libx265 -pix_fmt yuv444p -t 1 -tag:v hvc1 y444_511x511.hevc
$ ffmpeg -f lavfi -i testsrc=s=511x511 -c:v libx265 -pix_fmt gray -t 1 -tag:v hvc1 y400_511x511.hevc

To decode using hevcdec for YUV420 output format
$ hevcdec -i y444_511x511.hevc -o y444_511x511.yuv --save_output 1 --num_frames -1 --chroma_format YUV_420P --enable_yuv_format 31
$ hevcdec -i y400_511x511.hevc -o y400_511x511.yuv --save_output 1 --num_frames -1 --chroma_format YUV_420P --enable_yuv_format 31

To decode using hevcdec for YUV444 output format
$ hevcdec -i y444_511x511.hevc -o y444_511x511.yuv --save_output 1 --num_frames -1 --chroma_format YUV_444P --enable_yuv_format 31

To decode using hevcdec for YUV400 output format
$ hevcdec -i y400_511x511.hevc -o y400_511x511.yuv --save_output 1 --num_frames -1 --chroma_format GRAY --enable_yuv_format 31

Display resulting output using ffplay by passing `-f rawvideo -pixel_format yuv420p -video_size 511x511`
Change pixel_format to yuv420p/yuv444p/gray based on decoder chroma_format argument
2026-06-05 11:42:40 -07:00
..
arm libhevcdec: Unify ihevcd_function_selector_generic.c and ihevcd_function_selector_noneon.c 2026-05-07 07:00:35 -07:00
arm64 libhevc: added BTI and PAC support in libhevc 2026-04-02 08:34:07 -07:00
riscv64 libhevcdec: Unify ihevcd_function_selector_generic.c and ihevcd_function_selector_noneon.c 2026-05-07 07:00:35 -07:00
x86 libhevcdec: Unify ihevcd_function_selector_generic.c and ihevcd_function_selector_noneon.c 2026-05-07 07:00:35 -07:00
ihevcd_api.c Updates to odd dimension support. 2026-06-05 11:42:40 -07:00
ihevcd_bitstream.c Decoder: Fix integer-overflow sanitizer issues 2019-01-09 13:16:37 -08:00
ihevcd_bitstream.h Initial Version of HEVC decoder 2014-05-21 18:14:55 -07:00
ihevcd_boundary_strength.c Few bug fixes in loop filter 2015-07-31 01:59:55 +00:00
ihevcd_boundary_strength.h Initial Version of HEVC decoder 2014-05-21 18:14:55 -07:00
ihevcd_cabac.c hevcdec: add support for persistent rice adaptation flag 2026-03-16 10:03:26 -07:00
ihevcd_cabac.h hevcdec: add support for persistent rice adaptation flag 2026-03-16 10:03:26 -07:00
ihevcd_common_tables.c hevcdec: update lib for chroma format idc 422 2026-03-04 15:39:55 -08:00
ihevcd_common_tables.h hevcdec: update lib for chroma format idc 422 2026-03-04 15:39:55 -08:00
ihevcd_cxa.h libhevcdec: Add support for monochrome 2025-11-11 07:11:03 -08:00
ihevcd_deblk.c libhevcdec: update chroma deblocking masks and BS shifts for YUV422/YUV444 2026-06-03 09:40:02 -07:00
ihevcd_deblk.h Initial Version of HEVC decoder 2014-05-21 18:14:55 -07:00
ihevcd_debug.h Initial Version of HEVC decoder 2014-05-21 18:14:55 -07:00
ihevcd_decode.c Updates to odd dimension support. 2026-06-05 11:42:40 -07:00
ihevcd_decode.h Initial Version of HEVC decoder 2014-05-21 18:14:55 -07:00
ihevcd_defs.h refactor: clean up SAO and ILF padding code 2026-05-24 10:11:19 -07:00
ihevcd_error.h hevcdec: fix incorrect error checks added in sps/pps parsing 2026-02-20 11:12:39 -08:00
ihevcd_fmt_conv.c Updates to odd dimension support. 2026-06-05 11:42:40 -07:00
ihevcd_fmt_conv.h libhevcdec: Remove support for YUV422 ile, RGB565 and RGBA8888 output formats 2026-02-14 12:54:18 -08:00
ihevcd_func_types.h Initial Version of HEVC decoder 2014-05-21 18:14:55 -07:00
ihevcd_function_selector.h libhevcdec: Update deblock modules for yuv422 format 2026-05-21 08:22:42 -07:00
ihevcd_function_selector_generic.c libhevcdec: Update deblock modules for yuv422 format 2026-05-21 08:22:42 -07:00
ihevcd_get_mv.c Decoder: Fix integer-overflow sanitizer issues 2019-01-09 13:16:37 -08:00
ihevcd_get_mv.h Initial Version of HEVC decoder 2014-05-21 18:14:55 -07:00
ihevcd_ilf_padding.h Initial Version of HEVC decoder 2014-05-21 18:14:55 -07:00
ihevcd_inter_pred.c libhevcdec: Add inter pred support for yuv422 format 2026-05-06 10:30:26 -07:00
ihevcd_inter_pred.h Initial Version of HEVC decoder 2014-05-21 18:14:55 -07:00
ihevcd_intra_pred_mode_prediction.c Initial Version of HEVC decoder 2014-05-21 18:14:55 -07:00
ihevcd_intra_pred_mode_prediction.h Initial Version of HEVC decoder 2014-05-21 18:14:55 -07:00
ihevcd_iquant_itrans_recon_ctb.c libhevcdec: Add inter pred support for yuv422 format 2026-05-06 10:30:26 -07:00
ihevcd_iquant_itrans_recon_ctb.h Initial Version of HEVC decoder 2014-05-21 18:14:55 -07:00
ihevcd_itrans_recon_dc.c Initial Version of HEVC decoder 2014-05-21 18:14:55 -07:00
ihevcd_itrans_recon_dc.h Initial Version of HEVC decoder 2014-05-21 18:14:55 -07:00
ihevcd_ittiam_logo.h libhevcdec: Remove support for YUV422 ile, RGB565 and RGBA8888 output formats 2026-02-14 12:54:18 -08:00
ihevcd_job_queue.c Source files clean up 2014-07-12 15:09:24 -07:00
ihevcd_job_queue.h Source files clean up 2014-07-12 15:09:24 -07:00
ihevcd_mv_merge.c Reduced memory requirements 2015-10-09 11:44:26 -07:00
ihevcd_mv_merge.h Initial Version of HEVC decoder 2014-05-21 18:14:55 -07:00
ihevcd_mv_pred.c Source files clean up 2014-07-12 15:09:24 -07:00
ihevcd_mv_pred.h Initial Version of HEVC decoder 2014-05-21 18:14:55 -07:00
ihevcd_nal.c libhevc: move SEI related code under a macro 2024-05-07 10:07:49 -07:00
ihevcd_nal.h Initial Version of HEVC decoder 2014-05-21 18:14:55 -07:00
ihevcd_parse_headers.c Revert "libhevcdec: allow YUV422 format for decoding" 2026-05-27 07:59:18 -07:00
ihevcd_parse_headers.h libhevc: move SEI related code under a macro 2024-05-07 10:07:49 -07:00
ihevcd_parse_residual.c hevcdec: add support for persistent rice adaptation flag 2026-03-16 10:03:26 -07:00
ihevcd_parse_residual.h Initial Version of HEVC decoder 2014-05-21 18:14:55 -07:00
ihevcd_parse_slice.c refactor: clean up SAO and ILF padding code 2026-05-24 10:11:19 -07:00
ihevcd_parse_slice.h Initial Version of HEVC decoder 2014-05-21 18:14:55 -07:00
ihevcd_parse_slice_header.c libhevcdec: Add support for monochrome 2025-11-11 07:11:03 -08:00
ihevcd_parse_slice_header.h Initial Version of HEVC decoder 2014-05-21 18:14:55 -07:00
ihevcd_process_slice.c refactor: clean up SAO and ILF padding code 2026-05-24 10:11:19 -07:00
ihevcd_process_slice.h Initial Version of HEVC decoder 2014-05-21 18:14:55 -07:00
ihevcd_profile.h Source files clean up 2014-07-12 15:09:24 -07:00
ihevcd_ref_list.c Decoder: Fix integer-overflow sanitizer issues 2019-01-09 13:16:37 -08:00
ihevcd_ref_list.h Initial Version of HEVC decoder 2014-05-21 18:14:55 -07:00
ihevcd_sao.c refactor: clean up SAO and ILF padding code 2026-05-24 10:11:19 -07:00
ihevcd_sao.h refactor: clean up SAO and ILF padding code 2026-05-24 10:11:19 -07:00
ihevcd_statistics.h Initial Version of HEVC decoder 2014-05-21 18:14:55 -07:00
ihevcd_structs.h hevcdec: add support for persistent rice adaptation flag 2026-03-16 10:03:26 -07:00
ihevcd_trace.h Initial Version of HEVC decoder 2014-05-21 18:14:55 -07:00
ihevcd_utils.c Updates to odd dimension support. 2026-06-05 11:42:40 -07:00
ihevcd_utils.h libhevcdec: disable simd optimizations during 422/444 decoding. 2026-05-07 07:00:35 -07:00
ihevcd_version.c Stop using __DATE__/__TIME__ on all builds 2019-08-27 19:45:01 -07:00
libhevcdec.cmake refactor: clean up SAO and ILF padding code 2026-05-24 10:11:19 -07:00