I don't know what your code does, so I don't know what you should do.
If you're doing your own post-processing, you're probably using decoded RAW data only. In that case, it's worth considering pixel_aspect on final rendering
If you're using LibRaw post-processing (LibRaw::dcraw_process) then LibRaw::dcraw_make_mem_image() will do all needed tricks.
I don't know what your code does, so I don't know what you should do.
If you're doing your own post-processing, you're probably using decoded RAW data only. In that case, it's worth considering pixel_aspect on final rendering
If you're using LibRaw post-processing (LibRaw::dcraw_process) then LibRaw::dcraw_make_mem_image() will do all needed tricks.